Document --pod-annotations install argument (#1674)

* Document --pod-annotations install argument

Fixes #1667

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Revert v1.0.0 edits

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Make pod annotations example commands complete

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
This commit is contained in:
Nolan Brubaker
2019-07-19 15:12:57 -04:00
committed by Adnan Abdulhussein
parent 65906efffa
commit 5f409f12c8
3 changed files with 20 additions and 23 deletions
+2
View File
@@ -142,6 +142,8 @@ This is useful as a starting point for more customized installations.
# velero install --bucket gcp-backups --provider gcp --secret-file ./gcp-creds.json --wait
# velero install --bucket backups --provider aws --backup-location-config region=us-west-2 --secret-file ./an-empty-file --snapshot-location-config region=us-west-2 --pod-annotations iam.amazonaws.com/role=arn:aws:iam::<AWS_ACCOUNT_ID>:role/<VELERO_ROLE_NAME>
`,
Run: func(c *cobra.Command, args []string) {
cmd.CheckError(o.Validate(c, args, f))
+12 -18
View File
@@ -283,25 +283,19 @@ It can be set up for Velero by creating a role that will have required permissio
--policy-document file://./velero-policy.json
```
4. Update `AWS_ACCOUNT_ID` & `VELERO_ROLE_NAME` with `kubectl edit deploy/velero -n velero` and add the following annotation:
4. Use the `--pod-annotations` argument on `velero install` to add the following annotation:
```
---
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::<AWS_ACCOUNT_ID>:role/<VELERO_ROLE_NAME>
...
```
```bash
velero install \
--pod-annotations iam.amazonaws.com/role=arn:aws:iam::<AWS_ACCOUNT_ID>:role/<VELERO_ROLE_NAME> \
--provider aws \
--bucket $BUCKET \
--secret-file ./credentials-velero \
--backup-location-config region=$REGION \
--snapshot-location-config region=$REGION
```
Note that the `--secret-file` argument is required, but it can be an empty file.
[0]: namespace.md
[5]: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html
+6 -5
View File
@@ -15,11 +15,12 @@ velero install \
--provider <YOUR_PROVIDER> \
--bucket <YOUR_BUCKET> \
--secret-file <PATH_TO_FILE> \
[--backup-location-config]
[--snapshot-location-config]
[--namespace]
[--use-volume-snapshots]
[--use-restic]
[--backup-location-config] \
[--snapshot-location-config] \
[--namespace] \
[--use-volume-snapshots] \
[--use-restic] \
[--pod-annotations] \
```
For provider-specific instructions, see: