26 lines
851 B
YAML
26 lines
851 B
YAML
{{- if .Values.redis.pdb.enabled }}
|
|
apiVersion: policy/v1beta1
|
|
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 }}
|