Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit b0ce82b

Browse files
jackfrancisCecileRobertMichon
authored andcommitted
Kubernetes: Azure CNI v1.0.7 (#3433)
1 parent f50fe5f commit b0ce82b

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

pkg/acsengine/defaults.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import (
2020
const (
2121
// AzureCniPluginVer specifies version of Azure CNI plugin, which has been mirrored from
2222
// https://github.com/Azure/azure-container-networking/releases/download/${AZURE_PLUGIN_VER}/azure-vnet-cni-linux-amd64-${AZURE_PLUGIN_VER}.tgz
23-
// to https://acs-mirror.azureedge.net/cni/
24-
AzureCniPluginVer = "v1.0.4"
23+
// to https://acs-mirror.azureedge.net/cni
24+
AzureCniPluginVer = "v1.0.7"
2525
// CNIPluginVer specifies the version of CNI implementation
2626
// https://github.com/containernetworking/plugins
2727
CNIPluginVer = "v0.7.1"
@@ -572,7 +572,7 @@ func setOrchestratorDefaults(cs *api.ContainerService) {
572572
a.OrchestratorProfile.KubernetesConfig.Addons[cm] = assignDefaultAddonVals(a.OrchestratorProfile.KubernetesConfig.Addons[cm], DefaultContainerMonitoringAddonsConfig)
573573
}
574574
aN := getAddonsIndexByName(a.OrchestratorProfile.KubernetesConfig.Addons, AzureCNINetworkMonitoringAddonName)
575-
if a.OrchestratorProfile.KubernetesConfig.Addons[aN].IsEnabled(a.OrchestratorProfile.IsAzureCNI()) {
575+
if a.OrchestratorProfile.KubernetesConfig.Addons[aN].IsEnabled(api.DefaultAzureCNINetworkMonitoringAddonEnabled) {
576576
a.OrchestratorProfile.KubernetesConfig.Addons[aN] = assignDefaultAddonVals(a.OrchestratorProfile.KubernetesConfig.Addons[aN], DefaultAzureCNINetworkMonitorAddonsConfig)
577577
}
578578

pkg/acsengine/defaults_test.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -565,23 +565,28 @@ func TestIsAzureCNINetworkmonitorAddon(t *testing.T) {
565565
properties := mockCS.Properties
566566
properties.OrchestratorProfile.OrchestratorType = "Kubernetes"
567567
properties.MasterProfile.Count = 1
568+
properties.OrchestratorProfile.KubernetesConfig.Addons = []api.KubernetesAddon{
569+
getMockAddon(AzureCNINetworkMonitoringAddonName),
570+
}
568571
properties.OrchestratorProfile.KubernetesConfig.NetworkPlugin = "azure"
569572
setOrchestratorDefaults(&mockCS)
570573

571574
i := getAddonsIndexByName(properties.OrchestratorProfile.KubernetesConfig.Addons, AzureCNINetworkMonitoringAddonName)
572575
if !helpers.IsTrueBoolPointer(properties.OrchestratorProfile.KubernetesConfig.Addons[i].Enabled) {
573-
t.Fatalf("Azure CNI network plugin configuration should add Azure CNI networkmonitor addon")
576+
t.Fatalf("Azure CNI networkmonitor addon should be present")
574577
}
578+
575579
mockCS = getMockBaseContainerService("1.10.3")
576580
properties = mockCS.Properties
577581
properties.OrchestratorProfile.OrchestratorType = "Kubernetes"
578582
properties.MasterProfile.Count = 1
579-
properties.OrchestratorProfile.KubernetesConfig.NetworkPlugin = "kubenet"
583+
properties.OrchestratorProfile.KubernetesConfig.NetworkPlugin = "azure"
584+
properties.OrchestratorProfile.KubernetesConfig.Addons = []api.KubernetesAddon{}
580585
setOrchestratorDefaults(&mockCS)
581586

582587
i = getAddonsIndexByName(properties.OrchestratorProfile.KubernetesConfig.Addons, AzureCNINetworkMonitoringAddonName)
583588
if helpers.IsTrueBoolPointer(properties.OrchestratorProfile.KubernetesConfig.Addons[i].Enabled) {
584-
t.Fatalf("Azure CNI networkmonitor addon should only be present in Azure CNI configurations")
589+
t.Fatalf("Azure CNI networkmonitor addon should only be present if explicitly configured")
585590
}
586591
}
587592

pkg/api/const.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ const (
107107
DefaultNVIDIADevicePluginAddonEnabled = false
108108
// DefaultContainerMonitoringAddonEnabled determines the acs-engine provided default for enabling kubernetes container monitoring addon
109109
DefaultContainerMonitoringAddonEnabled = false
110+
// DefaultAzureCNINetworkMonitoringAddonEnabled Azure CNI networkmonitor addon default
111+
DefaultAzureCNINetworkMonitoringAddonEnabled = false
110112
// DefaultTillerAddonName is the name of the tiller addon deployment
111113
DefaultTillerAddonName = "tiller"
112114
// DefaultACIConnectorAddonName is the name of the tiller addon deployment

0 commit comments

Comments
 (0)