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

Issue with CSI not syncing Kubernetes Secret when using environment variables #196

Open
anu1508k opened this issue Nov 23, 2022 · 1 comment
Labels
question Further information is requested

Comments

@anu1508k
Copy link

I have installed helm csi driver with sync.secret enabled set to true. The SecretProviderClass has secretObjectName and pods have mounts .
SecretProviderClass:
apiVersion: secrets-store.csi.x-k8s.io/v1alpha1
kind: SecretProviderClass
metadata:
name: xyz-job-spc
namespace: ${ENV_NAME}
spec:
provider: gcp
parameters:
ClusterRole: secretprovidersyncing-role
secrets: |

  • resourceName: "projects/xyz/secrets/xyz_key_txt_${ENV_NAME}/versions/latest"
    fileName: "key.txt"
    secretObjects:
  • data:
  • key: xyz-key
    objectName: key.txt
    secretName: xyz-secret
    type: Opaque

Pod Spec:

 env:
   -  name: PASSWORD
       valueFrom:
         secretKeyRef:
           name: xyz-secret
           key: xyz-key
  volumeMounts:
    - name: xyz-secret
      mountPath: /etc/xyz/xyz-secret/key.txt
      readOnly: true

serviceAccountName: csi
restartPolicy: Never
volumes:
- name: xyz-secret
csi:
driver: secrets-store.csi.k8s.io
readOnly: true
volumeAttributes:
secretProviderClass: xyz-job-spc

@anu1508k anu1508k added the question Further information is requested label Nov 23, 2022
@r4m-mikhailt
Copy link

I have the same problem.
Setup without Workload Identity doesn't work. And we haven't any documentation about that feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants