mirror of https://github.com/kubernetes/kops.git
Remap all init container images of etcd-manager
This commit is contained in:
parent
75c4051116
commit
63cbe32293
|
@ -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)
|
||||
}
|
||||
|
||||
// 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