Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[helm chart] if using missmatched provider env var doesnt get set properly #269

Closed
MaxRink opened this issue May 26, 2021 · 4 comments
Closed
Labels

Comments

@MaxRink
Copy link

MaxRink commented May 26, 2021

What steps did you take and what happened:
im configuring configuration.provider to csi and configuration.backupStorageLocation.provider to aws
The access to the bucket fails as AWS_SHARED_CREDENTIALS_FILE doesnt get set, thus the credential lookup fails with

time="2021-05-26T18:25:19Z" level=error msg="Error getting backup store for this location" backupLocation=default controller=backup-sync error="rpc error: code = Unknown desc = NoCredentialProviders: no valid providers in chain. Deprecated.\n\tFor verbose messaging see aws.Config.CredentialsChainVerboseErrors" error.file="/go/src/velero-plugin-for-aws/velero-plugin-for-aws/volume_snapshotter.go:59" error.function=main.getSession logSource="pkg/controller/backup_sync_controller.go:175"

ive verified it, AWS_SHARED_CREDENTIALS_FILE isnt set inside the velero container
What did you expect to happen:
credential lookup works

Environment:

  • helm version (use helm version): 3.6
  • helm chart version and app version (use helm list -n <YOUR NAMESPACE>): 2.21.0
  • Kubernetes version (use kubectl version): 1.20.7
  • Kubernetes installer & version: capi
@jenting
Copy link
Collaborator

jenting commented May 26, 2021

There is no provider called csi, please use aws instead.

I guess you want to use plugins aws and csi?

@MaxRink
Copy link
Author

MaxRink commented May 27, 2021

@jenting Than this page is clearly wrong: https://velero.io/docs/v1.6/supported-providers/

@jenting
Copy link
Collaborator

jenting commented May 27, 2021

@MaxRink
Well, it's a bit hard to explain.

Generally, the configuration.provider is to provide a simple way to configure only once. Then you don't have to configure to backupStorageLocation.provider and volumeSnapshotLocation.provider if you're using public cloud provider aws/gcp/auzre/alibaba which supports the Object Store and Volume Snapshotter.

In your use case, I guess you'd want to use aws plugin for AWS S3 Object Store, and CSI plugin for Volume Snapshotter. For example:

helm install velero \
    --namespace=velero \
    --create-namespace \
    --set-file credentials.secretContents.cloud=credentials-velero \
    --set configuration.provider=aws \
    --set configuration.backupStorageLocation.name=default \
    --set configuration.backupStorageLocation.bucket=<bucket-name> \
    --set configuration.backupStorageLocation.config.region=<aws-region> \
    --set snapshotsEnabled=true \
    --set configuration.volumeSnapshotLocation.name=default \
    --set configuration.volumeSnapshotLocation.config.region=<aws-region> \
    --set initContainers[0].name=velero-plugin-for-aws \
    --set initContainers[0].image=velero/velero-plugin-for-aws:v1.2.0 \ 
    --set initContainers[0].volumeMounts[0].mountPath=/target \
    --set initContainers[0].volumeMounts[0].name=plugins \
    --set configuration.features=EnableCSI \
    --set initContainers[1].name=velero-plugin-for-csi \
    --set initContainers[1].image=velero/velero-plugin-for-csi:v0.1.2 \
    --set initContainers[1].volumeMounts[0].mountPath=/target \
    --set initContainers[1].volumeMounts[0].name=plugins \
    vmware-tanzu/velero

ndegory pushed a commit to ndegory/helm-charts that referenced this issue Jul 12, 2021
Updating repository for kube-state-metrics to use new stable repository URL

Signed-off-by: Bismarck Paliz <[email protected]>
@jenting
Copy link
Collaborator

jenting commented Aug 3, 2023

We deprecated the configuration.provider but configured the provider in each backup storage location as well as in each volume snapshot location. Here is the PR.

Closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
@MaxRink @jenting and others