Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Support secrets[._-]*.yaml #128

Open
schollii opened this issue Jul 23, 2019 · 2 comments · May be fixed by #155
Open

Support secrets[._-]*.yaml #128

schollii opened this issue Jul 23, 2019 · 2 comments · May be fixed by #155

Comments

@schollii
Copy link

There have been at least 2 other issues raised regarding the naming restrictions of helm secrets plugin on files it automatically identifies as containing secrets. Currently it is secrets.yaml and secrets.something.yaml (and something can contain dashes, underscores, letters, numbers). However I don't think it is very common for people to use dot as a separator to further qualify the purpose of a file. Most people would intuitively go for dash or underscore like secrets-myenv1.yaml or secrets_myenv1.yaml.

So I'd like to propose that the name search include not just dot, but also hyphen and underscore. I imagine there should only be a couple places in the code to fix, or are there a whole bunch? I don't mind doing it.

@schollii schollii changed the title Support secrets-*.yaml Support secrets[._-]*.yaml Jul 23, 2019
@schollii
Copy link
Author

I think it would be sufficient to modify the pattern in secrets.sh, helm_wrapper command, ie https://github.com/futuresimple/helm-secrets/blob/5f91bdfc66bd901e3088aac2efa2d107a055ea39/secrets.sh#L441

to

if [[ $yml =~ ^(.*/)?secrets([_.-][^.]+)*\.yaml$ ]]

I'm going to try it out.

@TravisWhitehead
Copy link

This seems like something that should be configurable.

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