Files
charts/bitnami/cert-manager/templates/controller/deployment.yaml
alvneiayu 35d81616db [bitnami/cert-manager] Include Cert Manager (#6271)
* [bitnami/cert-manager] Include Cert Manager

* Fix Chart.yaml

* Include CRDs

* Modify cert manager chart to include the changes requested

- Modify certManager name to certmanager inside _helpers.tpl
- Modify category from Infrastructure to CertificateAuthority
- Change apiVersion to V2
- Include new keywords suggestion
- Complete values.yaml with values forgotten (modified controller, webhook and cainjector values.yaml sections)
- Modify values.yaml Readmenator correct structure
- Move logLevel and leaderElection namespace to common section
- Change prometheus section to metric
- Include quotes in all the namespaces
- Include Custom https port key for the webhook service
- Allow custom service name in our serviceaccount yamls.
- Move all controller files from template to template/controller

* Modify cert manager chart to include the new round of changes requested

- Remove extra space inside Chart.yaml
- Remove unneeded comments inside values.yaml
- Include replicaCount in each component inside the cert manager (controller, webhook and cainjector).
- Moved RBAC parameters to "Other parameters" section
- Added generic comment to reference Bitnami image
- Remove customStartupProbe, customLivenessProbe and customReadinessProbe in controller and cainjector.
- Set up prometheus port dinamically inside the ServiceMonitor and values.yaml
- Remove yamllint unneeded comments
- Include validateValues function
- Modify the README TIPOs and include new values.yaml changes.

* Commit unneeded global section

* Missing starting space in global comment

* Restore global values

* Modify cert manager chart to include the changes requested

 - Include NOTES.txt
 - Delete '---' lines inside service files
 - Modify service names
 - Include targetPort in ServiceMonitor
 - Set up port number instead of controller label in service monitor to make it works

* [bitnami/cert-manager] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

Co-authored-by: Bitnami Containers <containers@bitnami.com>
2021-05-18 16:48:28 +02:00

127 lines
6.9 KiB
YAML

apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ include "certmanager.controller.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: controller
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: controller
{{- if .Values.controller.updateStrategy }}
strategy: {{- toYaml .Values.controller.updateStrategy | nindent 4 }}
{{- end }}
replicas: {{ .Values.controller.replicaCount }}
template:
metadata:
labels: {{- include "common.labels.standard" . | nindent 8 }}
app.kubernetes.io/component: controller
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }}
{{- end }}
{{- if .Values.controller.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.controller.podLabels "context" $) | nindent 8 }}
{{- end }}
annotations:
{{- if .Values.controller.podAnnotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.controller.podAnnotations "context" $) | nindent 8 }}
{{- end }}
{{- if and .Values.metrics.enabled (not .Values.metrics.serviceMonitor.enabled) }}
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.podAnnotations "context" $) | nindent 8 }}
{{- end }}
spec:
{{- include "certmanager.imagePullSecrets" . | nindent 6 }}
{{- if .Values.controller.podSecurityContext.enabled }}
securityContext: {{- omit .Values.controller.podSecurityContext "enabled" | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.controller.priorityClassName }}
priorityClassName: {{ .Values.controller.priorityClassName | quote }}
{{- end }}
{{- if .Values.controller.affinity }}
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.controller.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.controller.podAffinityPreset "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.controller.podAntiAffinityPreset "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.controller.nodeAffinityPreset.type "key" .Values.controller.nodeAffinityPreset.key "values" .Values.controller.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.controller.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.controller.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.controller.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.controller.tolerations "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.controller.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.controller.hostAliases "context" $) | nindent 8 }}
{{- end }}
initContainers:
{{- if .Values.controller.initContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.controller.initContainers "context" $) | nindent 8 }}
{{- end }}
serviceAccountName: {{ template "certmanager.controller.serviceAccountName" . }}
containers:
- name: {{ include "certmanager.controller.fullname" . }}
image: {{ template "certmanager.image" . }}
imagePullPolicy: {{ .Values.controller.image.pullPolicy | quote }}
{{- if .Values.controller.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.controller.command "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.controller.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.controller.args "context" $) | nindent 12 }}
{{- else }}
args:
- --v={{ .Values.logLevel }}
- --cluster-resource-namespace=$(POD_NAMESPACE)
- --leader-election-namespace={{ .Values.leaderElection.namespace }}
- --acme-http01-solver-image={{ template "certmanager.acmesolver.image" . }}
{{- end }}
{{- if .Values.controller.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.controller.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
env:
- name: BITNAMI_DEBUG
value: {{ ternary "true" "false" .Values.controller.image.debug | quote }}
{{- if .Values.controller.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.controller.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
envFrom:
{{- if .Values.controller.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.controller.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.controller.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.controller.extraEnvVarsSecret "context" $) }}
{{- end }}
{{- if .Values.controller.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.controller.lifecycleHooks "context" $) | nindent 12 }}
{{- end }}
ports:
- protocol: TCP
containerPort: {{ .Values.controller.containerPort }}
{{- if .Values.controller.resources }}
resources: {{- toYaml .Values.controller.resources | nindent 12 }}
{{- end }}
volumeMounts:
{{- if .Values.controller.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.controller.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.controller.sidecars }}
{{- include "common.tplvalues.render" (dict "value" .Values.controller.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
{{- if .Values.controller.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.controller.extraVolumes "context" $) | nindent 8 }}
{{- end }}