Skip to content

Commit

Permalink
Change the owner of the mount volume to the user other than root (i.e…
Browse files Browse the repository at this point in the history
…. 0) (#370)
  • Loading branch information
dargudear-google authored Dec 28, 2023
1 parent 5769c24 commit 3ba36fc
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions deploy/provider-gcp-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,25 @@ spec:
app: csi-secrets-store-provider-gcp
spec:
serviceAccountName: secrets-store-csi-driver-provider-gcp
initContainers:
- name: chown-provider-mount
image: busybox
command:
- chown
- "1000:1000"
- /etc/kubernetes/secrets-store-csi-providers
volumeMounts:
- mountPath: "/etc/kubernetes/secrets-store-csi-providers"
name: providervol
hostNetwork: false
hostPID: false
hostIPC: false
containers:
- name: provider
image: us-docker.pkg.dev/secretmanager-csi/secrets-store-csi-driver-provider-gcp/plugin@sha256:bf97decbbd5b5894662c438b6720bc3e42815301a507f5a52bd75771c0488cb6
securityContext:
runAsUser: 0
runAsGroup: 0
runAsUser: 1000
runAsGroup: 1000
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
seccompProfile:
Expand Down

0 comments on commit 3ba36fc

Please sign in to comment.