Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/velero/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v2
appVersion: 1.16.2
appVersion: 1.17.0
kubeVersion: ">=1.16.0-0"
description: A Helm chart for velero
name: velero
version: 10.1.3
version: 11.0.0
home: https://github.com/vmware-tanzu/velero
icon: https://cdn-images-1.medium.com/max/1600/1*-9mb3AKnKdcL_QD3CMnthQ.png
sources:
Expand Down
3 changes: 1 addition & 2 deletions charts/velero/crds/backuprepositories.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ spec:
resticIdentifier:
description: |-
ResticIdentifier is the full restic-compatible string for identifying
this repository.
this repository. This field is only used when RepositoryType is "restic".
type: string
volumeNamespace:
description: |-
Expand All @@ -83,7 +83,6 @@ spec:
required:
- backupStorageLocation
- maintenanceFrequency
- resticIdentifier
- volumeNamespace
type: object
status:
Expand Down
4 changes: 4 additions & 0 deletions charts/velero/crds/backups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,10 @@ spec:
uploads to perform when using the uploader.
type: integer
type: object
volumeGroupSnapshotLabelKey:
description: VolumeGroupSnapshotLabelKey specifies the label key
to group PVCs under a VGS.
type: string
volumeSnapshotLocations:
description: VolumeSnapshotLocations is a list containing names
of VolumeSnapshotLocations associated with this backup.
Expand Down
3 changes: 3 additions & 0 deletions charts/velero/crds/datauploads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ spec:
of the CSI snapshot.
nullable: true
properties:
driver:
description: Driver is the driver used by the VolumeSnapshotContent
type: string
snapshotClass:
description: SnapshotClass is the name of the snapshot class
that the volume snapshot is created with
Expand Down
59 changes: 39 additions & 20 deletions charts/velero/crds/podvolumebackups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,41 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: Pod Volume Backup status such as New/InProgress
- description: PodVolumeBackup status such as New/InProgress
jsonPath: .status.phase
name: Status
type: string
- description: Time when this backup was started
- description: Time duration since this PodVolumeBackup was started
jsonPath: .status.startTimestamp
name: Created
name: Started
type: date
- description: Namespace of the pod containing the volume to be backed up
jsonPath: .spec.pod.namespace
name: Namespace
type: string
- description: Name of the pod containing the volume to be backed up
jsonPath: .spec.pod.name
name: Pod
type: string
- description: Name of the volume to be backed up
jsonPath: .spec.volume
name: Volume
type: string
- description: The type of the uploader to handle data transfer
jsonPath: .spec.uploaderType
name: Uploader Type
type: string
- description: Completed bytes
format: int64
jsonPath: .status.progress.bytesDone
name: Bytes Done
type: integer
- description: Total bytes
format: int64
jsonPath: .status.progress.totalBytes
name: Total Bytes
type: integer
- description: Name of the Backup Storage Location where this backup should
be stored
jsonPath: .spec.backupStorageLocation
name: Storage Location
type: string
- jsonPath: .metadata.creationTimestamp
- description: Time duration since this PodVolumeBackup was created
jsonPath: .metadata.creationTimestamp
name: Age
type: date
- description: Name of the node where the PodVolumeBackup is processed
jsonPath: .status.node
name: Node
type: string
- description: The type of the uploader to handle data transfer
jsonPath: .spec.uploaderType
name: Uploader
type: string
name: v1
schema:
openAPIV3Schema:
Expand Down Expand Up @@ -78,6 +81,11 @@ spec:
BackupStorageLocation is the name of the backup storage location
where the backup repository is stored.
type: string
cancel:
description: |-
Cancel indicates request to cancel the ongoing PodVolumeBackup. It can be set
when the PodVolumeBackup is in InProgress phase
type: boolean
node:
description: Node is the name of the node that the Pod is running
on.
Expand Down Expand Up @@ -167,6 +175,13 @@ spec:
status:
description: PodVolumeBackupStatus is the current status of a PodVolumeBackup.
properties:
acceptedTimestamp:
description: |-
AcceptedTimestamp records the time the pod volume backup is to be prepared.
The server's time is used for AcceptedTimestamp
format: date-time
nullable: true
type: string
completionTimestamp:
description: |-
CompletionTimestamp records the time a backup was completed.
Expand All @@ -188,7 +203,11 @@ spec:
description: Phase is the current state of the PodVolumeBackup.
enum:
- New
- Accepted
- Prepared
- InProgress
- Canceling
- Canceled
- Completed
- Failed
type: string
Expand Down
70 changes: 46 additions & 24 deletions charts/velero/crds/podvolumerestores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,41 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: Namespace of the pod containing the volume to be restored
jsonPath: .spec.pod.namespace
name: Namespace
type: string
- description: Name of the pod containing the volume to be restored
jsonPath: .spec.pod.name
name: Pod
type: string
- description: The type of the uploader to handle data transfer
jsonPath: .spec.uploaderType
name: Uploader Type
type: string
- description: Name of the volume to be restored
jsonPath: .spec.volume
name: Volume
type: string
- description: Pod Volume Restore status such as New/InProgress
- description: PodVolumeRestore status such as New/InProgress
jsonPath: .status.phase
name: Status
type: string
- description: Pod Volume Restore status such as New/InProgress
- description: Time duration since this PodVolumeRestore was started
jsonPath: .status.startTimestamp
name: Started
type: date
- description: Completed bytes
format: int64
jsonPath: .status.progress.totalBytes
name: TotalBytes
jsonPath: .status.progress.bytesDone
name: Bytes Done
type: integer
- description: Pod Volume Restore status such as New/InProgress
- description: Total bytes
format: int64
jsonPath: .status.progress.bytesDone
name: BytesDone
jsonPath: .status.progress.totalBytes
name: Total Bytes
type: integer
- jsonPath: .metadata.creationTimestamp
- description: Name of the Backup Storage Location where the backup data is
stored
jsonPath: .spec.backupStorageLocation
name: Storage Location
type: string
- description: Time duration since this PodVolumeRestore was created
jsonPath: .metadata.creationTimestamp
name: Age
type: date
- description: Name of the node where the PodVolumeRestore is processed
jsonPath: .status.node
name: Node
type: string
- description: The type of the uploader to handle data transfer
jsonPath: .spec.uploaderType
name: Uploader Type
type: string
name: v1
schema:
openAPIV3Schema:
Expand Down Expand Up @@ -79,6 +81,11 @@ spec:
BackupStorageLocation is the name of the backup storage location
where the backup repository is stored.
type: string
cancel:
description: |-
Cancel indicates request to cancel the ongoing PodVolumeRestore. It can be set
when the PodVolumeRestore is in InProgress phase
type: boolean
pod:
description: Pod is a reference to the pod containing the volume
to be restored.
Expand Down Expand Up @@ -164,6 +171,13 @@ spec:
status:
description: PodVolumeRestoreStatus is the current status of a PodVolumeRestore.
properties:
acceptedTimestamp:
description: |-
AcceptedTimestamp records the time the pod volume restore is to be prepared.
The server's time is used for AcceptedTimestamp
format: date-time
nullable: true
type: string
completionTimestamp:
description: |-
CompletionTimestamp records the time a restore was completed.
Expand All @@ -176,11 +190,19 @@ spec:
description: Message is a message about the pod volume restore's
status.
type: string
node:
description: Node is name of the node where the pod volume restore
is processed.
type: string
phase:
description: Phase is the current state of the PodVolumeRestore.
enum:
- New
- Accepted
- Prepared
- InProgress
- Canceling
- Canceled
- Completed
- Failed
type: string
Expand Down
4 changes: 4 additions & 0 deletions charts/velero/crds/schedules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,10 @@ spec:
parallel uploads to perform when using the uploader.
type: integer
type: object
volumeGroupSnapshotLabelKey:
description: VolumeGroupSnapshotLabelKey specifies the label
key to group PVCs under a VGS.
type: string
volumeSnapshotLocations:
description: VolumeSnapshotLocations is a list containing names
of VolumeSnapshotLocations associated with this backup.
Expand Down
16 changes: 16 additions & 0 deletions charts/velero/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,22 @@ More info on the official site: https://velero.io/docs
{{- end }}
{{- end }}

