Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set DisableKubeletCloudCredentialProviders=false for versions without OOT credential provider (1.29) #456

Merged
merged 6 commits into from
Aug 22, 2024
Merged
6 changes: 6 additions & 0 deletions pkg/providers/imagefamily/bootstrap/aksbootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Bryce-Soghigian marked this conversation as resolved.
Show resolved Hide resolved
}

return fmt.Sprintf("%s/cloud-provider-azure/v%s/binaries/azure-acr-credential-provider-linux-%s-v%s.tar.gz", globalAKSMirror, credentialProviderVersion, arch, credentialProviderVersion)
Expand Down Expand Up @@ -492,6 +495,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
Expand Down
5 changes: 5 additions & 0 deletions pkg/providers/imagefamily/bootstrap/aksbootstrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down