2026-02-11 15:04:45 +02:00

27 lines
884 B
YAML

{{- if .Values.podDisruptionBudget.enabled }}
{{- if .Capabilities.APIVersions.Has "policy/v1beta1" }}
apiVersion: policy/v1beta1
{{- else -}}
apiVersion: policy/v1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: {{ template "victoria-metrics.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "victoria-metrics.common.metaLabels" . | nindent 4 }}
{{- if .Values.podDisruptionBudget.extraLabels }}
{{ toYaml .Values.podDisruptionBudget.extraLabels | indent 4}}
{{- end }}
spec:
{{- if .Values.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
{{- end }}
{{- if .Values.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
{{- end }}
selector:
matchLabels:
{{- include "victoria-metrics.server.matchLabels" . | nindent 6 }}
{{- end }}