-
Notifications
You must be signed in to change notification settings - Fork 54
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
Implicit mapping of secrets / objects - SecretProviderClass #192
Comments
Hello 👋 these are good questions. I think there are a few pre-existing things to mention here.
---
apiVersion: secrets-store.csi.x-k8s.io/v1alpha1
kind: SecretProviderClass
[...]
secretObjects:
- secretName: db-creds
type: Opaque
syncAll: true
parameters:
[...]
objects: |
- objectName: obj
secretPath: "database/creds/db-app"
transforms:
- inFilePath: "obj"
jsonPath: "$.username"
outFilePath: "username"
- inFilePath: "obj"
jsonPath: "$.password"
outFilePath: "password" I think that gets relatively close to what you want, except you can still end up with quite an arduous number of The vault-csi-provider owns all of the config inside Do you think that would fit your use-case? |
Thank you for your reply, Simply put, the answer is yes ! I think you totally got what I'm looking for. Yes, I tried playing with the full json response while omitting the In the end, if I get this right in order for this to work, this would require the default behavior you mention when |
Hi,
I've got a question regarding csi mode and also the way of creating kubernetes secrets using
secretObjects
from SecretProviderClass.Possibly a miss understanding from my side but I have a hard time thinking my way around this.
So as far as I understand, the current implementation provides an
objects
array of secrets to retrieve from vault. Each secret needs to be explicitly described using objectName, secretKey, secretPath. As specificied in documentation.Now I'm curious why it doesn't seem possible to provide a default implementation where all keys from a secretPath would be used in order to create the secret. Using a simple 1:1 mapping instead of using objectName / secretKey mapping.
Example of current spec :
Now if you have 30 secret keys, you would need to list these 30 items ?
Can't we just just give a secretPath and expect it to retrieve all secretKeys from that. And creating the secret with
secretKey: secretValue
loop over secrets from that path ?I feel like I'm missing the point here because I was not able to find any other questions/posts relevant for that matter.
Could you help me get back on track here ?
Thanks
The text was updated successfully, but these errors were encountered: