github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/cert-manager/templates/deployment.yaml (about) 1 apiVersion: apps/v1 2 kind: Deployment 3 metadata: 4 name: {{ template "cert-manager.fullname" . }} 5 namespace: {{ include "cert-manager.namespace" . }} 6 labels: 7 app: {{ template "cert-manager.name" . }} 8 app.kubernetes.io/name: {{ template "cert-manager.name" . }} 9 app.kubernetes.io/instance: {{ .Release.Name }} 10 app.kubernetes.io/component: "controller" 11 {{- include "labels" . | nindent 4 }} 12 {{- with .Values.deploymentAnnotations }} 13 annotations: 14 {{- toYaml . | nindent 4 }} 15 {{- end }} 16 spec: 17 replicas: {{ .Values.replicaCount }} 18 selector: 19 matchLabels: 20 app.kubernetes.io/name: {{ template "cert-manager.name" . }} 21 app.kubernetes.io/instance: {{ .Release.Name }} 22 app.kubernetes.io/component: "controller" 23 {{- with .Values.strategy }} 24 strategy: 25 {{- toYaml . | nindent 4 }} 26 {{- end }} 27 template: 28 metadata: 29 labels: 30 app: {{ template "cert-manager.name" . }} 31 app.kubernetes.io/name: {{ template "cert-manager.name" . }} 32 app.kubernetes.io/instance: {{ .Release.Name }} 33 app.kubernetes.io/component: "controller" 34 {{- include "labels" . | nindent 8 }} 35 {{- with .Values.podLabels }} 36 {{- toYaml . | nindent 8 }} 37 {{- end }} 38 {{- with .Values.podAnnotations }} 39 annotations: 40 {{- toYaml . | nindent 8 }} 41 {{- end }} 42 {{- if and .Values.prometheus.enabled (not .Values.prometheus.servicemonitor.enabled) }} 43 {{- if not .Values.podAnnotations }} 44 annotations: 45 {{- end }} 46 prometheus.io/path: "/metrics" 47 prometheus.io/scrape: 'true' 48 prometheus.io/port: '9402' 49 {{- end }} 50 spec: 51 serviceAccountName: {{ template "cert-manager.serviceAccountName" . }} 52 {{- if hasKey .Values "automountServiceAccountToken" }} 53 automountServiceAccountToken: {{ .Values.automountServiceAccountToken }} 54 {{- end }} 55 {{- with .Values.global.priorityClassName }} 56 priorityClassName: {{ . | quote }} 57 {{- end }} 58 {{- with .Values.securityContext }} 59 securityContext: 60 {{- toYaml . | nindent 8 }} 61 {{- end }} 62 {{- with .Values.volumes }} 63 volumes: 64 {{- toYaml . | nindent 8 }} 65 {{- end }} 66 containers: 67 - name: {{ .Chart.Name }} 68 {{- with .Values.image }} 69 image: "{{- if .registry -}}{{ .registry }}/{{- end -}}{{ .repository }}{{- if (.digest) -}} @{{ .digest }}{{- else -}}:{{ default $.Chart.AppVersion .tag }} {{- end -}}" 70 {{- end }} 71 imagePullPolicy: {{ .Values.image.pullPolicy }} 72 args: 73 {{- if .Values.global.logLevel }} 74 - --v={{ .Values.global.logLevel }} 75 {{- end }} 76 {{- if .Values.clusterResourceNamespace }} 77 - --cluster-resource-namespace={{ .Values.clusterResourceNamespace }} 78 {{- else }} 79 - --cluster-resource-namespace=$(POD_NAMESPACE) 80 {{- end }} 81 {{- with .Values.global.leaderElection }} 82 - --leader-election-namespace={{ .namespace }} 83 {{- if .leaseDuration }} 84 - --leader-election-lease-duration={{ .leaseDuration }} 85 {{- end }} 86 {{- if .renewDeadline }} 87 - --leader-election-renew-deadline={{ .renewDeadline }} 88 {{- end }} 89 {{- if .retryPeriod }} 90 - --leader-election-retry-period={{ .retryPeriod }} 91 {{- end }} 92 {{- end }} 93 {{- with .Values.extraArgs }} 94 {{- toYaml . | nindent 10 }} 95 {{- end }} 96 {{- with .Values.ingressShim }} 97 {{- if .defaultIssuerName }} 98 - --default-issuer-name={{ .defaultIssuerName }} 99 {{- end }} 100 {{- if .defaultIssuerKind }} 101 - --default-issuer-kind={{ .defaultIssuerKind }} 102 {{- end }} 103 {{- if .defaultIssuerGroup }} 104 - --default-issuer-group={{ .defaultIssuerGroup }} 105 {{- end }} 106 {{- end }} 107 {{- if .Values.featureGates }} 108 - --feature-gates={{ .Values.featureGates }} 109 {{- end }} 110 ports: 111 - containerPort: 9402 112 name: http-metrics 113 protocol: TCP 114 {{- with .Values.containerSecurityContext }} 115 securityContext: 116 {{- toYaml . | nindent 12 }} 117 {{- end }} 118 {{- with .Values.volumeMounts }} 119 volumeMounts: 120 {{- toYaml . | nindent 12 }} 121 {{- end }} 122 env: 123 - name: POD_NAMESPACE 124 valueFrom: 125 fieldRef: 126 fieldPath: metadata.namespace 127 {{- with .Values.extraEnv }} 128 {{- toYaml . | nindent 10 }} 129 {{- end }} 130 {{- with .Values.http_proxy }} 131 - name: HTTP_PROXY 132 value: {{ . }} 133 {{- end }} 134 {{- with .Values.https_proxy }} 135 - name: HTTPS_PROXY 136 value: {{ . }} 137 {{- end }} 138 {{- with .Values.no_proxy }} 139 - name: NO_PROXY 140 value: {{ . }} 141 {{- end }} 142 {{- with .Values.resources }} 143 resources: 144 {{- toYaml . | nindent 12 }} 145 {{- end }} 146 {{- with .Values.nodeSelector }} 147 nodeSelector: 148 {{- toYaml . | nindent 8 }} 149 {{- end }} 150 {{- with .Values.affinity }} 151 affinity: 152 {{- toYaml . | nindent 8 }} 153 {{- end }} 154 {{- with .Values.tolerations }} 155 tolerations: 156 {{- toYaml . | nindent 8 }} 157 {{- end }} 158 {{- with .Values.podDnsPolicy }} 159 dnsPolicy: {{ . }} 160 {{- end }} 161 {{- with .Values.podDnsConfig }} 162 dnsConfig: 163 {{- toYaml . | nindent 8 }} 164 {{- end }}