| Giorgi Lekveishvili | ec6b3cc | 2023-12-01 16:30:04 +0400 | [diff] [blame] | 1 | {{- if and .Values.deployment.enabled .Values.podDisruptionBudget -}} |
| 2 | apiVersion: policy/v1 |
| 3 | kind: PodDisruptionBudget |
| 4 | metadata: |
| 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 }} |
| 14 | spec: |
| 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 }} |