Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update staging/cse/windows/containerdfunc.ps1
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • Loading branch information
fseldow and Copilot committed Mar 9, 2026
commit 70b0ae2cfc4a3525442dcdde8df1b329400541a3
13 changes: 9 additions & 4 deletions staging/cse/windows/containerdfunc.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,16 @@ function Install-Containerd {

RegisterContainerDService -KubeDir $KubeDir
if ((Test-Path variable:global:BootstrapProfileContainerRegistryServer) -and -not [string]::IsNullOrEmpty($global:BootstrapProfileContainerRegistryServer)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe put the is null or empty first so that we don't test the path if the string is empty.

try {
Set-PodInfraContainerImage
if (Get-Command -Name Set-PodInfraContainerImage -ErrorAction SilentlyContinue) {
try {
Set-PodInfraContainerImage
}
catch {
Set-ExitCode -ExitCode $global:WINDOWS_CSE_ERROR_ORAS_PULL_POD_INFRA_CONTAINER -ErrorMessage "Failed to set pod infra container image: $_"
}
}
catch {
Set-ExitCode -ExitCode $global:WINDOWS_CSE_ERROR_ORAS_PULL_POD_INFRA_CONTAINER -ErrorMessage "Failed to set pod infra container image: $_"
else {
Write-Log "Set-PodInfraContainerImage command not found; skipping pod infra container image configuration."
}
}
Enable-Logging
Expand Down