This repository has been archived by the owner on Oct 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 522
feat: add support for Kubernetes v1.18.16 #4284
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,7 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() { | |
}) | ||
|
||
It("Should succeed when cluster VMs are missing expected tags during upgrade operation", func() { | ||
cs := api.CreateMockContainerService("testcluster", "1.18.15", 1, 1, false) | ||
cs := api.CreateMockContainerService("testcluster", "", 1, 1, false) | ||
uc := UpgradeCluster{ | ||
Translator: &i18n.Translator{}, | ||
Logger: log.NewEntry(log.New()), | ||
|
@@ -87,7 +87,7 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() { | |
}) | ||
|
||
It("Should return error message when failing to list VMs during upgrade operation", func() { | ||
cs := api.CreateMockContainerService("testcluster", "1.18.15", 1, 1, false) | ||
cs := api.CreateMockContainerService("testcluster", "", 1, 1, false) | ||
uc := UpgradeCluster{ | ||
Translator: &i18n.Translator{}, | ||
Logger: log.NewEntry(log.New()), | ||
|
@@ -113,7 +113,7 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() { | |
}) | ||
|
||
It("Should return error message when failing to delete VMs during upgrade operation", func() { | ||
cs := api.CreateMockContainerService("testcluster", "1.18.15", 1, 1, false) | ||
cs := api.CreateMockContainerService("testcluster", "", 1, 1, false) | ||
uc := UpgradeCluster{ | ||
Translator: &i18n.Translator{}, | ||
Logger: log.NewEntry(log.New()), | ||
|
@@ -136,7 +136,7 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() { | |
}) | ||
|
||
It("Should return error message when failing to deploy template during upgrade operation", func() { | ||
cs := api.CreateMockContainerService("testcluster", "1.18.15", 1, 1, false) | ||
cs := api.CreateMockContainerService("testcluster", "", 1, 1, false) | ||
uc := UpgradeCluster{ | ||
Translator: &i18n.Translator{}, | ||
Logger: log.NewEntry(log.New()), | ||
|
@@ -159,7 +159,7 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() { | |
}) | ||
|
||
It("Should return error message when failing to get a virtual machine during upgrade operation", func() { | ||
cs := api.CreateMockContainerService("testcluster", "1.18.15", 1, 6, false) | ||
cs := api.CreateMockContainerService("testcluster", "", 1, 6, false) | ||
uc := UpgradeCluster{ | ||
Translator: &i18n.Translator{}, | ||
Logger: log.NewEntry(log.New()), | ||
|
@@ -182,7 +182,7 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() { | |
}) | ||
|
||
It("Should return error message when failing to get storage client during upgrade operation", func() { | ||
cs := api.CreateMockContainerService("testcluster", "1.18.15", 5, 1, false) | ||
cs := api.CreateMockContainerService("testcluster", "", 5, 1, false) | ||
uc := UpgradeCluster{ | ||
Translator: &i18n.Translator{}, | ||
Logger: log.NewEntry(log.New()), | ||
|
@@ -205,7 +205,7 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() { | |
}) | ||
|
||
It("Should return error message when failing to delete network interface during upgrade operation", func() { | ||
cs := api.CreateMockContainerService("testcluster", "1.18.15", 3, 2, false) | ||
cs := api.CreateMockContainerService("testcluster", "", 3, 2, false) | ||
uc := UpgradeCluster{ | ||
Translator: &i18n.Translator{}, | ||
Logger: log.NewEntry(log.New()), | ||
|
@@ -228,7 +228,7 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() { | |
}) | ||
|
||
It("Should return error message when failing to delete role assignment during upgrade operation", func() { | ||
cs := api.CreateMockContainerService("testcluster", "1.18.15", 3, 2, false) | ||
cs := api.CreateMockContainerService("testcluster", "", 3, 2, false) | ||
cs.Properties.OrchestratorProfile.KubernetesConfig = &api.KubernetesConfig{} | ||
cs.Properties.OrchestratorProfile.KubernetesConfig.UseManagedIdentity = to.BoolPtr(true) | ||
uc := UpgradeCluster{ | ||
|
@@ -262,7 +262,7 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() { | |
|
||
BeforeEach(func() { | ||
mockClient = armhelpers.MockAKSEngineClient{MockKubernetesClient: &armhelpers.MockKubernetesClient{}} | ||
cs = api.CreateMockContainerService("testcluster", "1.18.15", 3, 3, false) | ||
cs = api.CreateMockContainerService("testcluster", "1.16.15", 3, 3, false) | ||
uc = UpgradeCluster{ | ||
Translator: &i18n.Translator{}, | ||
Logger: log.NewEntry(log.New()), | ||
|
@@ -291,10 +291,10 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() { | |
It("Should skip VMs that are already on desired version", func() { | ||
mockClient.FakeListVirtualMachineScaleSetVMsResult = func() []compute.VirtualMachineScaleSetVM { | ||
return []compute.VirtualMachineScaleSetVM{ | ||
mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.18.15"), | ||
mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.18.10"), | ||
mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.18.9"), | ||
mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.18.15"), | ||
mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.16.15"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just to prevent any unnecessary search/replace queries from coming up in the past, setting these UT data to a permanently deprecated version (the UT are just testing for version equality, they don't care about the supported versions list) |
||
mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.16.10"), | ||
mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.16.9"), | ||
mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.16.15"), | ||
} | ||
} | ||
uc.Force = false | ||
|
@@ -362,9 +362,9 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() { | |
It("Should use kubernetes api to get node versions for VMSS when latest model is not applied", func() { | ||
trueVar := true | ||
falseVar := false | ||
vmWithoutLatestModelApplied := mockClient.MakeFakeVirtualMachineScaleSetVMWithGivenName("Kubernetes:1.18.15", "vmWithoutLatestModelApplied!") | ||
vmWithoutLatestModelApplied := mockClient.MakeFakeVirtualMachineScaleSetVMWithGivenName("Kubernetes:1.16.15", "vmWithoutLatestModelApplied!") | ||
vmWithoutLatestModelApplied.VirtualMachineScaleSetVMProperties.LatestModelApplied = &falseVar | ||
vmWithLatestModelApplied := mockClient.MakeFakeVirtualMachineScaleSetVMWithGivenName("Kubernetes:1.18.15", "vmWithLatestModelApplied") | ||
vmWithLatestModelApplied := mockClient.MakeFakeVirtualMachineScaleSetVMWithGivenName("Kubernetes:1.16.15", "vmWithLatestModelApplied") | ||
vmWithLatestModelApplied.VirtualMachineScaleSetVMProperties.LatestModelApplied = &trueVar | ||
|
||
mockClient.MockKubernetesClient.GetNodeFunc = func(name string) (*v1.Node, error) { | ||
|
@@ -622,7 +622,7 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() { | |
Expect(*uc.UpgradedMasterVMs).To(HaveLen(0)) | ||
}) | ||
It("Should leave platform fault domain count nil", func() { | ||
cs := api.CreateMockContainerService("testcluster", "1.18.15", 3, 2, false) | ||
cs := api.CreateMockContainerService("testcluster", "", 3, 2, false) | ||
cs.Properties.OrchestratorProfile.KubernetesConfig = &api.KubernetesConfig{} | ||
cs.Properties.OrchestratorProfile.KubernetesConfig.UseManagedIdentity = to.BoolPtr(true) | ||
cs.Properties.MasterProfile.AvailabilityProfile = "AvailabilitySet" | ||
|
@@ -715,7 +715,7 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() { | |
}) | ||
|
||
It("Should not fail if no managed identity is returned by azure during upgrade operation", func() { | ||
cs := api.CreateMockContainerService("testcluster", "1.18.15", 3, 2, false) | ||
cs := api.CreateMockContainerService("testcluster", "", 3, 2, false) | ||
cs.Properties.OrchestratorProfile.KubernetesConfig = &api.KubernetesConfig{} | ||
cs.Properties.OrchestratorProfile.KubernetesConfig.UseManagedIdentity = to.BoolPtr(true) | ||
uc := UpgradeCluster{ | ||
|
@@ -738,7 +738,7 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() { | |
}) | ||
|
||
It("Should not fail if a Kubernetes client cannot be created", func() { | ||
cs := api.CreateMockContainerService("testcluster", "1.18.15", 3, 2, false) | ||
cs := api.CreateMockContainerService("testcluster", "", 3, 2, false) | ||
uc := UpgradeCluster{ | ||
Translator: &i18n.Translator{}, | ||
Logger: log.NewEntry(log.New()), | ||
|
@@ -772,7 +772,7 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() { | |
}) | ||
|
||
It("Should fail if cluster-autoscaler cannot be paused unless --force is specified", func() { | ||
cs := api.CreateMockContainerService("testcluster", "1.18.15", 3, 2, false) | ||
cs := api.CreateMockContainerService("testcluster", "", 3, 2, false) | ||
enabled := true | ||
addon := api.KubernetesAddon{ | ||
Name: "cluster-autoscaler", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -253,7 +253,7 @@ K8S_VERSIONS=" | |
1.21.0-alpha.3 | ||
1.20.4 | ||
1.19.8 | ||
1.18.15 | ||
1.18.16 | ||
1.18.15-azs | ||
1.17.17 | ||
1.17.17-azs | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
100% of UT should not care about our maintaining the versions support list, so shout if this ever bites you in the future!
cc @mboersma