Hello,
I’m trying to understand istio webhook injector and how it injects sidecar here, I had some difficulties to understand what’s happen in the following block on the AddContainer
func
Can anyone please explain to me the general idea ( e.g what’s the idea behind this first := len(target) == 0
and what does it mean “/-” )
first := len(target) == 0
var value interface{}
for _, add := range added {
value = add
path := basePath
if first {
first = false
value = []corev1.Volume{add}
} else {
path += "/-"
}
Thanks for your help!