Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

doesnt decode secret file #124

Open
kevupton opened this issue Jun 30, 2019 · 3 comments · May be fixed by #155
Open

doesnt decode secret file #124

kevupton opened this issue Jun 30, 2019 · 3 comments · May be fixed by #155

Comments

@kevupton
Copy link

kevupton commented Jun 30, 2019

I have a secret file, that is my dockerconfigjson for a private repository.
I am able to encode this json string no worries, and then decode it no worries manually.

However passing it into comand:

helm template . -f values/local.values.yaml -f secrets/docker.secret.yaml -f secrets/local.secrets.yaml > template.yaml 

I look at the output and it is the same encoded value.

apiVersion: v1
kind: Secret
metadata:
  name: docker-secret
#  uid: 51a2d001-9b41-11e9-b591-0800274eb36e
type: kubernetes.io/dockerconfigjson
data:
  .dockerconfigjson: {{ .Values.docker_auth_secret | b64enc | quote }}

when this is compiled. the b64enc is equal to the encoded value.
ENC[AES256_GCM,data:....]

I have another secret file, which actually works no problem. So it must be something to do with the value. it is quite a long value because its a json string.

@kevupton
Copy link
Author

kevupton commented Jul 1, 2019

Ok the solution was because of the way the file was named. I assumed that it would just look at the file contents and if there is a sops then it would decode it. However it seemed to only accept secrets.yaml and secrets.*.yaml files.

@kevupton
Copy link
Author

kevupton commented Jul 1, 2019

is it possible to change this pattern at all ? so it can be .secrets?.yaml$.

@schollii
Copy link

schollii commented Jul 23, 2019

Yes this is a real annoyance. I created ticket #128 for this. Seems like the fix should be really easy to allow additionally secrets-something which is more intuitive for describing the secrets file.

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

Successfully merging a pull request may close this issue.

2 participants