diff --git a/pkg/providers/imagefamily/bootstrap/aksbootstrap.go b/pkg/providers/imagefamily/bootstrap/aksbootstrap.go index 83014232b..e337e4188 100644 --- a/pkg/providers/imagefamily/bootstrap/aksbootstrap.go +++ b/pkg/providers/imagefamily/bootstrap/aksbootstrap.go @@ -437,6 +437,9 @@ func CredentialProviderURL(kubernetesVersion, arch string) string { credentialProviderVersion = "1.29.2" case 30: credentialProviderVersion = "1.30.0" + + case 31: + credentialProviderVersion = "1.31.0" } return fmt.Sprintf("%s/cloud-provider-azure/v%s/binaries/azure-acr-credential-provider-linux-%s-v%s.tar.gz", globalAKSMirror, credentialProviderVersion, arch, credentialProviderVersion) @@ -497,6 +500,9 @@ func (a AKS) applyOptions(nbv *NodeBootstrapVariables) { kubeletFlagsBase["--image-credential-provider-config"] = "/var/lib/kubelet/credential-provider-config.yaml" kubeletFlagsBase["--image-credential-provider-bin-dir"] = "/var/lib/kubelet/credential-provider" } else { // Versions Less than 1.30 + // we can make this logic smarter later when we have more than one + // for now just adding here. + kubeletFlagsBase["--feature-gates"] = "DisableKubeletCloudCredentialProviders=false" kubeletFlagsBase["--azure-container-registry-config"] = "/etc/kubernetes/azure.json" } // merge and stringify taints diff --git a/pkg/providers/imagefamily/bootstrap/aksbootstrap_test.go b/pkg/providers/imagefamily/bootstrap/aksbootstrap_test.go index ec0cb423f..0d3c3764b 100644 --- a/pkg/providers/imagefamily/bootstrap/aksbootstrap_test.go +++ b/pkg/providers/imagefamily/bootstrap/aksbootstrap_test.go @@ -65,6 +65,11 @@ func TestGetCredentialProviderURL(t *testing.T) { arch string url string }{ + { + version: "1.31.0", + arch: "amd64", + url: fmt.Sprintf("%s/cloud-provider-azure/v1.31.0/binaries/azure-acr-credential-provider-linux-amd64-v1.31.0.tar.gz", globalAKSMirror), + }, { version: "1.30.2", arch: "amd64",