diff --git a/cmd/generate_test.go b/cmd/generate_test.go index d22706d09b..d7e1e9d780 100644 --- a/cmd/generate_test.go +++ b/cmd/generate_test.go @@ -547,11 +547,6 @@ func TestExampleAPIModels(t *testing.T) { apiModelPath: "../examples/kubernetes-config/kubernetes-private-cluster.json", setArgs: []string{"orchestratorProfile.kubernetesConfig.privateCluster.jumpboxProfile.publicKey=\"ssh-rsa AAAAB3NO8b9== azureuser@cluster.local\",masterProfile.dnsPrefix=my-cluster,linuxProfile.ssh.publicKeys[0].keyData=\"ssh-rsa AAAAB3NO8b9== azureuser@cluster.local\",servicePrincipalProfile.clientId=\"123a4321-c6eb-4b61-9d6f-7db123e14a7a\",servicePrincipalProfile.secret=\"=#msRock5!t=\""}, }, - { - name: "rescheduler addon", - apiModelPath: "../examples/kubernetes-config/kubernetes-rescheduler.json", - setArgs: defaultSet, - }, { name: "standard LB", apiModelPath: "../examples/kubernetes-config/kubernetes-standardlb.json", diff --git a/docs/topics/azure-stack.md b/docs/topics/azure-stack.md index fdafb5b050..f9d9dd7b40 100644 --- a/docs/topics/azure-stack.md +++ b/docs/topics/azure-stack.md @@ -161,7 +161,6 @@ The list below includes the addons currently unsupported on Azure Stack Hub: * Cluster Autoscaler * KeyVault Flex Volume * NVIDIA Device Plugin -* Rescheduler * SMB Flex Volume ### Limited Number of Frontend Public IPs diff --git a/docs/topics/clusterdefinitions.md b/docs/topics/clusterdefinitions.md index 71d558e89b..82fef31e97 100644 --- a/docs/topics/clusterdefinitions.md +++ b/docs/topics/clusterdefinitions.md @@ -109,7 +109,7 @@ $ aks-engine get-versions | --------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | tiller | false | 1 | Delivers the Helm server-side component: tiller. See https://github.com/kubernetes/helm for more info | | kubernetes-dashboard | true | 1 | Delivers the Kubernetes Dashboard component. See https://github.com/kubernetes/dashboard for more info | -| rescheduler | false | 1 | Delivers the Kubernetes rescheduler component | +| rescheduler | false | 1 | Deprecated, no longer available after aks-engine v0.60.0. | | [cluster-autoscaler](../../examples/addons/cluster-autoscaler/README.md) | false | 1 | Delivers the Kubernetes cluster autoscaler component. See https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/cloudprovider/azure for more info; only supported for VMSS clusters on the first agent pool. | | [nvidia-device-plugin](../../examples/addons/nvidia-device-plugin/README.md) | true if using a Kubernetes cluster with an N-series agent pool | 1 | Delivers the Kubernetes NVIDIA device plugin component. See https://github.com/NVIDIA/k8s-device-plugin for more info | | container-monitoring | false | 1 | Delivers the Kubernetes container monitoring component | diff --git a/examples/e2e-tests/kubernetes/flatcar/flatcar.json b/examples/e2e-tests/kubernetes/flatcar/flatcar.json index 1b278f65c0..7496d97119 100644 --- a/examples/e2e-tests/kubernetes/flatcar/flatcar.json +++ b/examples/e2e-tests/kubernetes/flatcar/flatcar.json @@ -34,19 +34,6 @@ } ] }, - { - "name": "rescheduler", - "enabled": true, - "containers": [ - { - "name": "rescheduler", - "cpuRequests": "20m", - "memoryRequests": "200Mi", - "cpuLimits": "20m", - "memoryLimits": "200Mi" - } - ] - }, { "name": "keyvault-flexvolume", "enabled": false diff --git a/examples/e2e-tests/kubernetes/kubernetes-config/addons-disabled.json b/examples/e2e-tests/kubernetes/kubernetes-config/addons-disabled.json index 301268c86e..dc9c638de3 100644 --- a/examples/e2e-tests/kubernetes/kubernetes-config/addons-disabled.json +++ b/examples/e2e-tests/kubernetes/kubernetes-config/addons-disabled.json @@ -28,10 +28,6 @@ "name": "kubernetes-dashboard", "enabled": false }, - { - "name": "rescheduler", - "enabled": false - }, { "name": "nvidia-device-plugin", "enabled": false diff --git a/examples/e2e-tests/kubernetes/kubernetes-config/addons-enabled.json b/examples/e2e-tests/kubernetes/kubernetes-config/addons-enabled.json index dc45cfb916..1ccb6536af 100644 --- a/examples/e2e-tests/kubernetes/kubernetes-config/addons-enabled.json +++ b/examples/e2e-tests/kubernetes/kubernetes-config/addons-enabled.json @@ -28,10 +28,6 @@ "name": "kubernetes-dashboard", "enabled": true }, - { - "name": "rescheduler", - "enabled": true - }, { "name": "nvidia-device-plugin", "enabled": true diff --git a/examples/kubernetes-config/kubernetes-rescheduler.json b/examples/kubernetes-config/kubernetes-rescheduler.json deleted file mode 100644 index 3335f4d62b..0000000000 --- a/examples/kubernetes-config/kubernetes-rescheduler.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "apiVersion": "vlabs", - "properties": { - "orchestratorProfile": { - "kubernetesConfig": { - "addons": [ - { - "name": "rescheduler", - "enabled" : true - } - ] - } - }, - "masterProfile": { - "count": 1, - "dnsPrefix": "", - "vmSize": "Standard_D2_v3" - }, - "agentPoolProfiles": [ - { - "name": "agentpool1", - "count": 1, - "vmSize": "Standard_D2_v3", - "availabilityProfile": "AvailabilitySet" - } - ], - "linuxProfile": { - "adminUsername": "azureuser", - "ssh": { - "publicKeys": [ - { - "keyData": "" - } - ] - } - } - } -} diff --git a/examples/kubernetes-vmss-master/customvnet.json b/examples/kubernetes-vmss-master/customvnet.json index 3b58e5c2c4..6e0b36505e 100644 --- a/examples/kubernetes-vmss-master/customvnet.json +++ b/examples/kubernetes-vmss-master/customvnet.json @@ -33,19 +33,6 @@ "memoryLimits": "512Mi" } ] - }, - { - "name": "rescheduler", - "enabled": true, - "containers": [ - { - "name": "rescheduler", - "cpuRequests": "20m", - "memoryRequests": "200Mi", - "cpuLimits": "20m", - "memoryLimits": "200Mi" - } - ] } ] } diff --git a/examples/vnet/kubernetes-master-vmss.json b/examples/vnet/kubernetes-master-vmss.json index 3b58e5c2c4..6e0b36505e 100644 --- a/examples/vnet/kubernetes-master-vmss.json +++ b/examples/vnet/kubernetes-master-vmss.json @@ -33,19 +33,6 @@ "memoryLimits": "512Mi" } ] - }, - { - "name": "rescheduler", - "enabled": true, - "containers": [ - { - "name": "rescheduler", - "cpuRequests": "20m", - "memoryRequests": "200Mi", - "cpuLimits": "20m", - "memoryLimits": "200Mi" - } - ] } ] } diff --git a/parts/k8s/addons/kube-rescheduler.yaml b/parts/k8s/addons/kube-rescheduler.yaml deleted file mode 100644 index bd6a9b4019..0000000000 --- a/parts/k8s/addons/kube-rescheduler.yaml +++ /dev/null @@ -1,37 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: rescheduler - namespace: kube-system - labels: - k8s-app: rescheduler - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile -spec: - replicas: 1 - selector: - matchLabels: - k8s-app: rescheduler - template: - metadata: - labels: - k8s-app: rescheduler - spec: - priorityClassName: system-node-critical - nodeSelector: - kubernetes.io/os: linux - containers: - - image: {{ContainerImage "rescheduler"}} - imagePullPolicy: IfNotPresent - name: rescheduler - resources: - requests: - cpu: {{ContainerCPUReqs "rescheduler"}} - memory: {{ContainerMemReqs "rescheduler"}} - limits: - cpu: {{ContainerCPULimits "rescheduler"}} - memory: {{ContainerMemLimits "rescheduler"}} - command: - - sh - - -c - - '/rescheduler' diff --git a/pkg/api/addons.go b/pkg/api/addons.go index 925bdc5431..c21247b036 100644 --- a/pkg/api/addons.go +++ b/pkg/api/addons.go @@ -212,21 +212,6 @@ func (cs *ContainerService) setAddonsConfig(isUpgrade bool) { }, } - defaultReschedulerAddonsConfig := KubernetesAddon{ - Name: common.ReschedulerAddonName, - Enabled: to.BoolPtr(DefaultReschedulerAddonEnabled && !cs.Properties.IsAzureStackCloud()), - Containers: []KubernetesContainerSpec{ - { - Name: common.ReschedulerAddonName, - CPURequests: "10m", - MemoryRequests: "100Mi", - CPULimits: "10m", - MemoryLimits: "100Mi", - Image: kubernetesImageBase + k8sComponents[common.ReschedulerAddonName], - }, - }, - } - defaultMetricsServerAddonsConfig := KubernetesAddon{ Name: common.MetricsServerAddonName, Enabled: to.BoolPtr(DefaultMetricsServerAddonEnabled), @@ -909,7 +894,6 @@ func (cs *ContainerService) setAddonsConfig(isUpgrade bool) { defaultSMBFlexVolumeAddonsConfig, defaultKeyVaultFlexVolumeAddonsConfig, defaultDashboardAddonsConfig, - defaultReschedulerAddonsConfig, defaultMetricsServerAddonsConfig, defaultNVIDIADevicePluginAddonsConfig, defaultContainerMonitoringAddonsConfig, diff --git a/pkg/api/addons_test.go b/pkg/api/addons_test.go index 80bdd0a2d3..11a7211985 100644 --- a/pkg/api/addons_test.go +++ b/pkg/api/addons_test.go @@ -1447,49 +1447,6 @@ func TestSetAddonsConfig(t *testing.T) { }, }, "1.15.4"), }, - { - name: "rescheduler addon enabled", - cs: &ContainerService{ - Properties: &Properties{ - OrchestratorProfile: &OrchestratorProfile{ - OrchestratorVersion: "1.15.4", - KubernetesConfig: &KubernetesConfig{ - KubernetesImageBaseType: common.KubernetesImageBaseTypeMCR, - DNSServiceIP: DefaultKubernetesDNSServiceIP, - KubeletConfig: map[string]string{ - "--cluster-domain": "cluster.local", - }, - ClusterSubnet: DefaultKubernetesSubnet, - ProxyMode: KubeProxyModeIPTables, - NetworkPlugin: NetworkPluginAzure, - Addons: []KubernetesAddon{ - { - Name: common.ReschedulerAddonName, - Enabled: to.BoolPtr(true), - }, - }, - }, - }, - }, - }, - isUpgrade: false, - expectedAddons: concatenateDefaultAddons([]KubernetesAddon{ - { - Name: common.ReschedulerAddonName, - Enabled: to.BoolPtr(true), - Containers: []KubernetesContainerSpec{ - { - Name: common.ReschedulerAddonName, - CPURequests: "10m", - MemoryRequests: "100Mi", - CPULimits: "10m", - MemoryLimits: "100Mi", - Image: specConfig.MCRKubernetesImageBase + k8sComponentsByVersionMap["1.15.4"][common.ReschedulerAddonName], - }, - }, - }, - }, "1.15.4"), - }, { name: "nvidia addon enabled", cs: &ContainerService{ @@ -4570,7 +4527,6 @@ func TestSetAddonsConfig(t *testing.T) { common.SMBFlexVolumeAddonName, common.KeyVaultFlexVolumeAddonName, common.DashboardAddonName, - common.ReschedulerAddonName, common.MetricsServerAddonName, common.NVIDIADevicePluginAddonName, common.ContainerMonitoringAddonName, diff --git a/pkg/api/common/const.go b/pkg/api/common/const.go index d8ec5c4634..eaa7fe5b68 100644 --- a/pkg/api/common/const.go +++ b/pkg/api/common/const.go @@ -89,8 +89,8 @@ const ( DashboardAddonName = "kubernetes-dashboard" // DashboardMetricsScraperContainerName is the name of the metrics-scraper container in the kubernetes-dashboard addon DashboardMetricsScraperContainerName = "kubernetes-dashboard-metrics-scraper" - // ReschedulerAddonName is the name of the rescheduler addon deployment - ReschedulerAddonName = "rescheduler" + // ReschedulerAddonName // Deprecated + ReschedulerAddonName = "rescheduler" // Deprecated // ExecHealthZComponentName is the name of the exechealthz component ExecHealthZComponentName = "exechealthz" // MetricsServerAddonName is the name of the kubernetes metrics server addon deployment diff --git a/pkg/api/const.go b/pkg/api/const.go index 4ce51e6dd5..7bf014b7d1 100644 --- a/pkg/api/const.go +++ b/pkg/api/const.go @@ -134,8 +134,8 @@ const ( DefaultKeyVaultFlexVolumeAddonEnabled = true // DefaultDashboardAddonEnabled determines the aks-engine provided default for enabling kubernetes-dashboard addon DefaultDashboardAddonEnabled = false - // DefaultReschedulerAddonEnabled determines the aks-engine provided default for enabling kubernetes-rescheduler addon - DefaultReschedulerAddonEnabled = false + // DefaultReschedulerAddonEnabled // Deprecated + DefaultReschedulerAddonEnabled = false // Deprecated // DefaultAzureCNIMonitoringAddonEnabled determines the aks-engine provided default for enabling azurecni-network monitoring addon DefaultAzureCNIMonitoringAddonEnabled = true // DefaultKubeDNSAddonEnabled determines the aks-engine provided default for enabling coredns addon diff --git a/pkg/api/defaults_test.go b/pkg/api/defaults_test.go index 8030d1ad54..d4263778bb 100644 --- a/pkg/api/defaults_test.go +++ b/pkg/api/defaults_test.go @@ -243,7 +243,6 @@ func TestAssignDefaultAddonImages(t *testing.T) { common.SMBFlexVolumeAddonName: k8sComponents[common.SMBFlexVolumeAddonName], common.KeyVaultFlexVolumeAddonName: k8sComponents[common.KeyVaultFlexVolumeAddonName], common.DashboardAddonName: k8sComponents[common.DashboardAddonName], - common.ReschedulerAddonName: specConfig.MCRKubernetesImageBase + k8sComponents[common.ReschedulerAddonName], common.MetricsServerAddonName: specConfig.MCRKubernetesImageBase + k8sComponents[common.MetricsServerAddonName], common.NVIDIADevicePluginAddonName: specConfig.NVIDIAImageBase + k8sComponents[common.NVIDIADevicePluginAddonName], common.ContainerMonitoringAddonName: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod10052020", diff --git a/pkg/api/k8s_versions.go b/pkg/api/k8s_versions.go index 534819d37b..08acbe3bdf 100644 --- a/pkg/api/k8s_versions.go +++ b/pkg/api/k8s_versions.go @@ -73,7 +73,7 @@ var kubernetesImageBaseDefaultImages = map[string]map[string]string{ common.KubeDNSAddonName: "k8s-dns-kube-dns-amd64:1.15.4", common.DNSMasqComponentName: "k8s-dns-dnsmasq-nanny-amd64:1.15.4", common.DNSSidecarComponentName: "k8s-dns-sidecar-amd64:1.14.10", - common.ReschedulerAddonName: "rescheduler:v0.4.0", + common.ReschedulerAddonName: "rescheduler:v0.4.0", // Deprecated common.IPMASQAgentAddonName: "ip-masq-agent-amd64:v2.5.0", common.KubeProxyAddonName: "kube-proxy", common.ControllerManagerComponentName: "kube-controller-manager", @@ -89,7 +89,7 @@ var kubernetesImageBaseDefaultImages = map[string]map[string]string{ common.KubeDNSAddonName: "oss/kubernetes/k8s-dns-kube-dns:1.15.4", common.DNSMasqComponentName: "oss/kubernetes/k8s-dns-dnsmasq-nanny:1.15.4", common.DNSSidecarComponentName: "oss/kubernetes/k8s-dns-sidecar:1.14.10", - common.ReschedulerAddonName: "oss/kubernetes/rescheduler:v0.4.0", + common.ReschedulerAddonName: "oss/kubernetes/rescheduler:v0.4.0", // Deprecated common.IPMASQAgentAddonName: "oss/kubernetes/ip-masq-agent:v2.5.0", common.KubeProxyAddonName: "oss/kubernetes/kube-proxy", common.ControllerManagerComponentName: "oss/kubernetes/kube-controller-manager", diff --git a/pkg/api/types.go b/pkg/api/types.go index 8cc61b674e..dca9b9158f 100644 --- a/pkg/api/types.go +++ b/pkg/api/types.go @@ -2078,11 +2078,6 @@ func (p *Properties) SetCloudProviderRateLimitDefaults() { } } -// IsReschedulerEnabled checks if the rescheduler addon is enabled -func (k *KubernetesConfig) IsReschedulerEnabled() bool { - return k.IsAddonEnabled(common.ReschedulerAddonName) -} - // PrivateJumpboxProvision checks if a private cluster has jumpbox auto-provisioning func (k *KubernetesConfig) PrivateJumpboxProvision() bool { if k != nil && k.PrivateCluster != nil && *k.PrivateCluster.Enabled && k.PrivateCluster.JumpboxProfile != nil { diff --git a/pkg/api/types_test.go b/pkg/api/types_test.go index a9f9431fac..4e73f3668a 100644 --- a/pkg/api/types_test.go +++ b/pkg/api/types_test.go @@ -3386,37 +3386,6 @@ func TestAgentPoolIsNSeriesSKU(t *testing.T) { } } -func TestIsReschedulerEnabled(t *testing.T) { - c := KubernetesConfig{ - Addons: []KubernetesAddon{ - getMockAddon("addon"), - }, - } - enabled := c.IsReschedulerEnabled() - enabledDefault := DefaultReschedulerAddonEnabled - if enabled != enabledDefault { - t.Fatalf("KubernetesConfig.IsReschedulerEnabled() should return %t when no rescheduler addon has been specified, instead returned %t", enabledDefault, enabled) - } - c.Addons = append(c.Addons, getMockAddon(common.ReschedulerAddonName)) - enabled = c.IsReschedulerEnabled() - if enabled { - t.Fatalf("KubernetesConfig.IsReschedulerEnabled() should return true when a custom rescheduler addon has been specified, instead returned %t", enabled) - } - b := true - c = KubernetesConfig{ - Addons: []KubernetesAddon{ - { - Name: common.ReschedulerAddonName, - Enabled: &b, - }, - }, - } - enabled = c.IsReschedulerEnabled() - if !enabled { - t.Fatalf("KubernetesConfig.IsReschedulerEnabled() should return false when a custom rescheduler addon has been specified as enabled, instead returned %t", enabled) - } -} - func TestIsIPMasqAgentEnabled(t *testing.T) { cases := []struct { p Properties diff --git a/pkg/api/vlabs/validate.go b/pkg/api/vlabs/validate.go index 40f6fc1808..6ae8b34bba 100644 --- a/pkg/api/vlabs/validate.go +++ b/pkg/api/vlabs/validate.go @@ -766,6 +766,11 @@ func (a *Properties) validateAddons(isUpdate bool) error { if err := addon.validateArcAddonConfig(); err != nil { return err } + case common.ReschedulerAddonName: + if isUpdate { + log.Warnf("The rescheduler addon has been deprecated and disabled, it will be removed during this update") + } + return errors.Errorf("The rescheduler addon has been deprecated and disabled, please remove it from your cluster configuration before creating a new cluster") } } else { // Validation for addons if they are disabled diff --git a/pkg/api/vlabs/validate_test.go b/pkg/api/vlabs/validate_test.go index 82caf7cc04..5c8298b485 100644 --- a/pkg/api/vlabs/validate_test.go +++ b/pkg/api/vlabs/validate_test.go @@ -943,6 +943,27 @@ func ExampleKubernetesConfig_validateNetworkPlugin() { // level=warning msg="Windows + Kubenet is for development and testing only, not recommended for production" } +func ExampleProperties_validateAddons() { + log.SetOutput(os.Stdout) + log.SetFormatter(&log.TextFormatter{ + DisableColors: true, + DisableTimestamp: true, + }) + cs := getK8sDefaultContainerService(true) + + cs.Properties.OrchestratorProfile.KubernetesConfig = &KubernetesConfig{} + cs.Properties.OrchestratorProfile.KubernetesConfig.Addons = []KubernetesAddon{ + {Name: common.ReschedulerAddonName, + Enabled: to.BoolPtr(true)}, + } + if err := cs.Properties.validateAddons(true); err == nil { + fmt.Printf("error in ValidateNetworkPlugin: %s", err) + } + + // Output: + // level=warning msg="The rescheduler addon has been deprecated and disabled, it will be removed during this update" +} + func Test_Properties_ValidateNetworkPlugin(t *testing.T) { p := &Properties{} p.OrchestratorProfile = &OrchestratorProfile{} @@ -2225,6 +2246,22 @@ func TestValidateAddons(t *testing.T) { }, expectedErr: errors.Errorf("Both %s and %s addons are enabled, only one of these may be enabled on a cluster", common.KeyVaultFlexVolumeAddonName, common.SecretsStoreCSIDriverAddonName), }, + { + name: "deprecated rescheduler addon enabled", + p: &Properties{ + OrchestratorProfile: &OrchestratorProfile{ + KubernetesConfig: &KubernetesConfig{ + Addons: []KubernetesAddon{ + { + Name: common.ReschedulerAddonName, + Enabled: to.BoolPtr(true), + }, + }, + }, + }, + }, + expectedErr: errors.Errorf("The rescheduler addon has been deprecated and disabled, please remove it from your cluster configuration before creating a new cluster"), + }, } for _, test := range tests { diff --git a/pkg/engine/artifacts.go b/pkg/engine/artifacts.go index 2e571de55f..510e73e84d 100644 --- a/pkg/engine/artifacts.go +++ b/pkg/engine/artifacts.go @@ -130,11 +130,6 @@ func kubernetesAddonSettingsInit(p *api.Properties) map[string]kubernetesCompone base64Data: k.GetAddonScript(common.DashboardAddonName), destinationFile: dashboardAddonDestinationFilename, }, - common.ReschedulerAddonName: { - sourceFile: reschedulerAddonSourceFilename, - base64Data: k.GetAddonScript(common.ReschedulerAddonName), - destinationFile: reschedulerAddonDestinationFilename, - }, common.NVIDIADevicePluginAddonName: { sourceFile: nvidiaAddonSourceFilename, base64Data: k.GetAddonScript(common.NVIDIADevicePluginAddonName), diff --git a/pkg/engine/artifacts_test.go b/pkg/engine/artifacts_test.go index 0fa7564537..a70e822782 100644 --- a/pkg/engine/artifacts_test.go +++ b/pkg/engine/artifacts_test.go @@ -30,7 +30,6 @@ func TestKubernetesAddonSettingsInit(t *testing.T) { expectedSMBFlexVolume kubernetesComponentFileSpec expectedKeyVaultFlexVolume kubernetesComponentFileSpec expectedDashboard kubernetesComponentFileSpec - expectedRescheduler kubernetesComponentFileSpec expectedNvidia kubernetesComponentFileSpec expectedContainerMonitoring kubernetesComponentFileSpec expectedIPMasqAgent kubernetesComponentFileSpec @@ -105,10 +104,6 @@ func TestKubernetesAddonSettingsInit(t *testing.T) { Name: common.DashboardAddonName, Data: base64Data, }, - { - Name: common.ReschedulerAddonName, - Data: base64Data, - }, { Name: common.NVIDIADevicePluginAddonName, Data: base64Data, @@ -248,11 +243,6 @@ func TestKubernetesAddonSettingsInit(t *testing.T) { base64Data: base64Data, destinationFile: dashboardAddonDestinationFilename, }, - expectedRescheduler: kubernetesComponentFileSpec{ - sourceFile: reschedulerAddonSourceFilename, - base64Data: base64Data, - destinationFile: reschedulerAddonDestinationFilename, - }, expectedNvidia: kubernetesComponentFileSpec{ sourceFile: nvidiaAddonSourceFilename, base64Data: base64Data, @@ -395,9 +385,6 @@ func TestKubernetesAddonSettingsInit(t *testing.T) { { Name: common.DashboardAddonName, }, - { - Name: common.ReschedulerAddonName, - }, { Name: common.NVIDIADevicePluginAddonName, }, @@ -517,11 +504,6 @@ func TestKubernetesAddonSettingsInit(t *testing.T) { base64Data: "", destinationFile: dashboardAddonDestinationFilename, }, - expectedRescheduler: kubernetesComponentFileSpec{ - sourceFile: reschedulerAddonSourceFilename, - base64Data: "", - destinationFile: reschedulerAddonDestinationFilename, - }, expectedNvidia: kubernetesComponentFileSpec{ sourceFile: nvidiaAddonSourceFilename, base64Data: "", @@ -681,11 +663,6 @@ func TestKubernetesAddonSettingsInit(t *testing.T) { base64Data: "", destinationFile: dashboardAddonDestinationFilename, }, - expectedRescheduler: kubernetesComponentFileSpec{ - sourceFile: reschedulerAddonSourceFilename, - base64Data: "", - destinationFile: reschedulerAddonDestinationFilename, - }, expectedNvidia: kubernetesComponentFileSpec{ sourceFile: nvidiaAddonSourceFilename, base64Data: "", @@ -906,16 +883,6 @@ func TestKubernetesAddonSettingsInit(t *testing.T) { if c.expectedDashboard.destinationFile != componentFileSpec[addon].destinationFile { t.Fatalf("Expected %s to be %s", componentFileSpec[addon].destinationFile, c.expectedDashboard.destinationFile) } - case common.ReschedulerAddonName: - if c.expectedRescheduler.sourceFile != componentFileSpec[addon].sourceFile { - t.Fatalf("Expected %s to be %s", componentFileSpec[addon].sourceFile, c.expectedRescheduler.sourceFile) - } - if c.expectedRescheduler.base64Data != componentFileSpec[addon].base64Data { - t.Fatalf("Expected %s to be %s", componentFileSpec[addon].base64Data, c.expectedRescheduler.base64Data) - } - if c.expectedRescheduler.destinationFile != componentFileSpec[addon].destinationFile { - t.Fatalf("Expected %s to be %s", componentFileSpec[addon].destinationFile, c.expectedRescheduler.destinationFile) - } case common.NVIDIADevicePluginAddonName: if c.expectedNvidia.sourceFile != componentFileSpec[addon].sourceFile { t.Fatalf("Expected %s to be %s", componentFileSpec[addon].sourceFile, c.expectedNvidia.sourceFile) diff --git a/pkg/engine/const.go b/pkg/engine/const.go index f327b30b02..60dc85daad 100644 --- a/pkg/engine/const.go +++ b/pkg/engine/const.go @@ -161,8 +161,6 @@ const ( keyvaultFlexVolumeAddonDestinationFilename string = "keyvault-flexvolume.yaml" dashboardAddonSourceFilename string = "kubernetes-dashboard.yaml" dashboardAddonDestinationFilename string = "kubernetes-dashboard.yaml" - reschedulerAddonSourceFilename string = "kube-rescheduler.yaml" - reschedulerAddonDestinationFilename string = "kube-rescheduler.yaml" nvidiaAddonSourceFilename string = "nvidia-device-plugin.yaml" nvidiaAddonDestinationFilename string = "nvidia-device-plugin.yaml" containerMonitoringAddonSourceFilename string = "container-monitoring.yaml" diff --git a/pkg/engine/templates_generated.go b/pkg/engine/templates_generated.go index 4574f286f2..6198f22b62 100644 --- a/pkg/engine/templates_generated.go +++ b/pkg/engine/templates_generated.go @@ -27,7 +27,6 @@ // ../../parts/k8s/addons/keyvault-flexvolume.yaml // ../../parts/k8s/addons/kube-dns.yaml // ../../parts/k8s/addons/kube-proxy.yaml -// ../../parts/k8s/addons/kube-rescheduler.yaml // ../../parts/k8s/addons/kubernetes-dashboard.yaml // ../../parts/k8s/addons/metrics-server.yaml // ../../parts/k8s/addons/node-problem-detector.yaml @@ -9758,60 +9757,6 @@ func k8sAddonsKubeProxyYaml() (*asset, error) { return a, nil } -var _k8sAddonsKubeReschedulerYaml = []byte(`apiVersion: apps/v1 -kind: Deployment -metadata: - name: rescheduler - namespace: kube-system - labels: - k8s-app: rescheduler - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile -spec: - replicas: 1 - selector: - matchLabels: - k8s-app: rescheduler - template: - metadata: - labels: - k8s-app: rescheduler - spec: - priorityClassName: system-node-critical - nodeSelector: - kubernetes.io/os: linux - containers: - - image: {{ContainerImage "rescheduler"}} - imagePullPolicy: IfNotPresent - name: rescheduler - resources: - requests: - cpu: {{ContainerCPUReqs "rescheduler"}} - memory: {{ContainerMemReqs "rescheduler"}} - limits: - cpu: {{ContainerCPULimits "rescheduler"}} - memory: {{ContainerMemLimits "rescheduler"}} - command: - - sh - - -c - - '/rescheduler' -`) - -func k8sAddonsKubeReschedulerYamlBytes() ([]byte, error) { - return _k8sAddonsKubeReschedulerYaml, nil -} - -func k8sAddonsKubeReschedulerYaml() (*asset, error) { - bytes, err := k8sAddonsKubeReschedulerYamlBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "k8s/addons/kube-rescheduler.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - var _k8sAddonsKubernetesDashboardYaml = []byte(` apiVersion: v1 kind: Namespace @@ -20239,7 +20184,6 @@ var _bindata = map[string]func() (*asset, error){ "k8s/addons/keyvault-flexvolume.yaml": k8sAddonsKeyvaultFlexvolumeYaml, "k8s/addons/kube-dns.yaml": k8sAddonsKubeDnsYaml, "k8s/addons/kube-proxy.yaml": k8sAddonsKubeProxyYaml, - "k8s/addons/kube-rescheduler.yaml": k8sAddonsKubeReschedulerYaml, "k8s/addons/kubernetes-dashboard.yaml": k8sAddonsKubernetesDashboardYaml, "k8s/addons/metrics-server.yaml": k8sAddonsMetricsServerYaml, "k8s/addons/node-problem-detector.yaml": k8sAddonsNodeProblemDetectorYaml, @@ -20390,7 +20334,6 @@ var _bintree = &bintree{nil, map[string]*bintree{ "keyvault-flexvolume.yaml": {k8sAddonsKeyvaultFlexvolumeYaml, map[string]*bintree{}}, "kube-dns.yaml": {k8sAddonsKubeDnsYaml, map[string]*bintree{}}, "kube-proxy.yaml": {k8sAddonsKubeProxyYaml, map[string]*bintree{}}, - "kube-rescheduler.yaml": {k8sAddonsKubeReschedulerYaml, map[string]*bintree{}}, "kubernetes-dashboard.yaml": {k8sAddonsKubernetesDashboardYaml, map[string]*bintree{}}, "metrics-server.yaml": {k8sAddonsMetricsServerYaml, map[string]*bintree{}}, "node-problem-detector.yaml": {k8sAddonsNodeProblemDetectorYaml, map[string]*bintree{}}, diff --git a/pkg/engine/testdata/addons/kubernetes.json b/pkg/engine/testdata/addons/kubernetes.json index 19ca79f94e..4bb5d2220c 100644 --- a/pkg/engine/testdata/addons/kubernetes.json +++ b/pkg/engine/testdata/addons/kubernetes.json @@ -63,19 +63,6 @@ "name": "keyvault-flexvolume", "enabled": true }, - { - "name": "rescheduler", - "enabled": false, - "containers": [ - { - "name": "rescheduler", - "cpuRequests": "10m", - "memoryRequests": "100Mi", - "cpuLimits": "10m", - "memoryLimits": "100Mi" - } - ] - }, { "name": "metrics-server", "enabled": true, diff --git a/pkg/engine/testdata/key-vault-certs/kubernetes.json b/pkg/engine/testdata/key-vault-certs/kubernetes.json index 96283c215c..95fdbd9412 100644 --- a/pkg/engine/testdata/key-vault-certs/kubernetes.json +++ b/pkg/engine/testdata/key-vault-certs/kubernetes.json @@ -135,20 +135,6 @@ } ] }, - { - "name": "rescheduler", - "enabled": false, - "containers": [ - { - "name": "rescheduler", - "image": "k8s.gcr.io/rescheduler:v0.4.0", - "cpuRequests": "10m", - "memoryRequests": "100Mi", - "cpuLimits": "10m", - "memoryLimits": "100Mi" - } - ] - }, { "name": "metrics-server", "enabled": true, diff --git a/test/e2e/kubernetes/kubernetes_test.go b/test/e2e/kubernetes/kubernetes_test.go index 6e5ffd2793..07ebebd9db 100644 --- a/test/e2e/kubernetes/kubernetes_test.go +++ b/test/e2e/kubernetes/kubernetes_test.go @@ -1081,7 +1081,7 @@ var _ = Describe("Azure Container Cluster using the Kubernetes Orchestrator", fu for _, addonName := range []string{common.CoreDNSAddonName, common.TillerAddonName, common.AADPodIdentityAddonName, common.ACIConnectorAddonName, common.AzureDiskCSIDriverAddonName, common.AzureFileCSIDriverAddonName, common.CloudNodeManagerAddonName, common.ClusterAutoscalerAddonName, common.BlobfuseFlexVolumeAddonName, common.SMBFlexVolumeAddonName, common.KeyVaultFlexVolumeAddonName, common.DashboardAddonName, - common.ReschedulerAddonName, common.MetricsServerAddonName, common.NVIDIADevicePluginAddonName, common.ContainerMonitoringAddonName, + common.MetricsServerAddonName, common.NVIDIADevicePluginAddonName, common.ContainerMonitoringAddonName, common.AzureCNINetworkMonitorAddonName, common.CalicoAddonName, common.AzureNetworkPolicyAddonName, common.IPMASQAgentAddonName, common.AzurePolicyAddonName, common.NodeProblemDetectorAddonName, common.AntreaAddonName, common.FlannelAddonName, common.ScheduledMaintenanceAddonName, common.SecretsStoreCSIDriverAddonName} { diff --git a/vhd/packer/install-dependencies.sh b/vhd/packer/install-dependencies.sh index 6c04355215..bee56fe9f2 100644 --- a/vhd/packer/install-dependencies.sh +++ b/vhd/packer/install-dependencies.sh @@ -200,15 +200,6 @@ for CORE_DNS_VERSION in ${CORE_DNS_VERSIONS}; do echo " - ${CONTAINER_IMAGE}" >> ${VHD_LOGS_FILEPATH} done -RESCHEDULER_VERSIONS=" -0.4.0 -" -for RESCHEDULER_VERSION in ${RESCHEDULER_VERSIONS}; do - CONTAINER_IMAGE="mcr.microsoft.com/oss/kubernetes/rescheduler:v${RESCHEDULER_VERSION}" - loadContainerImage ${CONTAINER_IMAGE} - echo " - ${CONTAINER_IMAGE}" >> ${VHD_LOGS_FILEPATH} -done - VIRTUAL_KUBELET_VERSIONS="1.2.1.2" for VIRTUAL_KUBELET_VERSION in ${VIRTUAL_KUBELET_VERSIONS}; do CONTAINER_IMAGE="mcr.microsoft.com/oss/virtual-kubelet/virtual-kubelet:${VIRTUAL_KUBELET_VERSION}"