{{- if eq .Values.configuration.uploaderType "restic" }}
{{- $breaking = print $breaking "\n\nERROR: restic uploaderType was removed, please use a different one" }}
{{- end }}

{{- if hasKey .Values.configuration.repositoryMaintenanceJob "requests" }}
{{- $breaking = print $breaking "\n\nREMOVED: configuration.repositoryMaintenanceJob.requests has been removed, please use the configmap" }}
{{- end }}

{{- if hasKey .Values.configuration.repositoryMaintenanceJob "limits" }}
{{- $breaking = print $breaking "\n\nREMOVED: configuration.repositoryMaintenanceJob.limits has been removed, please use the configmap" }}
{{- end }}

{{- if hasKey .Values.configuration.repositoryMaintenanceJob "latestJobsCount" }}
{{- $breaking = print $breaking "\n\nREMOVED: configuration.repositoryMaintenanceJob.latestJobsCount has been removed, please use the configmap" }}
{{- end }}

{{- if $breaking }}
{{- fail (print $breaking_title $breaking) }}
{{- end }}
21 changes: 1 addition & 20 deletions charts/velero/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "velero.fullname" . }}
name: velero
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am thinking if there is any better way to handle this or not.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, I don't think there is. See the current node-agent ds: https://github.com/vmware-tanzu/helm-charts/blob/main/charts/velero/templates/node-agent-daemonset.yaml#L7

