blob: 186ced0821875dacbab69d40d2a290f53598569e [file] [log] [blame]
Oleksandr Kozachenkob0093492023-09-06 21:43:47 +02001{{- /*
2Copyright VMware, Inc.
3SPDX-License-Identifier: APACHE-2.0
4*/}}
5
6{{- if .Values.pdb.create }}
7apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
8kind: PodDisruptionBudget
9metadata:
10 name: {{ template "common.names.fullname" . }}
11 namespace: {{ include "common.names.namespace" . | quote }}
Mohammed Naser65cda132024-05-02 14:34:08 -040012 labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
Oleksandr Kozachenkob0093492023-09-06 21:43:47 +020013 app.kubernetes.io/component: keycloak
Oleksandr Kozachenkob0093492023-09-06 21:43:47 +020014 {{- if .Values.commonAnnotations }}
15 annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
16 {{- end }}
17spec:
18 {{- if .Values.pdb.minAvailable }}
19 minAvailable: {{ .Values.pdb.minAvailable }}
20 {{- end }}
21 {{- if .Values.pdb.maxUnavailable }}
22 maxUnavailable: {{ .Values.pdb.maxUnavailable }}
23 {{- end }}
Mohammed Naser65cda132024-05-02 14:34:08 -040024 {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
Oleksandr Kozachenkob0093492023-09-06 21:43:47 +020025 selector:
Mohammed Naser65cda132024-05-02 14:34:08 -040026 matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
Oleksandr Kozachenkob0093492023-09-06 21:43:47 +020027 app.kubernetes.io/component: keycloak
28{{- end }}