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

Secret namespace does not work for non-default value #25

Open
stephenchu opened this issue Feb 6, 2018 · 1 comment
Open

Secret namespace does not work for non-default value #25

stephenchu opened this issue Feb 6, 2018 · 1 comment

Comments

@stephenchu
Copy link

Using this repo's secret_example.yml, when I pass --secret webapp default, it renders correctly:

› git clone https://github.com/InQuicker/ktmpl.git bug && cd bug
...

› docker pull inquicker/ktmpl:latest
latest: Pulling from inquicker/ktmpl
Digest: sha256:02eb1cc8274f114c9284a3e02a6d7831f30cdc82893723486c6a3ca9e7532f32
Status: Image is up to date for inquicker/ktmpl:latest

› docker run --rm \
  -v $(pwd):/work \
  -w /work \
  inquicker/ktmpl:latest \
  --parameter PASSWORD pass \
  --secret webapp default \
  secret_example.yml

---
apiVersion: v1
data:
  config.yml: "dXNlcm5hbWU6ICJjYXJsIgpwYXNzd29yZDogInBhc3MiCg=="
kind: Secret
metadata:
  name: webapp
type: Opaque

However, when I alter the secret namespace from default to default1, it no longer renders:

› docker run --rm \
  -v $(pwd):/work \
  -w /work \
  inquicker/ktmpl:latest \
  --parameter PASSWORD pass \
  --secret webapp default1 \
  secret_example.yml
Error: Not all secrets specified were found.

/cc @jimmycuadra: I can't log issues to your forked branch, so I am creating it here instead.

@jimmycuadra
Copy link
Contributor

Sorry about the issues! I don't know why they were disabled on my fork, but I've now enabled them in case you run into issues in the future.

Regarding this issue, I think you've misunderstood what the namespace parameter is for. It doesn't allow you to override a default, it's used for specifying which secret you're referring to, because it's possible to have secrets with the same name but in different namespaces.

I don't have access to this repo anymore, so please close the issue if it's solved for you. Thanks!

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

No branches or pull requests

2 participants