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

fix: kube-proxy image on Azure Stack deployments #4329

Merged
merged 1 commit into from
Mar 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions pkg/api/addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -1179,9 +1179,7 @@ func getCSISidecarComponent(csiDriverName, csiSidecarName string, k8sComponents
// Azure Stack needs the '-azs' suffix so kube-proxy's manifests uses the custom hyperkube image present in the VHD
func kubeProxyImageSuffix(cs ContainerService) string {
if cs.Properties.IsAzureStackCloud() {
if !common.IsKubernetesVersionGe(cs.Properties.OrchestratorProfile.OrchestratorVersion, "1.16.0") {
return common.AzureStackSuffix
}
return common.AzureStackSuffix
}
return ""
}
18 changes: 3 additions & 15 deletions pkg/api/addons_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5299,25 +5299,13 @@ func TestKubeProxyImageSuffix(t *testing.T) {
}{
{
name: "return empty string if target cloud is NOT Azure Stack",
cs: getMockBaseContainerService("1.15.0"),
cs: getMockBaseContainerService("1.19.0"),
azurestack: false,
expected: "",
},
{
name: "return empty string if target cloud is NOT Azure Stack",
cs: getMockBaseContainerService("1.16.0"),
azurestack: false,
expected: "",
},
{
name: "return empty string if target version is v1.16 or greater",
cs: getMockBaseContainerService("1.16.0"),
azurestack: true,
expected: "",
},
{
name: "return '-azs' if target cloud is Azure Stack and K8s version lower than v1.16",
cs: getMockBaseContainerService("1.15.0"),
name: "return '-azs' if target cloud is Azure Stack",
cs: getMockBaseContainerService("1.19.0"),
azurestack: true,
expected: common.AzureStackSuffix,
},
Expand Down