blob: 272bc5092378f1e35a18b89569b77b3065672799 [file] [log] [blame]
Giorgi Lekveishviliec6b3cc2023-12-01 16:30:04 +04001{{- if and .Values.deployment.enabled .Values.podDisruptionBudget -}}
2apiVersion: policy/v1
3kind: PodDisruptionBudget
4metadata:
5 name: {{ template "coredns.fullname" . }}
6 labels: {{- include "coredns.labels" . | nindent 4 }}
7{{- if .Values.customLabels }}
8{{ toYaml .Values.customLabels | indent 4 }}
9{{- end }}
10{{- with .Values.customAnnotations }}
11 annotations:
12{{- toYaml . | nindent 4 }}
13{{- end }}
14spec:
15 selector:
16 matchLabels:
17 app.kubernetes.io/instance: {{ .Release.Name | quote }}
18 {{- if .Values.isClusterService }}
19 k8s-app: {{ template "coredns.k8sapplabel" . }}
20 {{- end }}
21 app.kubernetes.io/name: {{ template "coredns.name" . }}
22{{ toYaml .Values.podDisruptionBudget | indent 2 }}
23{{- end }}