Skip to content

Commit

Permalink
add credential provider support for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mainred committed Apr 11, 2024
1 parent 2296793 commit 9c81ecb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 7 additions & 2 deletions parts/windows/kuberneteswindowssetup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ $global:VNetCNIPluginsURL = "{{GetParameter "vnetCniWindowsPluginsURL"}}"
$global:IsDualStackEnabled = {{if IsIPv6DualStackFeatureEnabled}}$true{{else}}$false{{end}}
$global:IsAzureCNIOverlayEnabled = {{if IsAzureCNIOverlayFeatureEnabled}}$true{{else}}$false{{end}}

# Kubelet credential provider
$global:CredentialProviderURL = "{{GetParameter "windowsCredentialProviderURL"}}"

# CSI Proxy settings
$global:EnableCsiProxy = [System.Convert]::ToBoolean("{{GetVariable "windowsEnableCSIProxy" }}");
$global:CsiProxyUrl = "{{GetVariable "windowsCSIProxyURL" }}";
Expand Down Expand Up @@ -236,7 +239,7 @@ try
Write-Log "private egress proxy address is '$global:PrivateEgressProxyAddress'"
# TODO update to use proxy

$WindowsCSEScriptsPackage = "aks-windows-cse-scripts-v0.0.40.zip"
$WindowsCSEScriptsPackage = "aks-windows-cse-scripts-v0.0.40.0.zip"
Write-Log "CSEScriptsPackageUrl is $global:CSEScriptsPackageUrl"
Write-Log "WindowsCSEScriptsPackage is $WindowsCSEScriptsPackage"
# Old AKS RP sets the full URL (https://acs-mirror.azureedge.net/aks/windows/cse/aks-windows-cse-scripts-v0.0.11.zip) in CSEScriptsPackageUrl
Expand Down Expand Up @@ -292,7 +295,9 @@ try
Get-LogCollectionScripts

Write-KubeClusterConfig -MasterIP $MasterIP -KubeDnsServiceIp $KubeDnsServiceIp


Install-CredentialProvider -CustomCloudContainerRegistryDNSSuffix {{if IsAKSCustomCloud}}"{{ AKSCustomCloudContainerRegistryDNSSuffix }}"{{else}}""{{end}}

Get-KubePackage -KubeBinariesSASURL $global:KubeBinariesPackageSASURL

$cniBinPath = $global:AzureCNIBinDir
Expand Down
4 changes: 3 additions & 1 deletion parts/windows/windowscsehelper.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ $global:WINDOWS_CSE_ERROR_GPU_DRIVER_INSTALLATION_URL_NOT_EXE=61
$global:WINDOWS_CSE_ERROR_UPDATING_KUBE_CLUSTER_CONFIG=62
$global:WINDOWS_CSE_ERROR_GET_NODE_IPV6_IP=63
$global:WINDOWS_CSE_ERROR_GET_CONTAINERD_VERSION=64
$global:WINDOWS_CSE_ERROR_DOWNLOAD_CREDEDNTIAL_PROVIDER=65

# Please add new error code for downloading new packages in RP code too
$global:ErrorCodeNames = @(
Expand Down Expand Up @@ -135,7 +136,8 @@ $global:ErrorCodeNames = @(
"WINDOWS_CSE_ERROR_GPU_DRIVER_INSTALLATION_URL_NOT_EXE",
"WINDOWS_CSE_ERROR_UPDATING_KUBE_CLUSTER_CONFIG",
"WINDOWS_CSE_ERROR_GET_NODE_IPV6_IP",
"WINDOWS_CSE_ERROR_GET_CONTAINERD_VERSION"
"WINDOWS_CSE_ERROR_GET_CONTAINERD_VERSION",
"WINDOWS_CSE_ERROR_DOWNLOAD_CREDEDNTIAL_PROVIDER"
)

# NOTE: KubernetesVersion does not contain "v"
Expand Down

0 comments on commit 9c81ecb

Please sign in to comment.