mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Simplify etcd image version usage in kubeadm
This commit is contained in:
parent
5a3399f48d
commit
4c2b0731cb
@ -260,11 +260,7 @@ const (
|
||||
MinExternalEtcdVersion = "3.2.18"
|
||||
|
||||
// DefaultEtcdVersion indicates the default etcd version that kubeadm uses
|
||||
DefaultEtcdVersion = "3.3.15"
|
||||
|
||||
// DefaultEtcdImageVersion indicates the etcd image version that kubeadm uses.
|
||||
// For example, the image version of "k8s.gcr.io/etcd:3.3.15-0" is "0".
|
||||
DefaultEtcdImageVersion = "0"
|
||||
DefaultEtcdVersion = "3.3.15-0"
|
||||
|
||||
// PauseVersion indicates the default pause image version for kubeadm
|
||||
PauseVersion = "3.1"
|
||||
|
@ -68,7 +68,7 @@ func GetEtcdImage(cfg *kubeadmapi.ClusterConfiguration) string {
|
||||
etcdImageRepository = cfg.Etcd.Local.ImageRepository
|
||||
}
|
||||
// Etcd uses an imageTag that corresponds to the etcd version matching the Kubernetes version
|
||||
etcdImageTag := fmt.Sprintf("%s-%s", constants.DefaultEtcdVersion, constants.DefaultEtcdImageVersion)
|
||||
etcdImageTag := constants.DefaultEtcdVersion
|
||||
etcdVersion, err := constants.EtcdSupportedVersion(cfg.KubernetesVersion)
|
||||
if err == nil {
|
||||
etcdImageTag = etcdVersion.String()
|
||||
|
Loading…
Reference in New Issue
Block a user