github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/argo-cd/templates/redis/pdb.yaml (about)

     1  {{- $redisHa := index .Values "redis-ha" -}}
     2  {{- if and .Values.redis.enabled (not $redisHa.enabled) .Values.redis.pdb.enabled }}
     3  apiVersion: policy/v1
     4  kind: PodDisruptionBudget
     5  metadata:
     6    name: {{ include "argo-cd.redis.fullname" . }}
     7    namespace: {{ .Release.Namespace | quote }}
     8    labels:
     9      {{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }}
    10      {{- with .Values.redis.pdb.labels }}
    11        {{- toYaml . | nindent 4 }}
    12      {{- end }}
    13    {{- with .Values.redis.pdb.annotations }}
    14    annotations:
    15      {{- range $key, $value := . }}
    16      {{ $key }}: {{ $value | quote }}
    17      {{- end }}
    18    {{- end }}
    19  spec:
    20    {{- with .Values.redis.pdb.maxUnavailable }}
    21    maxUnavailable: {{ . }}
    22    {{- else }}
    23    minAvailable: {{ .Values.redis.pdb.minAvailable | default 0 }}
    24    {{- end }}
    25    selector:
    26      matchLabels:
    27        app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.redis.name }}
    28  {{- end }}