Skip to content

Commit

Permalink
fsGroup is applicable to PodSecurityContext not container
Browse files Browse the repository at this point in the history
Fixes validation error `error validating data: ValidationError(Deployment.spec.template.spec.containers[0].securityContext): unknown field "fsGroup" in io.k8s.api.core.v1.SecurityContext;`

See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#podsecuritycontext-v1-core and https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#securitycontext-v1-core

Signed-off-by: Vijay Katam <[email protected]>
  • Loading branch information
vijaykatam committed Apr 24, 2020
1 parent 6ec4c4e commit 05c600a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ spec:
securityContext:
runAsUser: 1000
runAsGroup: 2000
fsGroup: 3000
securityContext:
fsGroup: 3000
volumes:
- name: template-fs
emptyDir:
Expand Down

0 comments on commit 05c600a

Please sign in to comment.