blob: b91e0f11e95218902e1a2d6660290a793f7f1b62 [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 }}
12 labels: {{- include "common.labels.standard" . | nindent 4 }}
13 app.kubernetes.io/component: keycloak
14 {{- if .Values.commonLabels }}
15 {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
16 {{- end }}
17 {{- if .Values.commonAnnotations }}
18 annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
19 {{- end }}
20spec:
21 {{- if .Values.pdb.minAvailable }}
22 minAvailable: {{ .Values.pdb.minAvailable }}
23 {{- end }}
24 {{- if .Values.pdb.maxUnavailable }}
25 maxUnavailable: {{ .Values.pdb.maxUnavailable }}
26 {{- end }}
27 selector:
28 matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }}
29 app.kubernetes.io/component: keycloak
30{{- end }}