Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions deploy-templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ A Helm chart for KubeRocketCI Gerrit Operator
| imagePullSecrets | list | `[]` | Optional array of imagePullSecrets containing private registry credentials # Ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry |
| name | string | `"gerrit-operator"` | component name |
| nodeSelector | object | `{}` | |
| podSecurityContext | object | `{"runAsNonRoot":true}` | Pod Security Context Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ |
| projectSyncInterval | string | `"1h"` | Format: golang time.Duration-formatted string |
| resources.limits.memory | string | `"192Mi"` | |
| resources.requests.cpu | string | `"50m"` | |
| resources.requests.memory | string | `"64Mi"` | |
| securityContext | object | `{"allowPrivilegeEscalation":false}` | Container Security Context Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ |
| tolerations | list | `[]` | |

10 changes: 6 additions & 4 deletions deploy-templates/templates/operator_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ spec:
name: {{ .Values.name }}
spec:
serviceAccountName: "edp-{{ .Values.name }}"
securityContext:
runAsNonRoot: true
{{- if .Values.podSecurityContext }}
securityContext: {{ toYaml .Values.podSecurityContext | nindent 8 }}
{{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 8 }}
{{- end }}
Expand All @@ -31,8 +32,9 @@ spec:
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
command:
- {{ .Values.name }}
securityContext:
allowPrivilegeEscalation: false
{{- if .Values.securityContext }}
securityContext: {{ toYaml .Values.securityContext | nindent 12 }}
{{- end }}
env:
- name: WATCH_NAMESPACE
valueFrom:
Expand Down
10 changes: 10 additions & 0 deletions deploy-templates/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ resources:
cpu: 50m
memory: 64Mi

# -- Pod Security Context
# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
podSecurityContext:
runAsNonRoot: true

# -- Container Security Context
# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
securityContext:
allowPrivilegeEscalation: false

gerrit:
# -- Flag to enable/disable Gerrit deploy
deploy: true
Expand Down
Loading