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

Unable to pull multiple in-line secrets from SecretsManager via helmfile #449

Open
Kellen275 opened this issue Apr 18, 2024 · 3 comments
Open
Labels
bug Something isn't working Stale

Comments

@Kellen275
Copy link

Kellen275 commented Apr 18, 2024

Current Behavior

I'm attempting to pull secrets from AWS SecretsManager using helmfile.

I'm having trouble when pulling multiple secrets in, specifically, the same line of yaml.

In my helmfile environment values I have

secret1: ref+awssecrets://database#/user
secret2: ref+awssecrets://database#/pass

In my helmfile release values I'm pulling these in like

userPass: { .Values.secret1 }ZZZ{ .Values.secret2 }

The issue I'm seeing is that the final rendered yaml is

userPass: awssecrets://database#/pass

as opposed to

userPass: usernameZZZmysecretpassword

However if I split it onto multiple lines like

user: {{ .Values.secret1 }}
pass: {{ .Values.secret2 }}

I get the proper result

user: username
pass: mysecretpassword

Environment

  • Helmfile Version: 0.161.0
  • Helm Version: 3.13.2
  • Helm Secrets Version: 4.1.1
@Kellen275 Kellen275 added the bug Something isn't working label Apr 18, 2024
@Kellen275 Kellen275 changed the title Unable to pull multiple in-line SecretsManager secrets via helmfile Unable to pull multiple in-line secrets from SecretsManager via helmfile Apr 18, 2024
@Kellen275
Copy link
Author

Kellen275 commented Apr 18, 2024

I've found that using fetchSecretValue can produce a correct result

userPass: { .Values.secret1 | fetchSecretValue }ZZZ{ .Values.secret2 }

yields

userPass: usernameZZZmysecretpassword

@jkroepke
Copy link
Owner

Not sure if helm-secret is used here.

helmfile itself has the same capability to resolve / lookup references like secret1: ref+awssecrets://database#/user.

Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

2 participants