Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce 1.14 deprecation #10897

Merged
merged 1 commit into from
Feb 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/apis/kops/validation/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ func validateEtcdVersion(spec kops.EtcdClusterSpec, fieldPath *field.Path, minim

version := spec.Version
if spec.Version == "" {
version = components.DefaultEtcd3Version_1_13
version = components.DefaultEtcd3Version_1_14
}

sem, err := semver.Parse(strings.TrimPrefix(version, "v"))
Expand Down
6 changes: 0 additions & 6 deletions pkg/model/components/clusterautoscaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ func (b *ClusterAutoscalerOptionsBuilder) BuildOptions(o interface{}) error {
image = "k8s.gcr.io/autoscaling/cluster-autoscaler:v1.16.7"
case 15:
image = "k8s.gcr.io/autoscaling/cluster-autoscaler:v1.15.7"
case 14:
image = "k8s.gcr.io/autoscaling/cluster-autoscaler:v1.14.8"
case 13:
image = "gcr.io/google-containers/cluster-autoscaler:v1.13.9"
case 12:
image = "gcr.io/google-containers/cluster-autoscaler:v1.12.8"
}
}
cas.Image = fi.String(image)
Expand Down
6 changes: 1 addition & 5 deletions pkg/model/components/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ type EtcdOptionsBuilder struct {
var _ loader.OptionsBuilder = &EtcdOptionsBuilder{}

const (
DefaultEtcd3Version_1_13 = "3.2.24"

DefaultEtcd3Version_1_14 = "3.3.10"

DefaultEtcd3Version_1_17 = "3.4.3"
Expand All @@ -60,10 +58,8 @@ func (b *EtcdOptionsBuilder) BuildOptions(o interface{}) error {
c.Version = DefaultEtcd3Version_1_19
} else if b.IsKubernetesGTE("1.17") {
c.Version = DefaultEtcd3Version_1_17
} else if b.IsKubernetesGTE("1.14") {
c.Version = DefaultEtcd3Version_1_14
} else {
c.Version = DefaultEtcd3Version_1_13
c.Version = DefaultEtcd3Version_1_14
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/model/components/kubecontrollermanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func buildCluster() *api.Cluster {
return &api.Cluster{
Spec: api.ClusterSpec{
CloudProvider: "aws",
KubernetesVersion: "v1.14.0",
KubernetesVersion: "v1.15.0",
KubeAPIServer: &api.KubeAPIServerConfig{},
},
}
Expand Down
18 changes: 7 additions & 11 deletions pkg/model/components/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,14 @@ func (b *KubeletOptionsBuilder) BuildOptions(o interface{}) error {

// AllowPrivileged is deprecated and removed in v1.14.
// See https://github.com/kubernetes/kubernetes/pull/71835
if b.IsKubernetesGTE("1.14") {
if clusterSpec.Kubelet.AllowPrivileged != nil {
// If it is explicitly set to false, return an error, because this
// behavior is no longer supported in v1.14 (the default was true, prior).
if !*clusterSpec.Kubelet.AllowPrivileged {
klog.Warningf("Kubelet's --allow-privileged flag is no longer supported in v1.14.")
}
// Explicitly set it to nil, so it won't be passed on the command line.
clusterSpec.Kubelet.AllowPrivileged = nil
if clusterSpec.Kubelet.AllowPrivileged != nil {
// If it is explicitly set to false, return an error, because this
// behavior is no longer supported in v1.14 (the default was true, prior).
if !*clusterSpec.Kubelet.AllowPrivileged {
klog.Warningf("Kubelet's --allow-privileged flag is no longer supported in v1.14.")
}
} else {
clusterSpec.Kubelet.AllowPrivileged = fi.Bool(true)
// Explicitly set it to nil, so it won't be passed on the command line.
clusterSpec.Kubelet.AllowPrivileged = nil
}

if clusterSpec.Kubelet.ClusterDNS == "" {
Expand Down
4 changes: 2 additions & 2 deletions upup/pkg/fi/cloudup/apply_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ var (
// AlphaAllowALI is a feature flag that gates aliyun support while it is alpha
AlphaAllowALI = featureflag.New("AlphaAllowALI", featureflag.Bool(false))
// OldestSupportedKubernetesVersion is the oldest kubernetes version that is supported in Kops
OldestSupportedKubernetesVersion = "1.13.0"
OldestSupportedKubernetesVersion = "1.15.0"
// OldestRecommendedKubernetesVersion is the oldest kubernetes version that is not deprecated in Kops
OldestRecommendedKubernetesVersion = "1.15.0"
OldestRecommendedKubernetesVersion = "1.17.0"
)

type ApplyClusterCmd struct {
Expand Down