apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "gitlab-job-runner.fullname" . }}-controller-manager namespace: {{ .Release.Namespace }} labels: {{- include "gitlab-job-runner.labels" . | nindent 4 }} control-plane: controller-manager spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: {{- include "gitlab-job-runner.selectorLabels" . | nindent 6 }} control-plane: controller-manager template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "gitlab-job-runner.selectorLabels" . | nindent 8 }} control-plane: controller-manager spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "gitlab-job-runner.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: manager securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} command: - /manager args: {{- if .Values.leaderElection.enabled }} - --leader-elect {{- end }} {{- if .Values.metrics.enabled }} - --metrics-bind-address=:{{ .Values.metrics.port }} {{- if .Values.metrics.secure }} - --metrics-secure=true {{- end }} {{- else }} - --metrics-bind-address=0 {{- end }} - --health-probe-bind-address=:{{ .Values.healthProbe.port }} livenessProbe: httpGet: path: /healthz port: {{ .Values.healthProbe.port }} initialDelaySeconds: 15 periodSeconds: 20 readinessProbe: httpGet: path: /readyz port: {{ .Values.healthProbe.port }} initialDelaySeconds: 5 periodSeconds: 10 resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} terminationGracePeriodSeconds: 10