From faf6321500519a7dbdf68492f821a4fbc756aa92 Mon Sep 17 00:00:00 2001 From: Steve Kriss Date: Thu, 25 Apr 2019 08:56:47 -0600 Subject: [PATCH] [stable/velero] documentation and cleanup (#13209) * remove objectStorage section from volumesnapshotlocation.yaml Signed-off-by: Steve Kriss * don't specify optional server flags by default, update docs for them Signed-off-by: Steve Kriss * rearrange and document values.yaml Signed-off-by: Steve Kriss * update documentation on required parameters Signed-off-by: Steve Kriss * NOTES.txt edits Signed-off-by: Steve Kriss * update values.yaml docs for BSL/VSL config Signed-off-by: Steve Kriss * Azure docs & template fixes Signed-off-by: Steve Kriss * update docs on velero server flags Signed-off-by: Steve Kriss * bump Chart.yaml minor version Signed-off-by: Steve Kriss * fix linting errors Signed-off-by: Steve Kriss * lowercase config.volumeSnapshotLocation's apitimeout field everywhere Signed-off-by: Steve Kriss * only bump patch version Co-Authored-By: Steve Kriss Signed-off-by: Steve Kriss --- stable/velero/Chart.yaml | 2 +- stable/velero/README.md | 34 ++-- stable/velero/templates/NOTES.txt | 4 +- .../templates/volumesnapshotlocation.yaml | 4 +- stable/velero/values.yaml | 164 +++++++++++++----- 5 files changed, 141 insertions(+), 67 deletions(-) diff --git a/stable/velero/Chart.yaml b/stable/velero/Chart.yaml index 47337becac..61771d1e00 100644 --- a/stable/velero/Chart.yaml +++ b/stable/velero/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 0.11.0 description: A Helm chart for velero name: velero -version: 1.0.0 +version: 1.0.1 home: https://github.com/heptio/velero icon: https://cdn-images-1.medium.com/max/1600/1*-9mb3AKnKdcL_QD3CMnthQ.png sources: diff --git a/stable/velero/README.md b/stable/velero/README.md index 00d7eb05f4..011951ee6c 100644 --- a/stable/velero/README.md +++ b/stable/velero/README.md @@ -25,18 +25,23 @@ kubectl create secret generic cloud-credentials --namespace - Please change the values.yaml according to your setup See here for the official documentation https://heptio.github.io/velero/v0.11.0/install-overview +#### Required Parameters Parameter | Description | Default | Required --- | --- | --- | --- -`cloudprovider` | Cloud provider | `nil` | yes -`bucket` | Object storage where to store backups | `nil` | yes -`region` | AWS region | `nil` | only if using AWS -`apitimeout` | Api Timeout | `nil` | only if using Azure -`credentials` | Credentials | `nil` | Yes (not required for kube2iam) -`backupSyncPeriod` | How frequently Velero queries the object storage to make sure that the appropriate Backup resources have been created for existing backup files. | `60m` | yes -`gcSyncPeriod` | How frequently Velero queries the object storage to delete backup files that have passed their TTL. | `60m` | yes -`scheduleSyncPeriod` | How frequently Velero checks its Schedule resource objects to see if a backup needs to be initiated | `1m` | yes -`restoreOnlyMode` | When RestoreOnly mode is on, functionality for backups, schedules, and expired backup deletion is turned off. Restores are made from existing backup files in object storage. | `false` | yes +`configuration.provider` | The name of the cloud provider where you are deploying velero to (`aws`, `azure`, `gcp`) | none | yes +`configuration.backupStorageLocation.name` | The name of the cloud provider that will be used to actually store the backups (`aws`, `azure`, `gcp`) | none | yes +`configuration.backupStorageLocation.bucket` | The storage bucket where backups are to be uploaded | none | yes +`configuration.backupStorageLocation.config.region` | The cloud provider region (AWS only) | none | yes, if using AWS +`configuration.backupStorageLocation.config.resourceGroup` | The resource group containing the storage account (Azure only) | none | yes, if using Azure +`configuration.backupStorageLocation.config.storageAccount` | The storage account containing the blob container (Azure only) | none | yes, if using Azure +`configuration.volumeSnapshotLocation.name` | The name of the cloud provider the cluster is using for persistent volumes, if any | none | yes, if using PV snapshots +`configuration.volumeSnapshotLocation.config.region` | The cloud provider region (AWS only) | none | yes, if using AWS +`configuration.volumeSnapshotLocation.config.apitimeout` | The API timeout (Azure only) | none | yes, if using Azure +`credentials.useSecret` | Whether a secret should be used for IAM credentials. Set this to `false` when using `kube2iam` | `true` | yes +`credentials.existingSecret` | If specified and `useSecret` is `true`, uses an existing secret with this name instead of creating one | none | yes, if `useSecret` is `true` and `secretContents` is empty +`credentials.secretContents` | If specified and `useSecret` is `true`, contents for the credentials secret | none | yes, if `useSecret` is `true` and `existingSecret` is empty +#### All Parameters Parameter | Description | Default --- | --- | --- `image.repository` | Image repository | `gcr.io/heptio-images/velero` @@ -56,15 +61,18 @@ Parameter | Description | Default `configuration.backupStorageLocation.config.s3ForcePathStyle` | Set to `true` for a local storage service like Minio | `` `configuration.backupStorageLocation.config.s3Url` | S3 url (primarily used for local storage services like Minio) | `` `configuration.backupStorageLocation.config.kmsKeyId` | KMS key for encryption (AWS only) | `` +`configuration.backupStorageLocation.config.resourceGroup` | The resource group containing the storage account (Azure only) | `` +`configuration.backupStorageLocation.config.storageAccount` | The storage account containing the blob container (Azure only) | `` `configuration.backupStorageLocation.prefix` | The directory inside a storage bucket where backups are to be uploaded | `` -`configuration.backupSyncPeriod` | How frequently Velero queries the object storage to make sure that the appropriate Backup resources have been created for existing backup files | `60m` +`configuration.backupSyncPeriod` | How frequently Velero queries the object storage to make sure that the appropriate Backup resources have been created for existing backup files | (uses `velero server` default) `configuration.extraEnvVars` | Key/values for extra environment variables such as AWS_CLUSTER_NAME, etc | `{}` `configuration.provider` | The name of the cloud provider where you are deploying velero to (`aws`, `azure`, `gcp`) | -`configuration.restoreResourcePriorities` | An ordered list that describes the order in which Kubernetes resource objects should be restored | `namespaces,persistentvolumes,persistentvolumeclaims,secrets,configmaps,serviceaccounts,limitranges,pods` -`configuration.restoreOnlyMode` | When RestoreOnly mode is on, functionality for backups, schedules, and expired backup deletion is turned off. Restores are made from existing backup files in object storage | `false` +`configuration.restoreResourcePriorities` | An ordered list that describes the order in which Kubernetes resource objects should be restored | (uses `velero server` default) +`configuration.resticTimeout` | How long backups/restores of pod volumes should be allowed to run before timing out. | (uses `velero server` default) +`configuration.restoreOnlyMode` | When RestoreOnly mode is on, functionality for backups, schedules, and expired backup deletion is turned off. Restores are made from existing backup files in object storage | (uses `velero server` default) `configuration.volumeSnapshotLocation.name` | The name of the cloud provider the cluster is using for persistent volumes, if any | `{}` `configuration.volumeSnapshotLocation.config.region` | The cloud provider region (AWS only) | `` -`configuration.volumeSnapshotLocation.config.apiTimeout` | The API timeout (`azure` only) | +`configuration.volumeSnapshotLocation.config.apitimeout` | The API timeout (`azure` only) | `credentials.existingSecret` | If specified and `useSecret` is `true`, uses an existing secret with this name instead of creating one | `` `credentials.useSecret` | Whether a secret should be used. Set this to `false` when using `kube2iam` | `true` `credentials.secretContents` | Contents for the credentials secret | `{}` diff --git a/stable/velero/templates/NOTES.txt b/stable/velero/templates/NOTES.txt index 4ae5f88bd3..f9b3d06977 100644 --- a/stable/velero/templates/NOTES.txt +++ b/stable/velero/templates/NOTES.txt @@ -1,13 +1,11 @@ Check that the velero is up and running: - kubectl get deployment/{{ .Release.Name }} -n {{ .Release.Namespace }} + kubectl get deployment/{{ include "velero.fullname" . }} -n {{ .Release.Namespace }} Check that the secret has been created: kubectl get secret/{{ include "velero.fullname" . }} -n {{ .Release.Namespace }} -Check that the secret has been created: - Once velero server is up and running you need the client before you can use it 1. wget https://github.com/heptio/velero/releases/download/{{ .Values.image.tag }}/velero-{{ .Values.image.tag }}-darwin-amd64.tar.gz 2. tar -xvf velero-{{ .Values.image.tag }}-darwin-amd64.tar.gz -C velero-client diff --git a/stable/velero/templates/volumesnapshotlocation.yaml b/stable/velero/templates/volumesnapshotlocation.yaml index d6b78e1722..2c55a95c56 100644 --- a/stable/velero/templates/volumesnapshotlocation.yaml +++ b/stable/velero/templates/volumesnapshotlocation.yaml @@ -10,9 +10,7 @@ metadata: spec: {{- with .Values.configuration }} {{- with .volumeSnapshotLocation }} - provider: {{ .name }} - objectStorage: - bucket: {{ .bucket }} + provider: {{ .name }} {{ with .config }} config: {{- with .region }} diff --git a/stable/velero/values.yaml b/stable/velero/values.yaml index e24a82f182..df738b1eae 100644 --- a/stable/velero/values.yaml +++ b/stable/velero/values.yaml @@ -1,21 +1,25 @@ +## +## Configuration settings that directly affect the Velero deployment YAML. +## + +# Details of the container image to use in the Velero deployment & daemonset (if +# enabling restic). Required. image: repository: gcr.io/heptio-images/velero tag: v0.11.0 pullPolicy: IfNotPresent -# Only kube2iam/kiam: change the AWS_ACCOUNT_ID and VELERO_ROLE_NAME -podAnnotations: {} +# Annotations to add to the Velero deployment's pod template. Optional. +# +# If using kube2iam or kiam, use the following annotation with your AWS_ACCOUNT_ID +# and VELERO_ROLE_NAME filled in: # iam.amazonaws.com/role: arn:aws:iam:::role/ -# prometheus.io/scrape: "true" -# prometheus.io/port: "8085" -# prometheus.io/path: "/metrics" - -rbac: - create: true +podAnnotations: {} +# Resource requests/limits to specify for the Velero deployment. Optional. resources: {} -# this is the k8s spec block for initContainers: +# Init containers to add to the Velero deployment's pod spec. Optional. initContainers: [] # - name: # image: @@ -23,31 +27,52 @@ initContainers: [] # - name: plugins # mountPath: /target - -serviceAccount: - server: - create: true - name: - +# Tolerations to use for the Velero deployment. Optional. tolerations: [] +# Node selector to use for the Velero deployment. Optional. nodeSelector: {} -## Parameters for the ' default' Config resource -## See https://heptio.github.io/velero/v0.11.0/config-definition +# Settings for Velero's prometheus metrics. Disabled by default. +metrics: + enabled: false + scrapeInterval: 30s + + # Pod annotations for Prometheus + podAnnotations: + prometheus.io/scrape: "true" + prometheus.io/port: "8085" + prometheus.io/path: "/metrics" + + serviceMonitor: + enabled: false + additionalLabels: {} + +## +## End of deployment-related settings. +## + + +## +## Parameters for the `default` BackupStorageLocation and VolumeSnapshotLocation, +## and additional server settings. +## configuration: + # Cloud provider being used (e.g. aws, azure, gcp). provider: - volumeSnapshotLocation: {} - # name: - # config: - # region: - # apiTimeout: - + # Parameters for the `default` BackupStorageLocation. See + # https://heptio.github.io/velero/v0.11.0/api-types/backupstoragelocation.html backupStorageLocation: + # Cloud provider where backups should be stored. Usually should + # match `configuration.provider`. Required. name: + # Bucket to store backups in. Required. bucket: - # prefix: + # Prefix within bucket under which to store backups. Optional. + prefix: + # Additional provider-specific configuration. See link above + # for details of required/optional fields for your provider. config: {} # region: # s3ForcePathStyle: @@ -57,13 +82,74 @@ configuration: # storageAccount: # publicUrl: - backupSyncPeriod: 60m - resticTimeout: 1h - restoreResourcePriorities: namespaces,persistentvolumes,persistentvolumeclaims,secrets,configmaps,serviceaccounts,limitranges,pods - restoreOnlyMode: false + # Parameters for the `default` VolumeSnapshotLocation. See + # https://heptio.github.io/velero/v0.11.0/api-types/volumesnapshotlocation.html + volumeSnapshotLocation: + # Cloud provider where volume snapshots are being taken. Usually + # should match `configuration.provider`. Required., + name: + # Additional provider-specific configuration. See link above + # for details of required/optional fields for your provider. + config: {} + # region: + # apitimeout: + + # These are server-level settings passed as CLI flags to the `velero server` command. Velero + # uses default values if they're not passed in, so they only need to be explicitly specified + # here if using a non-default value. The `velero server` default values are shown in the + # comments below. + # -------------------- + # `velero server` default: 1m + backupSyncPeriod: + # `velero server` default: 1h + resticTimeout: + # `velero server` default: namespaces,persistentvolumes,persistentvolumeclaims,secrets,configmaps,serviceaccounts,limitranges,pods + restoreResourcePriorities: + # `velero server` default: false + restoreOnlyMode: + # additional key/value pairs to be used as environment variables such as "AWS_CLUSTER_NAME: 'yourcluster.domain.tld'" extraEnvVars: {} +## +## End of backup/snapshot location settings. +## + + +## +## Settings for additional Velero resources. +## + +# Whether to create the Velero cluster role binding. +rbac: + create: true + +# Information about the Kubernetes service account Velero uses. +serviceAccount: + server: + create: true + name: + +# Info about the secret to be used by the Velero deployment, which +# should contain credentials for the cloud provider IAM account you've +# set up for Velero. +credentials: + # Whether a secret should be used as the source of IAM account + # credentials. Set to false if, for example, using kube2iam or + # kiam to provide IAM credentials for the Velero pod. + useSecret: true + # Name of a pre-existing secret (if any) in the Velero namespace + # that should be used to get IAM account credentials. Optional. + existingSecret: + # Data to be stored in the Velero secret, if `useSecret` is + # true and `existingSecret` is empty. This should be the contents + # of your IAM credentials file. + secretContents: {} + +# Whether to deploy the restic daemonset. +deployRestic: false + +# Backup schedules to create. # Eg: # schedules: # mybackup: @@ -74,22 +160,6 @@ configuration: # - foo schedules: {} -credentials: - existingSecret: - useSecret: true - secretContents: {} - -deployRestic: false - -metrics: - enabled: false - scrapeInterval: 30s - - # Pod annotations for Prometheus - podAnnotations: - prometheus.io/scrape: "true" - prometheus.io/port: "8085" - - serviceMonitor: - enabled: false - additionalLabels: {} +## +## End of additional Velero resource settings. +##