Skip to content

Commit

Permalink
Merge pull request #8206 from rifelpet/automated-cherry-pick-of-#8176…
Browse files Browse the repository at this point in the history
…-origin-release-1.17

Automated cherry pick of #8176 and #8209: Add deprecation warning for older k8s versions
  • Loading branch information
k8s-ci-robot committed Jan 12, 2020
2 parents ca5ce58 + 699bbaa commit 376f010
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions permalinks/upgrade_k8s.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Kubernetes Upgrade Recommended

Kops has established a deprecation policy for Kubernetes version support.
Kops 1.18 will drop support for Kubernetes 1.8 and below.


You are running a version of kubernetes that we recommend upgrading.

Please see the [instructions for how to upgrade kubernetes](https://kops.sigs.k8s.io/operations/updates_and_upgrades/#upgrading-kubernetes)

Please see the deprecation policy [GitHub issue](https://github.com/kubernetes/kops/issues/7999) for more information and to leave feedback.
16 changes: 16 additions & 0 deletions upup/pkg/fi/cloudup/apply_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ var (
AlphaAllowALI = featureflag.New("AlphaAllowALI", featureflag.Bool(false))
// CloudupModels a list of supported models
CloudupModels = []string{"proto", "cloudup"}
// OldestSupportedKubernetesVersion is the oldest kubernetes version that is supported in Kops
OldestSupportedKubernetesVersion = "1.9.0"
)

type ApplyClusterCmd struct {
Expand Down Expand Up @@ -1044,6 +1046,20 @@ func (c *ApplyClusterCmd) validateKubernetesVersion() error {
return nil
}

if !util.IsKubernetesGTE(OldestSupportedKubernetesVersion, *parsed) {
fmt.Printf("\n")
fmt.Printf(starline)
fmt.Printf("\n")
fmt.Printf("Kops support for this Kubernetes version is deprecated and will be removed in a future release.\n")
fmt.Printf("\n")
fmt.Printf("Upgrading is recommended\n")
fmt.Printf("More information: %s\n", buildPermalink("upgrade_k8s", ""))
fmt.Printf("\n")
fmt.Printf(starline)
fmt.Printf("\n")

}

// TODO: make util.ParseKubernetesVersion not return a pointer
kubernetesVersion := *parsed

Expand Down

0 comments on commit 376f010

Please sign in to comment.