diff --git a/examples/k8s-upgrade/v1.8.4.json.env b/examples/k8s-upgrade/v1.8.4.json.env index 0c4a1c88e8..218725816b 100644 --- a/examples/k8s-upgrade/v1.8.4.json.env +++ b/examples/k8s-upgrade/v1.8.4.json.env @@ -1,2 +1,2 @@ ACSE_POSTDEPLOY=examples/k8s-upgrade/k8s-upgrade.sh -EXPECTED_ORCHESTRATOR_VERSION=1.9.0 +EXPECTED_ORCHESTRATOR_VERSION=1.9.1 diff --git a/examples/kubernetes.json b/examples/kubernetes.json index b1f1078447..f210b874b5 100644 --- a/examples/kubernetes.json +++ b/examples/kubernetes.json @@ -32,4 +32,4 @@ "secret": "" } } -} +} \ No newline at end of file diff --git a/pkg/acsengine/k8s_versions.go b/pkg/acsengine/k8s_versions.go index 9df70c3367..8f6d93671c 100644 --- a/pkg/acsengine/k8s_versions.go +++ b/pkg/acsengine/k8s_versions.go @@ -8,6 +8,34 @@ import ( // KubeConfigs represents Docker images used for Kubernetes components based on Kubernetes versions (major.minor.patch) var KubeConfigs = map[string]map[string]string{ + common.KubernetesVersion1Dot9Dot1: { + "hyperkube": "hyperkube-amd64:v1.9.1", + "ccm": "cloud-controller-manager-amd64:v1.9.1", + "dockerEngineVersion": "1.12.*", + DefaultDashboardAddonName: "kubernetes-dashboard-amd64:v1.8.1", + "exechealthz": "exechealthz-amd64:1.2", + "addonresizer": "addon-resizer:1.7", + "heapster": "heapster-amd64:v1.4.2", + "dns": "k8s-dns-kube-dns-amd64:1.14.5", + "addonmanager": "kube-addon-manager-amd64:v6.5", + "dnsmasq": "k8s-dns-dnsmasq-nanny-amd64:1.14.5", + "pause": "pause-amd64:3.0", + DefaultTillerAddonName: DefaultTillerImage, + DefaultReschedulerAddonName: DefaultReschedulerImage, + "windowszip": "v1.9.1-1int.zip", + "nodestatusfreq": DefaultKubernetesNodeStatusUpdateFrequency, + "nodegraceperiod": DefaultKubernetesCtrlMgrNodeMonitorGracePeriod, + "podeviction": DefaultKubernetesCtrlMgrPodEvictionTimeout, + "routeperiod": DefaultKubernetesCtrlMgrRouteReconciliationPeriod, + "backoffretries": strconv.Itoa(DefaultKubernetesCloudProviderBackoffRetries), + "backoffjitter": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffJitter, 'f', -1, 64), + "backoffduration": strconv.Itoa(DefaultKubernetesCloudProviderBackoffDuration), + "backoffexponent": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffExponent, 'f', -1, 64), + "ratelimitqps": strconv.FormatFloat(DefaultKubernetesCloudProviderRateLimitQPS, 'f', -1, 64), + "ratelimitbucket": strconv.Itoa(DefaultKubernetesCloudProviderRateLimitBucket), + "gchighthreshold": strconv.Itoa(DefaultKubernetesGCHighThreshold), + "gclowthreshold": strconv.Itoa(DefaultKubernetesGCLowThreshold), + }, common.KubernetesVersion1Dot9Dot0: { "hyperkube": "hyperkube-amd64:v1.9.0", "ccm": "cloud-controller-manager-amd64:v1.9.0", diff --git a/pkg/api/common/const.go b/pkg/api/common/const.go index fe81963e00..36c26f7d56 100644 --- a/pkg/api/common/const.go +++ b/pkg/api/common/const.go @@ -53,6 +53,8 @@ const ( ) const ( + // KubernetesVersion1Dot9Dot1 is the major.minor.patch string for the 1.9.1 version of kubernetes + KubernetesVersion1Dot9Dot1 string = "1.9.1" // KubernetesVersion1Dot9Dot0 is the major.minor.patch string for the 1.9.0 version of kubernetes KubernetesVersion1Dot9Dot0 string = "1.9.0" // KubernetesVersion1Dot8Dot0 is the major.minor.patch string for the 1.8.0 version of kubernetes @@ -125,6 +127,7 @@ var AllKubernetesSupportedVersions = map[string]bool{ KubernetesVersion1Dot8Dot4: true, KubernetesVersion1Dot8Dot6: true, KubernetesVersion1Dot9Dot0: true, + KubernetesVersion1Dot9Dot1: true, } // GetSupportedKubernetesVersion verifies that a passed-in version string is supported, or returns a default version string if not @@ -159,6 +162,7 @@ var AllKubernetesWindowsSupportedVersions = map[string]bool{ KubernetesVersion1Dot8Dot4: true, KubernetesVersion1Dot8Dot6: true, KubernetesVersion1Dot9Dot0: true, + KubernetesVersion1Dot9Dot1: false, // TODO turn on when image is uploaded } const ( diff --git a/pkg/api/common/helper_test.go b/pkg/api/common/helper_test.go index e432772d35..0ffc21c568 100644 --- a/pkg/api/common/helper_test.go +++ b/pkg/api/common/helper_test.go @@ -22,6 +22,11 @@ func Test_GetValidPatchVersion(t *testing.T) { if version != KubernetesVersion1Dot8Dot6 { t.Errorf("It is not Kubernetes version %s", KubernetesVersion1Dot8Dot6) } + + version = GetValidPatchVersion(Kubernetes, "1.9.1") + if version != KubernetesVersion1Dot9Dot1 { + t.Errorf("It is not Kubernetes version %s", KubernetesVersion1Dot9Dot1) + } } func Test_RationalizeReleaseAndVersion(t *testing.T) { @@ -35,6 +40,11 @@ func Test_RationalizeReleaseAndVersion(t *testing.T) { t.Errorf("It is not Kubernetes version %s", KubernetesVersion1Dot6Dot13) } + version = RationalizeReleaseAndVersion(Kubernetes, "1.9", "") + if version != KubernetesVersion1Dot9Dot1 { + t.Errorf("It is not Kubernetes version %s", KubernetesVersion1Dot9Dot1) + } + version = RationalizeReleaseAndVersion(Kubernetes, "", "1.6.11") if version != KubernetesVersion1Dot6Dot11 { t.Errorf("It is not Kubernetes version %s", KubernetesVersion1Dot6Dot11) diff --git a/pkg/api/orchestrators_test.go b/pkg/api/orchestrators_test.go index f39a5023a5..aedccafdb5 100644 --- a/pkg/api/orchestrators_test.go +++ b/pkg/api/orchestrators_test.go @@ -97,13 +97,13 @@ func TestOrchestratorUpgradeInfo(t *testing.T) { } orch, e = GetOrchestratorVersionProfile(csOrch) Expect(e).To(BeNil()) - // 1.8.6, 1.9.0 - Expect(len(orch.Upgrades)).To(Equal(2)) + // 1.8.6, 1.9.0, 1.9.1 + Expect(len(orch.Upgrades)).To(Equal(3)) - // 1.9.0 is not upgradable + // 1.9.1 is not upgradable csOrch = &OrchestratorProfile{ OrchestratorType: Kubernetes, - OrchestratorVersion: "1.9.0", + OrchestratorVersion: "1.9.1", } orch, e = GetOrchestratorVersionProfile(csOrch) Expect(e).To(BeNil()) @@ -112,12 +112,12 @@ func TestOrchestratorUpgradeInfo(t *testing.T) { // v20170930 - all orchestrators list, e := GetOrchestratorVersionProfileListV20170930("", "") Expect(e).To(BeNil()) - Expect(len(list.Properties.Orchestrators)).To(Equal(27)) + Expect(len(list.Properties.Orchestrators)).To(Equal(28)) // v20170930 - kubernetes only list, e = GetOrchestratorVersionProfileListV20170930(common.Kubernetes, "") Expect(e).To(BeNil()) - Expect(len(list.Properties.Orchestrators)).To(Equal(22)) + Expect(len(list.Properties.Orchestrators)).To(Equal(23)) } func TestKubernetesInfo(t *testing.T) { diff --git a/pkg/api/vlabs/validate.go b/pkg/api/vlabs/validate.go index bbd7346450..8576b22a89 100644 --- a/pkg/api/vlabs/validate.go +++ b/pkg/api/vlabs/validate.go @@ -462,6 +462,8 @@ func (a *KubernetesConfig) Validate(k8sVersion string) error { const minKubeletRetries = 4 // k8s versions that have cloudprovider backoff enabled var backoffEnabledVersions = map[string]bool{ + common.KubernetesVersion1Dot9Dot0: true, + common.KubernetesVersion1Dot9Dot1: true, common.KubernetesVersion1Dot8Dot0: true, common.KubernetesVersion1Dot8Dot1: true, common.KubernetesVersion1Dot8Dot2: true, diff --git a/pkg/api/vlabs/validate_test.go b/pkg/api/vlabs/validate_test.go index f75a9a966d..d8d8529bc1 100644 --- a/pkg/api/vlabs/validate_test.go +++ b/pkg/api/vlabs/validate_test.go @@ -262,7 +262,8 @@ func Test_KubernetesConfig_Validate(t *testing.T) { // Tests that apply to 1.6 and later releases for _, k8sVersion := range []string{common.KubernetesVersion1Dot6Dot11, common.KubernetesVersion1Dot6Dot12, common.KubernetesVersion1Dot6Dot13, common.KubernetesVersion1Dot7Dot7, common.KubernetesVersion1Dot7Dot9, common.KubernetesVersion1Dot7Dot10, common.KubernetesVersion1Dot7Dot12, - common.KubernetesVersion1Dot8Dot1, common.KubernetesVersion1Dot8Dot2, common.KubernetesVersion1Dot8Dot4, common.KubernetesVersion1Dot8Dot6} { + common.KubernetesVersion1Dot8Dot1, common.KubernetesVersion1Dot8Dot2, common.KubernetesVersion1Dot8Dot4, common.KubernetesVersion1Dot8Dot6, + common.KubernetesVersion1Dot9Dot0, common.KubernetesVersion1Dot9Dot1} { c := KubernetesConfig{ CloudProviderBackoff: true, CloudProviderRateLimit: true,