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

Add support for secret env vars #99

Merged
merged 3 commits into from Apr 23, 2020

Conversation

dunglas
Copy link
Contributor

@dunglas dunglas commented Apr 13, 2020

This PR adds a new value credentials.extraEnvVars allowing to store data in a secret and expose it to the container through an environment variable.
This is necessary for the Digital Ocean plugin and maybe other.

I tested it (and it works). This PR also includes #94 (because without this PR, the chart is broken). I'll rebase when #94 will be merged.

Thanks for this great tool by the way!

Signed-off-by: Kévin Dunglas <dunglas@gmail.com>
Signed-off-by: Kévin Dunglas <dunglas@gmail.com>
carlisia
carlisia previously approved these changes Apr 20, 2020
Copy link
Contributor

@carlisia carlisia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lgtm!

@skriss should this also go on therestic-daemonset template?

@carlisia carlisia requested a review from nrb April 20, 2020 22:47
@skriss
Copy link
Member

skriss commented Apr 23, 2020

@carlisia yeah, I think it probably should, since the secret is mounted in there too so presumably any extra env vars apply there as well.

@carlisia
Copy link
Contributor

Ok @dunglas, please also add it to the restic-daemonset template when you have a chance.

Signed-off-by: Kévin Dunglas <dunglas@gmail.com>
@dunglas
Copy link
Contributor Author

dunglas commented Apr 23, 2020

@carlisia done! Thanks for the review.

Copy link
Contributor

@carlisia carlisia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, and thanks for adding .Values.configuration.extraEnvVars to the restic template too!

👍

Copy link
Member

@skriss skriss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the PR @dunglas!

@skriss skriss merged commit dac2338 into vmware-tanzu:master Apr 23, 2020
@qRoC
Copy link

qRoC commented Aug 18, 2021

Hello.

variables such as "DIGITALOCEAN_TOKEN: <your-key>".

What is <your-key>?

For configuration:

credentials:
  existingSecret: velero-secrets
  extraEnvVars:
    DIGITALOCEAN_TOKEN: 'hello'

Need generate 2 secrets: velero-secrets and velero?

Because is generate:

- name: DIGITALOCEAN_TOKEN
  valueFrom:
    secretKeyRef:
       name: velero
       key: DIGITALOCEAN_TOKEN

@mshivanna
Copy link

mshivanna commented Sep 13, 2021

In deployment.yaml file on line 129 under secretKeyRef

name: {{ include "velero.fullname" $ }}

should have been

name: {{ include "velero.secretName" $ }}

@dunglas dunglas deleted the support-secret-env-vars branch September 28, 2021 09:13
@dunglas dunglas mentioned this pull request Sep 28, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants