| Sketch🕴️ | 620d57b | 2025-07-31 22:31:14 +0400 | [diff] [blame] | 1 | {{- /* |
| 2 | Copyright Broadcom, Inc. All Rights Reserved. |
| 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: {{ include "common.names.fullname" . }} |
| 11 | namespace: {{ include "common.names.namespace" . | quote }} |
| 12 | labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} |
| 13 | {{- if .Values.commonAnnotations }} |
| 14 | annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} |
| 15 | {{- end }} |
| 16 | spec: |
| 17 | {{- if .Values.pdb.minAvailable }} |
| 18 | minAvailable: {{ .Values.pdb.minAvailable }} |
| 19 | {{- end }} |
| 20 | {{- if or .Values.pdb.maxUnavailable (not .Values.pdb.minAvailable)}} |
| 21 | maxUnavailable: {{ .Values.pdb.maxUnavailable | default 1 }} |
| 22 | {{- end }} |
| 23 | {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }} |
| 24 | selector: |
| 25 | matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} |
| 26 | {{- end }} |