{{/* vim: set filetype=mustache: */}} {{- define "common.deployment.tpl" -}} {{- $autoscaling := .Values.autoscaling | default (dict) -}} apiVersion: apps/v1 kind: Deployment metadata: {{ include "common.metadata" . | nindent 2 }} spec: {{- if not $autoscaling.enabled }} replicas: {{ .Values.replicaCount | default 1 }} {{- end }} selector: matchLabels: {{- include "common.selectorLabels" . | nindent 6 }} template: {{- include "common.pod-template" . | nindent 4 }} {{- end -}} {{- define "common.deployment" -}} {{- include "common.utils.flattenCall" (list "common.utils.merge" . "common.deployment.tpl") -}} {{- end -}}