27 lines
985 B
YAML
27 lines
985 B
YAML
kind: PodDisruptionBudget
|
|
{{- if or (.Capabilities.APIVersions.Has "policy/v1") (semverCompare ">=1.21-0" .Capabilities.KubeVersion.Version) }}
|
|
apiVersion: policy/v1
|
|
{{- else }}
|
|
apiVersion: policy/v1beta1
|
|
{{- end }}
|
|
metadata:
|
|
name: {{ template "cockroachdb.fullname" . }}-budget
|
|
namespace: {{ .Release.Namespace | quote }}
|
|
labels:
|
|
helm.sh/chart: {{ template "cockroachdb.chart" . }}
|
|
app.kubernetes.io/name: {{ template "cockroachdb.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name | quote }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
|
|
{{- with .Values.labels }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: {{ template "cockroachdb.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name | quote }}
|
|
{{- with .Values.statefulset.labels }}
|
|
{{- toYaml . | nindent 6 }}
|
|
{{- end }}
|
|
maxUnavailable: {{ .Values.statefulset.budget.maxUnavailable | int64 }}
|