From 99705b39202e833e4c723203c17d4b908f8b5d72 Mon Sep 17 00:00:00 2001 From: Alexander Bauer Date: Fri, 16 Dec 2022 02:29:32 +0000 Subject: [PATCH] Add initContainers option Signed-off-by: Alexander Bauer --- charts/coredns/templates/deployment.yaml | 4 ++++ charts/coredns/values.yaml | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/charts/coredns/templates/deployment.yaml b/charts/coredns/templates/deployment.yaml index 7412e19..a0a9489 100644 --- a/charts/coredns/templates/deployment.yaml +++ b/charts/coredns/templates/deployment.yaml @@ -89,6 +89,10 @@ spec: {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.initContainers }} + initContainers: +{{- toYaml .Values.initContainers | nindent 8}} {{- end }} containers: - name: "coredns" diff --git a/charts/coredns/values.yaml b/charts/coredns/values.yaml index e7d21c2..ec8d8f1 100644 --- a/charts/coredns/values.yaml +++ b/charts/coredns/values.yaml @@ -42,6 +42,12 @@ rollingUpdate: maxUnavailable: 1 maxSurge: 25% +## Optionally, add init containers to run before the main CoreDNS container starts up. +# initContainers: +# - name: helloworld +# image: "busybox" +# command: ["bash", "-c", "Hello world"] + # Under heavy load it takes more that standard time to remove Pod endpoint from a cluster. # This will delay termination of our pod by `preStopSleep`. To make sure kube-proxy has # enough time to catch up.