2021-06-24 01:55:05 +00:00
|
|
|
kind: PodDisruptionBudget
|
2023-07-19 14:21:37 +00:00
|
|
|
{{- if or (.Capabilities.APIVersions.Has "policy/v1") (semverCompare ">=1.21-0" .Capabilities.KubeVersion.Version) }}
|
2022-10-26 08:01:31 +00:00
|
|
|
apiVersion: policy/v1
|
|
|
|
{{- else }}
|
2021-06-24 01:55:05 +00:00
|
|
|
apiVersion: policy/v1beta1
|
2022-10-26 08:01:31 +00:00
|
|
|
{{- end }}
|
2021-06-24 01:55:05 +00:00
|
|
|
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 }}
|