Oleksandr Kozachenko | b009349 | 2023-09-06 21:43:47 +0200 | [diff] [blame] | 1 | {{- /* |
| 2 | Copyright VMware, Inc. |
| 3 | SPDX-License-Identifier: APACHE-2.0 |
| 4 | */}} |
| 5 | |
| 6 | {{- if .Values.pdb.create }} |
| 7 | apiVersion: {{ include "common.capabilities.policy.apiVersion" . }} |
| 8 | kind: PodDisruptionBudget |
| 9 | metadata: |
| 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 }} |
| 20 | spec: |
| 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 }} |