| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- {{- if and .Values.certController.create (not .Values.webhook.certManager.enabled) }}
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: {{ include "external-secrets.fullname" . }}-cert-controller
- namespace: {{ .Release.Namespace | quote }}
- labels:
- {{- include "external-secrets-cert-controller.labels" . | nindent 4 }}
- {{- with .Values.certController.deploymentAnnotations }}
- annotations:
- {{- toYaml . | nindent 4 }}
- {{- end }}
- spec:
- replicas: {{ .Values.certController.replicaCount }}
- revisionHistoryLimit: {{ .Values.certController.revisionHistoryLimit }}
- selector:
- matchLabels:
- {{- include "external-secrets-cert-controller.selectorLabels" . | nindent 6 }}
- template:
- metadata:
- {{- with .Values.certController.podAnnotations }}
- annotations:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- labels:
- {{- include "external-secrets-cert-controller.labels" . | nindent 8 }}
- {{- with .Values.certController.podLabels }}
- {{- toYaml . | nindent 8 }}
- {{- end }}
- spec:
- {{- with .Values.certController.imagePullSecrets }}
- imagePullSecrets:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- serviceAccountName: {{ include "external-secrets-cert-controller.serviceAccountName" . }}
- automountServiceAccountToken: {{ .Values.certController.serviceAccount.automount }}
- {{- with .Values.certController.podSecurityContext }}
- securityContext:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- hostNetwork: {{ .Values.certController.hostNetwork }}
- containers:
- - name: cert-controller
- {{- with .Values.certController.securityContext }}
- securityContext:
- {{- toYaml . | nindent 12 }}
- {{- end }}
- image: "{{ .Values.certController.image.repository }}:{{ .Values.certController.image.tag | default .Chart.AppVersion }}"
- imagePullPolicy: {{ .Values.certController.image.pullPolicy }}
- args:
- - certcontroller
- - --crd-requeue-interval={{ .Values.certController.requeueInterval }}
- - --service-name={{ include "external-secrets.fullname" . }}-webhook
- - --service-namespace={{ .Release.Namespace }}
- - --secret-name={{ include "external-secrets.fullname" . }}-webhook
- - --secret-namespace={{ .Release.Namespace }}
- - --metrics-addr=:{{ .Values.certController.metrics.listen.port }}
- - --healthz-addr={{ .Values.certController.readinessProbe.address }}:{{ .Values.certController.readinessProbe.port }}
- {{ if not .Values.crds.createClusterSecretStore -}}
- - --crd-names=externalsecrets.external-secrets.io
- - --crd-names=secretstores.external-secrets.io
- {{- end -}}
- {{- range $key, $value := .Values.certController.extraArgs }}
- {{- if $value }}
- - --{{ $key }}={{ $value }}
- {{- else }}
- - --{{ $key }}
- {{- end }}
- {{- end }}
- ports:
- - containerPort: {{ .Values.certController.metrics.listen.port }}
- protocol: TCP
- name: metrics
- readinessProbe:
- httpGet:
- port: {{ .Values.certController.readinessProbe.port }}
- path: /readyz
- initialDelaySeconds: 20
- periodSeconds: 5
- {{- with .Values.certController.extraEnv }}
- env:
- {{- toYaml . | nindent 12 }}
- {{- end }}
- {{- with .Values.certController.resources }}
- resources:
- {{- toYaml . | nindent 12 }}
- {{- end }}
- {{- if .Values.certController.extraVolumeMounts }}
- volumeMounts:
- {{- toYaml .Values.certController.extraVolumeMounts | nindent 12 }}
- {{- end }}
- {{- if .Values.certController.extraVolumes }}
- volumes:
- {{- toYaml .Values.certController.extraVolumes | nindent 8 }}
- {{- end }}
- {{- with .Values.certController.nodeSelector }}
- nodeSelector:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.certController.affinity }}
- affinity:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.certController.tolerations }}
- tolerations:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.certController.topologySpreadConstraints }}
- topologySpreadConstraints:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- if .Values.certController.priorityClassName }}
- priorityClassName: {{ .Values.certController.priorityClassName }}
- {{- end }}
- {{- end }}
|