mirror of https://github.com/kubernetes/kops.git
Merge pull request #5427 from coreypobrien/fiximagemapping
Remap initContainers as well as containers in PodSpec
This commit is contained in:
commit
a88b7f0f70
|
@ -47,8 +47,10 @@ func (m *imageRemapVisitor) VisitString(path []string, v string, mutator func(st
|
|||
return nil
|
||||
}
|
||||
|
||||
// Deployments look like spec.template.spec.containers.[2].image
|
||||
if n < 3 || path[n-3] != "containers" {
|
||||
// Deployments/DaemonSets/Jobs/StatefulSets have two imapge fields
|
||||
// - spec.template.spec.containers.[2].image
|
||||
// - spec.template.spec.initContainers.[2].image
|
||||
if n < 3 || (path[n-3] != "containers" && path[n-3] != "initContainers") {
|
||||
glog.Warningf("Skipping likely image field: %s", strings.Join(path, "."))
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue