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

Optionally determine the secret key from the secret source value #107

Open
carolynvs opened this issue May 5, 2022 · 0 comments
Open

Optionally determine the secret key from the secret source value #107

carolynvs opened this issue May 5, 2022 · 0 comments
Labels
2 - 🍕 Pizza should be eaten daily enhancement New code, ahoy!

Comments

@carolynvs
Copy link
Member

Currently every secret resolved by the plugin must be stored in its own k8s secret. It would be great to support having multiple resolvable secret values in a single k8s secret.

The k8s plugin should parse the source secret value, and cut it after the first "period". If there is a substring after a period in the source value, then it should be used as the kubernetes secret key. If there isn't a period in the secret name, then the key defaults to "value".

# porter credential set
credentials:
  - name: password
    source:
      secret: secretname.secretkey

The above credential set would result in Porter calling Resolve, passing in a secret key of "secret", and a secret value of "secretname.secretkey". The plugin should look for a k8s secret named "secretname" and return the value of the key "secretkey" defined on that k8s secret.

@carolynvs carolynvs added 2 - 🍕 Pizza should be eaten daily enhancement New code, ahoy! labels May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - 🍕 Pizza should be eaten daily enhancement New code, ahoy!
Projects
None yet
Development

No branches or pull requests

1 participant