Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,22 @@ securityContext:
capabilities:
drop:
- "ALL"
command: []
command:
- /manager
extraArgs: []
nodeSelector: {}
tolerations: []
extraVolumes: []
extraVolumeMounts: []
affinity: {}

debug:
enabled: true
image:
registry: registry.k8s.io
repository: pause
tag: 3.10

resources:
limits: {}
requests:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,29 @@ spec:
{{- end }}
serviceAccountName: {{ include "gitops-operator.serviceAccountName" . }}
securityContext:
{{- if .Values.debug.enabled }}
runAsNonRoot: false
{{- else }}
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- end }}
containers:
- name: manager
- name: {{ ternary .Values.debug.enabled "debug" "manager" }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- $imageContext := deepCopy .Values.image }}
{{- if not (get $imageContext "tag") }}
{{- $_ := set $imageContext "tag" .Chart.AppVersion }}
{{- if .Values.debug.enabled }}
{{- $imageContext := deepCopy .Values.debug.image }}
{{- else }}
{{- $imageContext := deepCopy .Values.image }}
{{- if not (get $imageContext "tag") }}
{{- $_ := set $imageContext "tag" .Chart.AppVersion }}
{{- end }}
{{- end }}
image: {{ include "codefresh-gitops-runtime.image.name" (dict "image" $imageContext "context" .) }}
env: {{- include "codefresh-gitops-runtime.env-vars" (dict "Values" $mergedValues "context" .) | nindent 8 }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.command }}
command:
{{- if .Values.command }}
{{- .Values.command | toYaml | nindent 8 }}
{{- else }}
command:
- /manager
{{- end }}
{{- with .Values.extraArgs }}
args:
Expand Down