diff --git a/parts/k8s/addons/azure-cni-networkmonitor.yaml b/parts/k8s/addons/azure-cni-networkmonitor.yaml deleted file mode 100644 index dce3e8047e..0000000000 --- a/parts/k8s/addons/azure-cni-networkmonitor.yaml +++ /dev/null @@ -1,79 +0,0 @@ -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: azure-cni-networkmonitor - namespace: kube-system - labels: - app: azure-cnms - addonmanager.kubernetes.io/mode: Reconcile -spec: - selector: - matchLabels: - k8s-app: azure-cnms - updateStrategy: - type: RollingUpdate - rollingUpdate: - maxUnavailable: 50% - template: - metadata: - labels: - k8s-app: azure-cnms -{{- if IsKubernetesVersionGe "1.17.0"}} - annotations: - cluster-autoscaler.kubernetes.io/daemonset-pod: "true" -{{- end}} - spec: - priorityClassName: system-node-critical - tolerations: - - key: CriticalAddonsOnly - operator: Exists - - key: node-role.kubernetes.io/master - operator: Equal - value: "true" - effect: NoSchedule - - operator: "Exists" - effect: NoExecute - - operator: "Exists" - effect: NoSchedule - nodeSelector: - kubernetes.io/os: linux - containers: - - name: azure-cnms - image: {{ContainerImage "azure-cni-networkmonitor"}} - imagePullPolicy: IfNotPresent - securityContext: - privileged: true - resources: - requests: - cpu: {{ContainerCPUReqs "azure-cni-networkmonitor"}} - memory: {{ContainerMemReqs "azure-cni-networkmonitor"}} - limits: - cpu: {{ContainerCPULimits "azure-cni-networkmonitor"}} - memory: {{ContainerMemLimits "azure-cni-networkmonitor"}} - env: - - name: HOSTNAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: spec.nodeName - volumeMounts: - - name: ebtables-rule-repo - mountPath: /var/run - - name: log - mountPath: /var/log - - name: telemetry - mountPath: /opt/cni/bin - hostNetwork: true - volumes: - - name: log - hostPath: - path: /var/log - type: Directory - - name: ebtables-rule-repo - hostPath: - path: /var/run/ - type: Directory - - name: telemetry - hostPath: - path: /opt/cni/bin - type: Directory diff --git a/parts/k8s/kubernetesparams.t b/parts/k8s/kubernetesparams.t index 74d9c57cad..2b5e3b63ab 100644 --- a/parts/k8s/kubernetesparams.t +++ b/parts/k8s/kubernetesparams.t @@ -474,15 +474,6 @@ } } {{end}} - {{if IsAzureCNI}} - ,"AzureCNINetworkMonitorImageURL": { - "defaultValue": "", - "metadata": { - "description": "Azure CNI networkmonitor Image URL" - }, - "type": "string" - } - {{end}} {{if .OrchestratorProfile.KubernetesConfig.IsAppGWIngressEnabled}} ,"appGwSubnet": { "metadata": { diff --git a/pkg/api/addons.go b/pkg/api/addons.go index d3444de3bd..f63552a672 100644 --- a/pkg/api/addons.go +++ b/pkg/api/addons.go @@ -285,23 +285,6 @@ func (cs *ContainerService) setAddonsConfig(isUpgrade bool) { }, } - defaultAzureCNINetworkMonitorAddonsConfig := KubernetesAddon{ - Name: common.AzureCNINetworkMonitorAddonName, - Enabled: to.BoolPtr(o.IsAzureCNI() && - o.KubernetesConfig.NetworkPolicy != NetworkPolicyCalico && - o.KubernetesConfig.NetworkPolicy != NetworkPolicyAntrea), - Containers: []KubernetesContainerSpec{ - { - Name: common.AzureCNINetworkMonitorAddonName, - Image: specConfig.AzureCNIImageBase + k8sComponents[common.AzureCNINetworkMonitorAddonName], - CPURequests: "30m", - MemoryRequests: "25Mi", - CPULimits: "200m", - MemoryLimits: "256Mi", - }, - }, - } - defaultAzureNetworkPolicyAddonsConfig := KubernetesAddon{ Name: common.AzureNetworkPolicyAddonName, Enabled: to.BoolPtr(o.KubernetesConfig.NetworkPlugin == NetworkPluginAzure && o.KubernetesConfig.NetworkPolicy == NetworkPolicyAzure), @@ -883,7 +866,6 @@ func (cs *ContainerService) setAddonsConfig(isUpgrade bool) { defaultMetricsServerAddonsConfig, defaultNVIDIADevicePluginAddonsConfig, defaultContainerMonitoringAddonsConfig, - defaultAzureCNINetworkMonitorAddonsConfig, defaultAzureNetworkPolicyAddonsConfig, defaultCloudNodeManagerAddonsConfig, defaultIPMasqAgentAddonsConfig, @@ -987,6 +969,14 @@ func (cs *ContainerService) setAddonsConfig(isUpgrade bool) { } } + // Deal with legacy Azure CNI networkmonitor addon configuration + if isUpgrade { + // Force disabling of the deprecated Azure CNI networkmonitor addon + if i := getAddonsIndexByName(o.KubernetesConfig.Addons, common.AzureCNINetworkMonitorAddonName); i > -1 { + o.KubernetesConfig.Addons[i].Enabled = to.BoolPtr(false) + } + } + // Honor customKubeProxyImage field if o.KubernetesConfig.CustomKubeProxyImage != "" { if i := getAddonsIndexByName(o.KubernetesConfig.Addons, common.KubeProxyAddonName); i > -1 { diff --git a/pkg/api/addons_test.go b/pkg/api/addons_test.go index 07109f8eaa..c5a8086985 100644 --- a/pkg/api/addons_test.go +++ b/pkg/api/addons_test.go @@ -1644,7 +1644,7 @@ func TestSetAddonsConfig(t *testing.T) { }, }, isUpgrade: false, - expectedAddons: omitFromAddons([]string{common.AzureCNINetworkMonitorAddonName}, concatenateDefaultAddons([]KubernetesAddon{ + expectedAddons: concatenateDefaultAddons([]KubernetesAddon{ { Name: common.CalicoAddonName, Enabled: to.BoolPtr(true), @@ -1675,7 +1675,7 @@ func TestSetAddonsConfig(t *testing.T) { }, }, }, - }, "1.15.4")), + }, "1.15.4"), }, { name: "calico addon enabled with user configuration", @@ -1708,7 +1708,7 @@ func TestSetAddonsConfig(t *testing.T) { }, }, isUpgrade: false, - expectedAddons: omitFromAddons([]string{common.AzureCNINetworkMonitorAddonName}, concatenateDefaultAddons([]KubernetesAddon{ + expectedAddons: concatenateDefaultAddons([]KubernetesAddon{ { Name: common.CalicoAddonName, Enabled: to.BoolPtr(true), @@ -1739,7 +1739,7 @@ func TestSetAddonsConfig(t *testing.T) { }, }, }, - }, "1.15.4")), + }, "1.15.4"), }, { name: "calico addon back-compat", @@ -1794,7 +1794,7 @@ func TestSetAddonsConfig(t *testing.T) { }, }, isUpgrade: true, - expectedAddons: omitFromAddons([]string{common.AzureCNINetworkMonitorAddonName}, concatenateDefaultAddons([]KubernetesAddon{ + expectedAddons: concatenateDefaultAddons([]KubernetesAddon{ { Name: common.CalicoAddonName, Enabled: to.BoolPtr(true), @@ -1825,7 +1825,7 @@ func TestSetAddonsConfig(t *testing.T) { }, }, }, - }, "1.15.4")), + }, "1.15.4"), }, { name: "aad-pod-identity enabled", @@ -1957,7 +1957,7 @@ func TestSetAddonsConfig(t *testing.T) { }, }, isUpgrade: false, - expectedAddons: omitFromAddons([]string{common.IPMASQAgentAddonName, common.AzureCNINetworkMonitorAddonName}, concatenateDefaultAddons([]KubernetesAddon{ + expectedAddons: omitFromAddons([]string{common.IPMASQAgentAddonName}, concatenateDefaultAddons([]KubernetesAddon{ { Name: common.CiliumAddonName, Enabled: to.BoolPtr(true), @@ -2056,20 +2056,6 @@ func TestSetAddonsConfig(t *testing.T) { "enable-ipv6": "false", }, }, - { - Name: common.AzureCNINetworkMonitorAddonName, - Enabled: to.BoolPtr(true), - Containers: []KubernetesContainerSpec{ - { - Name: common.AzureCNINetworkMonitorAddonName, - Image: "AzureCNIImageBase" + k8sComponentsByVersionMap["1.15.12"][common.AzureCNINetworkMonitorAddonName], - CPURequests: "30m", - MemoryRequests: "25Mi", - CPULimits: "200m", - MemoryLimits: "256Mi", - }, - }, - }, { Name: common.CoreDNSAddonName, Enabled: to.BoolPtr(DefaultCoreDNSAddonEnabled), @@ -3779,6 +3765,34 @@ func TestSetAddonsConfig(t *testing.T) { }, }, "1.18.1"), }, + { + name: "upgrade w/ Azure CNI networkmonitor enabled", + cs: &ContainerService{ + Properties: &Properties{ + OrchestratorProfile: &OrchestratorProfile{ + OrchestratorVersion: "1.18.1", + 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.AzureCNINetworkMonitorAddonName, + Enabled: to.BoolPtr(true), + }, + }, + }, + }, + }, + }, + isUpgrade: true, + expectedAddons: getDefaultAddons("1.18.1", "", common.KubernetesImageBaseTypeMCR), + }, { name: "kube-proxy w/ user configuration", cs: &ContainerService{ @@ -4081,7 +4095,7 @@ func TestSetAddonsConfig(t *testing.T) { }, }, isUpgrade: false, - expectedAddons: omitFromAddons([]string{common.IPMASQAgentAddonName, common.AzureCNINetworkMonitorAddonName}, concatenateDefaultAddons([]KubernetesAddon{ + expectedAddons: omitFromAddons([]string{common.IPMASQAgentAddonName}, concatenateDefaultAddons([]KubernetesAddon{ { Name: common.AntreaAddonName, Enabled: to.BoolPtr(true), @@ -4123,7 +4137,7 @@ func TestSetAddonsConfig(t *testing.T) { }, }, isUpgrade: false, - expectedAddons: omitFromAddons([]string{common.AzureCNINetworkMonitorAddonName}, concatenateDefaultAddons([]KubernetesAddon{ + expectedAddons: concatenateDefaultAddons([]KubernetesAddon{ { Name: common.AntreaAddonName, Enabled: to.BoolPtr(true), @@ -4133,7 +4147,7 @@ func TestSetAddonsConfig(t *testing.T) { "serviceCidr": DefaultKubernetesServiceCIDR, }, }, - }, "1.15.4")), + }, "1.15.4"), }, { name: "addons with IPv6 single stack", @@ -4168,7 +4182,7 @@ func TestSetAddonsConfig(t *testing.T) { }, }, isUpgrade: false, - expectedAddons: omitFromAddons([]string{common.AzureCNINetworkMonitorAddonName}, overwriteDefaultAddons([]KubernetesAddon{ + expectedAddons: overwriteDefaultAddons([]KubernetesAddon{ { Name: common.CoreDNSAddonName, Enabled: to.BoolPtr(DefaultCoreDNSAddonEnabled), @@ -4229,7 +4243,7 @@ func TestSetAddonsConfig(t *testing.T) { }, }, }, - }, "1.18.0")), + }, "1.18.0"), }, { name: "addons with dual stack", @@ -4262,7 +4276,7 @@ func TestSetAddonsConfig(t *testing.T) { }, }, isUpgrade: false, - expectedAddons: omitFromAddons([]string{common.AzureCNINetworkMonitorAddonName}, overwriteDefaultAddons([]KubernetesAddon{ + expectedAddons: overwriteDefaultAddons([]KubernetesAddon{ { Name: common.IPMASQAgentAddonName, Enabled: to.BoolPtr(true), @@ -4298,7 +4312,7 @@ func TestSetAddonsConfig(t *testing.T) { }, }, }, - }, "1.18.0")), + }, "1.18.0"), }, { name: "kube proxy w/ customKubeProxyImage", @@ -4516,7 +4530,6 @@ func TestSetAddonsConfig(t *testing.T) { common.NVIDIADevicePluginAddonName, common.ContainerMonitoringAddonName, common.IPMASQAgentAddonName, - common.AzureCNINetworkMonitorAddonName, common.AzureNetworkPolicyAddonName, common.CalicoAddonName, common.AADPodIdentityAddonName, @@ -5059,20 +5072,6 @@ func getDefaultAddons(version, kubernetesImageBase, kubernetesImageBaseType stri "enable-ipv6": "false", }, }, - { - Name: common.AzureCNINetworkMonitorAddonName, - Enabled: to.BoolPtr(true), - Containers: []KubernetesContainerSpec{ - { - Name: common.AzureCNINetworkMonitorAddonName, - Image: specConfig.AzureCNIImageBase + k8sComponentsByVersionMap[version][common.AzureCNINetworkMonitorAddonName], - CPURequests: "30m", - MemoryRequests: "25Mi", - CPULimits: "200m", - MemoryLimits: "256Mi", - }, - }, - }, { Name: common.AuditPolicyAddonName, Enabled: to.BoolPtr(true), diff --git a/pkg/api/defaults_test.go b/pkg/api/defaults_test.go index 845e9b0edd..1873f101b0 100644 --- a/pkg/api/defaults_test.go +++ b/pkg/api/defaults_test.go @@ -236,27 +236,26 @@ func TestAssignDefaultAddonImages(t *testing.T) { customImage := "myimage" specConfig := AzureCloudSpecEnvMap["AzurePublicCloud"].KubernetesSpecConfig defaultAddonImages := map[string]string{ - common.TillerAddonName: specConfig.TillerImageBase + k8sComponents[common.TillerAddonName], - common.ClusterAutoscalerAddonName: specConfig.MCRKubernetesImageBase + k8sComponents[common.ClusterAutoscalerAddonName], - common.BlobfuseFlexVolumeAddonName: k8sComponents[common.BlobfuseFlexVolumeAddonName], - common.SMBFlexVolumeAddonName: k8sComponents[common.SMBFlexVolumeAddonName], - common.KeyVaultFlexVolumeAddonName: k8sComponents[common.KeyVaultFlexVolumeAddonName], - common.DashboardAddonName: k8sComponents[common.DashboardAddonName], - common.MetricsServerAddonName: specConfig.MCRKubernetesImageBase + k8sComponents[common.MetricsServerAddonName], - common.NVIDIADevicePluginAddonName: specConfig.NVIDIAImageBase + k8sComponents[common.NVIDIADevicePluginAddonName], - common.ContainerMonitoringAddonName: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod02232021", - common.IPMASQAgentAddonName: specConfig.MCRKubernetesImageBase + k8sComponents[common.IPMASQAgentAddonName], - common.AzureCNINetworkMonitorAddonName: specConfig.AzureCNIImageBase + k8sComponents[common.AzureCNINetworkMonitorAddonName], - common.CalicoAddonName: specConfig.CalicoImageBase + k8sComponents[common.CalicoTyphaComponentName], - common.AzureNetworkPolicyAddonName: k8sComponents[common.AzureNetworkPolicyAddonName], - common.AADPodIdentityAddonName: k8sComponents[common.NMIContainerName], - common.AzurePolicyAddonName: k8sComponents[common.AzurePolicyAddonName], - common.NodeProblemDetectorAddonName: k8sComponents[common.NodeProblemDetectorAddonName], - common.KubeDNSAddonName: specConfig.MCRKubernetesImageBase + k8sComponents[common.KubeDNSAddonName], - common.CoreDNSAddonName: specConfig.MCRKubernetesImageBase + k8sComponents[common.CoreDNSAddonName], - common.KubeProxyAddonName: specConfig.MCRKubernetesImageBase + k8sComponents[common.KubeProxyAddonName], - common.AntreaAddonName: k8sComponents[common.AntreaControllerContainerName], - common.FlannelAddonName: k8sComponents[common.KubeFlannelContainerName], + common.TillerAddonName: specConfig.TillerImageBase + k8sComponents[common.TillerAddonName], + common.ClusterAutoscalerAddonName: specConfig.MCRKubernetesImageBase + k8sComponents[common.ClusterAutoscalerAddonName], + common.BlobfuseFlexVolumeAddonName: k8sComponents[common.BlobfuseFlexVolumeAddonName], + common.SMBFlexVolumeAddonName: k8sComponents[common.SMBFlexVolumeAddonName], + common.KeyVaultFlexVolumeAddonName: k8sComponents[common.KeyVaultFlexVolumeAddonName], + common.DashboardAddonName: k8sComponents[common.DashboardAddonName], + common.MetricsServerAddonName: specConfig.MCRKubernetesImageBase + k8sComponents[common.MetricsServerAddonName], + common.NVIDIADevicePluginAddonName: specConfig.NVIDIAImageBase + k8sComponents[common.NVIDIADevicePluginAddonName], + common.ContainerMonitoringAddonName: "mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod02232021", + common.IPMASQAgentAddonName: specConfig.MCRKubernetesImageBase + k8sComponents[common.IPMASQAgentAddonName], + common.CalicoAddonName: specConfig.CalicoImageBase + k8sComponents[common.CalicoTyphaComponentName], + common.AzureNetworkPolicyAddonName: k8sComponents[common.AzureNetworkPolicyAddonName], + common.AADPodIdentityAddonName: k8sComponents[common.NMIContainerName], + common.AzurePolicyAddonName: k8sComponents[common.AzurePolicyAddonName], + common.NodeProblemDetectorAddonName: k8sComponents[common.NodeProblemDetectorAddonName], + common.KubeDNSAddonName: specConfig.MCRKubernetesImageBase + k8sComponents[common.KubeDNSAddonName], + common.CoreDNSAddonName: specConfig.MCRKubernetesImageBase + k8sComponents[common.CoreDNSAddonName], + common.KubeProxyAddonName: specConfig.MCRKubernetesImageBase + k8sComponents[common.KubeProxyAddonName], + common.AntreaAddonName: k8sComponents[common.AntreaControllerContainerName], + common.FlannelAddonName: k8sComponents[common.KubeFlannelContainerName], } customAddonImages := make(map[string]string) @@ -3407,44 +3406,6 @@ func TestWindowsProfileDefaults(t *testing.T) { } } -func TestIsAzureCNINetworkmonitorAddon(t *testing.T) { - mockCS := getMockBaseContainerService("1.10.3") - properties := mockCS.Properties - properties.MasterProfile.Count = 1 - properties.OrchestratorProfile.KubernetesConfig.Addons = []KubernetesAddon{ - { - Name: common.AzureCNINetworkMonitorAddonName, - Containers: []KubernetesContainerSpec{ - { - Name: common.AzureCNINetworkMonitorAddonName, - CPURequests: "50m", - MemoryRequests: "150Mi", - CPULimits: "50m", - MemoryLimits: "150Mi", - }, - }, - Enabled: to.BoolPtr(true), - }, - } - mockCS.setOrchestratorDefaults(true, true) - - i := getAddonsIndexByName(properties.OrchestratorProfile.KubernetesConfig.Addons, common.AzureCNINetworkMonitorAddonName) - if !to.Bool(properties.OrchestratorProfile.KubernetesConfig.Addons[i].Enabled) { - t.Fatalf("Azure CNI networkmonitor addon should be present") - } - - mockCS = getMockBaseContainerService("1.10.3") - properties = mockCS.Properties - properties.MasterProfile.Count = 1 - properties.OrchestratorProfile.KubernetesConfig.NetworkPlugin = NetworkPluginAzure - mockCS.setOrchestratorDefaults(true, true) - - i = getAddonsIndexByName(properties.OrchestratorProfile.KubernetesConfig.Addons, common.AzureCNINetworkMonitorAddonName) - if !to.Bool(properties.OrchestratorProfile.KubernetesConfig.Addons[i].Enabled) { - t.Fatalf("Azure CNI networkmonitor addon should be present by default if Azure CNI is set") - } -} - // TestSetVMSSDefaultsAndZones covers tests for setVMSSDefaultsForAgents and masters func TestSetVMSSDefaultsAndZones(t *testing.T) { // masters with VMSS and no zones diff --git a/pkg/api/k8s_versions.go b/pkg/api/k8s_versions.go index a8f9785e9b..bea1b2af2f 100644 --- a/pkg/api/k8s_versions.go +++ b/pkg/api/k8s_versions.go @@ -55,7 +55,6 @@ const ( ScheduledMaintenanceManagerImageReference string = "quay.io/awesomenix/drainsafe-manager:latest" nvidiaDevicePluginImageReference string = "oss/nvidia/k8s-device-plugin:1.0.0-beta6" virtualKubeletImageReference string = "virtual-kubelet:1.2.1.2" // Deprecated - azureCNINetworkMonitorImageReference string = "networkmonitor:v0.0.8" tillerImageReference string = "oss/kubernetes/tiller:v2.13.1" csiSecretsStoreProviderAzureImageReference string = "oss/azure/secrets-store/provider-azure:0.0.12" csiSecretsStoreDriverImageReference string = "oss/kubernetes-csi/secrets-store/driver:v0.0.19" @@ -491,7 +490,6 @@ func getK8sVersionComponents(version, kubernetesImageBaseType string, overrides common.TillerAddonName: tillerImageReference, common.ReschedulerAddonName: getDefaultImage(common.ReschedulerAddonName, kubernetesImageBaseType), common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.DNSSidecarComponentName: getDefaultImage(common.DNSSidecarComponentName, kubernetesImageBaseType), common.BlobfuseFlexVolumeAddonName: blobfuseFlexVolumeImageReference, @@ -576,7 +574,6 @@ func getK8sVersionComponents(version, kubernetesImageBaseType string, overrides common.TillerAddonName: tillerImageReference, common.ReschedulerAddonName: getDefaultImage(common.ReschedulerAddonName, kubernetesImageBaseType), common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.DNSSidecarComponentName: getDefaultImage(common.DNSSidecarComponentName, kubernetesImageBaseType), common.BlobfuseFlexVolumeAddonName: blobfuseFlexVolumeImageReference, @@ -661,7 +658,6 @@ func getK8sVersionComponents(version, kubernetesImageBaseType string, overrides common.TillerAddonName: tillerImageReference, common.ReschedulerAddonName: getDefaultImage(common.ReschedulerAddonName, kubernetesImageBaseType), common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.DNSSidecarComponentName: getDefaultImage(common.DNSSidecarComponentName, kubernetesImageBaseType), common.BlobfuseFlexVolumeAddonName: blobfuseFlexVolumeImageReference, @@ -746,7 +742,6 @@ func getK8sVersionComponents(version, kubernetesImageBaseType string, overrides common.TillerAddonName: tillerImageReference, common.ReschedulerAddonName: getDefaultImage(common.ReschedulerAddonName, kubernetesImageBaseType), common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.DNSSidecarComponentName: getDefaultImage(common.DNSSidecarComponentName, kubernetesImageBaseType), common.BlobfuseFlexVolumeAddonName: blobfuseFlexVolumeImageReference, @@ -831,7 +826,6 @@ func getK8sVersionComponents(version, kubernetesImageBaseType string, overrides common.TillerAddonName: tillerImageReference, common.ReschedulerAddonName: getDefaultImage(common.ReschedulerAddonName, kubernetesImageBaseType), common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.DNSSidecarComponentName: getDefaultImage(common.DNSSidecarComponentName, kubernetesImageBaseType), common.BlobfuseFlexVolumeAddonName: blobfuseFlexVolumeImageReference, @@ -912,7 +906,6 @@ func getK8sVersionComponents(version, kubernetesImageBaseType string, overrides common.TillerAddonName: tillerImageReference, common.ReschedulerAddonName: getDefaultImage(common.ReschedulerAddonName, kubernetesImageBaseType), common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.DNSSidecarComponentName: getDefaultImage(common.DNSSidecarComponentName, kubernetesImageBaseType), common.BlobfuseFlexVolumeAddonName: blobfuseFlexVolumeImageReference, @@ -990,7 +983,6 @@ func getK8sVersionComponents(version, kubernetesImageBaseType string, overrides common.TillerAddonName: tillerImageReference, common.ReschedulerAddonName: getDefaultImage(common.ReschedulerAddonName, kubernetesImageBaseType), common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.DNSSidecarComponentName: getDefaultImage(common.DNSSidecarComponentName, kubernetesImageBaseType), common.BlobfuseFlexVolumeAddonName: blobfuseFlexVolumeImageReference, @@ -1065,7 +1057,6 @@ func getK8sVersionComponents(version, kubernetesImageBaseType string, overrides common.TillerAddonName: tillerImageReference, common.ReschedulerAddonName: getDefaultImage(common.ReschedulerAddonName, kubernetesImageBaseType), common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.DNSSidecarComponentName: getDefaultImage(common.DNSSidecarComponentName, kubernetesImageBaseType), common.BlobfuseFlexVolumeAddonName: blobfuseFlexVolumeImageReference, @@ -1138,7 +1129,6 @@ func getK8sVersionComponents(version, kubernetesImageBaseType string, overrides common.TillerAddonName: tillerImageReference, common.ReschedulerAddonName: getDefaultImage(common.ReschedulerAddonName, kubernetesImageBaseType), common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.DNSSidecarComponentName: getDefaultImage(common.DNSSidecarComponentName, kubernetesImageBaseType), common.BlobfuseFlexVolumeAddonName: blobfuseFlexVolumeImageReference, @@ -1210,7 +1200,6 @@ func getK8sVersionComponents(version, kubernetesImageBaseType string, overrides common.TillerAddonName: tillerImageReference, common.ReschedulerAddonName: getDefaultImage(common.ReschedulerAddonName, kubernetesImageBaseType), common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.DNSSidecarComponentName: getDefaultImage(common.DNSSidecarComponentName, kubernetesImageBaseType), common.BlobfuseFlexVolumeAddonName: blobfuseFlexVolumeImageReference, @@ -1273,7 +1262,6 @@ func getK8sVersionComponents(version, kubernetesImageBaseType string, overrides common.TillerAddonName: tillerImageReference, common.ReschedulerAddonName: getDefaultImage(common.ReschedulerAddonName, kubernetesImageBaseType), common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.DNSSidecarComponentName: getDefaultImage(common.DNSSidecarComponentName, kubernetesImageBaseType), common.BlobfuseFlexVolumeAddonName: blobfuseFlexVolumeImageReference, @@ -1336,7 +1324,6 @@ func getK8sVersionComponents(version, kubernetesImageBaseType string, overrides common.TillerAddonName: tillerImageReference, common.ReschedulerAddonName: k8sComponent[common.ReschedulerAddonName], common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.DNSSidecarComponentName: k8sComponent[common.DNSSidecarComponentName], common.BlobfuseFlexVolumeAddonName: blobfuseFlexVolumeImageReference, @@ -1399,7 +1386,6 @@ func getK8sVersionComponents(version, kubernetesImageBaseType string, overrides common.TillerAddonName: tillerImageReference, common.ReschedulerAddonName: k8sComponent[common.ReschedulerAddonName], common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.DNSSidecarComponentName: k8sComponent[common.DNSSidecarComponentName], common.BlobfuseFlexVolumeAddonName: blobfuseFlexVolumeImageReference, @@ -1461,7 +1447,6 @@ func getK8sVersionComponents(version, kubernetesImageBaseType string, overrides common.TillerAddonName: tillerImageReference, common.ReschedulerAddonName: k8sComponent[common.ReschedulerAddonName], common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.BlobfuseFlexVolumeAddonName: blobfuseFlexVolumeImageReference, common.SMBFlexVolumeAddonName: smbFlexVolumeImageReference, common.KeyVaultFlexVolumeAddonName: keyvaultFlexVolumeImageReference, @@ -1505,65 +1490,63 @@ func getK8sVersionComponents(version, kubernetesImageBaseType string, overrides } case "1.7": ret = map[string]string{ - common.Hyperkube: getDefaultImage(common.Hyperkube, kubernetesImageBaseType) + ":v" + version, - common.KubeProxyAddonName: getDefaultImage(common.Hyperkube, kubernetesImageBaseType) + ":v" + version, - common.DashboardAddonName: k8sComponent["dashboard"], - common.ExecHealthZComponentName: getDefaultImage(common.ExecHealthZComponentName, kubernetesImageBaseType), - common.AddonResizerComponentName: k8sComponent[common.AddonResizerComponentName], - common.MetricsServerAddonName: k8sComponent[common.MetricsServerAddonName], - common.KubeDNSAddonName: k8sComponent[common.KubeDNSAddonName], - common.AddonManagerComponentName: k8sComponent[common.AddonManagerComponentName], - common.DNSMasqComponentName: k8sComponent[common.DNSMasqComponentName], - common.PauseComponentName: pauseImageReference, - common.TillerAddonName: tillerImageReference, - common.ReschedulerAddonName: k8sComponent[common.ReschedulerAddonName], - common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, - "nodestatusfreq": DefaultKubernetesNodeStatusUpdateFrequency, - "nodegraceperiod": DefaultKubernetesCtrlMgrNodeMonitorGracePeriod, - "podeviction": DefaultKubernetesCtrlMgrPodEvictionTimeout, - "routeperiod": DefaultKubernetesCtrlMgrRouteReconciliationPeriod, - "backoffretries": strconv.Itoa(DefaultKubernetesCloudProviderBackoffRetries), - "backoffjitter": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffJitter, 'f', -1, 64), - "backoffduration": strconv.Itoa(DefaultKubernetesCloudProviderBackoffDuration), - "backoffexponent": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffExponent, 'f', -1, 64), - "ratelimitqps": strconv.FormatFloat(DefaultKubernetesCloudProviderRateLimitQPS, 'f', -1, 64), - "ratelimitqpswrite": strconv.FormatFloat(DefaultKubernetesCloudProviderRateLimitQPSWrite, 'f', -1, 64), - "ratelimitbucket": strconv.Itoa(DefaultKubernetesCloudProviderRateLimitBucket), - "ratelimitbucketwrite": strconv.Itoa(DefaultKubernetesCloudProviderRateLimitBucketWrite), - "gchighthreshold": strconv.Itoa(DefaultKubernetesGCHighThreshold), - "gclowthreshold": strconv.Itoa(DefaultKubernetesGCLowThreshold), + common.Hyperkube: getDefaultImage(common.Hyperkube, kubernetesImageBaseType) + ":v" + version, + common.KubeProxyAddonName: getDefaultImage(common.Hyperkube, kubernetesImageBaseType) + ":v" + version, + common.DashboardAddonName: k8sComponent["dashboard"], + common.ExecHealthZComponentName: getDefaultImage(common.ExecHealthZComponentName, kubernetesImageBaseType), + common.AddonResizerComponentName: k8sComponent[common.AddonResizerComponentName], + common.MetricsServerAddonName: k8sComponent[common.MetricsServerAddonName], + common.KubeDNSAddonName: k8sComponent[common.KubeDNSAddonName], + common.AddonManagerComponentName: k8sComponent[common.AddonManagerComponentName], + common.DNSMasqComponentName: k8sComponent[common.DNSMasqComponentName], + common.PauseComponentName: pauseImageReference, + common.TillerAddonName: tillerImageReference, + common.ReschedulerAddonName: k8sComponent[common.ReschedulerAddonName], + common.ACIConnectorAddonName: virtualKubeletImageReference, + "nodestatusfreq": DefaultKubernetesNodeStatusUpdateFrequency, + "nodegraceperiod": DefaultKubernetesCtrlMgrNodeMonitorGracePeriod, + "podeviction": DefaultKubernetesCtrlMgrPodEvictionTimeout, + "routeperiod": DefaultKubernetesCtrlMgrRouteReconciliationPeriod, + "backoffretries": strconv.Itoa(DefaultKubernetesCloudProviderBackoffRetries), + "backoffjitter": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffJitter, 'f', -1, 64), + "backoffduration": strconv.Itoa(DefaultKubernetesCloudProviderBackoffDuration), + "backoffexponent": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffExponent, 'f', -1, 64), + "ratelimitqps": strconv.FormatFloat(DefaultKubernetesCloudProviderRateLimitQPS, 'f', -1, 64), + "ratelimitqpswrite": strconv.FormatFloat(DefaultKubernetesCloudProviderRateLimitQPSWrite, 'f', -1, 64), + "ratelimitbucket": strconv.Itoa(DefaultKubernetesCloudProviderRateLimitBucket), + "ratelimitbucketwrite": strconv.Itoa(DefaultKubernetesCloudProviderRateLimitBucketWrite), + "gchighthreshold": strconv.Itoa(DefaultKubernetesGCHighThreshold), + "gclowthreshold": strconv.Itoa(DefaultKubernetesGCLowThreshold), } case "1.6": ret = map[string]string{ - common.Hyperkube: getDefaultImage(common.Hyperkube, kubernetesImageBaseType) + ":v" + version, - common.KubeProxyAddonName: getDefaultImage(common.Hyperkube, kubernetesImageBaseType) + ":v" + version, - common.DashboardAddonName: k8sComponent["dashboard"], - common.ExecHealthZComponentName: getDefaultImage(common.ExecHealthZComponentName, kubernetesImageBaseType), - common.AddonResizerComponentName: k8sComponent[common.AddonResizerComponentName], - common.MetricsServerAddonName: k8sComponent[common.MetricsServerAddonName], - common.KubeDNSAddonName: k8sComponent[common.KubeDNSAddonName], - common.AddonManagerComponentName: k8sComponent[common.AddonManagerComponentName], - common.DNSMasqComponentName: k8sComponent[common.DNSMasqComponentName], - common.PauseComponentName: pauseImageReference, - common.TillerAddonName: tillerImageReference, - common.ReschedulerAddonName: k8sComponent[common.ReschedulerAddonName], - common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, - "nodestatusfreq": DefaultKubernetesNodeStatusUpdateFrequency, - "nodegraceperiod": DefaultKubernetesCtrlMgrNodeMonitorGracePeriod, - "podeviction": DefaultKubernetesCtrlMgrPodEvictionTimeout, - "routeperiod": DefaultKubernetesCtrlMgrRouteReconciliationPeriod, - "backoffretries": strconv.Itoa(DefaultKubernetesCloudProviderBackoffRetries), - "backoffjitter": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffJitter, 'f', -1, 64), - "backoffduration": strconv.Itoa(DefaultKubernetesCloudProviderBackoffDuration), - "backoffexponent": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffExponent, 'f', -1, 64), - "ratelimitqps": strconv.FormatFloat(DefaultKubernetesCloudProviderRateLimitQPS, 'f', -1, 64), - "ratelimitqpswrite": strconv.FormatFloat(DefaultKubernetesCloudProviderRateLimitQPSWrite, 'f', -1, 64), - "ratelimitbucket": strconv.Itoa(DefaultKubernetesCloudProviderRateLimitBucket), - "ratelimitbucketwrite": strconv.Itoa(DefaultKubernetesCloudProviderRateLimitBucketWrite), - "gchighthreshold": strconv.Itoa(DefaultKubernetesGCHighThreshold), - "gclowthreshold": strconv.Itoa(DefaultKubernetesGCLowThreshold), + common.Hyperkube: getDefaultImage(common.Hyperkube, kubernetesImageBaseType) + ":v" + version, + common.KubeProxyAddonName: getDefaultImage(common.Hyperkube, kubernetesImageBaseType) + ":v" + version, + common.DashboardAddonName: k8sComponent["dashboard"], + common.ExecHealthZComponentName: getDefaultImage(common.ExecHealthZComponentName, kubernetesImageBaseType), + common.AddonResizerComponentName: k8sComponent[common.AddonResizerComponentName], + common.MetricsServerAddonName: k8sComponent[common.MetricsServerAddonName], + common.KubeDNSAddonName: k8sComponent[common.KubeDNSAddonName], + common.AddonManagerComponentName: k8sComponent[common.AddonManagerComponentName], + common.DNSMasqComponentName: k8sComponent[common.DNSMasqComponentName], + common.PauseComponentName: pauseImageReference, + common.TillerAddonName: tillerImageReference, + common.ReschedulerAddonName: k8sComponent[common.ReschedulerAddonName], + common.ACIConnectorAddonName: virtualKubeletImageReference, + "nodestatusfreq": DefaultKubernetesNodeStatusUpdateFrequency, + "nodegraceperiod": DefaultKubernetesCtrlMgrNodeMonitorGracePeriod, + "podeviction": DefaultKubernetesCtrlMgrPodEvictionTimeout, + "routeperiod": DefaultKubernetesCtrlMgrRouteReconciliationPeriod, + "backoffretries": strconv.Itoa(DefaultKubernetesCloudProviderBackoffRetries), + "backoffjitter": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffJitter, 'f', -1, 64), + "backoffduration": strconv.Itoa(DefaultKubernetesCloudProviderBackoffDuration), + "backoffexponent": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffExponent, 'f', -1, 64), + "ratelimitqps": strconv.FormatFloat(DefaultKubernetesCloudProviderRateLimitQPS, 'f', -1, 64), + "ratelimitqpswrite": strconv.FormatFloat(DefaultKubernetesCloudProviderRateLimitQPSWrite, 'f', -1, 64), + "ratelimitbucket": strconv.Itoa(DefaultKubernetesCloudProviderRateLimitBucket), + "ratelimitbucketwrite": strconv.Itoa(DefaultKubernetesCloudProviderRateLimitBucketWrite), + "gchighthreshold": strconv.Itoa(DefaultKubernetesGCHighThreshold), + "gclowthreshold": strconv.Itoa(DefaultKubernetesGCLowThreshold), } default: diff --git a/pkg/api/k8s_versions_test.go b/pkg/api/k8s_versions_test.go index 296dad755f..a3d7c33b8b 100644 --- a/pkg/api/k8s_versions_test.go +++ b/pkg/api/k8s_versions_test.go @@ -44,7 +44,6 @@ func TestGetK8sVersionComponents(t *testing.T) { common.ReschedulerAddonName: getDefaultImage(common.ReschedulerAddonName, kubernetesImageBaseType), common.AzureArcOnboardingAddonName: azureArcOnboardingImageReference, common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.DNSSidecarComponentName: getDefaultImage(common.DNSSidecarComponentName, kubernetesImageBaseType), common.BlobfuseFlexVolumeAddonName: blobfuseFlexVolumeImageReference, @@ -135,7 +134,6 @@ func TestGetK8sVersionComponents(t *testing.T) { common.ReschedulerAddonName: getDefaultImage(common.ReschedulerAddonName, kubernetesImageBaseType), common.AzureArcOnboardingAddonName: azureArcOnboardingImageReference, common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.DNSSidecarComponentName: getDefaultImage(common.DNSSidecarComponentName, kubernetesImageBaseType), common.BlobfuseFlexVolumeAddonName: blobfuseFlexVolumeImageReference, @@ -222,7 +220,6 @@ func TestGetK8sVersionComponents(t *testing.T) { common.ReschedulerAddonName: getDefaultImage(common.ReschedulerAddonName, kubernetesImageBaseType), common.AzureArcOnboardingAddonName: azureArcOnboardingImageReference, common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.DNSSidecarComponentName: getDefaultImage(common.DNSSidecarComponentName, kubernetesImageBaseType), common.BlobfuseFlexVolumeAddonName: blobfuseFlexVolumeImageReference, @@ -306,7 +303,6 @@ func TestGetK8sVersionComponents(t *testing.T) { common.ReschedulerAddonName: getDefaultImage(common.ReschedulerAddonName, kubernetesImageBaseType), common.AzureArcOnboardingAddonName: azureArcOnboardingImageReference, common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.NVIDIADevicePluginAddonName: nvidiaDevicePluginImageReference, common.DNSSidecarComponentName: getDefaultImage(common.DNSSidecarComponentName, kubernetesImageBaseType), @@ -386,7 +382,6 @@ func TestGetK8sVersionComponents(t *testing.T) { common.TillerAddonName: tillerImageReference, common.ReschedulerAddonName: getDefaultImage(common.ReschedulerAddonName, kubernetesImageBaseType), common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.NVIDIADevicePluginAddonName: nvidiaDevicePluginImageReference, common.DNSSidecarComponentName: getDefaultImage(common.DNSSidecarComponentName, kubernetesImageBaseType), @@ -465,7 +460,6 @@ func TestGetK8sVersionComponents(t *testing.T) { common.TillerAddonName: tillerImageReference, common.ReschedulerAddonName: getDefaultImage(common.ReschedulerAddonName, kubernetesImageBaseType), common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.NVIDIADevicePluginAddonName: nvidiaDevicePluginImageReference, common.DNSSidecarComponentName: getDefaultImage(common.DNSSidecarComponentName, kubernetesImageBaseType), @@ -543,7 +537,6 @@ func TestGetK8sVersionComponents(t *testing.T) { common.TillerAddonName: tillerImageReference, common.ReschedulerAddonName: getDefaultImage(common.ReschedulerAddonName, kubernetesImageBaseType), common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.NVIDIADevicePluginAddonName: nvidiaDevicePluginImageReference, common.DNSSidecarComponentName: getDefaultImage(common.DNSSidecarComponentName, kubernetesImageBaseType), @@ -612,7 +605,6 @@ func TestGetK8sVersionComponents(t *testing.T) { common.TillerAddonName: tillerImageReference, common.ReschedulerAddonName: getDefaultImage(common.ReschedulerAddonName, kubernetesImageBaseType), common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.NVIDIADevicePluginAddonName: nvidiaDevicePluginImageReference, common.DNSSidecarComponentName: getDefaultImage(common.DNSSidecarComponentName, kubernetesImageBaseType), @@ -681,7 +673,6 @@ func TestGetK8sVersionComponents(t *testing.T) { common.TillerAddonName: tillerImageReference, common.ReschedulerAddonName: k8sComponent[common.ReschedulerAddonName], common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.NVIDIADevicePluginAddonName: nvidiaDevicePluginImageReference, common.DNSSidecarComponentName: k8sComponent[common.DNSSidecarComponentName], @@ -750,7 +741,6 @@ func TestGetK8sVersionComponents(t *testing.T) { common.TillerAddonName: tillerImageReference, common.ReschedulerAddonName: k8sComponent[common.ReschedulerAddonName], common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.DNSSidecarComponentName: k8sComponent[common.DNSSidecarComponentName], common.BlobfuseFlexVolumeAddonName: blobfuseFlexVolumeImageReference, @@ -818,7 +808,6 @@ func TestGetK8sVersionComponents(t *testing.T) { common.TillerAddonName: tillerImageReference, common.ReschedulerAddonName: k8sComponent[common.ReschedulerAddonName], common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.BlobfuseFlexVolumeAddonName: blobfuseFlexVolumeImageReference, common.SMBFlexVolumeAddonName: smbFlexVolumeImageReference, common.KeyVaultFlexVolumeAddonName: keyvaultFlexVolumeImageReference, @@ -868,34 +857,33 @@ func TestGetK8sVersionComponents(t *testing.T) { } k8sComponent = kubernetesImageBaseVersionedImages[kubernetesImageBaseType]["1.7"] expected = map[string]string{ - common.Hyperkube: "hyperkube-amd64:v1.7.13", - common.KubeProxyAddonName: "hyperkube-amd64:v1.7.13", - common.DashboardAddonName: k8sComponent["dashboard"], - common.ExecHealthZComponentName: getDefaultImage(common.ExecHealthZComponentName, kubernetesImageBaseType), - common.AddonResizerComponentName: k8sComponent[common.AddonResizerComponentName], - common.MetricsServerAddonName: k8sComponent[common.MetricsServerAddonName], - common.KubeDNSAddonName: k8sComponent[common.KubeDNSAddonName], - common.AddonManagerComponentName: k8sComponent[common.AddonManagerComponentName], - common.DNSMasqComponentName: k8sComponent[common.DNSMasqComponentName], - common.PauseComponentName: pauseImageReference, - common.TillerAddonName: tillerImageReference, - common.ReschedulerAddonName: k8sComponent[common.ReschedulerAddonName], - common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, - "nodestatusfreq": DefaultKubernetesNodeStatusUpdateFrequency, - "nodegraceperiod": DefaultKubernetesCtrlMgrNodeMonitorGracePeriod, - "podeviction": DefaultKubernetesCtrlMgrPodEvictionTimeout, - "routeperiod": DefaultKubernetesCtrlMgrRouteReconciliationPeriod, - "backoffretries": strconv.Itoa(DefaultKubernetesCloudProviderBackoffRetries), - "backoffjitter": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffJitter, 'f', -1, 64), - "backoffduration": strconv.Itoa(DefaultKubernetesCloudProviderBackoffDuration), - "backoffexponent": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffExponent, 'f', -1, 64), - "ratelimitqps": strconv.FormatFloat(DefaultKubernetesCloudProviderRateLimitQPS, 'f', -1, 64), - "ratelimitqpswrite": strconv.FormatFloat(DefaultKubernetesCloudProviderRateLimitQPSWrite, 'f', -1, 64), - "ratelimitbucket": strconv.Itoa(DefaultKubernetesCloudProviderRateLimitBucket), - "ratelimitbucketwrite": strconv.Itoa(DefaultKubernetesCloudProviderRateLimitBucketWrite), - "gchighthreshold": strconv.Itoa(DefaultKubernetesGCHighThreshold), - "gclowthreshold": strconv.Itoa(DefaultKubernetesGCLowThreshold), + common.Hyperkube: "hyperkube-amd64:v1.7.13", + common.KubeProxyAddonName: "hyperkube-amd64:v1.7.13", + common.DashboardAddonName: k8sComponent["dashboard"], + common.ExecHealthZComponentName: getDefaultImage(common.ExecHealthZComponentName, kubernetesImageBaseType), + common.AddonResizerComponentName: k8sComponent[common.AddonResizerComponentName], + common.MetricsServerAddonName: k8sComponent[common.MetricsServerAddonName], + common.KubeDNSAddonName: k8sComponent[common.KubeDNSAddonName], + common.AddonManagerComponentName: k8sComponent[common.AddonManagerComponentName], + common.DNSMasqComponentName: k8sComponent[common.DNSMasqComponentName], + common.PauseComponentName: pauseImageReference, + common.TillerAddonName: tillerImageReference, + common.ReschedulerAddonName: k8sComponent[common.ReschedulerAddonName], + common.ACIConnectorAddonName: virtualKubeletImageReference, + "nodestatusfreq": DefaultKubernetesNodeStatusUpdateFrequency, + "nodegraceperiod": DefaultKubernetesCtrlMgrNodeMonitorGracePeriod, + "podeviction": DefaultKubernetesCtrlMgrPodEvictionTimeout, + "routeperiod": DefaultKubernetesCtrlMgrRouteReconciliationPeriod, + "backoffretries": strconv.Itoa(DefaultKubernetesCloudProviderBackoffRetries), + "backoffjitter": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffJitter, 'f', -1, 64), + "backoffduration": strconv.Itoa(DefaultKubernetesCloudProviderBackoffDuration), + "backoffexponent": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffExponent, 'f', -1, 64), + "ratelimitqps": strconv.FormatFloat(DefaultKubernetesCloudProviderRateLimitQPS, 'f', -1, 64), + "ratelimitqpswrite": strconv.FormatFloat(DefaultKubernetesCloudProviderRateLimitQPSWrite, 'f', -1, 64), + "ratelimitbucket": strconv.Itoa(DefaultKubernetesCloudProviderRateLimitBucket), + "ratelimitbucketwrite": strconv.Itoa(DefaultKubernetesCloudProviderRateLimitBucketWrite), + "gchighthreshold": strconv.Itoa(DefaultKubernetesGCHighThreshold), + "gclowthreshold": strconv.Itoa(DefaultKubernetesGCLowThreshold), } g.Expect(oneDotSevenDotZero).To(Equal(expected)) @@ -920,7 +908,6 @@ func TestGetK8sVersionComponents(t *testing.T) { common.TillerAddonName: tillerImageReference, common.ReschedulerAddonName: k8sComponent[common.ReschedulerAddonName], common.ACIConnectorAddonName: virtualKubeletImageReference, - common.AzureCNINetworkMonitorAddonName: azureCNINetworkMonitorImageReference, common.ClusterAutoscalerAddonName: k8sComponent[common.ClusterAutoscalerAddonName], common.DNSSidecarComponentName: k8sComponent[common.DNSSidecarComponentName], common.BlobfuseFlexVolumeAddonName: blobfuseFlexVolumeImageReference, diff --git a/pkg/api/vlabs/validate.go b/pkg/api/vlabs/validate.go index 5c67b7e2ce..25771c457c 100644 --- a/pkg/api/vlabs/validate.go +++ b/pkg/api/vlabs/validate.go @@ -801,6 +801,10 @@ func (a *Properties) validateAddons(isUpdate bool) error { return errors.Errorf("The rescheduler addon has been deprecated and disabled, please remove it from your cluster configuration before creating a new cluster") case common.DashboardAddonName: log.Warnf("The kube-dashboard addon is deprecated, we recommend you install the dashboard yourself, see https://github.com/kubernetes/dashboard") + case common.AzureCNINetworkMonitorAddonName: + if isUpdate { + log.Warnf("The Azure CNI networkmonitor addon has been deprecated, it will be marked as disabled") + } } } 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 04f69f6c86..50747e622d 100644 --- a/pkg/api/vlabs/validate_test.go +++ b/pkg/api/vlabs/validate_test.go @@ -969,9 +969,19 @@ func ExampleProperties_validateAddons() { fmt.Printf("error in validateAddons: %s", err) } + cs.Properties.OrchestratorProfile.KubernetesConfig = &KubernetesConfig{} + cs.Properties.OrchestratorProfile.KubernetesConfig.Addons = []KubernetesAddon{ + {Name: common.AzureCNINetworkMonitorAddonName, + Enabled: to.BoolPtr(true)}, + } + if err := cs.Properties.validateAddons(true); err != nil { + fmt.Printf("error in validateAddons: %s", err) + } + // Output: // level=warning msg="The rescheduler addon has been deprecated and disabled, it will be removed during this update" // level=warning msg="The kube-dashboard addon is deprecated, we recommend you install the dashboard yourself, see https://github.com/kubernetes/dashboard" + // level=warning msg="The Azure CNI networkmonitor addon has been deprecated, it will be marked as disabled" } func Test_Properties_ValidateNetworkPlugin(t *testing.T) { diff --git a/pkg/engine/artifacts.go b/pkg/engine/artifacts.go index 9ccab34fc9..3551d08cf2 100644 --- a/pkg/engine/artifacts.go +++ b/pkg/engine/artifacts.go @@ -140,11 +140,6 @@ func kubernetesAddonSettingsInit(p *api.Properties) map[string]kubernetesCompone base64Data: k.GetAddonScript(common.IPMASQAgentAddonName), destinationFile: ipMasqAgentAddonDestinationFilename, }, - common.AzureCNINetworkMonitorAddonName: { - sourceFile: azureCNINetworkMonitorAddonSourceFilename, - base64Data: k.GetAddonScript(common.AzureCNINetworkMonitorAddonName), - destinationFile: azureCNINetworkMonitorAddonDestinationFilename, - }, common.CalicoAddonName: { sourceFile: calicoAddonSourceFilename, base64Data: k.GetAddonScript(common.CalicoAddonName), diff --git a/pkg/engine/artifacts_test.go b/pkg/engine/artifacts_test.go index 0f8173511a..3d169a12c4 100644 --- a/pkg/engine/artifacts_test.go +++ b/pkg/engine/artifacts_test.go @@ -111,10 +111,6 @@ func TestKubernetesAddonSettingsInit(t *testing.T) { Name: common.IPMASQAgentAddonName, Data: base64Data, }, - { - Name: common.AzureCNINetworkMonitorAddonName, - Data: base64Data, - }, { Name: common.CalicoAddonName, Data: base64Data, @@ -248,11 +244,6 @@ func TestKubernetesAddonSettingsInit(t *testing.T) { base64Data: base64Data, destinationFile: ipMasqAgentAddonDestinationFilename, }, - expectedAzureCNINetworkMonitor: kubernetesComponentFileSpec{ - sourceFile: azureCNINetworkMonitorAddonSourceFilename, - base64Data: base64Data, - destinationFile: azureCNINetworkMonitorAddonDestinationFilename, - }, expectedCalico: kubernetesComponentFileSpec{ sourceFile: calicoAddonSourceFilename, base64Data: base64Data, @@ -381,9 +372,6 @@ func TestKubernetesAddonSettingsInit(t *testing.T) { { Name: common.IPMASQAgentAddonName, }, - { - Name: common.AzureCNINetworkMonitorAddonName, - }, { Name: common.CalicoAddonName, }, @@ -501,11 +489,6 @@ func TestKubernetesAddonSettingsInit(t *testing.T) { base64Data: "", destinationFile: ipMasqAgentAddonDestinationFilename, }, - expectedAzureCNINetworkMonitor: kubernetesComponentFileSpec{ - sourceFile: azureCNINetworkMonitorAddonSourceFilename, - base64Data: "", - destinationFile: azureCNINetworkMonitorAddonDestinationFilename, - }, expectedCalico: kubernetesComponentFileSpec{ sourceFile: calicoAddonSourceFilename, base64Data: "", @@ -655,11 +638,6 @@ func TestKubernetesAddonSettingsInit(t *testing.T) { base64Data: "", destinationFile: ipMasqAgentAddonDestinationFilename, }, - expectedAzureCNINetworkMonitor: kubernetesComponentFileSpec{ - sourceFile: azureCNINetworkMonitorAddonSourceFilename, - base64Data: "", - destinationFile: azureCNINetworkMonitorAddonDestinationFilename, - }, expectedCalico: kubernetesComponentFileSpec{ sourceFile: calicoAddonSourceFilename, base64Data: "", @@ -880,16 +858,6 @@ func TestKubernetesAddonSettingsInit(t *testing.T) { if c.expectedIPMasqAgent.destinationFile != componentFileSpec[addon].destinationFile { t.Fatalf("Expected %s to be %s", componentFileSpec[addon].destinationFile, c.expectedIPMasqAgent.destinationFile) } - case common.AzureCNINetworkMonitorAddonName: - if c.expectedAzureCNINetworkMonitor.sourceFile != componentFileSpec[addon].sourceFile { - t.Fatalf("Expected %s to be %s", componentFileSpec[addon].sourceFile, c.expectedAzureCNINetworkMonitor.sourceFile) - } - if c.expectedAzureCNINetworkMonitor.base64Data != componentFileSpec[addon].base64Data { - t.Fatalf("Expected %s to be %s", componentFileSpec[addon].base64Data, c.expectedAzureCNINetworkMonitor.base64Data) - } - if c.expectedAzureCNINetworkMonitor.destinationFile != componentFileSpec[addon].destinationFile { - t.Fatalf("Expected %s to be %s", componentFileSpec[addon].destinationFile, c.expectedAzureCNINetworkMonitor.destinationFile) - } case common.CalicoAddonName: if c.expectedCalico.sourceFile != componentFileSpec[addon].sourceFile { t.Fatalf("Expected %s to be %s", componentFileSpec[addon].sourceFile, c.expectedCalico.sourceFile) diff --git a/pkg/engine/const.go b/pkg/engine/const.go index d9bac720fc..763aa828a7 100644 --- a/pkg/engine/const.go +++ b/pkg/engine/const.go @@ -139,70 +139,68 @@ const ( // addons source and destination file references const ( - metricsServerAddonSourceFilename string = "metrics-server.yaml" - metricsServerAddonDestinationFilename string = "metrics-server.yaml" - tillerAddonSourceFilename string = "tiller.yaml" - tillerAddonDestinationFilename string = "tiller.yaml" - aadPodIdentityAddonSourceFilename string = "aad-pod-identity.yaml" - aadPodIdentityAddonDestinationFilename string = "aad-pod-identity.yaml" - azureDiskCSIAddonSourceFilename string = "azuredisk-csi-driver-deployment.yaml" - azureDiskCSIAddonDestinationFilename string = "azuredisk-csi-driver-deployment.yaml" - azureFileCSIAddonSourceFilename string = "azurefile-csi-driver-deployment.yaml" - azureFileCSIAddonDestinationFilename string = "azurefile-csi-driver-deployment.yaml" - clusterAutoscalerAddonSourceFilename string = "cluster-autoscaler.yaml" - clusterAutoscalerAddonDestinationFilename string = "cluster-autoscaler.yaml" - blobfuseFlexVolumeAddonSourceFilename string = "blobfuse-flexvolume.yaml" - blobfuseFlexVolumeAddonDestinationFilename string = "blobfuse-flexvolume.yaml" - smbFlexVolumeAddonSourceFilename string = "smb-flexvolume.yaml" - smbFlexVolumeAddonDestinationFilename string = "smb-flexvolume.yaml" - keyvaultFlexVolumeAddonSourceFilename string = "keyvault-flexvolume.yaml" - keyvaultFlexVolumeAddonDestinationFilename string = "keyvault-flexvolume.yaml" - dashboardAddonSourceFilename string = "kubernetes-dashboard.yaml" // Deprecated - dashboardAddonDestinationFilename string = "kubernetes-dashboard.yaml" // Deprecated - nvidiaAddonSourceFilename string = "nvidia-device-plugin.yaml" - nvidiaAddonDestinationFilename string = "nvidia-device-plugin.yaml" - containerMonitoringAddonSourceFilename string = "container-monitoring.yaml" - containerMonitoringAddonDestinationFilename string = "container-monitoring.yaml" - ipMasqAgentAddonSourceFilename string = "ip-masq-agent.yaml" - ipMasqAgentAddonDestinationFilename string = "ip-masq-agent.yaml" - azureCNINetworkMonitorAddonSourceFilename string = "azure-cni-networkmonitor.yaml" - azureCNINetworkMonitorAddonDestinationFilename string = "azure-cni-networkmonitor.yaml" - calicoAddonSourceFilename string = "calico.yaml" - calicoAddonDestinationFilename string = "calico.yaml" - azureNetworkPolicyAddonSourceFilename string = "azure-network-policy.yaml" - azureNetworkPolicyAddonDestinationFilename string = "azure-network-policy.yaml" - azurePolicyAddonSourceFilename string = "azure-policy-deployment.yaml" - azurePolicyAddonDestinationFilename string = "azure-policy-deployment.yaml" - cloudNodeManagerAddonSourceFilename string = "cloud-node-manager.yaml" - cloudNodeManagerAddonDestinationFilename string = "cloud-node-manager.yaml" - nodeProblemDetectorAddonSourceFilename string = "node-problem-detector.yaml" - nodeProblemDetectorAddonDestinationFilename string = "node-problem-detector.yaml" - kubeDNSAddonSourceFilename string = "kube-dns.yaml" - kubeDNSAddonDestinationFilename string = "kube-dns.yaml" - corednsAddonSourceFilename string = "coredns.yaml" - corednsAddonDestinationFilename string = "coredns.yaml" - kubeProxyAddonSourceFilename string = "kube-proxy.yaml" - kubeProxyAddonDestinationFilename string = "kube-proxy.yaml" - podSecurityPolicyAddonSourceFilename string = "pod-security-policy.yaml" - podSecurityPolicyAddonDestinationFilename string = "pod-security-policy.yaml" - aadDefaultAdminGroupAddonSourceFilename string = "aad-default-admin-group-rbac.yaml" - aadDefaultAdminGroupDestinationFilename string = "aad-default-admin-group-rbac.yaml" - ciliumAddonSourceFilename string = "cilium.yaml" - ciliumAddonDestinationFilename string = "cilium.yaml" - antreaAddonSourceFilename string = "antrea.yaml" - antreaAddonDestinationFilename string = "antrea.yaml" - auditPolicyAddonSourceFilename string = "audit-policy.yaml" - auditPolicyAddonDestinationFilename string = "audit-policy.yaml" - cloudProviderAddonSourceFilename string = "azure-cloud-provider.yaml" - cloudProviderAddonDestinationFilename string = "azure-cloud-provider.yaml" - flannelAddonSourceFilename string = "flannel.yaml" - flannelAddonDestinationFilename string = "flannel.yaml" - scheduledMaintenanceAddonSourceFilename string = "scheduled-maintenance-deployment.yaml" - scheduledMaintenanceAddonDestinationFilename string = "scheduled-maintenance-deployment.yaml" - secretsStoreCSIDriverAddonSourceFileName string = "secrets-store-csi-driver.yaml" - secretsStoreCSIDriverAddonDestinationFileName string = "secrets-store-csi-driver.yaml" - connectedClusterAddonSourceFilename string = "arc-onboarding.yaml" - connectedClusterAddonDestinationFilename string = "arc-onboarding.yaml" + metricsServerAddonSourceFilename string = "metrics-server.yaml" + metricsServerAddonDestinationFilename string = "metrics-server.yaml" + tillerAddonSourceFilename string = "tiller.yaml" + tillerAddonDestinationFilename string = "tiller.yaml" + aadPodIdentityAddonSourceFilename string = "aad-pod-identity.yaml" + aadPodIdentityAddonDestinationFilename string = "aad-pod-identity.yaml" + azureDiskCSIAddonSourceFilename string = "azuredisk-csi-driver-deployment.yaml" + azureDiskCSIAddonDestinationFilename string = "azuredisk-csi-driver-deployment.yaml" + azureFileCSIAddonSourceFilename string = "azurefile-csi-driver-deployment.yaml" + azureFileCSIAddonDestinationFilename string = "azurefile-csi-driver-deployment.yaml" + clusterAutoscalerAddonSourceFilename string = "cluster-autoscaler.yaml" + clusterAutoscalerAddonDestinationFilename string = "cluster-autoscaler.yaml" + blobfuseFlexVolumeAddonSourceFilename string = "blobfuse-flexvolume.yaml" + blobfuseFlexVolumeAddonDestinationFilename string = "blobfuse-flexvolume.yaml" + smbFlexVolumeAddonSourceFilename string = "smb-flexvolume.yaml" + smbFlexVolumeAddonDestinationFilename string = "smb-flexvolume.yaml" + keyvaultFlexVolumeAddonSourceFilename string = "keyvault-flexvolume.yaml" + keyvaultFlexVolumeAddonDestinationFilename string = "keyvault-flexvolume.yaml" + dashboardAddonSourceFilename string = "kubernetes-dashboard.yaml" // Deprecated + dashboardAddonDestinationFilename string = "kubernetes-dashboard.yaml" // Deprecated + nvidiaAddonSourceFilename string = "nvidia-device-plugin.yaml" + nvidiaAddonDestinationFilename string = "nvidia-device-plugin.yaml" + containerMonitoringAddonSourceFilename string = "container-monitoring.yaml" + containerMonitoringAddonDestinationFilename string = "container-monitoring.yaml" + ipMasqAgentAddonSourceFilename string = "ip-masq-agent.yaml" + ipMasqAgentAddonDestinationFilename string = "ip-masq-agent.yaml" + calicoAddonSourceFilename string = "calico.yaml" + calicoAddonDestinationFilename string = "calico.yaml" + azureNetworkPolicyAddonSourceFilename string = "azure-network-policy.yaml" + azureNetworkPolicyAddonDestinationFilename string = "azure-network-policy.yaml" + azurePolicyAddonSourceFilename string = "azure-policy-deployment.yaml" + azurePolicyAddonDestinationFilename string = "azure-policy-deployment.yaml" + cloudNodeManagerAddonSourceFilename string = "cloud-node-manager.yaml" + cloudNodeManagerAddonDestinationFilename string = "cloud-node-manager.yaml" + nodeProblemDetectorAddonSourceFilename string = "node-problem-detector.yaml" + nodeProblemDetectorAddonDestinationFilename string = "node-problem-detector.yaml" + kubeDNSAddonSourceFilename string = "kube-dns.yaml" + kubeDNSAddonDestinationFilename string = "kube-dns.yaml" + corednsAddonSourceFilename string = "coredns.yaml" + corednsAddonDestinationFilename string = "coredns.yaml" + kubeProxyAddonSourceFilename string = "kube-proxy.yaml" + kubeProxyAddonDestinationFilename string = "kube-proxy.yaml" + podSecurityPolicyAddonSourceFilename string = "pod-security-policy.yaml" + podSecurityPolicyAddonDestinationFilename string = "pod-security-policy.yaml" + aadDefaultAdminGroupAddonSourceFilename string = "aad-default-admin-group-rbac.yaml" + aadDefaultAdminGroupDestinationFilename string = "aad-default-admin-group-rbac.yaml" + ciliumAddonSourceFilename string = "cilium.yaml" + ciliumAddonDestinationFilename string = "cilium.yaml" + antreaAddonSourceFilename string = "antrea.yaml" + antreaAddonDestinationFilename string = "antrea.yaml" + auditPolicyAddonSourceFilename string = "audit-policy.yaml" + auditPolicyAddonDestinationFilename string = "audit-policy.yaml" + cloudProviderAddonSourceFilename string = "azure-cloud-provider.yaml" + cloudProviderAddonDestinationFilename string = "azure-cloud-provider.yaml" + flannelAddonSourceFilename string = "flannel.yaml" + flannelAddonDestinationFilename string = "flannel.yaml" + scheduledMaintenanceAddonSourceFilename string = "scheduled-maintenance-deployment.yaml" + scheduledMaintenanceAddonDestinationFilename string = "scheduled-maintenance-deployment.yaml" + secretsStoreCSIDriverAddonSourceFileName string = "secrets-store-csi-driver.yaml" + secretsStoreCSIDriverAddonDestinationFileName string = "secrets-store-csi-driver.yaml" + connectedClusterAddonSourceFilename string = "arc-onboarding.yaml" + connectedClusterAddonDestinationFilename string = "arc-onboarding.yaml" ) // components source and destination file references diff --git a/pkg/engine/templates_generated.go b/pkg/engine/templates_generated.go index 0eb0c044b2..b7eb96a95c 100644 --- a/pkg/engine/templates_generated.go +++ b/pkg/engine/templates_generated.go @@ -9,7 +9,6 @@ // ../../parts/k8s/addons/arc-onboarding.yaml // ../../parts/k8s/addons/audit-policy.yaml // ../../parts/k8s/addons/azure-cloud-provider.yaml -// ../../parts/k8s/addons/azure-cni-networkmonitor.yaml // ../../parts/k8s/addons/azure-network-policy.yaml // ../../parts/k8s/addons/azure-policy-deployment.yaml // ../../parts/k8s/addons/azuredisk-csi-driver-deployment.yaml @@ -1989,102 +1988,6 @@ func k8sAddonsAzureCloudProviderYaml() (*asset, error) { return a, nil } -var _k8sAddonsAzureCniNetworkmonitorYaml = []byte(`apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: azure-cni-networkmonitor - namespace: kube-system - labels: - app: azure-cnms - addonmanager.kubernetes.io/mode: Reconcile -spec: - selector: - matchLabels: - k8s-app: azure-cnms - updateStrategy: - type: RollingUpdate - rollingUpdate: - maxUnavailable: 50% - template: - metadata: - labels: - k8s-app: azure-cnms -{{- if IsKubernetesVersionGe "1.17.0"}} - annotations: - cluster-autoscaler.kubernetes.io/daemonset-pod: "true" -{{- end}} - spec: - priorityClassName: system-node-critical - tolerations: - - key: CriticalAddonsOnly - operator: Exists - - key: node-role.kubernetes.io/master - operator: Equal - value: "true" - effect: NoSchedule - - operator: "Exists" - effect: NoExecute - - operator: "Exists" - effect: NoSchedule - nodeSelector: - kubernetes.io/os: linux - containers: - - name: azure-cnms - image: {{ContainerImage "azure-cni-networkmonitor"}} - imagePullPolicy: IfNotPresent - securityContext: - privileged: true - resources: - requests: - cpu: {{ContainerCPUReqs "azure-cni-networkmonitor"}} - memory: {{ContainerMemReqs "azure-cni-networkmonitor"}} - limits: - cpu: {{ContainerCPULimits "azure-cni-networkmonitor"}} - memory: {{ContainerMemLimits "azure-cni-networkmonitor"}} - env: - - name: HOSTNAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: spec.nodeName - volumeMounts: - - name: ebtables-rule-repo - mountPath: /var/run - - name: log - mountPath: /var/log - - name: telemetry - mountPath: /opt/cni/bin - hostNetwork: true - volumes: - - name: log - hostPath: - path: /var/log - type: Directory - - name: ebtables-rule-repo - hostPath: - path: /var/run/ - type: Directory - - name: telemetry - hostPath: - path: /opt/cni/bin - type: Directory -`) - -func k8sAddonsAzureCniNetworkmonitorYamlBytes() ([]byte, error) { - return _k8sAddonsAzureCniNetworkmonitorYaml, nil -} - -func k8sAddonsAzureCniNetworkmonitorYaml() (*asset, error) { - bytes, err := k8sAddonsAzureCniNetworkmonitorYamlBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "k8s/addons/azure-cni-networkmonitor.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - var _k8sAddonsAzureNetworkPolicyYaml = []byte(`apiVersion: v1 kind: ServiceAccount metadata: @@ -16774,15 +16677,6 @@ var _k8sKubernetesparamsT = []byte(` "etcdServerCertificate": { } } {{end}} - {{if IsAzureCNI}} - ,"AzureCNINetworkMonitorImageURL": { - "defaultValue": "", - "metadata": { - "description": "Azure CNI networkmonitor Image URL" - }, - "type": "string" - } - {{end}} {{if .OrchestratorProfile.KubernetesConfig.IsAppGWIngressEnabled}} ,"appGwSubnet": { "metadata": { @@ -20126,7 +20020,6 @@ var _bindata = map[string]func() (*asset, error){ "k8s/addons/arc-onboarding.yaml": k8sAddonsArcOnboardingYaml, "k8s/addons/audit-policy.yaml": k8sAddonsAuditPolicyYaml, "k8s/addons/azure-cloud-provider.yaml": k8sAddonsAzureCloudProviderYaml, - "k8s/addons/azure-cni-networkmonitor.yaml": k8sAddonsAzureCniNetworkmonitorYaml, "k8s/addons/azure-network-policy.yaml": k8sAddonsAzureNetworkPolicyYaml, "k8s/addons/azure-policy-deployment.yaml": k8sAddonsAzurePolicyDeploymentYaml, "k8s/addons/azuredisk-csi-driver-deployment.yaml": k8sAddonsAzurediskCsiDriverDeploymentYaml, @@ -20275,7 +20168,6 @@ var _bintree = &bintree{nil, map[string]*bintree{ "arc-onboarding.yaml": {k8sAddonsArcOnboardingYaml, map[string]*bintree{}}, "audit-policy.yaml": {k8sAddonsAuditPolicyYaml, map[string]*bintree{}}, "azure-cloud-provider.yaml": {k8sAddonsAzureCloudProviderYaml, map[string]*bintree{}}, - "azure-cni-networkmonitor.yaml": {k8sAddonsAzureCniNetworkmonitorYaml, map[string]*bintree{}}, "azure-network-policy.yaml": {k8sAddonsAzureNetworkPolicyYaml, map[string]*bintree{}}, "azure-policy-deployment.yaml": {k8sAddonsAzurePolicyDeploymentYaml, map[string]*bintree{}}, "azuredisk-csi-driver-deployment.yaml": {k8sAddonsAzurediskCsiDriverDeploymentYaml, map[string]*bintree{}}, diff --git a/test/e2e/kubernetes/kubernetes_test.go b/test/e2e/kubernetes/kubernetes_test.go index 76633ce4b9..b2a05934d6 100644 --- a/test/e2e/kubernetes/kubernetes_test.go +++ b/test/e2e/kubernetes/kubernetes_test.go @@ -1061,7 +1061,7 @@ var _ = Describe("Azure Container Cluster using the Kubernetes Orchestrator", fu common.AzureDiskCSIDriverAddonName, common.AzureFileCSIDriverAddonName, common.CloudNodeManagerAddonName, common.ClusterAutoscalerAddonName, common.BlobfuseFlexVolumeAddonName, common.SMBFlexVolumeAddonName, common.KeyVaultFlexVolumeAddonName, common.DashboardAddonName, common.MetricsServerAddonName, common.NVIDIADevicePluginAddonName, common.ContainerMonitoringAddonName, - common.AzureCNINetworkMonitorAddonName, common.CalicoAddonName, common.AzureNetworkPolicyAddonName, common.IPMASQAgentAddonName, + common.CalicoAddonName, common.AzureNetworkPolicyAddonName, common.IPMASQAgentAddonName, common.AzurePolicyAddonName, common.NodeProblemDetectorAddonName, common.AntreaAddonName, common.FlannelAddonName, common.ScheduledMaintenanceAddonName, common.SecretsStoreCSIDriverAddonName} { var addonPods = []string{addonName} diff --git a/vhd/packer/install-dependencies.sh b/vhd/packer/install-dependencies.sh index 4830874a18..adb8e30f78 100644 --- a/vhd/packer/install-dependencies.sh +++ b/vhd/packer/install-dependencies.sh @@ -171,15 +171,6 @@ for CORE_DNS_VERSION in ${CORE_DNS_VERSIONS}; do done AZURE_CNIIMAGEBASE="mcr.microsoft.com/containernetworking" -AZURE_CNI_NETWORKMONITOR_VERSIONS=" -0.0.8 -" -for AZURE_CNI_NETWORKMONITOR_VERSION in ${AZURE_CNI_NETWORKMONITOR_VERSIONS}; do - CONTAINER_IMAGE="${AZURE_CNIIMAGEBASE}/networkmonitor:v${AZURE_CNI_NETWORKMONITOR_VERSION}" - loadContainerImage ${CONTAINER_IMAGE} - echo " - ${CONTAINER_IMAGE}" >> ${VHD_LOGS_FILEPATH} -done - AZURE_NPM_VERSIONS=" 1.2.2_hotfix "