{{/* This is a builder for deployments */}} {{- define "deployment.spec" }} {{- /* (define) */}} # --------------------------------------------------------------------- # The spec is build within the helm library # please check the lib/templates/deployment/spec # --------------------------------------------------------------------- spec: replicas: {{ .Values.workload.replicas | default 1}} selector: matchLabels: {{ include "metadata.selectorLabels" . | indent 6 }} {{ include "lib.deployment.template" . | indent 2 }} {{- end -}} {{- define "lib.deployment.template" -}} {{- /* (define) */ -}} template: metadata: labels: {{- include "metadata.labels" . | nindent 6 }} spec: {{- include "helper.workload.securityContext" . | nindent 4 -}} {{- include "helper.deployment.volumes" . | nindent 4 }} {{- include "helper.deployment.containers" . | nindent 4 }} {{- include "helper.deployment.initContainers" . | nindent 4 }} {{- end -}} {{- /* /(define) */ -}}