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

Commit

Permalink
fix: kube-proxy image on Azure Stack deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
jadarsie committed Mar 16, 2021
1 parent 23240ca commit f1704c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
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

0 comments on commit f1704c7

Please sign in to comment.