Merge pull request #112641 from anstns/master

Optimize name rules
This commit is contained in:
Kubernetes Prow Robot 2022-09-22 09:41:15 -07:00 committed by GitHub
commit beb90b4b47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,26 +88,26 @@ func GetEtcdImage(cfg *kubeadmapi.ClusterConfiguration) string {
// GetControlPlaneImages returns a list of container images kubeadm expects to use on a control plane node // GetControlPlaneImages returns a list of container images kubeadm expects to use on a control plane node
func GetControlPlaneImages(cfg *kubeadmapi.ClusterConfiguration) []string { func GetControlPlaneImages(cfg *kubeadmapi.ClusterConfiguration) []string {
imgs := []string{} images := make([]string, 0)
// start with core kubernetes images // start with core kubernetes images
imgs = append(imgs, GetKubernetesImage(constants.KubeAPIServer, cfg)) images = append(images, GetKubernetesImage(constants.KubeAPIServer, cfg))
imgs = append(imgs, GetKubernetesImage(constants.KubeControllerManager, cfg)) images = append(images, GetKubernetesImage(constants.KubeControllerManager, cfg))
imgs = append(imgs, GetKubernetesImage(constants.KubeScheduler, cfg)) images = append(images, GetKubernetesImage(constants.KubeScheduler, cfg))
imgs = append(imgs, GetKubernetesImage(constants.KubeProxy, cfg)) images = append(images, GetKubernetesImage(constants.KubeProxy, cfg))
// pause is not available on the ci image repository so use the default image repository. // pause is not available on the ci image repository so use the default image repository.
imgs = append(imgs, GetPauseImage(cfg)) images = append(images, GetPauseImage(cfg))
// if etcd is not external then add the image as it will be required // if etcd is not external then add the image as it will be required
if cfg.Etcd.Local != nil { if cfg.Etcd.Local != nil {
imgs = append(imgs, GetEtcdImage(cfg)) images = append(images, GetEtcdImage(cfg))
} }
// Append the appropriate DNS images // Append the appropriate DNS images
imgs = append(imgs, GetDNSImage(cfg)) images = append(images, GetDNSImage(cfg))
return imgs return images
} }
// GetPauseImage returns the image for the "pause" container // GetPauseImage returns the image for the "pause" container