Also velero deployment is hardcoded through velero codebase itself:

Maintenance jobs and pod volume restores are dependent on it.

Of course if you wish I can revert this change, but if we allow creating any other deployment than velero, then we essentially allow shipping broken config. And in current iteration is not possible to have two instances of velero in the same cluster working (since either the deployment name is wrong if fullname is not velero or clusterroles overlap)

namespace: {{ .Release.Namespace }}
{{- with .Values.annotations }}
annotations:
Expand Down Expand Up @@ -183,25 +183,6 @@ spec:
{{- if and .repositoryConfigData (or .repositoryConfigData.global .repositoryConfigData.repositories) }}
- --repo-maintenance-job-configmap={{ default "velero-repo-maintenance" .repositoryConfigData.name }}
{{- else }}
{{- with .requests }}
{{- with .cpu }}
- --maintenance-job-cpu-request={{ . }}
{{- end }}
{{- with .memory }}
- --maintenance-job-mem-request={{ . }}
{{- end }}
{{- end }}
{{- with .limits }}
{{- with .cpu }}
- --maintenance-job-cpu-limit={{ . }}
{{- end }}
{{- with .memory }}
- --maintenance-job-mem-limit={{ . }}
{{- end }}
{{- end }}
{{- with .latestJobsCount }}
- --keep-latest-maintenance-jobs={{ . }}
{{- end }}
{{- end }}
{{- end }}
{{- with .extraArgs }}
Expand Down
17 changes: 5 additions & 12 deletions charts/velero/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace:
# enabling node-agent). Required.
image:
repository: velero/velero
tag: v1.16.2
tag: v1.17.0
# Digest value example: sha256:d238835e151cec91c6a811fe3a89a66d3231d9f64d09e5f3c49552672d271f38.
# If used, it will take precedence over the image.tag.
# digest:
Expand Down Expand Up @@ -130,7 +130,7 @@ dnsPolicy: ClusterFirst
# If the value is a string then it is evaluated as a template.
initContainers:
# - name: velero-plugin-for-aws
# image: velero/velero-plugin-for-aws:v1.12.2
# image: velero/velero-plugin-for-aws:v1.13.0
# imagePullPolicy: IfNotPresent
# volumeMounts:
# - mountPath: /target
Expand Down Expand Up @@ -512,14 +512,6 @@ configuration:
# Resource requests/limits to specify for the repository-maintenance job. Optional.
# https://velero.io/docs/v1.14/repository-maintenance/#resource-limitation
repositoryMaintenanceJob:
requests:
# cpu: 500m
# memory: 512Mi
limits:
# cpu: 1000m
# memory: 1024Mi
# Number of latest maintenance jobs to keep for each repository
latestJobsCount: 3
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this was set as default, shouldn't this be added as a default in the ConfigMap, as it stands in this default is simply now lost. Could be added here: https://github.com/vmware-tanzu/helm-charts/blob/main/charts/velero/values.yaml#L550

Also all these parameters could be kept in the values and simply be used to manage the global repositoryConfigData

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add the default in the configmap.

As for supporting previous requests and limits fields this would require parsing and merging logic since global is as of now rendered as-is, so I'll wait for a maintainer to have a say about this, TBH I'm not convinced if it's worth it

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's good enough for me, with that change we keep the current default behavior of the chart

# Per-repository resource settings ConfigMap
# This ConfigMap allows specifying different settings for different repositories
# See: https://velero.io/docs/main/repository-maintenance/
Expand Down Expand Up @@ -547,7 +539,8 @@ configuration:
# operator: "In"
# values: ["us-central1-a", "us-central1-b", "us-central1-c"]
# priorityClassName: "low-priority" # Note: priorityClassName is only supported in global configuration
global: {}
global:
keepLatestMaintenanceJobs: 3
# Repository-specific configurations
# Repository keys are formed as: "{namespace}-{storageLocation}-{repositoryType}"
# For example: "default-default-kopia" or "prod-s3-backup-kopia"
Expand Down Expand Up @@ -791,7 +784,7 @@ schedules: {}
# velero.io/plugin-config: ""
# velero.io/pod-volume-restore: RestoreItemAction
# data:
# image: velero/velero-restore-helper:v1.10.2
# image: velero/velero:v1.17.0
# cpuRequest: 200m
# memRequest: 128Mi
# cpuLimit: 200m
Expand Down