mirror of https://github.com/kubernetes/kops.git
Merge pull request #15514 from mochilabs/master
Remap all init container images of etcd-manager
This commit is contained in:
commit
cbbe2bee48
|
|
@ -273,14 +273,17 @@ func (b *EtcdManagerBuilder) buildPod(etcdCluster kops.EtcdClusterSpec, instance
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
// Remap image via AssetBuilder
|
|
||||||
remapped, err := b.AssetBuilder.RemapImage(initContainer.Image)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("unable to remap container image %q: %w", initContainer.Image, err)
|
|
||||||
}
|
|
||||||
initContainer.Image = remapped
|
|
||||||
pod.Spec.InitContainers = append(pod.Spec.InitContainers, initContainer)
|
pod.Spec.InitContainers = append(pod.Spec.InitContainers, initContainer)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remap all init container images via AssetBuilder
|
||||||
|
for i, container := range pod.Spec.InitContainers {
|
||||||
|
remapped, err := b.AssetBuilder.RemapImage(container.Image)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("unable to remap init container image %q: %w", container.Image, err)
|
||||||
|
}
|
||||||
|
pod.Spec.InitContainers[i].Image = remapped
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue