File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,23 +15,22 @@ spec:
1515 {{- include "appscode.imagePullSecrets" . | nindent 6 }}
1616 serviceAccountName : {{ include "service-gateway.fullname" . }}-gwclass-cleaner
1717 automountServiceAccountToken : true
18+ {{- if eq "true" ( include "distro.openshift" . ) }}
1819 securityContext :
19- runAsNonRoot : true
20- runAsUser : 65534
21- seccompProfile :
22- type : RuntimeDefault
20+ {{- toYaml (omit .Values.cleaner.podSecurityContext "runAsUser" "runAsGroup" "fsGroup" "supplementalGroups") | nindent 8 }}
21+ {{- else }}
22+ securityContext :
23+ {{- toYaml .Values.cleaner.podSecurityContext | nindent 8 }}
24+ {{- end }}
2325 containers :
2426 - name : kubectl
27+ {{- if eq "true" ( include "distro.openshift" . ) }}
28+ securityContext :
29+ {{- toYaml (omit .Values.cleaner.securityContext "runAsUser" "runAsGroup" "fsGroup" "supplementalGroups") | nindent 12 }}
30+ {{- else }}
2531 securityContext :
26- allowPrivilegeEscalation : false
27- capabilities :
28- drop : ["ALL"]
29- privileged : false
30- readOnlyRootFilesystem : true
31- runAsNonRoot : true
32- runAsUser : 65534
33- seccompProfile :
34- type : RuntimeDefault
32+ {{- toYaml .Values.cleaner.securityContext | nindent 12 }}
33+ {{- end }}
3534 image : " {{ include " kubectl.registry" . }}/{{ .Values.kubectl.repository }}:{{ .Values.kubectl.tag }}"
3635 imagePullPolicy : {{ .Values.kubectl.pullPolicy }}
3736 command :
Original file line number Diff line number Diff line change @@ -168,3 +168,18 @@ kubectl:
168168# and shuts down before it can remove the finalizer.
169169cleaner :
170170 enabled : false
171+ podSecurityContext :
172+ runAsNonRoot : true
173+ runAsUser : 65534
174+ seccompProfile :
175+ type : RuntimeDefault
176+ securityContext :
177+ allowPrivilegeEscalation : false
178+ capabilities :
179+ drop : ["ALL"]
180+ privileged : false
181+ readOnlyRootFilesystem : true
182+ runAsNonRoot : true
183+ runAsUser : 65534
184+ seccompProfile :
185+ type : RuntimeDefault
You can’t perform that action at this time.
0 commit comments