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

Commit

Permalink
Add support for k8s 1.9.2 (#2092)
Browse files Browse the repository at this point in the history
* add support for k8s 1.9.2

* updated windows zip

* revert to 1.7 for addon resizer
  • Loading branch information
Cecile Robert-Michon authored and jackfrancis committed Jan 18, 2018
1 parent 34c4679 commit 1bc0360
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/k8s-upgrade/v1.8.4.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.9.1
EXPECTED_ORCHESTRATOR_VERSION=1.9.2
28 changes: 28 additions & 0 deletions pkg/acsengine/k8s_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.KubernetesVersion1Dot9Dot2: {
"hyperkube": "hyperkube-amd64:v1.9.2",
"ccm": "cloud-controller-manager-amd64:v1.9.2",
"dockerEngineVersion": "1.12.*",
DefaultDashboardAddonName: "kubernetes-dashboard-amd64:v1.8.2",
"exechealthz": "exechealthz-amd64:1.2",
"addonresizer": "addon-resizer:1.7",
"heapster": "heapster-amd64:v1.5.0",
"dns": "k8s-dns-kube-dns-amd64:1.14.8",
"addonmanager": "kube-addon-manager-amd64:v6.5",
"dnsmasq": "k8s-dns-dnsmasq-nanny-amd64:1.14.8",
"pause": "pause-amd64:3.1",
DefaultTillerAddonName: DefaultTillerImage,
DefaultReschedulerAddonName: DefaultReschedulerImage,
"windowszip": "v1.9.2-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.KubernetesVersion1Dot9Dot1: {
"hyperkube": "hyperkube-amd64:v1.9.1",
"ccm": "cloud-controller-manager-amd64:v1.9.1",
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 @@ -53,6 +53,8 @@ const (
)

const (
// KubernetesVersion1Dot9Dot2 is the major.minor.patch string for the 1.9.2 version of kubernetes
KubernetesVersion1Dot9Dot2 string = "1.9.2"
// 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
Expand Down Expand Up @@ -131,6 +133,7 @@ var AllKubernetesSupportedVersions = map[string]bool{
KubernetesVersion1Dot8Dot7: true,
KubernetesVersion1Dot9Dot0: true,
KubernetesVersion1Dot9Dot1: true,
KubernetesVersion1Dot9Dot2: true,
}

// GetSupportedKubernetesVersion verifies that a passed-in version string is supported, or returns a default version string if not
Expand Down Expand Up @@ -167,6 +170,7 @@ var AllKubernetesWindowsSupportedVersions = map[string]bool{
KubernetesVersion1Dot8Dot7: true,
KubernetesVersion1Dot9Dot0: true,
KubernetesVersion1Dot9Dot1: true,
KubernetesVersion1Dot9Dot2: true,
}

const (
Expand Down
9 changes: 7 additions & 2 deletions pkg/api/common/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ func Test_GetValidPatchVersion(t *testing.T) {
if version != KubernetesVersion1Dot9Dot1 {
t.Errorf("It is not Kubernetes version %s", KubernetesVersion1Dot9Dot1)
}

version = GetValidPatchVersion(Kubernetes, "1.9.2")
if version != KubernetesVersion1Dot9Dot2 {
t.Errorf("It is not Kubernetes version %s", KubernetesVersion1Dot9Dot2)
}
}

func Test_RationalizeReleaseAndVersion(t *testing.T) {
Expand All @@ -41,8 +46,8 @@ func Test_RationalizeReleaseAndVersion(t *testing.T) {
}

version = RationalizeReleaseAndVersion(Kubernetes, "1.9", "")
if version != KubernetesVersion1Dot9Dot1 {
t.Errorf("It is not Kubernetes version %s", KubernetesVersion1Dot9Dot1)
if version != KubernetesVersion1Dot9Dot2 {
t.Errorf("It is not Kubernetes version %s", KubernetesVersion1Dot9Dot2)
}

version = RationalizeReleaseAndVersion(Kubernetes, "", "1.6.11")
Expand Down
12 changes: 6 additions & 6 deletions pkg/api/orchestrators_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ func TestOrchestratorUpgradeInfo(t *testing.T) {
}
orch, e = GetOrchestratorVersionProfile(csOrch)
Expect(e).To(BeNil())
// 1.8.6, 1.8.7, 1.9.0, 1.9.1
Expect(len(orch.Upgrades)).To(Equal(4))
// 1.8.6, 1.8.7, 1.9.0, 1.9.1, 1.9.2
Expect(len(orch.Upgrades)).To(Equal(5))

// 1.9.1 is not upgradable
// 1.9.2 is not upgradable
csOrch = &OrchestratorProfile{
OrchestratorType: Kubernetes,
OrchestratorVersion: "1.9.1",
OrchestratorVersion: "1.9.2",
}
orch, e = GetOrchestratorVersionProfile(csOrch)
Expect(e).To(BeNil())
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(29))
Expect(len(list.Properties.Orchestrators)).To(Equal(30))

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

func TestKubernetesInfo(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions pkg/api/vlabs/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ func (a *KubernetesConfig) Validate(k8sVersion string) error {
var backoffEnabledVersions = map[string]bool{
common.KubernetesVersion1Dot9Dot0: true,
common.KubernetesVersion1Dot9Dot1: true,
common.KubernetesVersion1Dot9Dot2: true,
common.KubernetesVersion1Dot8Dot0: true,
common.KubernetesVersion1Dot8Dot1: true,
common.KubernetesVersion1Dot8Dot2: true,
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 @@ -267,7 +267,7 @@ func Test_KubernetesConfig_Validate(t *testing.T) {
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.KubernetesVersion1Dot8Dot7,
common.KubernetesVersion1Dot9Dot0, common.KubernetesVersion1Dot9Dot1} {
common.KubernetesVersion1Dot9Dot0, common.KubernetesVersion1Dot9Dot1, common.KubernetesVersion1Dot9Dot2} {
c := KubernetesConfig{
CloudProviderConfig: CloudProviderConfig{
CloudProviderBackoff: true,
Expand Down

0 comments on commit 1bc0360

Please sign in to comment.