Closed egarbi closed 6 months ago
Thank you for the bug report, @egarbi. We will take a look
Hi @egarbi I see that in your supplied secrets.yaml
provider class you seem to be using an ssmparameter objectType
and a full arn as the objectName
. However, for parameter store objects you must use the name and not the full arn. From the README:
For SSM Parameter Store, this must be the Name of the parameter and can not be a full ARN.
I've reproduced your problem using the full arn:
MountVolume.SetUp failed for volume "grafana-db-creds" : rpc error: code = Unavailable desc = failed to mount secrets store objects for pod default/pod, err: rpc error: code = Unavailable desc = error reading from server: EOF
And I've confirmed that the container starts up and mounts as intended when using just the name.
An additional note: I can't see your full deployment specification file so it's impossible to know, but if you check the examples/ExampleDeployment.yaml
you'll see that the
volumeMounts:
- name: grafana-db-creds
mountPath: /mnt/secrets
readOnly: true
env:
- name: GF_SECURITY_ADMIN_USER
valueFrom:
secretKeyRef:
name: grafana-db-creds
key: username
- name: GF_SECURITY_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: grafana-db-creds
key: password
block is included in the containers
section and is therefore not at the same indentation as volumes
which is what your deployment specification seems to be.
Describe the bug When trying to mount secrets coming from SSM in JSON format the secrets fail to be mounted.
To Reproduce
Steps to reproduce the behaviour: Adding
secrets.yaml
as follows:... and then try to use it within a deployment as
From describe pod I can see
From
secrets-store-csi-driver-provider-aws*
pod I can seeDo you also notice this bug when using a different secrets store provider (Vault/Azure/GCP...)? Yes/No
If yes, the issue is likely with the k8s Secrets Store CSI driver, not the AWS provider. Open an issue in that repo.
Expected behavior The secret should be retrieved from SSM and being mounted to be available for the container.
Environment: OS, Go version, etc. EKS, AWS, kubernetes 1.28, driver version can be seen on details above.
Additional context I was trying to deploy grafana using Helm in EKS using kubectl manually. The role associated with the service account exists and has the proper permissions. The SSM path exists and its a JSON with user, password on it