blob: 821b4f9f70e1f2f30b7090f2d916bbda2bb522bc [file] [log] [blame]
Sketch🕴️620d57b2025-07-31 22:31:14 +04001{{- /*
2Copyright Broadcom, Inc. All Rights Reserved.
3SPDX-License-Identifier: APACHE-2.0
4*/}}
5
6{{- if .Values.pdb.create }}
7apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
8kind: PodDisruptionBudget
9metadata:
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 }}
16spec:
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 }}