Files
devops-infra-helm-charts-gcp/helm-templates/victoria-metrics-cluster/templates/vmselect-pdb.yaml
T
2026-08-26 03:39:42 +05:30

27 lines
930 B
YAML

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