From 05c600a2b1764f5b4bc1ef202c8bfe1e3021fe4e Mon Sep 17 00:00:00 2001 From: Vijay Katam Date: Fri, 24 Apr 2020 10:50:26 -0700 Subject: [PATCH] fsGroup is applicable to PodSecurityContext not container 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 --- config/deployment.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/deployment.yml b/config/deployment.yml index e8675d176..a342b2a7d 100644 --- a/config/deployment.yml +++ b/config/deployment.yml @@ -33,7 +33,8 @@ spec: securityContext: runAsUser: 1000 runAsGroup: 2000 - fsGroup: 3000 + securityContext: + fsGroup: 3000 volumes: - name: template-fs emptyDir: