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

Commit 6ba4622

Browse files
Cecile Robert-Michonjackfrancis
authored andcommitted
Add support for k8s 1.7.14 (#2442)
* add k8s 1.8.9 * add k8s 1.7.13 * fixed tests
1 parent 9dbdeb6 commit 6ba4622

File tree

10 files changed

+66
-23
lines changed

10 files changed

+66
-23
lines changed

cmd/orchestrators_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ var _ = Describe("The orchestrators command", func() {
4040
It("should succeed", func() {
4141
command := &orchestratorsCmd{
4242
orchestrator: "kubernetes",
43-
version: "1.7.13",
43+
version: "1.7.14",
4444
}
4545

4646
err := command.run(nil, nil)

examples/k8s-upgrade/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ To get the list of all available Kubernetes versions and upgrades, run the *orch
3737
{
3838
"orchestratorVersion": "1.7.13"
3939
},
40+
{
41+
"orchestratorVersion": "1.7.14"
42+
},
4043
{
4144
"orchestratorVersion": "1.8.1"
4245
},
@@ -94,6 +97,9 @@ To get the information specific to the cluster, provide its current orchestrator
9497
{
9598
"orchestratorVersion": "1.7.13"
9699
},
100+
{
101+
"orchestratorVersion": "1.7.14"
102+
},
97103
{
98104
"orchestratorVersion": "1.8.0"
99105
},

pkg/acsengine/k8s_versions.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ var KubeConfigs = map[string]map[string]string{
156156
common.KubernetesVersion1Dot8Dot2: getK8sVersionComponents("1.8.2", map[string]string{"windowszip": "v1.8.2-2int.zip"}),
157157
common.KubernetesVersion1Dot8Dot1: getK8sVersionComponents("1.8.1", map[string]string{"windowszip": "v1.8.1-2int.zip"}),
158158
common.KubernetesVersion1Dot8Dot0: getK8sVersionComponents("1.8.0", map[string]string{"windowszip": "v1.8.0-2int.zip"}),
159+
common.KubernetesVersion1Dot7Dot14: getK8sVersionComponents("1.7.14", nil),
159160
common.KubernetesVersion1Dot7Dot13: getK8sVersionComponents("1.7.13", map[string]string{"windowszip": "v1.7.13-1int.zip"}),
160161
common.KubernetesVersion1Dot7Dot12: getK8sVersionComponents("1.7.12", map[string]string{"windowszip": "v1.7.12-2int.zip"}),
161162
common.KubernetesVersion1Dot7Dot10: getK8sVersionComponents("1.7.10", map[string]string{"windowszip": "v1.7.10-1int.zip"}),

pkg/api/common/const.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ const (
101101
KubernetesVersion1Dot7Dot12 string = "1.7.12"
102102
// KubernetesVersion1Dot7Dot13 is the major.minor.patch string for the 1.7.13 version of kubernetes
103103
KubernetesVersion1Dot7Dot13 string = "1.7.13"
104+
// KubernetesVersion1Dot7Dot14 is the major.minor.patch string for the 1.7.14 version of kubernetes
105+
KubernetesVersion1Dot7Dot14 string = "1.7.14"
104106
// KubernetesVersion1Dot6Dot6 is the major.minor.patch string for the 1.6.6 version of kubernetes
105107
KubernetesVersion1Dot6Dot6 string = "1.6.6"
106108
// KubernetesVersion1Dot6Dot9 is the major.minor.patch string for the 1.6.9 version of kubernetes
@@ -132,6 +134,7 @@ var AllKubernetesSupportedVersions = map[string]bool{
132134
KubernetesVersion1Dot7Dot10: true,
133135
KubernetesVersion1Dot7Dot12: true,
134136
KubernetesVersion1Dot7Dot13: true,
137+
KubernetesVersion1Dot7Dot14: true,
135138
KubernetesVersion1Dot8Dot0: true,
136139
KubernetesVersion1Dot8Dot1: true,
137140
KubernetesVersion1Dot8Dot2: true,

pkg/api/common/helper_test.go

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ func Test_GetValidPatchVersion(t *testing.T) {
1414
}
1515

1616
version = GetValidPatchVersion(Kubernetes, "1.7.3")
17-
if version != KubernetesVersion1Dot7Dot13 {
18-
t.Errorf("It is not Kubernetes version %s", KubernetesVersion1Dot7Dot13)
17+
if version != KubernetesVersion1Dot7Dot14 {
18+
t.Errorf("It is not Kubernetes version %s", KubernetesVersion1Dot7Dot14)
1919
}
2020

2121
version = GetValidPatchVersion(Kubernetes, "1.8.7")
@@ -46,8 +46,8 @@ func TestGetLatestPatchVersion(t *testing.T) {
4646
}
4747

4848
version = GetLatestPatchVersion("1.7", GetAllSupportedKubernetesVersions())
49-
if version != KubernetesVersion1Dot7Dot13 {
50-
t.Errorf("It is not Kubernetes version %s", KubernetesVersion1Dot7Dot13)
49+
if version != KubernetesVersion1Dot7Dot14 {
50+
t.Errorf("It is not Kubernetes version %s", KubernetesVersion1Dot7Dot14)
5151
}
5252

5353
version = GetLatestPatchVersion("1.8", GetAllSupportedKubernetesVersions())
@@ -93,6 +93,21 @@ func Test_RationalizeReleaseAndVersion(t *testing.T) {
9393
t.Errorf("It is not Kubernetes version %s", KubernetesVersion1Dot6Dot11)
9494
}
9595

96+
version = RationalizeReleaseAndVersion(Kubernetes, "1.7", "", false)
97+
if version != KubernetesVersion1Dot7Dot14 {
98+
t.Errorf("It is not Kubernetes version %s", KubernetesVersion1Dot7Dot14)
99+
}
100+
101+
version = RationalizeReleaseAndVersion(Kubernetes, "", "1.7.14", false)
102+
if version != KubernetesVersion1Dot7Dot14 {
103+
t.Errorf("It is not Kubernetes version %s", KubernetesVersion1Dot7Dot14)
104+
}
105+
106+
version = RationalizeReleaseAndVersion(Kubernetes, "1.7", "1.7.14", false)
107+
if version != KubernetesVersion1Dot7Dot14 {
108+
t.Errorf("It is not Kubernetes version %s", KubernetesVersion1Dot7Dot14)
109+
}
110+
96111
version = RationalizeReleaseAndVersion(Kubernetes, "", "1.6.7", false)
97112
if version != "" {
98113
t.Errorf("It is not empty string")

pkg/api/orchestrators_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ func TestOrchestratorUpgradeInfo(t *testing.T) {
5757
}
5858
orch, e := GetOrchestratorVersionProfile(csOrch)
5959
Expect(e).To(BeNil())
60-
// 1.6.9, 1.6.11, 1.6.12, 1.6.13, 1.7.0, 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.7.13
61-
Expect(len(orch.Upgrades)).To(Equal(14))
60+
// 1.6.9, 1.6.11, 1.6.12, 1.6.13, 1.7.0, 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.7.13, 1.7.14
61+
Expect(len(orch.Upgrades)).To(Equal(15))
6262

6363
// 1.7.0 is upgradable to 1.7.x and 1.8.x
6464
csOrch = &OrchestratorProfile{
@@ -67,13 +67,13 @@ func TestOrchestratorUpgradeInfo(t *testing.T) {
6767
}
6868
orch, e = GetOrchestratorVersionProfile(csOrch)
6969
Expect(e).To(BeNil())
70-
// 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.7.13, 1.8.0, 1.8.1, 1.8.2, 1.8.4, 1.8.6, 1.8.7, 1.8.8, 1.8.9
71-
Expect(len(orch.Upgrades)).To(Equal(17))
70+
// 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.7.13, 1.7.14, 1.8.0, 1.8.1, 1.8.2, 1.8.4, 1.8.6, 1.8.7, 1.8.8, 1.8.9
71+
Expect(len(orch.Upgrades)).To(Equal(18))
7272

73-
// 1.7.13 is upgradable to 1.8.x
73+
// 1.7.14 is upgradable to 1.8.x
7474
csOrch = &OrchestratorProfile{
7575
OrchestratorType: Kubernetes,
76-
OrchestratorVersion: "1.7.13",
76+
OrchestratorVersion: "1.7.14",
7777
}
7878
orch, e = GetOrchestratorVersionProfile(csOrch)
7979
Expect(e).To(BeNil())
@@ -102,12 +102,12 @@ func TestOrchestratorUpgradeInfo(t *testing.T) {
102102
// v20170930 - all orchestrators
103103
list, e := GetOrchestratorVersionProfileListV20170930("", "")
104104
Expect(e).To(BeNil())
105-
Expect(len(list.Properties.Orchestrators)).To(Equal(34))
105+
Expect(len(list.Properties.Orchestrators)).To(Equal(35))
106106

107107
// v20170930 - kubernetes only
108108
list, e = GetOrchestratorVersionProfileListV20170930(common.Kubernetes, "")
109109
Expect(e).To(BeNil())
110-
Expect(len(list.Properties.Orchestrators)).To(Equal(29))
110+
Expect(len(list.Properties.Orchestrators)).To(Equal(30))
111111
}
112112

113113
func TestKubernetesInfo(t *testing.T) {

pkg/api/v20170930/validate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func (o *OrchestratorProfile) ValidateForUpgrade() error {
3232
case Kubernetes:
3333
switch o.OrchestratorVersion {
3434
case common.KubernetesVersion1Dot6Dot13:
35-
case common.KubernetesVersion1Dot7Dot13:
35+
case common.KubernetesVersion1Dot7Dot14:
3636
default:
3737
return fmt.Errorf("Upgrade to Kubernetes %s is not supported", o.OrchestratorVersion)
3838
}

pkg/api/vlabs/validate.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ func (o *OrchestratorProfile) Validate(isUpdate bool) error {
126126
o.OrchestratorVersion == common.KubernetesVersion1Dot7Dot9 ||
127127
o.OrchestratorVersion == common.KubernetesVersion1Dot7Dot10 ||
128128
o.OrchestratorVersion == common.KubernetesVersion1Dot7Dot12 ||
129-
o.OrchestratorVersion == common.KubernetesVersion1Dot7Dot13 {
129+
o.OrchestratorVersion == common.KubernetesVersion1Dot7Dot13 ||
130+
o.OrchestratorVersion == common.KubernetesVersion1Dot7Dot14 {
130131
return fmt.Errorf("enablePodSecurityPolicy is only supported in acs-engine for Kubernetes version %s or greater; unable to validate for Kubernetes version %s",
131132
"1.8.0", o.OrchestratorVersion)
132133
}
@@ -245,7 +246,7 @@ func (o *OrchestratorProfile) ValidateForUpgrade() error {
245246
case Kubernetes:
246247
switch o.OrchestratorVersion {
247248
case common.KubernetesVersion1Dot6Dot13:
248-
case common.KubernetesVersion1Dot7Dot13:
249+
case common.KubernetesVersion1Dot7Dot14:
249250
default:
250251
return fmt.Errorf("Upgrade to Kubernetes version %s is not supported", o.OrchestratorVersion)
251252
}
@@ -533,6 +534,7 @@ func (a *KubernetesConfig) Validate(k8sVersion string) error {
533534
common.KubernetesVersion1Dot7Dot10: true,
534535
common.KubernetesVersion1Dot7Dot12: true,
535536
common.KubernetesVersion1Dot7Dot13: true,
537+
common.KubernetesVersion1Dot7Dot14: true,
536538
common.KubernetesVersion1Dot6Dot6: true,
537539
common.KubernetesVersion1Dot6Dot9: true,
538540
common.KubernetesVersion1Dot6Dot11: true,

pkg/api/vlabs/validate_test.go

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ func Test_KubernetesConfig_Validate(t *testing.T) {
260260

261261
// Tests that apply to 1.6 and later releases
262262
for _, k8sVersion := range []string{common.KubernetesVersion1Dot6Dot11, common.KubernetesVersion1Dot6Dot12, common.KubernetesVersion1Dot6Dot13,
263-
common.KubernetesVersion1Dot7Dot7, common.KubernetesVersion1Dot7Dot9, common.KubernetesVersion1Dot7Dot10, common.KubernetesVersion1Dot7Dot12, common.KubernetesVersion1Dot7Dot13,
263+
common.KubernetesVersion1Dot7Dot7, common.KubernetesVersion1Dot7Dot9, common.KubernetesVersion1Dot7Dot10, common.KubernetesVersion1Dot7Dot12, common.KubernetesVersion1Dot7Dot13, common.KubernetesVersion1Dot7Dot14,
264264
common.KubernetesVersion1Dot8Dot1, common.KubernetesVersion1Dot8Dot2, common.KubernetesVersion1Dot8Dot4, common.KubernetesVersion1Dot8Dot6, common.KubernetesVersion1Dot8Dot7, common.KubernetesVersion1Dot8Dot8, common.KubernetesVersion1Dot8Dot9,
265265
common.KubernetesVersion1Dot9Dot0, common.KubernetesVersion1Dot9Dot1, common.KubernetesVersion1Dot9Dot2, common.KubernetesVersion1Dot9Dot3, common.KubernetesVersion1Dot9Dot4, common.KubernetesVersion1Dot10Dot0} {
266266
c := KubernetesConfig{
@@ -587,6 +587,14 @@ func TestWindowsVersions(t *testing.T) {
587587
)
588588
}
589589

590+
p = getK8sDefaultProperties(true)
591+
p.OrchestratorProfile.OrchestratorVersion = "1.7.14"
592+
if err := p.Validate(false); err == nil {
593+
t.Errorf(
594+
"should error on invalid Windows version",
595+
)
596+
}
597+
590598
p = getK8sDefaultProperties(true)
591599
p.OrchestratorProfile.OrchestratorRelease = "1.8"
592600
if err := p.Validate(false); err != nil {
@@ -670,13 +678,21 @@ func TestLinuxVersions(t *testing.T) {
670678
}
671679

672680
p = getK8sDefaultProperties(false)
673-
p.OrchestratorProfile.OrchestratorVersion = "1.7.13"
681+
p.OrchestratorProfile.OrchestratorVersion = "1.7.14"
674682
if err := p.Validate(false); err != nil {
675683
t.Errorf(
676684
"should not error on valid Linux version: %v", err,
677685
)
678686
}
679687

688+
p = getK8sDefaultProperties(false)
689+
p.OrchestratorProfile.OrchestratorVersion = "1.7.15"
690+
if err := p.Validate(false); err == nil {
691+
t.Errorf(
692+
"should error on invalid Linux version",
693+
)
694+
}
695+
680696
p = getK8sDefaultProperties(false)
681697
p.OrchestratorProfile.OrchestratorRelease = "1.8"
682698
if err := p.Validate(false); err != nil {

pkg/operations/kubernetesupgrade/upgradecluster_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() {
2929
It("Should return error message when failing to list VMs during upgrade operation", func() {
3030
cs := createContainerService("testcluster", common.KubernetesVersion1Dot6Dot9, 1, 1)
3131

32-
cs.Properties.OrchestratorProfile.OrchestratorVersion = common.KubernetesVersion1Dot7Dot13
32+
cs.Properties.OrchestratorProfile.OrchestratorVersion = common.KubernetesVersion1Dot7Dot14
3333

3434
uc := UpgradeCluster{
3535
Translator: &i18n.Translator{},
@@ -53,7 +53,7 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() {
5353
It("Should return error message when failing to detete VMs during upgrade operation", func() {
5454
cs := createContainerService("testcluster", common.KubernetesVersion1Dot6Dot9, 1, 1)
5555

56-
cs.Properties.OrchestratorProfile.OrchestratorVersion = common.KubernetesVersion1Dot7Dot13
56+
cs.Properties.OrchestratorProfile.OrchestratorVersion = common.KubernetesVersion1Dot7Dot14
5757
uc := UpgradeCluster{
5858
Translator: &i18n.Translator{},
5959
Logger: log.NewEntry(log.New()),
@@ -91,7 +91,7 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() {
9191

9292
It("Should return error message when failing to get a virtual machine during upgrade operation", func() {
9393
cs := createContainerService("testcluster", common.KubernetesVersion1Dot6Dot9, 1, 6)
94-
cs.Properties.OrchestratorProfile.OrchestratorVersion = common.KubernetesVersion1Dot7Dot13
94+
cs.Properties.OrchestratorProfile.OrchestratorVersion = common.KubernetesVersion1Dot7Dot14
9595
uc := UpgradeCluster{
9696
Translator: &i18n.Translator{},
9797
Logger: log.NewEntry(log.New()),
@@ -110,7 +110,7 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() {
110110

111111
It("Should return error message when failing to get storage client during upgrade operation", func() {
112112
cs := createContainerService("testcluster", common.KubernetesVersion1Dot6Dot9, 5, 1)
113-
cs.Properties.OrchestratorProfile.OrchestratorVersion = common.KubernetesVersion1Dot7Dot13
113+
cs.Properties.OrchestratorProfile.OrchestratorVersion = common.KubernetesVersion1Dot7Dot14
114114
uc := UpgradeCluster{
115115
Translator: &i18n.Translator{},
116116
Logger: log.NewEntry(log.New()),
@@ -129,7 +129,7 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() {
129129

130130
It("Should return error message when failing to delete network interface during upgrade operation", func() {
131131
cs := createContainerService("testcluster", common.KubernetesVersion1Dot6Dot9, 3, 2)
132-
cs.Properties.OrchestratorProfile.OrchestratorVersion = common.KubernetesVersion1Dot7Dot13
132+
cs.Properties.OrchestratorProfile.OrchestratorVersion = common.KubernetesVersion1Dot7Dot14
133133
uc := UpgradeCluster{
134134
Translator: &i18n.Translator{},
135135
Logger: log.NewEntry(log.New()),

0 commit comments

Comments
 (0)