Update etcd to v3.5.9

This commit is contained in:
Ciprian Hacman 2023-05-21 06:35:40 +03:00
parent c2d8852e56
commit 2f07263d3d
3 changed files with 5 additions and 13 deletions

View File

@ -1419,19 +1419,12 @@ func validateEtcdStorage(specs []kops.EtcdClusterSpec, fieldPath *field.Path) fi
}
// validateEtcdVersion is responsible for validating the storage version of etcd
// @TODO semvar package doesn't appear to ignore a 'v' in v1.1.1; could be a problem later down the line
func validateEtcdVersion(spec kops.EtcdClusterSpec, fieldPath *field.Path, minimalVersion *semver.Version) field.ErrorList {
// @check if the storage is specified that it's valid
if minimalVersion == nil {
v := semver.MustParse("0.0.0")
minimalVersion = &v
if spec.Version == "" {
return nil
}
version := spec.Version
if spec.Version == "" {
version = components.DefaultEtcd3Version_1_20
}
sem, err := semver.Parse(strings.TrimPrefix(version, "v"))
if err != nil {
@ -1440,7 +1433,7 @@ func validateEtcdVersion(spec kops.EtcdClusterSpec, fieldPath *field.Path, minim
// we only support v3 for now
if sem.Major == 3 {
if sem.LT(*minimalVersion) {
if minimalVersion != nil && sem.LT(*minimalVersion) {
return field.ErrorList{field.Invalid(fieldPath.Child("version"), version, fmt.Sprintf("minimum version required is %s", minimalVersion.String()))}
}
return nil

View File

@ -29,8 +29,7 @@ type EtcdOptionsBuilder struct {
var _ loader.OptionsBuilder = &EtcdOptionsBuilder{}
const (
DefaultEtcd3Version_1_20 = "3.4.13"
DefaultEtcd3Version_1_22 = "3.5.7"
DefaultEtcd3Version_1_22 = "3.5.9"
)
// BuildOptions is responsible for filling in the defaults for the etcd cluster model

View File

@ -69,7 +69,7 @@ var etcdSupportedImages = map[string]string{
"3.2.24": "registry.k8s.io/etcd:3.2.24-1",
"3.3.17": "registry.k8s.io/etcd:3.3.17-0",
"3.4.13": "registry.k8s.io/etcd:3.4.13-0",
"3.5.7": "registry.k8s.io/etcd:3.5.7-0",
"3.5.9": "registry.k8s.io/etcd:3.5.9-0",
}
func etcdSupportedVersions() []string {