Skip to content

Commit

Permalink
refactor: wrap the injection in a feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Sep 29, 2023
1 parent dc0d80d commit a1a3a60
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 13 deletions.
4 changes: 3 additions & 1 deletion legacy/build-deploy-docker-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,9 @@ set +x
if [ "$(featureFlag ROOTLESS_WORKLOAD)" = enabled ]; then
yq3 merge -ix -- /kubectl-build-deploy/values.yaml /kubectl-build-deploy/rootless.values.yaml
fi

if [ "$(featureFlag FS_ON_ROOT_MISMATCH)" = enabled ]; then
yq3 write -i -- /kubectl-build-deploy/values.yaml 'podSecurityContext.fsGroupChangePolicy' "OnRootMismatch"
fi
if [ "${SCC_CHECK}" != "false" ]; then
# openshift permissions are different, this is to set the fsgroup to the supplemental group from the openshift annotations
# this applies it to all deployments in this environment because we don't isolate by service type its applied to all
Expand Down
3 changes: 1 addition & 2 deletions legacy/helmcharts/basic-persistent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

podSecurityContext:
fsGroupChangePolicy: "OnRootMismatch"
podSecurityContext: {}

securityContext: {}
# capabilities:
Expand Down
3 changes: 1 addition & 2 deletions legacy/helmcharts/cli-persistent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

podSecurityContext:
fsGroupChangePolicy: "OnRootMismatch"
podSecurityContext: {}

securityContext: {}
# capabilities:
Expand Down
3 changes: 1 addition & 2 deletions legacy/helmcharts/nginx-php-persistent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

podSecurityContext:
fsGroupChangePolicy: "OnRootMismatch"
podSecurityContext: {}

securityContext: {}
# capabilities:
Expand Down
4 changes: 2 additions & 2 deletions legacy/helmcharts/node-persistent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

podSecurityContext:
fsGroupChangePolicy: "OnRootMismatch"
podSecurityContext: {}

securityContext: {}
# capabilities:
# drop:
Expand Down
3 changes: 1 addition & 2 deletions legacy/helmcharts/python-persistent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

podSecurityContext:
fsGroupChangePolicy: "OnRootMismatch"
podSecurityContext: {}

securityContext: {}
# capabilities:
Expand Down
3 changes: 1 addition & 2 deletions legacy/helmcharts/worker-persistent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

podSecurityContext:
fsGroupChangePolicy: "OnRootMismatch"
podSecurityContext: {}

securityContext: {}
# capabilities:
Expand Down

0 comments on commit a1a3a60

Please sign in to comment.