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

Add support for Kubernetes v1.8.7 #2068

Merged
merged 3 commits into from
Jan 17, 2018
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
8 changes: 7 additions & 1 deletion examples/k8s-upgrade/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ To get the list of all available Kubernetes versions and upgrades, run the *orch
},
{
"orchestratorVersion": "1.8.6"
},
{
"orchestratorVersion": "1.8.7"
}
]
},
Expand Down Expand Up @@ -103,6 +106,9 @@ To get the information specific to the cluster, provide its current orchestrator
},
{
"orchestratorVersion": "1.8.6"
},
{
"orchestratorVersion": "1.8.7"
}
{
"orchestratorVersion": "1.7.9"
Expand Down Expand Up @@ -135,7 +141,7 @@ For example,
--deployment-dir ./_output/test \
--location westus \
--resource-group test-upgrade \
--upgrade-version 1.8.6 \
--upgrade-version 1.8.7 \
--auth-method client_secret \
--client-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
--client-secret xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Expand Down
2 changes: 1 addition & 1 deletion examples/k8s-upgrade/v1.7.9-hybrid.json.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ACSE_POSTDEPLOY=examples/k8s-upgrade/k8s-upgrade.sh
EXPECTED_ORCHESTRATOR_VERSION=1.8.6
EXPECTED_ORCHESTRATOR_VERSION=1.8.7
2 changes: 1 addition & 1 deletion examples/k8s-upgrade/v1.7.9-win.json.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ACSE_POSTDEPLOY=examples/k8s-upgrade/k8s-upgrade.sh
EXPECTED_ORCHESTRATOR_VERSION=1.8.6
EXPECTED_ORCHESTRATOR_VERSION=1.8.7
2 changes: 1 addition & 1 deletion examples/k8s-upgrade/v1.7.9.json.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ACSE_POSTDEPLOY=examples/k8s-upgrade/k8s-upgrade.sh
EXPECTED_ORCHESTRATOR_VERSION=1.8.6
EXPECTED_ORCHESTRATOR_VERSION=1.8.7
30 changes: 29 additions & 1 deletion pkg/acsengine/k8s_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,34 @@ var KubeConfigs = map[string]map[string]string{
"gchighthreshold": strconv.Itoa(DefaultKubernetesGCHighThreshold),
"gclowthreshold": strconv.Itoa(DefaultKubernetesGCLowThreshold),
},
common.KubernetesVersion1Dot8Dot7: {
"hyperkube": "hyperkube-amd64:v1.8.7",
"ccm": "cloud-controller-manager-amd64:v1.8.7",
"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.8.7-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.KubernetesVersion1Dot8Dot6: {
"hyperkube": "hyperkube-amd64:v1.8.6",
"ccm": "cloud-controller-manager-amd64:v1.8.6",
Expand All @@ -78,7 +106,7 @@ var KubeConfigs = map[string]map[string]string{
"pause": "pause-amd64:3.0",
DefaultTillerAddonName: DefaultTillerImage,
DefaultReschedulerAddonName: DefaultReschedulerImage,
"windowszip": "v1.8.6-1int.zip",
"windowszip": "v1.8.6-2int.zip",
"nodestatusfreq": DefaultKubernetesNodeStatusUpdateFrequency,
"nodegraceperiod": DefaultKubernetesCtrlMgrNodeMonitorGracePeriod,
"podeviction": DefaultKubernetesCtrlMgrPodEvictionTimeout,
Expand Down
4 changes: 4 additions & 0 deletions pkg/api/common/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ const (
KubernetesVersion1Dot8Dot4 string = "1.8.4"
// KubernetesVersion1Dot8Dot6 is the major.minor.patch string for the 1.8.6 version of kubernetes
KubernetesVersion1Dot8Dot6 string = "1.8.6"
// KubernetesVersion1Dot8Dot7 is the major.minor.patch string for the 1.8.7 version of kubernetes
KubernetesVersion1Dot8Dot7 string = "1.8.7"
// KubernetesVersion1Dot7Dot0 is the major.minor.patch string for the 1.7.0 version of kubernetes
KubernetesVersion1Dot7Dot0 string = "1.7.0"
// KubernetesVersion1Dot7Dot1 is the major.minor.patch string for the 1.7.1 version of kubernetes
Expand Down Expand Up @@ -126,6 +128,7 @@ var AllKubernetesSupportedVersions = map[string]bool{
KubernetesVersion1Dot8Dot2: true,
KubernetesVersion1Dot8Dot4: true,
KubernetesVersion1Dot8Dot6: true,
KubernetesVersion1Dot8Dot7: true,
KubernetesVersion1Dot9Dot0: true,
KubernetesVersion1Dot9Dot1: true,
}
Expand Down Expand Up @@ -161,6 +164,7 @@ var AllKubernetesWindowsSupportedVersions = map[string]bool{
KubernetesVersion1Dot8Dot2: true,
KubernetesVersion1Dot8Dot4: true,
KubernetesVersion1Dot8Dot6: true,
KubernetesVersion1Dot8Dot7: true,
KubernetesVersion1Dot9Dot0: true,
KubernetesVersion1Dot9Dot1: true,
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/api/common/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ func Test_GetValidPatchVersion(t *testing.T) {
t.Errorf("It is not Kubernetes version %s", KubernetesVersion1Dot7Dot12)
}

version = GetValidPatchVersion(Kubernetes, "1.8.6")
if version != KubernetesVersion1Dot8Dot6 {
t.Errorf("It is not Kubernetes version %s", KubernetesVersion1Dot8Dot6)
version = GetValidPatchVersion(Kubernetes, "1.8.7")
if version != KubernetesVersion1Dot8Dot7 {
t.Errorf("It is not Kubernetes version %s", KubernetesVersion1Dot8Dot7)
}

version = GetValidPatchVersion(Kubernetes, "1.9.1")
Expand Down
16 changes: 8 additions & 8 deletions pkg/api/orchestrators_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ func TestOrchestratorUpgradeInfo(t *testing.T) {
}
orch, e = GetOrchestratorVersionProfile(csOrch)
Expect(e).To(BeNil())
// 1.7.1, 1.7.2, 1.7.4, 1.7.5, 1.7.7, 1.7.9, 1.7.10, 1.7.12, 1.8.0, 1.8.1, 1.8.2, 1.8.4, 1.8.6
Expect(len(orch.Upgrades)).To(Equal(13))
// 1.7.1, 1.7.2, 1.7.4, 1.7.5, 1.7.7, 1.7.9, 1.7.10, 1.7.12, 1.8.0, 1.8.1, 1.8.2, 1.8.4, 1.8.6, 1.8.7
Expect(len(orch.Upgrades)).To(Equal(14))

// 1.7.12 is upgradable to 1.8.x
csOrch = &OrchestratorProfile{
Expand All @@ -87,8 +87,8 @@ func TestOrchestratorUpgradeInfo(t *testing.T) {
}
orch, e = GetOrchestratorVersionProfile(csOrch)
Expect(e).To(BeNil())
// 1.8.0, 1.8.1, 1.8.2, 1.8.4, 1.8.6
Expect(len(orch.Upgrades)).To(Equal(5))
// 1.8.0, 1.8.1, 1.8.2, 1.8.4, 1.8.6, 1.8.7
Expect(len(orch.Upgrades)).To(Equal(6))

// 1.8.4 is upgradable to 1.8.x and 1.9.x
csOrch = &OrchestratorProfile{
Expand All @@ -97,8 +97,8 @@ func TestOrchestratorUpgradeInfo(t *testing.T) {
}
orch, e = GetOrchestratorVersionProfile(csOrch)
Expect(e).To(BeNil())
// 1.8.6, 1.9.0, 1.9.1
Expect(len(orch.Upgrades)).To(Equal(3))
// 1.8.6, 1.8.7, 1.9.0, 1.9.1
Expect(len(orch.Upgrades)).To(Equal(4))

// 1.9.1 is not upgradable
csOrch = &OrchestratorProfile{
Expand All @@ -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(28))
Expect(len(list.Properties.Orchestrators)).To(Equal(29))

// v20170930 - kubernetes only
list, e = GetOrchestratorVersionProfileListV20170930(common.Kubernetes, "")
Expect(e).To(BeNil())
Expect(len(list.Properties.Orchestrators)).To(Equal(23))
Expect(len(list.Properties.Orchestrators)).To(Equal(24))
}

func TestKubernetesInfo(t *testing.T) {
Expand Down
2 changes: 2 additions & 0 deletions pkg/api/vlabs/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ func (a *KubernetesConfig) Validate(k8sVersion string) error {
common.KubernetesVersion1Dot8Dot2: true,
common.KubernetesVersion1Dot8Dot4: true,
common.KubernetesVersion1Dot8Dot6: true,
common.KubernetesVersion1Dot8Dot7: true,
common.KubernetesVersion1Dot7Dot0: true,
common.KubernetesVersion1Dot7Dot1: true,
common.KubernetesVersion1Dot7Dot2: true,
Expand Down Expand Up @@ -632,6 +633,7 @@ func (a *KubernetesConfig) Validate(k8sVersion string) error {
common.KubernetesVersion1Dot8Dot2: true,
common.KubernetesVersion1Dot8Dot4: true,
common.KubernetesVersion1Dot8Dot6: true,
common.KubernetesVersion1Dot8Dot7: true,
}

if a.UseCloudControllerManager != nil && *a.UseCloudControllerManager || a.CustomCcmImage != "" {
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/vlabs/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ 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.KubernetesVersion1Dot8Dot7,
common.KubernetesVersion1Dot9Dot0, common.KubernetesVersion1Dot9Dot1} {
c := KubernetesConfig{
CloudProviderConfig: CloudProviderConfig{
Expand Down