rancher-partner-charts/charts/yugabyte/yugaware/templates/pdb.yaml

20 lines
585 B
YAML

{{/*
TODO: switch to policy/v1 completely when we stop supporting
Kubernetes versions < 1.21
*/}}
{{- if .Values.pdbPolicyVersionOverride }}
apiVersion: policy/{{ .Values.pdbPolicyVersionOverride }}
{{- else if .Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" }}
apiVersion: policy/v1
{{- else }}
apiVersion: policy/v1beta1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: {{ .Release.Name }}-yugaware-pdb
spec:
maxUnavailable: {{ .Values.yugaware.podDisruptionBudget.maxUnavailable | toJson }}
selector:
matchLabels:
app: {{ .Release.Name }}-yugaware