From de5bd8de1ab33987e69aefd0debc818656887cbc Mon Sep 17 00:00:00 2001 From: "Addo.Zhang" Date: Sat, 16 Jan 2021 06:54:37 +0800 Subject: [PATCH] injector: fix bug where existing volumes in pod spec are not preserved (#2238) Signed-off-by: addozhang --- pkg/injector/patch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/injector/patch.go b/pkg/injector/patch.go index 9f58e0950c..426a0dcc5c 100644 --- a/pkg/injector/patch.go +++ b/pkg/injector/patch.go @@ -45,7 +45,7 @@ func (wh *mutatingWebhook) createPatch(pod *corev1.Pod, req *v1beta1.AdmissionRe } // Create volume for envoy TLS secret - pod.Spec.Volumes = getVolumeSpec(envoyBootstrapConfigName) + pod.Spec.Volumes = append(pod.Spec.Volumes, getVolumeSpec(envoyBootstrapConfigName)...) // Add the Init Container initContainer := getInitContainerSpec(constants.InitContainerName, wh.config.InitContainerImage)