kubezero/charts/kubezero-metrics/charts/prometheus-pushgateway/templates/pdb.yaml

18 lines
586 B
YAML

{{- if .Values.podDisruptionBudget -}}
{{ if $.Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" -}}
apiVersion: policy/v1
{{- else -}}
apiVersion: policy/v1beta1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: {{ template "prometheus-pushgateway.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{ template "prometheus-pushgateway.defaultLabels" merge (dict "extraLabels" .Values.podLabels) . }}
spec:
selector:
matchLabels:
app: {{ template "prometheus-pushgateway.name" . }}
{{ toYaml .Values.podDisruptionBudget | indent 2 }}
{{- end -}}