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

Commit

Permalink
chore: deprecate rescheduler addon (#4275)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrancis authored Feb 19, 2021
1 parent b9c9dda commit 5c1707d
Show file tree
Hide file tree
Showing 28 changed files with 50 additions and 366 deletions.
5 changes: 0 additions & 5 deletions cmd/generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion docs/topics/azure-stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/topics/clusterdefinitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
13 changes: 0 additions & 13 deletions examples/e2e-tests/kubernetes/flatcar/flatcar.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,6 @@
}
]
},
{
"name": "rescheduler",
"enabled": true,
"containers": [
{
"name": "rescheduler",
"cpuRequests": "20m",
"memoryRequests": "200Mi",
"cpuLimits": "20m",
"memoryLimits": "200Mi"
}
]
},
{
"name": "keyvault-flexvolume",
"enabled": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
"name": "kubernetes-dashboard",
"enabled": false
},
{
"name": "rescheduler",
"enabled": false
},
{
"name": "nvidia-device-plugin",
"enabled": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
"name": "kubernetes-dashboard",
"enabled": true
},
{
"name": "rescheduler",
"enabled": true
},
{
"name": "nvidia-device-plugin",
"enabled": true
Expand Down
38 changes: 0 additions & 38 deletions examples/kubernetes-config/kubernetes-rescheduler.json

This file was deleted.

13 changes: 0 additions & 13 deletions examples/kubernetes-vmss-master/customvnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,6 @@
"memoryLimits": "512Mi"
}
]
},
{
"name": "rescheduler",
"enabled": true,
"containers": [
{
"name": "rescheduler",
"cpuRequests": "20m",
"memoryRequests": "200Mi",
"cpuLimits": "20m",
"memoryLimits": "200Mi"
}
]
}
]
}
Expand Down
13 changes: 0 additions & 13 deletions examples/vnet/kubernetes-master-vmss.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,6 @@
"memoryLimits": "512Mi"
}
]
},
{
"name": "rescheduler",
"enabled": true,
"containers": [
{
"name": "rescheduler",
"cpuRequests": "20m",
"memoryRequests": "200Mi",
"cpuLimits": "20m",
"memoryLimits": "200Mi"
}
]
}
]
}
Expand Down
37 changes: 0 additions & 37 deletions parts/k8s/addons/kube-rescheduler.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions pkg/api/addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -909,7 +894,6 @@ func (cs *ContainerService) setAddonsConfig(isUpgrade bool) {
defaultSMBFlexVolumeAddonsConfig,
defaultKeyVaultFlexVolumeAddonsConfig,
defaultDashboardAddonsConfig,
defaultReschedulerAddonsConfig,
defaultMetricsServerAddonsConfig,
defaultNVIDIADevicePluginAddonsConfig,
defaultContainerMonitoringAddonsConfig,
Expand Down
44 changes: 0 additions & 44 deletions pkg/api/addons_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -4570,7 +4527,6 @@ func TestSetAddonsConfig(t *testing.T) {
common.SMBFlexVolumeAddonName,
common.KeyVaultFlexVolumeAddonName,
common.DashboardAddonName,
common.ReschedulerAddonName,
common.MetricsServerAddonName,
common.NVIDIADevicePluginAddonName,
common.ContainerMonitoringAddonName,
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/common/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion pkg/api/defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/k8s_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
5 changes: 0 additions & 5 deletions pkg/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
31 changes: 0 additions & 31 deletions pkg/api/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions pkg/api/vlabs/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 5c1707d

Please sign in to comment.