File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed
Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -65,9 +65,11 @@ A Helm chart for KubeRocketCI Gerrit Operator
6565| imagePullSecrets | list | ` [] ` | Optional array of imagePullSecrets containing private registry credentials # Ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry |
6666| name | string | ` "gerrit-operator" ` | component name |
6767| nodeSelector | object | ` {} ` | |
68+ | podSecurityContext | object | ` {"runAsNonRoot":true} ` | Pod Security Context Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ |
6869| projectSyncInterval | string | ` "1h" ` | Format: golang time.Duration-formatted string |
6970| resources.limits.memory | string | ` "192Mi" ` | |
7071| resources.requests.cpu | string | ` "50m" ` | |
7172| resources.requests.memory | string | ` "64Mi" ` | |
73+ | securityContext | object | ` {"allowPrivilegeEscalation":false} ` | Container Security Context Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ |
7274| tolerations | list | ` [] ` | |
7375
Original file line number Diff line number Diff line change 1919 name : {{ .Values.name }}
2020 spec :
2121 serviceAccountName : " edp-{{ .Values.name }}"
22- securityContext :
23- runAsNonRoot : true
22+ {{- if .Values.podSecurityContext }}
23+ securityContext : {{ toYaml .Values.podSecurityContext | nindent 8 }}
24+ {{- end }}
2425 {{- if .Values.imagePullSecrets }}
2526 imagePullSecrets : {{ toYaml .Values.imagePullSecrets | nindent 8 }}
2627 {{- end }}
3132 imagePullPolicy : " {{ .Values.imagePullPolicy }}"
3233 command :
3334 - {{ .Values.name }}
34- securityContext :
35- allowPrivilegeEscalation : false
35+ {{- if .Values.securityContext }}
36+ securityContext : {{ toYaml .Values.securityContext | nindent 12 }}
37+ {{- end }}
3638 env :
3739 - name : WATCH_NAMESPACE
3840 valueFrom :
Original file line number Diff line number Diff line change @@ -50,6 +50,16 @@ resources:
5050 cpu : 50m
5151 memory : 64Mi
5252
53+ # -- Pod Security Context
54+ # Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
55+ podSecurityContext :
56+ runAsNonRoot : true
57+
58+ # -- Container Security Context
59+ # Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
60+ securityContext :
61+ allowPrivilegeEscalation : false
62+
5363gerrit :
5464 # -- Flag to enable/disable Gerrit deploy
5565 deploy : true
You can’t perform that action at this time.
0 commit comments