From 9cd2862c8e588b795f2570d62f0245c925c01579 Mon Sep 17 00:00:00 2001 From: Nolan Brubaker Date: Tue, 16 Apr 2019 11:24:47 -0400 Subject: [PATCH] Document install command for GCP, AWS, and Azure Signed-off-by: Nolan Brubaker --- docs/aws-config.md | 84 ++++++++----------- docs/azure-config.md | 67 +++++++-------- docs/gcp-config.md | 57 +++++-------- docs/install-overview.md | 18 +++- docs/namespace.md | 63 ++------------ docs/restic.md | 47 ++++------- examples/aws/05-backupstoragelocation.yaml | 26 ------ examples/aws/06-volumesnapshotlocation.yaml | 24 ------ examples/aws/10-deployment-kube2iam.yaml | 50 ----------- examples/aws/10-deployment.yaml | 64 -------------- examples/aws/20-restic-daemonset.yaml | 69 --------------- examples/azure/00-deployment.yaml | 63 -------------- examples/azure/05-backupstoragelocation.yaml | 27 ------ examples/azure/06-volumesnapshotlocation.yaml | 24 ------ examples/azure/20-restic-daemonset.yaml | 65 -------------- examples/gcp/05-backupstoragelocation.yaml | 24 ------ examples/gcp/06-volumesnapshotlocation.yaml | 23 ----- examples/gcp/10-deployment.yaml | 65 -------------- examples/gcp/20-restic-daemonset.yaml | 69 --------------- 19 files changed, 123 insertions(+), 806 deletions(-) delete mode 100644 examples/aws/05-backupstoragelocation.yaml delete mode 100644 examples/aws/06-volumesnapshotlocation.yaml delete mode 100644 examples/aws/10-deployment-kube2iam.yaml delete mode 100644 examples/aws/10-deployment.yaml delete mode 100644 examples/aws/20-restic-daemonset.yaml delete mode 100644 examples/azure/00-deployment.yaml delete mode 100644 examples/azure/05-backupstoragelocation.yaml delete mode 100644 examples/azure/06-volumesnapshotlocation.yaml delete mode 100644 examples/azure/20-restic-daemonset.yaml delete mode 100644 examples/gcp/05-backupstoragelocation.yaml delete mode 100644 examples/gcp/06-volumesnapshotlocation.yaml delete mode 100644 examples/gcp/10-deployment.yaml delete mode 100644 examples/gcp/20-restic-daemonset.yaml diff --git a/docs/aws-config.md b/docs/aws-config.md index bcb74a64a..5e2b3fbb2 100644 --- a/docs/aws-config.md +++ b/docs/aws-config.md @@ -5,14 +5,17 @@ To set up Velero on AWS, you: * Download an official release of Velero * Create your S3 bucket * Create an AWS IAM user for Velero -* Configure the server -* Create a Secret for your credentials +* Install the server If you do not have the `aws` CLI locally installed, follow the [user guide][5] to set it up. ## Download Velero -1. Download the [latest release's](https://github.com/heptio/velero/releases) tarball for your client platform. +1. Download the [latest official release's](https://github.com/heptio/velero/releases) tarball for your client platform. + + _We strongly recommend that you use an [official release](https://github.com/heptio/velero/releases) of +Velero. The tarballs for each release contain the `velero` command-line client. The code in the master branch +of the Velero repository is under active development and is not guaranteed to be stable!_ 1. Extract the tarball: ```bash @@ -22,25 +25,23 @@ If you do not have the `aws` CLI locally installed, follow the [user guide][5] t 1. Move the `velero` binary from the Velero directory to somewhere in your PATH. -_We strongly recommend that you use an [official release](https://github.com/heptio/velero/releases) of Velero. The tarballs for each release contain the -`velero` command-line client **and** version-specific sample YAML files for deploying Velero to your cluster. The code and sample YAML files in the master -branch of the Velero repository are under active development and are not guaranteed to be stable. Use them at your own risk!_ - ## Create S3 bucket Velero requires an object storage bucket to store backups in, preferrably unique to a single Kubernetes cluster (see the [FAQ][20] for more details). Create an S3 bucket, replacing placeholders appropriately: ```bash +BUCKET= +REGION= aws s3api create-bucket \ - --bucket \ - --region \ - --create-bucket-configuration LocationConstraint= + --bucket $BUCKET \ + --region $REGION \ + --create-bucket-configuration LocationConstraint=$REGION ``` NOTE: us-east-1 does not support a `LocationConstraint`. If your region is `us-east-1`, omit the bucket configuration: ```bash aws s3api create-bucket \ - --bucket \ + --bucket $BUCKET \ --region us-east-1 ``` @@ -59,7 +60,6 @@ For more information, see [the AWS documentation on IAM users][14]. 2. Attach policies to give `velero` the necessary permissions: ```bash - BUCKET= cat > velero-policy.json < \ - --from-file cloud=credentials-velero -``` +For more complex installation needs, use either the Helm chart, or add `--dry-run -o yaml` options for generating the YAML representation for the installation. -Specify the following values in the example files: -* In `config/aws/05-backupstoragelocation.yaml`: +## Setting AWS_CLUSTER_NAME (Optional) - * Replace `` and `` (for S3 backup storage, region is optional and will be queried from the AWS S3 API if not provided). See the [BackupStorageLocation definition][21] for details. +* If you have multiple clusters and you want to support migration of resources between them, you can use `kubectl edit deploy/velero -n velero` to edit your deployment: -* In `config/aws/06-volumesnapshotlocation.yaml`: - - * Replace ``. See the [VolumeSnapshotLocation definition][6] for details. - -* (Optional, use only to specify multiple volume snapshot locations) In `config/aws/10-deployment.yaml` (or `config/aws/10-deployment-kube2iam.yaml`, as appropriate): - - * Uncomment the `--default-volume-snapshot-locations` and replace provider locations with the values for your environment. - -* (Optional) If you run the nginx example, in file `config/nginx-app/with-pv.yaml`: - - * Replace `` with `gp2`. This is AWS's default `StorageClass` name. - -* (Optional) If you have multiple clusters and you want to support migration of resources between them, in file `config/aws/10-deployment.yaml`: - - * Uncomment the environment variable `AWS_CLUSTER_NAME` and replace `` with the current cluster's name. When restoring backup, it will make Velero (and cluster it's running on) claim ownership of AWS volumes created from snapshots taken on different cluster. + * Add the environment variable `AWS_CLUSTER_NAME` under `spec.template.spec.env`, with the current cluster's name. When restoring backup, it will make Velero (and cluster it's running on) claim ownership of AWS volumes created from snapshots taken on different cluster. The best way to get the current cluster's name is to either check it with used deployment tool or to read it directly from the EC2 instances tags. The following listing shows how to get the cluster's nodes EC2 Tags. First, get the nodes external IDs (EC2 IDs): @@ -197,16 +185,6 @@ Specify the following values in the example files: aws ec2 describe-tags --filters "Name=resource-id,Values=" "Name=key,Values=KubernetesCluster" ``` -## Start the server - -In the root of your Velero directory, run: - - ```bash - kubectl apply -f config/aws/05-backupstoragelocation.yaml - kubectl apply -f config/aws/06-volumesnapshotlocation.yaml - kubectl apply -f config/aws/10-deployment.yaml - ``` - ## ALTERNATIVE: Setup permissions using kube2iam [Kube2iam](https://github.com/jtblin/kube2iam) is a Kubernetes application that allows managing AWS IAM permissions for pod via annotations rather than operating on API keys. @@ -298,7 +276,7 @@ It can be set up for Velero by creating a role that will have required permissio --policy-name velero-policy \ --policy-document file://./velero-policy.json ``` -4. Update `AWS_ACCOUNT_ID` & `VELERO_ROLE_NAME` in the file `config/aws/10-deployment-kube2iam.yaml`: +4. Update `AWS_ACCOUNT_ID` & `VELERO_ROLE_NAME` with `kubectl edit deploy/velero -n velero` and add the following annotation: ``` --- @@ -318,7 +296,11 @@ It can be set up for Velero by creating a role that will have required permissio ... ``` -5. Run Velero deployment using the file `config/aws/10-deployment-kube2iam.yaml`. +## Installing the nginx example (optional) + +If you run the nginx example, in file `config/nginx-app/with-pv.yaml`: + + * Replace `` with `gp2`. This is AWS's default `StorageClass` name. [0]: namespace.md [5]: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html diff --git a/docs/azure-config.md b/docs/azure-config.md index 38c2edbf6..a5568d046 100644 --- a/docs/azure-config.md +++ b/docs/azure-config.md @@ -5,8 +5,7 @@ To configure Velero on Azure, you: * Download an official release of Velero * Create your Azure storage account and blob container * Create Azure service principal for Velero -* Configure the server -* Create a Secret for your credentials +* Install the server If you do not have the `az` Azure CLI 2.0 installed locally, follow the [install guide][18] to set it up. @@ -23,7 +22,11 @@ consider using Premium Managed Disks, which are SSD backed. ## Download Velero -1. Download the [latest release's](https://github.com/heptio/velero/releases) tarball for your client platform. +1. Download the [latest official release's](https://github.com/heptio/velero/releases) tarball for your client platform. + + _We strongly recommend that you use an [official release](https://github.com/heptio/velero/releases) of +Velero. The tarballs for each release contain the `velero` command-line client. The code in the master branch +of the Velero repository is under active development and is not guaranteed to be stable!_ 1. Extract the tarball: ```bash @@ -33,10 +36,6 @@ consider using Premium Managed Disks, which are SSD backed. 1. Move the `velero` binary from the Velero directory to somewhere in your PATH. -_We strongly recommend that you use an [official release](https://github.com/heptio/velero/releases) of Velero. The tarballs for each release contain the -`velero` command-line client **and** version-specific sample YAML files for deploying Velero to your cluster. The code and sample YAML files in the master -branch of the Velero repository are under active development and are not guaranteed to be stable. Use them at your own risk!_ - ## Create Azure storage account and blob container Velero requires a storage account and blob container in which to store backups. @@ -71,7 +70,8 @@ az storage account create \ Create the blob container named `velero`. Feel free to use a different name, preferably unique to a single Kubernetes cluster. See the [FAQ][20] for more details. ```bash -az storage container create -n velero --public-access off --account-name $AZURE_STORAGE_ACCOUNT_ID +BLOB_CONTAINER=velero +az storage container create -n $BLOB_CONTAINER --public-access off --account-name $AZURE_STORAGE_ACCOUNT_ID ``` ## Get resource group for persistent volume snapshots @@ -120,47 +120,40 @@ To integrate Velero with Azure, you must create an Velero-specific [service prin AZURE_CLIENT_ID=`az ad sp list --display-name "velero" --query '[0].appId' -o tsv` ``` -## Credentials and configuration - -In the Velero directory (i.e. where you extracted the release tarball), run the following to first set up namespaces, RBAC, and other scaffolding. To run in a custom namespace, make sure that you have edited the YAML file to specify the namespace. See [Run in custom namespace][0]. +Now you need to create a file that contains all the environment variables you just set. The command looks like the following: ```bash -kubectl apply -f config/common/00-prereqs.yaml +cat << EOF > ./credentials-velero +AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} +AZURE_TENANT_ID=${AZURE_TENANT_ID} +AZURE_CLIENT_ID=${AZURE_CLIENT_ID} +AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} +AZURE_RESOURCE_GROUP=${AZURE_RESOURCE_GROUP} +EOF ``` -Now you need to create a Secret that contains all the environment variables you just set. The command looks like the following: +## Install and start Velero + +Install Velero, including all prerequisites, into the cluster and start the deployment. This will create a namespace called `velero`, and place a deployment named `velero` in it. ```bash -kubectl create secret generic cloud-credentials \ - --namespace \ - --from-literal AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} \ - --from-literal AZURE_TENANT_ID=${AZURE_TENANT_ID} \ - --from-literal AZURE_CLIENT_ID=${AZURE_CLIENT_ID} \ - --from-literal AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} \ - --from-literal AZURE_RESOURCE_GROUP=${AZURE_RESOURCE_GROUP} +velero install \ + --provider azure \ + --bucket $BLOB_CONTAINER \ + --secret-file ./credentials-velero \ + --backup-location-config resourceGroup=$AZURE_BACKUP_RESOURCE_GROUP,storageAccount=$AZURE_STORAGE_ACCOUNT_ID \ + --snapshot-location-config apiTimeout= ``` -Now that you have your Azure credentials stored in a Secret, you need to replace some placeholder values in the template files. Specifically, you need to change the following: +Additionally, you can specify `--use-restic` to enable restic support, and `--wait` to wait for the deployment to be ready. -* In file `config/azure/05-backupstoragelocation.yaml`: +For more complex installation needs, use either the Helm chart, or add `--dry-run -o yaml` options for generating the YAML representation for the installation. - * Replace ``, ``, and ``. See the [BackupStorageLocation definition][21] for details. +## Installing the nginx example (optional) -* In file `config/azure/06-volumesnapshotlocation.yaml`: +If you run the nginx example, in file `config/nginx-app/with-pv.yaml`: - * Replace ``. See the [VolumeSnapshotLocation definition][8] for details. - -* (Optional, use only if you need to specify multiple volume snapshot locations) In `config/azure/00-deployment.yaml`: - - * Uncomment the `--default-volume-snapshot-locations` and replace provider locations with the values for your environment. - -## Start the server - -In the root of your Velero directory, run: - - ```bash - kubectl apply -f config/azure/ - ``` + * Replace `` with `default`. This is Azure's default `StorageClass` name. [0]: namespace.md [8]: api-types/volumesnapshotlocation.md#azure diff --git a/docs/gcp-config.md b/docs/gcp-config.md index 25939a784..c7c0436f5 100644 --- a/docs/gcp-config.md +++ b/docs/gcp-config.md @@ -9,7 +9,11 @@ If you do not have the `gcloud` and `gsutil` CLIs locally installed, follow the ## Download Velero -1. Download the [latest release's](https://github.com/heptio/velero/releases) tarball for your client platform. +1. Download the [latest official release's](https://github.com/heptio/velero/releases) tarball for your client platform. + + _We strongly recommend that you use an [official release](https://github.com/heptio/velero/releases) of +Velero. The tarballs for each release contain the `velero` command-line client. The code in the master branch +of the Velero repository is under active development and is not guaranteed to be stable!_ 1. Extract the tarball: ```bash @@ -19,10 +23,6 @@ If you do not have the `gcloud` and `gsutil` CLIs locally installed, follow the 1. Move the `velero` binary from the Velero directory to somewhere in your PATH. -_We strongly recommend that you use an [official release](https://github.com/heptio/velero/releases) of Velero. The tarballs for each release contain the -`velero` command-line client **and** version-specific sample YAML files for deploying Velero to your cluster. The code and sample YAML files in the master -branch of the Velero repository are under active development and are not guaranteed to be stable. Use them at your own risk!_ - ## Create GCS bucket Velero requires an object storage bucket in which to store backups, preferably unique to a single Kubernetes cluster (see the [FAQ][20] for more details). Create a GCS bucket, replacing the placeholder with the name of your bucket: @@ -110,49 +110,30 @@ To integrate Velero with GCP, create an Velero-specific [Service Account][15]: If you run Google Kubernetes Engine (GKE), make sure that your current IAM user is a cluster-admin. This role is required to create RBAC objects. See [the GKE documentation][22] for more information. -In the Velero directory (i.e. where you extracted the release tarball), run the following to first set up namespaces, RBAC, and other scaffolding. To run in a custom namespace, make sure that you have edited the YAML files to specify the namespace. See [Run in custom namespace][0]. + +## Install and start Velero + +Install Velero, including all prerequisites, into the cluster and start the deployment. This will create a namespace called `velero`, and place a deployment named `velero` in it. ```bash -kubectl apply -f config/common/00-prereqs.yaml +velero install \ + --provider gcp \ + --bucket $BUCKET \ + --secret-file ./credentials-velero ``` -Create a Secret. In the directory of the credentials file you just created, run: +Additionally, you can specify `--use-restic` to enable restic support, and `--wait` to wait for the deployment to be ready. -```bash -kubectl create secret generic cloud-credentials \ - --namespace velero \ - --from-file cloud=credentials-velero -``` +(Optional) Specify `--snapshot-location-config snapshotLocation=` to keep snapshots in a specific availability zone. See the [VolumeSnapshotLocation definition][8] for details. -**Note: If you use a custom namespace, replace `velero` with the name of the custom namespace** +For more complex installation needs, use either the Helm chart, or add `--dry-run -o yaml` options for generating the YAML representation for the installation. -Specify the following values in the example files: +## Installing the nginx example (optional) -* In file `config/gcp/05-backupstoragelocation.yaml`: - - * Replace ``. See the [BackupStorageLocation definition][7] for details. - -* (Optional) If you run the nginx example, in file `config/nginx-app/with-pv.yaml`: +If you run the nginx example, in file `config/nginx-app/with-pv.yaml`: * Replace `` with `standard`. This is GCP's default `StorageClass` name. -* (Optional, use only if you need to specify multiple volume snapshot locations) In `config/gcp/10-deployment.yaml`: - - * Uncomment the `--default-volume-snapshot-locations` and replace provider locations with the values for your environment. - -* (Optional) In file `config/gcp/06-volumesnapshotlocation.yaml`: - - * Add `snapshotLocation: ` to the config. See the [VolumeSnapshotLocation definition][8] for details. - -## Start the server - -In the root of your Velero directory, run: - - ```bash - kubectl apply -f config/gcp/05-backupstoragelocation.yaml - kubectl apply -f config/gcp/06-volumesnapshotlocation.yaml - kubectl apply -f config/gcp/10-deployment.yaml - ``` [0]: namespace.md [7]: api-types/backupstoragelocation.md#gcp @@ -160,5 +141,5 @@ In the root of your Velero directory, run: [15]: https://cloud.google.com/compute/docs/access/service-accounts [16]: https://cloud.google.com/sdk/docs/ [20]: faq.md - [22]: https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control#prerequisites_for_using_role-based_access_control + [22]: https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control#iam-rolebinding-bootstrap diff --git a/docs/install-overview.md b/docs/install-overview.md index a1f10c83a..d2eb5c6a3 100644 --- a/docs/install-overview.md +++ b/docs/install-overview.md @@ -14,13 +14,29 @@ For details, see the documentation topics for individual cloud providers. ## Cloud provider -The Velero repository includes a set of example YAML files that specify the settings for each supported cloud provider. For provider-specific instructions, see: +The Velero client includes an `install` command to specify the settings for each supported cloud provider. You can install Velero for the included cloud providers using the following command: + +```bash + velero install \ + --provider \ + --bucket \ + --secret-file \ + [--backup-location-config] + [--snapshot-location-config] + [--namespace] +``` + +For provider-specific instructions, see: * [Run Velero on AWS][0] * [Run Velero on GCP][1] * [Run Velero on Azure][2] * [Use IBM Cloud Object Store as Velero's storage destination][4] +To see the YAML applied by the `velero install` command, use the `--dry-run -o yaml` arguments. + +For more complex installation needs, use either the generated YAML, or the Helm chart. + ## On-premises You can run Velero in an on-premises cluster in different ways depending on your requirements. diff --git a/docs/namespace.md b/docs/namespace.md index b77615b8c..4d0a85105 100644 --- a/docs/namespace.md +++ b/docs/namespace.md @@ -1,72 +1,23 @@ # Run in custom namespace -In Velero version 0.7.0 and later, you can run Velero in any namespace. To do so, you specify the -namespace in the YAML files that configure the Velero server. You then also specify the namespace when -you run Velero client commands. - -## Edit the example files - -The Velero release tarballs include a set of example configs that you can use to set up your Velero server. The -examples place the server and backup/schedule/restore/etc. data in the `velero` namespace. - -To run the server in another namespace, you edit the relevant files, changing `velero` to -your desired namespace. - -To store your backups, schedules, restores, and config in another namespace, you edit the relevant -files, changing `velero` to your desired namespace. You also need to create the -`cloud-credentials` secret in your desired namespace. +In Velero version 0.7.0 and later, you can run Velero in any namespace. First, ensure you've [downloaded & extracted the latest release][0]. -For all cloud providers, edit `config/common/00-prereqs.yaml`. This file defines: +Then, install Velero using the `--namespace` flag: -* CustomResourceDefinitions for the Velero objects (backups, schedules, restores, downloadrequests, etc.) -* The namespace where the Velero server runs -* The namespace where backups, schedules, restores, etc. are stored -* The Velero service account -* The RBAC rules to grant permissions to the Velero service account +```bash + velero install --bucket --provider --namespace +``` -### AWS - -For AWS, edit: - -* `config/aws/05-backupstoragelocation.yaml` -* `config/aws/06-volumesnapshotlocation.yaml` -* `config/aws/10-deployment.yaml` - - -### Azure - -For Azure, edit: - -* `config/azure/00-deployment.yaml` -* `config/azure/05-backupstoragelocation.yaml` -* `config/azure/06-volumesnapshotlocation.yaml` - -### GCP - -For GCP, edit: - -* `config/gcp/05-backupstoragelocation.yaml` -* `config/gcp/06-volumesnapshotlocation.yaml` -* `config/gcp/10-deployment.yaml` - - -### IBM - -For IBM, edit: - -* `config/ibm/05-backupstoragelocation.yaml` -* `config/ibm/10-deployment.yaml` - ## Specify the namespace in client commands To specify the namespace for all Velero client commands, run: -``` -velero client config set namespace= +```bash + velero client config set namespace= ``` diff --git a/docs/restic.md b/docs/restic.md index 53393f178..d7d58d96f 100644 --- a/docs/restic.md +++ b/docs/restic.md @@ -23,42 +23,28 @@ cross-volume-type data migrations. Stay tuned as this evolves! ### Prerequisites -- A working install of Velero version 0.10.0 or later. See [Set up Velero][2] -- A local clone of [the latest release tag of the Velero repository][3] - Velero's restic integration requires the Kubernetes [MountPropagation feature][6], which is enabled by default in Kubernetes v1.10.0 and later. - ### Instructions -1. Ensure you've [downloaded & extracted the latest release][3]. +Ensure you've [downloaded latest release][3]. -1. In the Velero directory (i.e. where you extracted the release tarball), run the following to create new custom resource definitions: - - ```bash - kubectl apply -f config/common/00-prereqs.yaml - ``` - -1. Run one of the following for your platform to create the daemonset: +To install restic, use the `--use-restic` flag on the `velero install` command. See the [install overview][2] for more details. Please note: In RancherOS , the path is not `/var/lib/kubelet/pods` , rather it is `/opt/rke/var/lib/kubelet/pods` - thereby requires modifying the restic-daemonset.yaml before applying. + thereby requires modifying the restic daemonset after installing. - ``` - hostPath: - path: /var/lib/kubelet/pods - ``` + ```yaml + hostPath: + path: /var/lib/kubelet/pods + ``` - to + to - ``` - hostPath: - path: /opt/rke/var/lib/kubelet/pods - ``` - - - AWS: `kubectl apply -f config/aws/20-restic-daemonset.yaml` - - Azure: `kubectl apply -f config/azure/20-restic-daemonset.yaml` - - GCP: `kubectl apply -f config/gcp/20-restic-daemonset.yaml` - - Minio: `kubectl apply -f config/minio/30-restic-daemonset.yaml` + ```yaml + hostPath: + path: /opt/rke/var/lib/kubelet/pods + ``` You're now ready to use Velero with restic. @@ -70,11 +56,11 @@ You're now ready to use Velero with restic. kubectl -n YOUR_POD_NAMESPACE annotate pod/YOUR_POD_NAME backup.velero.io/backup-volumes=YOUR_VOLUME_NAME_1,YOUR_VOLUME_NAME_2,... ``` - where the volume names are the names of the volumes in the pod spec. - + where the volume names are the names of the volumes in the pod spec. + For example, for the following pod: - ```bash + ```yaml apiVersion: v1 kind: Pod metadata: @@ -98,6 +84,7 @@ You're now ready to use Velero with restic. ``` You'd run: + ```bash kubectl -n foo annotate pod/sample backup.velero.io/backup-volumes=pvc-volume,emptydir-volume ``` @@ -127,7 +114,7 @@ You're now ready to use Velero with restic. ``` 1. When the restore completes, view information about your pod volume restores: - + ```bash velero restore describe YOUR_RESTORE_NAME diff --git a/examples/aws/05-backupstoragelocation.yaml b/examples/aws/05-backupstoragelocation.yaml deleted file mode 100644 index c7033c959..000000000 --- a/examples/aws/05-backupstoragelocation.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 2018 the Velero contributors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - ---- -apiVersion: velero.io/v1 -kind: BackupStorageLocation -metadata: - name: default - namespace: velero -spec: - provider: aws - objectStorage: - bucket: - config: - region: diff --git a/examples/aws/06-volumesnapshotlocation.yaml b/examples/aws/06-volumesnapshotlocation.yaml deleted file mode 100644 index d15c387a5..000000000 --- a/examples/aws/06-volumesnapshotlocation.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2018 the Velero contributors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - ---- -apiVersion: velero.io/v1 -kind: VolumeSnapshotLocation -metadata: - name: aws-default - namespace: velero -spec: - provider: aws - config: - region: diff --git a/examples/aws/10-deployment-kube2iam.yaml b/examples/aws/10-deployment-kube2iam.yaml deleted file mode 100644 index b1e4fdfd2..000000000 --- a/examples/aws/10-deployment-kube2iam.yaml +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright 2018 the Velero contributors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - namespace: velero - name: velero -spec: - replicas: 1 - template: - metadata: - labels: - component: velero - annotations: - iam.amazonaws.com/role: arn:aws:iam:::role/ - prometheus.io/scrape: "true" - prometheus.io/port: "8085" - prometheus.io/path: "/metrics" - spec: - restartPolicy: Always - serviceAccountName: velero - containers: - - name: velero - image: gcr.io/heptio-images/velero:latest - ports: - - name: metrics - containerPort: 8085 - command: - - /velero - args: - - server - volumeMounts: - - name: plugins - mountPath: /plugins - volumes: - - name: plugins - emptyDir: {} diff --git a/examples/aws/10-deployment.yaml b/examples/aws/10-deployment.yaml deleted file mode 100644 index d3b166d5f..000000000 --- a/examples/aws/10-deployment.yaml +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 2017 the Velero contributors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - namespace: velero - name: velero -spec: - replicas: 1 - template: - metadata: - labels: - component: velero - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "8085" - prometheus.io/path: "/metrics" - spec: - restartPolicy: Always - serviceAccountName: velero - containers: - - name: velero - image: gcr.io/heptio-images/velero:latest - command: - - /velero - args: - - server - ## uncomment following line and specify values if needed for multiple provider snapshot locations - # - --default-volume-snapshot-locations= - volumeMounts: - - name: cloud-credentials - mountPath: /credentials - - name: plugins - mountPath: /plugins - - name: scratch - mountPath: /scratch - env: - - name: AWS_SHARED_CREDENTIALS_FILE - value: /credentials/cloud - - name: VELERO_SCRATCH_DIR - value: /scratch - #- name: AWS_CLUSTER_NAME - # value: - volumes: - - name: cloud-credentials - secret: - secretName: cloud-credentials - - name: plugins - emptyDir: {} - - name: scratch - emptyDir: {} diff --git a/examples/aws/20-restic-daemonset.yaml b/examples/aws/20-restic-daemonset.yaml deleted file mode 100644 index b498366ce..000000000 --- a/examples/aws/20-restic-daemonset.yaml +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 2018 the Velero contributors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: restic - namespace: velero -spec: - selector: - matchLabels: - name: restic - template: - metadata: - labels: - name: restic - spec: - serviceAccountName: velero - securityContext: - runAsUser: 0 - volumes: - - name: cloud-credentials - secret: - secretName: cloud-credentials - - name: host-pods - hostPath: - path: /var/lib/kubelet/pods - - name: scratch - emptyDir: {} - containers: - - name: velero - image: gcr.io/heptio-images/velero:latest - command: - - /velero - args: - - restic - - server - volumeMounts: - - name: cloud-credentials - mountPath: /credentials - - name: host-pods - mountPath: /host_pods - mountPropagation: HostToContainer - - name: scratch - mountPath: /scratch - env: - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: VELERO_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: AWS_SHARED_CREDENTIALS_FILE - value: /credentials/cloud - - name: VELERO_SCRATCH_DIR - value: /scratch diff --git a/examples/azure/00-deployment.yaml b/examples/azure/00-deployment.yaml deleted file mode 100644 index 46a02b57c..000000000 --- a/examples/azure/00-deployment.yaml +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright 2017 the Velero contributors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - namespace: velero - name: velero -spec: - replicas: 1 - template: - metadata: - labels: - component: velero - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "8085" - prometheus.io/path: "/metrics" - spec: - restartPolicy: Always - serviceAccountName: velero - containers: - - name: velero - image: gcr.io/heptio-images/velero:latest - ports: - - name: metrics - containerPort: 8085 - command: - - /velero - args: - - server - ## uncomment following line and specify values if needed for multiple provider snapshot locations - # - --default-volume-snapshot-locations= - envFrom: - - secretRef: - name: cloud-credentials - env: - - name: VELERO_SCRATCH_DIR - value: /scratch - volumeMounts: - - name: plugins - mountPath: /plugins - - name: scratch - mountPath: /scratch - volumes: - - name: plugins - emptyDir: {} - - name: scratch - emptyDir: {} - nodeSelector: - beta.kubernetes.io/os: linux diff --git a/examples/azure/05-backupstoragelocation.yaml b/examples/azure/05-backupstoragelocation.yaml deleted file mode 100644 index 0dbff0a2b..000000000 --- a/examples/azure/05-backupstoragelocation.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 2018 the Velero contributors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - ---- -apiVersion: velero.io/v1 -kind: BackupStorageLocation -metadata: - name: default - namespace: velero -spec: - provider: azure - objectStorage: - bucket: - config: - resourceGroup: - storageAccount: diff --git a/examples/azure/06-volumesnapshotlocation.yaml b/examples/azure/06-volumesnapshotlocation.yaml deleted file mode 100644 index f32524124..000000000 --- a/examples/azure/06-volumesnapshotlocation.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2018 the Velero contributors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - ---- -apiVersion: velero.io/v1 -kind: VolumeSnapshotLocation -metadata: - name: azure-default - namespace: velero -spec: - provider: azure - config: - apiTimeout: diff --git a/examples/azure/20-restic-daemonset.yaml b/examples/azure/20-restic-daemonset.yaml deleted file mode 100644 index 46b45ffd9..000000000 --- a/examples/azure/20-restic-daemonset.yaml +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright 2018 the Velero contributors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: restic - namespace: velero -spec: - selector: - matchLabels: - name: restic - template: - metadata: - labels: - name: restic - spec: - serviceAccountName: velero - securityContext: - runAsUser: 0 - volumes: - - name: host-pods - hostPath: - path: /var/lib/kubelet/pods - - name: scratch - emptyDir: {} - containers: - - name: velero - image: gcr.io/heptio-images/velero:latest - command: - - /velero - args: - - restic - - server - volumeMounts: - - name: host-pods - mountPath: /host_pods - mountPropagation: HostToContainer - - name: scratch - mountPath: /scratch - envFrom: - - secretRef: - name: cloud-credentials - env: - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: VELERO_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: VELERO_SCRATCH_DIR - value: /scratch diff --git a/examples/gcp/05-backupstoragelocation.yaml b/examples/gcp/05-backupstoragelocation.yaml deleted file mode 100644 index a33c5c20d..000000000 --- a/examples/gcp/05-backupstoragelocation.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2018 the Velero contributors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - ---- -apiVersion: velero.io/v1 -kind: BackupStorageLocation -metadata: - name: default - namespace: velero -spec: - provider: gcp - objectStorage: - bucket: diff --git a/examples/gcp/06-volumesnapshotlocation.yaml b/examples/gcp/06-volumesnapshotlocation.yaml deleted file mode 100644 index 728aa938f..000000000 --- a/examples/gcp/06-volumesnapshotlocation.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2018 the Velero contributors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - ---- -apiVersion: velero.io/v1 -kind: VolumeSnapshotLocation -metadata: - name: gcp-default - namespace: velero -spec: - provider: gcp - config: {} diff --git a/examples/gcp/10-deployment.yaml b/examples/gcp/10-deployment.yaml deleted file mode 100644 index eaa1893bc..000000000 --- a/examples/gcp/10-deployment.yaml +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright 2018 the Velero contributors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - namespace: velero - name: velero -spec: - replicas: 1 - template: - metadata: - labels: - component: velero - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "8085" - prometheus.io/path: "/metrics" - spec: - restartPolicy: Always - serviceAccountName: velero - containers: - - name: velero - image: gcr.io/heptio-images/velero:latest - ports: - - name: metrics - containerPort: 8085 - command: - - /velero - args: - - server - ## uncomment following line and specify values if needed for multiple provider snapshot locations - # - --default-volume-snapshot-locations= - volumeMounts: - - name: cloud-credentials - mountPath: /credentials - - name: plugins - mountPath: /plugins - - name: scratch - mountPath: /scratch - env: - - name: GOOGLE_APPLICATION_CREDENTIALS - value: /credentials/cloud - - name: VELERO_SCRATCH_DIR - value: /scratch - volumes: - - name: cloud-credentials - secret: - secretName: cloud-credentials - - name: plugins - emptyDir: {} - - name: scratch - emptyDir: {} diff --git a/examples/gcp/20-restic-daemonset.yaml b/examples/gcp/20-restic-daemonset.yaml deleted file mode 100644 index 4e6d0c1f1..000000000 --- a/examples/gcp/20-restic-daemonset.yaml +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 2018 the Velero contributors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: restic - namespace: velero -spec: - selector: - matchLabels: - name: restic - template: - metadata: - labels: - name: restic - spec: - serviceAccountName: velero - securityContext: - runAsUser: 0 - volumes: - - name: cloud-credentials - secret: - secretName: cloud-credentials - - name: host-pods - hostPath: - path: /var/lib/kubelet/pods - - name: scratch - emptyDir: {} - containers: - - name: velero - image: gcr.io/heptio-images/velero:latest - command: - - /velero - args: - - restic - - server - volumeMounts: - - name: cloud-credentials - mountPath: /credentials - - name: host-pods - mountPath: /host_pods - mountPropagation: HostToContainer - - name: scratch - mountPath: /scratch - env: - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: VELERO_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: GOOGLE_APPLICATION_CREDENTIALS - value: /credentials/cloud - - name: VELERO_SCRATCH_DIR - value: /scratch