Marko Oldenburg e4c7b319e2
All checks were successful
Build Helm Chart / helm-package (push) Successful in 7s
first commit
2025-03-04 07:05:50 +01:00

36 lines
1.1 KiB
YAML

{{- 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 }}