argocd-helm/charts/argo-cd/templates/redis/poddisruptionbudget.yaml
2022-05-22 13:51:41 +02:00

26 lines
893 B
YAML

{{- if .Values.redis.pdb.enabled }}
apiVersion: {{ include "argo-cd.podDisruptionBudget.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ template "argo-cd.redis.fullname" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }}
{{- with .Values.redis.pdb.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.redis.pdb.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.redis.pdb.minAvailable }}
minAvailable: {{ .Values.redis.pdb.minAvailable }}
{{- else if .Values.redis.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.redis.pdb.maxUnavailable }}
{{- else }}
minAvailable: 0
{{- end }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.redis.name }}
{{- end }}