{{- if eq .Values.kind "Deployment" }} {{- if and .Values.clustered (not .Values.cluster.ha_ap_mode) }} {{- fail ".Values.kind is set to Deployment but this is unsupported in a clustered environment. Use a StatefulSet" }} {{- else }} apiVersion: apps/v1 kind: Deployment metadata: labels: application: {{ .Values.application.name }} name: {{ tpl .Values.templates.deployment . }} {{- if .Values.clustered }} annotations: {{- include "drainer.pod" . | nindent 6 }} {{- end }} spec: replicas: 1 revisionHistoryLimit: 2 selector: matchLabels: application: {{ .Values.application.name }} strategy: type: Recreate template: metadata: # trigger deployments on config map changes annotations: configmap/checksum: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} labels: application: {{ .Values.application.name }} deployment: {{ tpl .Values.templates.deployment . }} name: {{ tpl .Values.templates.deployment . }} spec: {{- include "amq.pod" . | nindent 6 }} {{- end }} {{- end }}