github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/prometheus-community/kube-prometheus-stack/templates/prometheus/podDisruptionBudget.yaml (about) 1 {{- if and .Values.prometheus.enabled .Values.prometheus.podDisruptionBudget.enabled }} 2 apiVersion: {{ ternary "policy/v1" "policy/v1beta1" (semverCompare ">=1.21.0-0" .Capabilities.KubeVersion.Version) }} 3 kind: PodDisruptionBudget 4 metadata: 5 name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus 6 namespace: {{ template "kube-prometheus-stack.namespace" . }} 7 labels: 8 app: {{ template "kube-prometheus-stack.name" . }}-prometheus 9 {{ include "kube-prometheus-stack.labels" . | indent 4 }} 10 spec: 11 {{- if .Values.prometheus.podDisruptionBudget.minAvailable }} 12 minAvailable: {{ .Values.prometheus.podDisruptionBudget.minAvailable }} 13 {{- end }} 14 {{- if .Values.prometheus.podDisruptionBudget.maxUnavailable }} 15 maxUnavailable: {{ .Values.prometheus.podDisruptionBudget.maxUnavailable }} 16 {{- end }} 17 selector: 18 matchLabels: 19 app.kubernetes.io/name: prometheus 20 prometheus: {{ template "kube-prometheus-stack.prometheus.crname" . }} 21 {{- end }}