mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-07-19 22:42:44 +00:00
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:
committed by
Adnan Abdulhussein
parent
65906efffa
commit
5f409f12c8
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user