-
Notifications
You must be signed in to change notification settings - Fork 286
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
Create kubernetes secret with few different keys from single secret in GCP secret manager #1468
Comments
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Describe the solution you'd like
My application has ENV variables which reference to kubernetes secrets and these kubernetes secret objects have few keys like this:
secret.yaml
:deployment.yaml
:Now I'm trying to implement secret-store-csi-driver and GCP Secret Manager approach:
helm install csi-secrets-store secrets-store-csi-driver/secrets-store-csi-driver --namespace kube-system --set syncSecret.enabled=true --set enableSecretRotation=true --set rotationPollInterval="120s"
test-dummy-secret
in GCP Secret Manager which contains data:Now I need to create
SecretProviderClass
which creates kubernetes secret with 2 keysusername
andpassword
from single secret in GCP Secret Manager. How can I implement this?This is my
SecretProviderClass
object:Pods are deployed and secrets been created. Great!
The problem is it creates kubernetes secret with key
username
which contains all context of GCPtest-dummy-secret
But I need to be able create single kubernetes secret with several keys from single GCP secret, rather then create a separate secret for each key. It's pretty hard to maintain when for each kubernetes secret key you have a separate secret in GCP secret manager
I also read this PR and couldn't understand how you defined
objectName
there. I mean how you create 2 differentobjectName
from single file nameAs I understand, to create kubernetes secret with different key values it should be like this?
Thanks!
Environment:
kubectl version
):The text was updated successfully, but these errors were encountered: