apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "cert-manager-ibm-cis-webhook.fullname" . }} namespace: {{ .Release.Namespace | quote }} labels: app: {{ include "cert-manager-ibm-cis-webhook.name" . }} chart: {{ include "cert-manager-ibm-cis-webhook.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: app: {{ include "cert-manager-ibm-cis-webhook.name" . }} release: {{ .Release.Name }} template: metadata: labels: app: {{ include "cert-manager-ibm-cis-webhook.name" . }} release: {{ .Release.Name }} annotations: checksum/secrets: {{ include (print $.Template.BasePath "/secret.yaml") $ | sha256sum }} spec: securityContext: runAsNonRoot: true serviceAccountName: {{ include "cert-manager-ibm-cis-webhook.fullname" . }} imagePullSecrets: {{- range .Values.imagePullSecrets }} - name: {{ .name | quote }} {{- end }} containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} args: - --secure-port={{ .Values.containerPort }} - --tls-cert-file=/tls/tls.crt - --tls-private-key-file=/tls/tls.key env: - name: GROUP_NAME value: {{ .Values.groupName | quote }} - name: IBMCLOUD_API_KEY valueFrom: secretKeyRef: name: {{ include "cert-manager-ibm-cis-webhook.fullname" . }}-ibmcis-credentials key: api-token ports: - name: https containerPort: {{ .Values.containerPort }} protocol: TCP livenessProbe: httpGet: scheme: HTTPS path: /healthz port: https readinessProbe: httpGet: scheme: HTTPS path: /healthz port: https securityContext: runAsNonRoot: true readOnlyRootFilesystem: true capabilities: drop: - ALL volumeMounts: - name: certs mountPath: /tls readOnly: true resources: {{ toYaml .Values.resources | indent 12 }} volumes: - name: certs secret: secretName: {{ include "cert-manager-ibm-cis-webhook.servingCertificate" . }} {{- with .Values.nodeSelector }} nodeSelector: {{ toYaml . | indent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{ toYaml . | indent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{ toYaml . | indent 8 }} {{- end }}