From b38cedd594fe4fe37bb2b9b7b3505cd61b2ccb66 Mon Sep 17 00:00:00 2001 From: Matt Boersma Date: Tue, 29 Oct 2019 17:06:58 -0600 Subject: [PATCH] chore: remove support for Kubernetes 1.10.x (#2234) --- cmd/generate_test.go | 5 -- cmd/rotate_certs_test.go | 2 +- .../kubernetes-cluster-autoscaler.json | 2 +- .../nvidia-device-plugin.json | 2 +- .../kubernetes-releases/kubernetes1.10.json | 36 ------------- examples/windows/kubernetes-hyperv.json | 2 +- pkg/api/common/versions.go | 4 +- pkg/api/convertertoagentpoolonlyapi_test.go | 2 +- pkg/api/convertertoapi_test.go | 4 +- pkg/api/defaults_test.go | 10 ++-- pkg/api/types_test.go | 2 +- pkg/api/vlabs/validate_test.go | 22 ++++---- pkg/armhelpers/mockclients.go | 4 +- .../addons/kubernetes-custom-psp.json | 2 +- .../addons/kubernetes-kube-proxy.json | 2 +- pkg/engine/testdata/addons/kubernetes.json | 2 +- .../agentPoolOnly/v20170831/agents.json | 2 +- .../agentPoolOnly/v20180331/agents.json | 2 +- .../agentsWithFullNetworkProfile.json | 2 +- .../agentsWithFullNetworkProfileV2.json | 2 +- .../agentsWithOnlyNetworkPlugin.json | 2 +- .../disks-managed/kubernetes-vmss.json | 2 +- ...ernetes1.10.9.json => kubernetes1.11.json} | 4 +- .../largeclusters/kubernetes-vmss.json | 2 +- .../windows/kubernetes-kubernetesconfig.json | 2 +- .../testdata/windows/kubernetes-vmss.json | 2 +- .../kubernetesupgrade/upgradecluster_test.go | 54 +++++++++---------- 27 files changed, 69 insertions(+), 110 deletions(-) delete mode 100644 examples/kubernetes-releases/kubernetes1.10.json rename pkg/engine/testdata/kubernetesversions/{kubernetes1.10.9.json => kubernetes1.11.json} (94%) diff --git a/cmd/generate_test.go b/cmd/generate_test.go index 7c0ed796e..4d95acc57 100644 --- a/cmd/generate_test.go +++ b/cmd/generate_test.go @@ -499,11 +499,6 @@ func TestExampleAPIModels(t *testing.T) { apiModelPath: "../examples/kubernetes-msi-userassigned/kube-vmss.json", setArgs: defaultSet, }, - { - name: "1.10 example", - apiModelPath: "../examples/kubernetes-releases/kubernetes1.10.json", - setArgs: defaultSet, - }, { name: "1.11 example", apiModelPath: "../examples/kubernetes-releases/kubernetes1.11.json", diff --git a/cmd/rotate_certs_test.go b/cmd/rotate_certs_test.go index 3e61e9c90..742be3601 100644 --- a/cmd/rotate_certs_test.go +++ b/cmd/rotate_certs_test.go @@ -247,7 +247,7 @@ func TestDeleteServiceAccounts(t *testing.T) { func TestWriteArtifacts(t *testing.T) { g := NewGomegaWithT(t) - cs := api.CreateMockContainerService("testcluster", "1.10.13", 3, 2, false) + cs := api.CreateMockContainerService("testcluster", "1.11.10", 3, 2, false) cs.SetPropertiesDefaults(api.PropertiesDefaultsParams{ IsScale: false, IsUpgrade: false, diff --git a/examples/addons/cluster-autoscaler/kubernetes-cluster-autoscaler.json b/examples/addons/cluster-autoscaler/kubernetes-cluster-autoscaler.json index 8875a3a38..501b70b84 100644 --- a/examples/addons/cluster-autoscaler/kubernetes-cluster-autoscaler.json +++ b/examples/addons/cluster-autoscaler/kubernetes-cluster-autoscaler.json @@ -3,7 +3,7 @@ "properties": { "orchestratorProfile": { "orchestratorType": "Kubernetes", - "orchestratorRelease": "1.10", + "orchestratorRelease": "1.11", "kubernetesConfig": { "useManagedIdentity": true, "addons": [ diff --git a/examples/addons/nvidia-device-plugin/nvidia-device-plugin.json b/examples/addons/nvidia-device-plugin/nvidia-device-plugin.json index 71a2f1849..bffd1840a 100644 --- a/examples/addons/nvidia-device-plugin/nvidia-device-plugin.json +++ b/examples/addons/nvidia-device-plugin/nvidia-device-plugin.json @@ -3,7 +3,7 @@ "properties": { "orchestratorProfile": { "orchestratorType": "Kubernetes", - "orchestratorRelease": "1.10", + "orchestratorRelease": "1.11", "kubernetesConfig": { "addons": [ { diff --git a/examples/kubernetes-releases/kubernetes1.10.json b/examples/kubernetes-releases/kubernetes1.10.json deleted file mode 100644 index be2348249..000000000 --- a/examples/kubernetes-releases/kubernetes1.10.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "apiVersion": "vlabs", - "properties": { - "orchestratorProfile": { - "orchestratorType": "Kubernetes", - "orchestratorRelease": "1.10" - }, - "masterProfile": { - "count": 1, - "dnsPrefix": "", - "vmSize": "Standard_D2_v3" - }, - "agentPoolProfiles": [ - { - "name": "agentpool1", - "count": 3, - "vmSize": "Standard_D2_v3", - "availabilityProfile": "AvailabilitySet" - } - ], - "linuxProfile": { - "adminUsername": "azureuser", - "ssh": { - "publicKeys": [ - { - "keyData": "" - } - ] - } - }, - "servicePrincipalProfile": { - "clientId": "", - "secret": "" - } - } -} diff --git a/examples/windows/kubernetes-hyperv.json b/examples/windows/kubernetes-hyperv.json index 227f4ccbb..beb167beb 100644 --- a/examples/windows/kubernetes-hyperv.json +++ b/examples/windows/kubernetes-hyperv.json @@ -3,7 +3,7 @@ "properties": { "orchestratorProfile": { "orchestratorType": "Kubernetes", - "orchestratorRelease": "1.10", + "orchestratorRelease": "1.11", "kubernetesConfig": { "apiServerConfig" : { "--feature-gates": "HyperVContainer=true" diff --git a/pkg/api/common/versions.go b/pkg/api/common/versions.go index 0f37498d6..687379149 100644 --- a/pkg/api/common/versions.go +++ b/pkg/api/common/versions.go @@ -72,8 +72,8 @@ var AllKubernetesSupportedVersions = map[string]bool{ "1.10.7": false, "1.10.8": false, "1.10.9": false, - "1.10.12": true, - "1.10.13": true, + "1.10.12": false, + "1.10.13": false, "1.11.0-alpha.1": false, "1.11.0-alpha.2": false, "1.11.0-beta.1": false, diff --git a/pkg/api/convertertoagentpoolonlyapi_test.go b/pkg/api/convertertoagentpoolonlyapi_test.go index 844f071e8..9d641ec96 100644 --- a/pkg/api/convertertoagentpoolonlyapi_test.go +++ b/pkg/api/convertertoagentpoolonlyapi_test.go @@ -14,7 +14,7 @@ import ( ) func TestConvertV20180331AgentPoolOnlyOrchestratorProfile(t *testing.T) { - kubernetesVersion := "1.10.13" + kubernetesVersion := "1.11.10" networkPlugin := v20180331.Azure networkPolicy := v20180331.NetworkPolicyCalico networkPluginKubenet := v20180331.Kubenet diff --git a/pkg/api/convertertoapi_test.go b/pkg/api/convertertoapi_test.go index 5f86a9b1b..5a38aa3ff 100644 --- a/pkg/api/convertertoapi_test.go +++ b/pkg/api/convertertoapi_test.go @@ -137,7 +137,7 @@ func TestOrchestratorVersion(t *testing.T) { Properties: &vlabs.Properties{ OrchestratorProfile: &vlabs.OrchestratorProfile{ OrchestratorType: vlabs.Kubernetes, - OrchestratorVersion: "1.10.13", + OrchestratorVersion: "1.11.10", }, }, } @@ -145,7 +145,7 @@ func TestOrchestratorVersion(t *testing.T) { if err != nil { t.Fatalf("Failed to convert ContainerService, error: %s", err) } - if cs.Properties.OrchestratorProfile.OrchestratorVersion != "1.10.13" { + if cs.Properties.OrchestratorProfile.OrchestratorVersion != "1.11.10" { t.Fatalf("incorrect OrchestratorVersion '%s'", cs.Properties.OrchestratorProfile.OrchestratorVersion) } } diff --git a/pkg/api/defaults_test.go b/pkg/api/defaults_test.go index ab4931be3..000ab7bb0 100644 --- a/pkg/api/defaults_test.go +++ b/pkg/api/defaults_test.go @@ -198,14 +198,14 @@ func TestAssignDefaultAddonImages(t *testing.T) { defaultAddonImages := map[string]string{ TillerAddonName: "gcr.io/kubernetes-helm/tiller:v2.13.1", ACIConnectorAddonName: "microsoft/virtual-kubelet:latest", - ClusterAutoscalerAddonName: "k8s.gcr.io/cluster-autoscaler:v1.2.5", + ClusterAutoscalerAddonName: "k8s.gcr.io/cluster-autoscaler:v1.3.9", BlobfuseFlexVolumeAddonName: "mcr.microsoft.com/k8s/flexvolume/blobfuse-flexvolume:1.0.8", SMBFlexVolumeAddonName: "mcr.microsoft.com/k8s/flexvolume/smb-flexvolume:1.0.2", KeyVaultFlexVolumeAddonName: "mcr.microsoft.com/k8s/flexvolume/keyvault-flexvolume:v0.0.13", DashboardAddonName: "k8s.gcr.io/kubernetes-dashboard-amd64:v1.10.1", - ReschedulerAddonName: "k8s.gcr.io/rescheduler:v0.3.1", + ReschedulerAddonName: "k8s.gcr.io/rescheduler:v0.4.0", MetricsServerAddonName: "k8s.gcr.io/metrics-server-amd64:v0.2.1", - NVIDIADevicePluginAddonName: "nvidia/k8s-device-plugin:1.10", + NVIDIADevicePluginAddonName: "nvidia/k8s-device-plugin:1.11", ContainerMonitoringAddonName: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod10182019", IPMASQAgentAddonName: "k8s.gcr.io/ip-masq-agent-amd64:v2.5.0", AzureCNINetworkMonitoringAddonName: "mcr.microsoft.com/containernetworking/networkmonitor:v0.0.6", @@ -252,7 +252,7 @@ func TestAssignDefaultAddonImages(t *testing.T) { c := c t.Run(c.name, func(t *testing.T) { t.Parallel() - mockCS := getMockBaseContainerService("1.10.8") + mockCS := getMockBaseContainerService("1.11.10") mockCS.Properties.OrchestratorProfile.OrchestratorType = Kubernetes mockCS.Properties.OrchestratorProfile.KubernetesConfig.Addons = c.myAddons mockCS.setOrchestratorDefaults(c.isUpdate, c.isUpdate) @@ -1140,7 +1140,7 @@ func TestStorageProfile(t *testing.T) { properties.AgentPoolProfiles[0].AvailabilityProfile, AvailabilitySet) } - mockCS = getMockBaseContainerService("1.10.2") + mockCS = getMockBaseContainerService("1.11.10") properties = mockCS.Properties properties.OrchestratorProfile.OrchestratorType = Kubernetes mockCS.SetPropertiesDefaults(PropertiesDefaultsParams{ diff --git a/pkg/api/types_test.go b/pkg/api/types_test.go index 4e0befc09..c9c8d65b0 100644 --- a/pkg/api/types_test.go +++ b/pkg/api/types_test.go @@ -42,7 +42,7 @@ const exampleAKSAPIModel = `{ "properties": { "dnsPrefix": "agents006", "fqdn": "agents006.azmk8s.io", - "kubernetesVersion": "1.10.12", + "kubernetesVersion": "1.11.10", "agentPoolProfiles": [ { "name": "agentpool1", "count": 2, "vmSize": "Standard_D2_v2" } ], "linuxProfile": { "adminUsername": "azureuser", "ssh": { "publicKeys": [ { "keyData": "" } ] } }, diff --git a/pkg/api/vlabs/validate_test.go b/pkg/api/vlabs/validate_test.go index c78016eb8..71f1a90f5 100644 --- a/pkg/api/vlabs/validate_test.go +++ b/pkg/api/vlabs/validate_test.go @@ -124,7 +124,7 @@ func Test_OrchestratorProfile_Validate(t *testing.T) { properties: &Properties{ OrchestratorProfile: &OrchestratorProfile{ OrchestratorType: "Kubernetes", - OrchestratorVersion: "1.10.13", + OrchestratorVersion: "1.11.10", KubernetesConfig: &KubernetesConfig{ EnableAggregatedAPIs: true, EnableRbac: &falseVal, @@ -161,7 +161,7 @@ func Test_OrchestratorProfile_Validate(t *testing.T) { properties: &Properties{ OrchestratorProfile: &OrchestratorProfile{ OrchestratorType: "Kubernetes", - OrchestratorVersion: "1.10.13", + OrchestratorVersion: "1.11.10", KubernetesConfig: &KubernetesConfig{ EnableDataEncryptionAtRest: &trueVal, EtcdEncryptionKey: "fakeEncryptionKey", @@ -198,7 +198,7 @@ func Test_OrchestratorProfile_Validate(t *testing.T) { properties: &Properties{ OrchestratorProfile: &OrchestratorProfile{ OrchestratorType: "Kubernetes", - OrchestratorVersion: "1.10.13", + OrchestratorVersion: "1.11.10", KubernetesConfig: &KubernetesConfig{ EnablePodSecurityPolicy: &trueVal, }, @@ -294,7 +294,7 @@ func Test_OrchestratorProfile_Validate(t *testing.T) { properties: &Properties{ OrchestratorProfile: &OrchestratorProfile{ OrchestratorType: "Kubernetes", - OrchestratorVersion: "v1.10.13", + OrchestratorVersion: "v1.11.10", }, }, }, @@ -1416,10 +1416,10 @@ func Test_Properties_ValidateAddons(t *testing.T) { "should error on azure-policy with k8s < 1.10", ) } - p.OrchestratorProfile.OrchestratorRelease = "1.10" + p.OrchestratorProfile.OrchestratorRelease = "1.11" if err := p.validateAddons(); err != nil { t.Errorf( - "should not error on azure-policy with k8s >= 1.10", + "should not error on azure-policy with k8s >= 1.11", ) } @@ -1450,10 +1450,10 @@ func Test_Properties_ValidateAddons(t *testing.T) { ) } - p.OrchestratorProfile.OrchestratorRelease = "1.10" + p.OrchestratorProfile.OrchestratorRelease = "1.11" if err := p.validateAddons(); err != nil { t.Errorf( - "should not error on nvidia-device-plugin with k8s >= 1.10", + "should not error on nvidia-device-plugin with k8s >= 1.11", ) } p.OrchestratorProfile.KubernetesConfig = &KubernetesConfig{ @@ -2094,7 +2094,7 @@ func TestMasterProfileValidate(t *testing.T) { { name: "Master Profile with VMSS and storage account", orchestratorType: Kubernetes, - orchestratorRelease: "1.10", + orchestratorRelease: "1.11", masterProfile: MasterProfile{ DNSPrefix: "dummy", Count: 3, @@ -2106,7 +2106,7 @@ func TestMasterProfileValidate(t *testing.T) { { name: "Master Profile with VMSS and agent profiles with VMAS", orchestratorType: Kubernetes, - orchestratorRelease: "1.10", + orchestratorRelease: "1.11", masterProfile: MasterProfile{ DNSPrefix: "dummy", Count: 3, @@ -2670,7 +2670,7 @@ func TestProperties_ValidateVNET(t *testing.T) { t.Run(test.name, func(t *testing.T) { t.Parallel() cs := getK8sDefaultContainerService(true) - cs.Properties.OrchestratorProfile.OrchestratorRelease = "1.10" + cs.Properties.OrchestratorProfile.OrchestratorRelease = "1.11" cs.Properties.MasterProfile = test.masterProfile cs.Properties.AgentPoolProfiles = test.agentPoolProfiles err := cs.Validate(true) diff --git a/pkg/armhelpers/mockclients.go b/pkg/armhelpers/mockclients.go index 23f379b51..c9e1fac74 100644 --- a/pkg/armhelpers/mockclients.go +++ b/pkg/armhelpers/mockclients.go @@ -27,7 +27,7 @@ import ( ) const ( - defaultK8sVersionForFakeVMs = "Kubernetes:1.9.10" + defaultK8sVersionForFakeVMs = "Kubernetes:1.11.10" //DefaultFakeVMName is the default name assigned to VMs part of FakeListVirtualMachineScaleSetVMsResult and FakeListVirtualMachineResult DefaultFakeVMName = "k8s-agentpool1-12345678-0" ) @@ -350,7 +350,7 @@ func (mkc *MockKubernetesClient) GetNode(name string) (*v1.Node, error) { } node := &v1.Node{} node.Status.Conditions = append(node.Status.Conditions, v1.NodeCondition{Type: v1.NodeReady, Status: v1.ConditionTrue}) - node.Status.NodeInfo.KubeletVersion = "1.9.10" + node.Status.NodeInfo.KubeletVersion = "1.11.10" return node, nil } diff --git a/pkg/engine/testdata/addons/kubernetes-custom-psp.json b/pkg/engine/testdata/addons/kubernetes-custom-psp.json index 2946a2938..42c6ee657 100644 --- a/pkg/engine/testdata/addons/kubernetes-custom-psp.json +++ b/pkg/engine/testdata/addons/kubernetes-custom-psp.json @@ -5,7 +5,7 @@ "provisioningState": "", "orchestratorProfile": { "orchestratorType": "Kubernetes", - "orchestratorRelease": "1.10", + "orchestratorRelease": "1.11", "kubernetesConfig": { "enablePodSecurityPolicy": true, "enableRbac": true, diff --git a/pkg/engine/testdata/addons/kubernetes-kube-proxy.json b/pkg/engine/testdata/addons/kubernetes-kube-proxy.json index 536d0d91d..c8a8e02e0 100644 --- a/pkg/engine/testdata/addons/kubernetes-kube-proxy.json +++ b/pkg/engine/testdata/addons/kubernetes-kube-proxy.json @@ -5,7 +5,7 @@ "provisioningState": "", "orchestratorProfile": { "orchestratorType": "Kubernetes", - "orchestratorRelease": "1.10", + "orchestratorRelease": "1.11", "kubernetesConfig": { "addons": [ { diff --git a/pkg/engine/testdata/addons/kubernetes.json b/pkg/engine/testdata/addons/kubernetes.json index 422745e48..a2d48604e 100644 --- a/pkg/engine/testdata/addons/kubernetes.json +++ b/pkg/engine/testdata/addons/kubernetes.json @@ -5,7 +5,7 @@ "provisioningState": "", "orchestratorProfile": { "orchestratorType": "Kubernetes", - "orchestratorRelease": "1.10", + "orchestratorRelease": "1.11", "kubernetesConfig": { "addons": [ { diff --git a/pkg/engine/testdata/agentPoolOnly/v20170831/agents.json b/pkg/engine/testdata/agentPoolOnly/v20170831/agents.json index 3ac0a4bd3..0fcd4782a 100644 --- a/pkg/engine/testdata/agentPoolOnly/v20170831/agents.json +++ b/pkg/engine/testdata/agentPoolOnly/v20170831/agents.json @@ -3,7 +3,7 @@ "properties": { "dnsPrefix": "agents006", "fqdn": "agents006.azmk8s.io", - "kubernetesVersion": "1.10.13", + "kubernetesVersion": "1.11.10", "agentPoolProfiles": [ { "name": "agentpool1", diff --git a/pkg/engine/testdata/agentPoolOnly/v20180331/agents.json b/pkg/engine/testdata/agentPoolOnly/v20180331/agents.json index b47f94e49..c0b62e77e 100644 --- a/pkg/engine/testdata/agentPoolOnly/v20180331/agents.json +++ b/pkg/engine/testdata/agentPoolOnly/v20180331/agents.json @@ -3,7 +3,7 @@ "properties": { "dnsPrefix": "agents006", "fqdn": "agents006.azmk8s.io", - "kubernetesVersion": "1.10.13", + "kubernetesVersion": "1.11.10", "agentPoolProfiles": [ { "name": "agentpool1", diff --git a/pkg/engine/testdata/agentPoolOnly/v20180331/agentsWithFullNetworkProfile.json b/pkg/engine/testdata/agentPoolOnly/v20180331/agentsWithFullNetworkProfile.json index 5c2360c86..34b9fa589 100644 --- a/pkg/engine/testdata/agentPoolOnly/v20180331/agentsWithFullNetworkProfile.json +++ b/pkg/engine/testdata/agentPoolOnly/v20180331/agentsWithFullNetworkProfile.json @@ -3,7 +3,7 @@ "properties": { "dnsPrefix": "agents006", "fqdn": "agents006.azmk8s.io", - "kubernetesVersion": "1.10.13", + "kubernetesVersion": "1.11.10", "agentPoolProfiles": [ { "name": "agentpool1", diff --git a/pkg/engine/testdata/agentPoolOnly/v20180331/agentsWithFullNetworkProfileV2.json b/pkg/engine/testdata/agentPoolOnly/v20180331/agentsWithFullNetworkProfileV2.json index 1db801610..4d01663e0 100644 --- a/pkg/engine/testdata/agentPoolOnly/v20180331/agentsWithFullNetworkProfileV2.json +++ b/pkg/engine/testdata/agentPoolOnly/v20180331/agentsWithFullNetworkProfileV2.json @@ -3,7 +3,7 @@ "properties": { "dnsPrefix": "agents006", "fqdn": "agents006.azmk8s.io", - "kubernetesVersion": "1.10.13", + "kubernetesVersion": "1.11.10", "agentPoolProfiles": [ { "name": "agentpool1", diff --git a/pkg/engine/testdata/agentPoolOnly/v20180331/agentsWithOnlyNetworkPlugin.json b/pkg/engine/testdata/agentPoolOnly/v20180331/agentsWithOnlyNetworkPlugin.json index 4bdd42f00..21d6fba43 100644 --- a/pkg/engine/testdata/agentPoolOnly/v20180331/agentsWithOnlyNetworkPlugin.json +++ b/pkg/engine/testdata/agentPoolOnly/v20180331/agentsWithOnlyNetworkPlugin.json @@ -3,7 +3,7 @@ "properties": { "dnsPrefix": "agents006", "fqdn": "agents006.azmk8s.io", - "kubernetesVersion": "1.10.13", + "kubernetesVersion": "1.11.10", "agentPoolProfiles": [ { "name": "agentpool1", diff --git a/pkg/engine/testdata/disks-managed/kubernetes-vmss.json b/pkg/engine/testdata/disks-managed/kubernetes-vmss.json index 8a1d587f7..58a3cbb1c 100644 --- a/pkg/engine/testdata/disks-managed/kubernetes-vmss.json +++ b/pkg/engine/testdata/disks-managed/kubernetes-vmss.json @@ -5,7 +5,7 @@ "provisioningState": "", "orchestratorProfile": { "orchestratorType": "Kubernetes", - "orchestratorRelease": "1.10" + "orchestratorRelease": "1.11" }, "masterProfile": { "count": 1, diff --git a/pkg/engine/testdata/kubernetesversions/kubernetes1.10.9.json b/pkg/engine/testdata/kubernetesversions/kubernetes1.11.json similarity index 94% rename from pkg/engine/testdata/kubernetesversions/kubernetes1.10.9.json rename to pkg/engine/testdata/kubernetesversions/kubernetes1.11.json index 2d03c5bd6..42cdc62fb 100644 --- a/pkg/engine/testdata/kubernetesversions/kubernetes1.10.9.json +++ b/pkg/engine/testdata/kubernetesversions/kubernetes1.11.json @@ -3,7 +3,7 @@ "properties": { "orchestratorProfile": { "orchestratorType": "Kubernetes", - "orchestratorRelease": "1.10" + "orchestratorRelease": "1.11" }, "masterProfile": { "count": 1, @@ -58,4 +58,4 @@ ] } } -} \ No newline at end of file +} diff --git a/pkg/engine/testdata/largeclusters/kubernetes-vmss.json b/pkg/engine/testdata/largeclusters/kubernetes-vmss.json index 04fe6eefd..c7779fcaf 100644 --- a/pkg/engine/testdata/largeclusters/kubernetes-vmss.json +++ b/pkg/engine/testdata/largeclusters/kubernetes-vmss.json @@ -3,7 +3,7 @@ "properties": { "orchestratorProfile": { "orchestratorType": "Kubernetes", - "orchestratorRelease": "1.10" + "orchestratorRelease": "1.11" }, "masterProfile": { "count": 1, diff --git a/pkg/engine/testdata/windows/kubernetes-kubernetesconfig.json b/pkg/engine/testdata/windows/kubernetes-kubernetesconfig.json index dd7dc370b..29194703c 100644 --- a/pkg/engine/testdata/windows/kubernetes-kubernetesconfig.json +++ b/pkg/engine/testdata/windows/kubernetes-kubernetesconfig.json @@ -3,7 +3,7 @@ "properties": { "orchestratorProfile": { "orchestratorType": "Kubernetes", - "orchestratorRelease": "1.10", + "orchestratorRelease": "1.11", "kubernetesConfig": { "useInstanceMetadata": false, "windowsNodeBinariesURL": "http://test/test.tar.gz" diff --git a/pkg/engine/testdata/windows/kubernetes-vmss.json b/pkg/engine/testdata/windows/kubernetes-vmss.json index 113832c73..a1e431421 100644 --- a/pkg/engine/testdata/windows/kubernetes-vmss.json +++ b/pkg/engine/testdata/windows/kubernetes-vmss.json @@ -3,7 +3,7 @@ "properties": { "orchestratorProfile": { "orchestratorType": "Kubernetes", - "orchestratorRelease": "1.10", + "orchestratorRelease": "1.11", "kubernetesConfig": { "useInstanceMetadata": false } diff --git a/pkg/operations/kubernetesupgrade/upgradecluster_test.go b/pkg/operations/kubernetesupgrade/upgradecluster_test.go index 1b8a56dcf..b14ce1c41 100644 --- a/pkg/operations/kubernetesupgrade/upgradecluster_test.go +++ b/pkg/operations/kubernetesupgrade/upgradecluster_test.go @@ -54,7 +54,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.10.13", 1, 1, false) + cs := api.CreateMockContainerService("testcluster", "1.12.8", 1, 1, false) uc := UpgradeCluster{ Translator: &i18n.Translator{}, Logger: log.NewEntry(log.New()), @@ -80,7 +80,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.10.13", 1, 1, false) + cs := api.CreateMockContainerService("testcluster", "1.12.8", 1, 1, false) uc := UpgradeCluster{ Translator: &i18n.Translator{}, Logger: log.NewEntry(log.New()), @@ -106,7 +106,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.10.13", 1, 1, false) + cs := api.CreateMockContainerService("testcluster", "1.12.8", 1, 1, false) uc := UpgradeCluster{ Translator: &i18n.Translator{}, Logger: log.NewEntry(log.New()), @@ -129,7 +129,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.10.13", 1, 1, false) + cs := api.CreateMockContainerService("testcluster", "1.12.8", 1, 1, false) uc := UpgradeCluster{ Translator: &i18n.Translator{}, Logger: log.NewEntry(log.New()), @@ -152,7 +152,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.10.13", 1, 6, false) + cs := api.CreateMockContainerService("testcluster", "1.12.8", 1, 6, false) uc := UpgradeCluster{ Translator: &i18n.Translator{}, Logger: log.NewEntry(log.New()), @@ -175,7 +175,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.10.13", 5, 1, false) + cs := api.CreateMockContainerService("testcluster", "1.12.8", 5, 1, false) uc := UpgradeCluster{ Translator: &i18n.Translator{}, Logger: log.NewEntry(log.New()), @@ -198,7 +198,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.10.13", 3, 2, false) + cs := api.CreateMockContainerService("testcluster", "1.12.8", 3, 2, false) uc := UpgradeCluster{ Translator: &i18n.Translator{}, Logger: log.NewEntry(log.New()), @@ -221,7 +221,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.10.13", 3, 2, false) + cs := api.CreateMockContainerService("testcluster", "1.12.8", 3, 2, false) cs.Properties.OrchestratorProfile.KubernetesConfig = &api.KubernetesConfig{} cs.Properties.OrchestratorProfile.KubernetesConfig.UseManagedIdentity = true uc := UpgradeCluster{ @@ -255,7 +255,7 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() { BeforeEach(func() { mockClient = armhelpers.MockAKSEngineClient{MockKubernetesClient: &armhelpers.MockKubernetesClient{}} - cs = api.CreateMockContainerService("testcluster", "1.9.10", 3, 3, false) + cs = api.CreateMockContainerService("testcluster", "1.12.8", 3, 3, false) uc = UpgradeCluster{ Translator: &i18n.Translator{}, Logger: log.NewEntry(log.New()), @@ -284,10 +284,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.9.10"), - mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.9.9"), - mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.9.7"), - mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.9.10"), + mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.12.8"), + mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.12.5"), + mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.12.7"), + mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.12.8"), } } uc.Force = false @@ -355,17 +355,17 @@ 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.9.10", "vmWithoutLatestModelApplied!") + vmWithoutLatestModelApplied := mockClient.MakeFakeVirtualMachineScaleSetVMWithGivenName("Kubernetes:1.12.8", "vmWithoutLatestModelApplied!") vmWithoutLatestModelApplied.VirtualMachineScaleSetVMProperties.LatestModelApplied = &falseVar - vmWithLatestModelApplied := mockClient.MakeFakeVirtualMachineScaleSetVMWithGivenName("Kubernetes:1.9.10", "vmWithLatestModelApplied") + vmWithLatestModelApplied := mockClient.MakeFakeVirtualMachineScaleSetVMWithGivenName("Kubernetes:1.12.8", "vmWithLatestModelApplied") vmWithLatestModelApplied.VirtualMachineScaleSetVMProperties.LatestModelApplied = &trueVar mockClient.MockKubernetesClient.GetNodeFunc = func(name string) (*v1.Node, error) { node := &v1.Node{} - node.Status.NodeInfo.KubeletVersion = "v1.9.7" + node.Status.NodeInfo.KubeletVersion = "v1.12.7" node.Status = v1.NodeStatus{} node.Status.NodeInfo = v1.NodeSystemInfo{ - KubeletVersion: "v1.9.7", + KubeletVersion: "v1.12.7", } return node, nil @@ -436,7 +436,7 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() { BeforeEach(func() { mockClient = armhelpers.MockAKSEngineClient{} - cs = api.CreateMockContainerService("testcluster", "1.9.10", 3, 3, false) + cs = api.CreateMockContainerService("testcluster", "1.11.10", 3, 3, false) uc = UpgradeCluster{ Translator: &i18n.Translator{}, Logger: log.NewEntry(log.New()), @@ -478,10 +478,10 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() { It("Should mark scale sets as windows correctly.", func() { mockClient.FakeListVirtualMachineScaleSetVMsResult = func() []compute.VirtualMachineScaleSetVM { return []compute.VirtualMachineScaleSetVM{ - mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.9.10"), - mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.9.9"), - mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.9.7"), - mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.9.10"), + mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.11.10"), + mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.11.9"), + mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.11.7"), + mockClient.MakeFakeVirtualMachineScaleSetVM("Kubernetes:1.11.10"), } } uc.Force = false @@ -615,7 +615,7 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() { Expect(*uc.UpgradedMasterVMs).To(HaveLen(0)) }) It("Should set platform fault domain count based on availability sets", func() { - cs := api.CreateMockContainerService("testcluster", "1.10.13", 3, 2, false) + cs := api.CreateMockContainerService("testcluster", "1.12.8", 3, 2, false) cs.Properties.OrchestratorProfile.KubernetesConfig = &api.KubernetesConfig{} cs.Properties.OrchestratorProfile.KubernetesConfig.UseManagedIdentity = true uc := UpgradeCluster{ @@ -643,7 +643,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.10.13", 3, 2, false) + cs := api.CreateMockContainerService("testcluster", "1.12.8", 3, 2, false) cs.Properties.OrchestratorProfile.KubernetesConfig = &api.KubernetesConfig{} cs.Properties.OrchestratorProfile.KubernetesConfig.UseManagedIdentity = true uc := UpgradeCluster{ @@ -666,7 +666,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.10.13", 3, 2, false) + cs := api.CreateMockContainerService("testcluster", "1.12.8", 3, 2, false) uc := UpgradeCluster{ Translator: &i18n.Translator{}, Logger: log.NewEntry(log.New()), @@ -700,7 +700,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.10.13", 3, 2, false) + cs := api.CreateMockContainerService("testcluster", "1.12.8", 3, 2, false) enabled := true addon := api.KubernetesAddon{ Name: "cluster-autoscaler", @@ -752,7 +752,7 @@ var _ = Describe("Upgrade Kubernetes cluster tests", func() { }) It("Should pause cluster-autoscaler during upgrade operation", func() { - cs := api.CreateMockContainerService("testcluster", "1.10.13", 3, 2, false) + cs := api.CreateMockContainerService("testcluster", "1.11.10", 3, 2, false) enabled := true addon := api.KubernetesAddon{ Name: "cluster-autoscaler",