injector: fix bug where existing volumes in pod spec are not preserved
@@ -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)
