Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Reduce the Kubernetes version support matrix #3750

Merged
merged 10 commits into from
Sep 6, 2018

Conversation

CecileRobertMichon
Copy link
Contributor

@CecileRobertMichon CecileRobertMichon commented Aug 27, 2018

What this PR does / why we need it: Deprecates Kubernetes versions except for the two latest patches of each minor release while maintaining support for scale and upgrade from these versions. Exception is version 1.6.9 which we need to keep support for because of API v20160930.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

If applicable:

  • documentation
  • unit tests
  • tested backward compatibility (ie. deploy with previous version, upgrade with this branch)

Release note:

"1.7.12": false,
"1.7.13": false,
"1.7.14": false,
"1.7.15": false,
"1.7.16": true,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we keep 1.7.16?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know if any acs-engine users still provision 1.7 clusters? Otherwise, I'd say get rid of it except that 1.7.x is still supported in AKS currently. (I assume we can't remove Kubernetes versions that AKS still expects.)

@ghost ghost added the in progress label Aug 27, 2018
@mboersma
Copy link
Member

Should we keep the last two patch versions for each minor? That's the slightly more conservative policy that I've heard mentioned as a goal for AKS, for example.

@@ -862,16 +862,6 @@ func (w *WindowsProfile) Validate(orchestratorType string) error {
func (k *KubernetesConfig) Validate(k8sVersion string, hasWindows bool) error {
// number of minimum retries allowed for kubelet to post node status
const minKubeletRetries = 4
// k8s versions that have cloudprovider backoff enabled
var backoffEnabledVersions = common.AllKubernetesSupportedVersions
// at present all supported versions allow for cloudprovider backoff
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at present all supported versions allow for cloudprovider backoff --> this validation is a no-op, remove it for now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

@codecov
Copy link

codecov bot commented Sep 5, 2018

Codecov Report

Merging #3750 into master will increase coverage by 0.01%.
The diff coverage is 45.45%.

@@            Coverage Diff             @@
##           master    #3750      +/-   ##
==========================================
+ Coverage   55.48%   55.49%   +0.01%     
==========================================
  Files         108      108              
  Lines       16140    16138       -2     
==========================================
+ Hits         8955     8956       +1     
- Misses       6420     6421       +1     
+ Partials      765      761       -4

@CecileRobertMichon
Copy link
Contributor Author

CecileRobertMichon commented Sep 5, 2018

Back-compat tests:

@CecileRobertMichon
Copy link
Contributor Author

CecileRobertMichon commented Sep 5, 2018

Error message when trying to deploy a cluster with a deprecated version:

2018/09/05 22:34:02 Output:FATA[0000] error loading API model in generateCmd: error parsing the api model: the following OrchestratorProfile configuration is not supported: OrchestratorType: "Kubernetes", OrchestratorRelease: "", OrchestratorVersion: "1.10.0". Please use one of the following versions: [1.6.9 1.7.15 1.7.16 1.8.14 1.8.15 1.9.9 1.9.10 1.10.6 1.10.7 1.11.1 1.11.2 1.12.0-alpha.1 1.12.0-beta.0]

@CecileRobertMichon
Copy link
Contributor Author

CecileRobertMichon commented Sep 5, 2018

Error message when trying to upgrade to deprecated version:
FATA[0003] error loading existing cluster: Upgrading to version 1.8.0 is not supported. To see a list of available upgrades, use 'acs-engine orchestrators --orchestrator kubernetes --version 1.7.0'

$ bin/acs-engine orchestrators --orchestrator kubernetes --version 1.7.0
{
  "orchestrators": [
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.7.0",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.7.15"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.7.16"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.8.14"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.8.15"
        }
      ]
    }
  ]
}```

Copy link
Contributor

@weinong weinong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. However, it would require some changes in RP as we moved apiloader into RP code base

@CecileRobertMichon
Copy link
Contributor Author

CecileRobertMichon commented Sep 6, 2018

Orchestrators command output:

bin/acs-engine orchestrators --orchestrator kubernetes
{
  "orchestrators": [
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.6.9",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.7.15"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.7.16"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.7.15",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.7.16"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.8.14"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.8.15"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.7.16",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.8.14"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.8.15"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.8.14",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.8.15"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.9.9"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.9.10"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.8.15",
      "default": true,
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.9.9"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.9.10"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.9.9",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.9.10"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.10.6"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.10.7"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.9.10",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.10.6"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.10.7"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.10.6",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.10.7"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.11.1"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.11.2"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.10.7",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.11.1"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.11.2"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.11.1",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.11.2"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.12.0-alpha.1"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.12.0-beta.0"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.11.2",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.12.0-alpha.1"
        },
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.12.0-beta.0"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.12.0-alpha.1",
      "upgrades": [
        {
          "orchestratorType": "",
          "orchestratorVersion": "1.12.0-beta.0"
        }
      ]
    },
    {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.12.0-beta.0"
    }
  ]
}

@@ -251,14 +251,14 @@ func (a *Apiloader) LoadContainerServiceForAgentPoolOnlyCluster(

// use defaultKubernetesVersion arg if no version was supplied in the request contents
if managedCluster.Properties.KubernetesVersion == "" && defaultKubernetesVersion != "" {
if !common.AllKubernetesSupportedVersions[defaultKubernetesVersion] {
if !common.IsSupportedKubernetesVersion(defaultKubernetesVersion, isUpdate, false) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: instead of passing in the literal false create a hasWindows var with the value false and pass in hasWindows for readability.

return nil, IsSSHAutoGenerated, a.Translator.Errorf("The selected orchestrator version '%s' is not supported", defaultKubernetesVersion)
}
managedCluster.Properties.KubernetesVersion = defaultKubernetesVersion
}

// verify orchestrator version
if len(managedCluster.Properties.KubernetesVersion) > 0 && !common.AllKubernetesSupportedVersions[managedCluster.Properties.KubernetesVersion] {
if len(managedCluster.Properties.KubernetesVersion) > 0 && !common.IsSupportedKubernetesVersion(managedCluster.Properties.KubernetesVersion, isUpdate, false) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@@ -289,7 +289,7 @@ func (a *Apiloader) LoadContainerServiceForAgentPoolOnlyCluster(

// use defaultKubernetesVersion arg if no version was supplied in the request contents
if managedCluster.Properties.KubernetesVersion == "" && defaultKubernetesVersion != "" {
if !common.AllKubernetesSupportedVersions[defaultKubernetesVersion] {
if !common.IsSupportedKubernetesVersion(defaultKubernetesVersion, isUpdate, false) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@@ -300,7 +300,7 @@ func (a *Apiloader) LoadContainerServiceForAgentPoolOnlyCluster(
}

// verify orchestrator version
if len(managedCluster.Properties.KubernetesVersion) > 0 && !common.AllKubernetesSupportedVersions[managedCluster.Properties.KubernetesVersion] {
if len(managedCluster.Properties.KubernetesVersion) > 0 && !common.IsSupportedKubernetesVersion(managedCluster.Properties.KubernetesVersion, isUpdate, false) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@jackfrancis
Copy link
Member

/lgtm pending consideration of nits

@acs-bot
Copy link

acs-bot commented Sep 6, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon, jackfrancis

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [CecileRobertMichon,jackfrancis]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jackfrancis jackfrancis merged commit 849e5fd into Azure:master Sep 6, 2018
@ghost ghost removed the in progress label Sep 6, 2018
@CecileRobertMichon CecileRobertMichon deleted the deprecate-k8s-versions branch November 6, 2018 19:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants