Skip to content

Commit

Permalink
fix: set DisableKubeletCloudCredentialProviders=false for versions …
Browse files Browse the repository at this point in the history
…without OOT credential provider (1.29) (#456)

* fix: DisableKubeletCloudCredentialProviders should default to false for 1.29

* fix: adding 1.31 credential provider into switch

* test: testing 1.31 credential provider url

* fix: ci

---------

Co-authored-by: Alex Leites <[email protected]>
  • Loading branch information
Bryce-Soghigian and tallaxes authored Aug 22, 2024
1 parent f6fd9cd commit a43b994
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
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"
}

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 @@ -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
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

0 comments on commit a43b994

Please sign in to comment.