Skip to content
Open
Changes from all commits
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
15 changes: 9 additions & 6 deletions staging/cse/windows/windowsciliumnetworkingfunc.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ Installs Windows Cilium Networking using the global configuration settings.
- Expects node prep to remove source NuGet package from aks-cache following installation

#>
function Enable-WindowsCiliumNetworking
{
function Enable-WindowsCiliumNetworking {
if (!$global:EnableWindowsCiliumNetworking) {
Write-Log "Windows Cilium Networking is disabled, skipping installation"
return
Expand All @@ -41,7 +40,7 @@ function Enable-WindowsCiliumNetworking
$installArgs = @{
RestartRequiredOut = ([ref]$isRebootNeeded)
SourceDirectory = $global:WindowsCiliumInstallPath
SkipNugetUnpack = [switch]::Present
SkipNugetUnpack = [switch]::Present
}

# Add scenario configuration if specified
Expand All @@ -61,8 +60,7 @@ function Enable-WindowsCiliumNetworking
if ($isRebootNeeded) {
$global:RebootNeeded = $true
}
}
catch {
} catch {
Write-Log "Failed to install Windows Cilium Networking: $_"
Set-ExitCode -ExitCode $global:WINDOWS_CSE_ERROR_WINDOWS_CILIUM_NETWORKING_INSTALL_FAILED -ErrorMessage "$_"
}
Expand Down Expand Up @@ -97,5 +95,10 @@ function Invoke-WindowsCiliumNetworkingInstallScript {
)

$wcnInstallScript = $global:WindowsCiliumInstallPath | Join-Path -ChildPath 'scripts' | Join-Path -ChildPath 'install' | Join-Path -ChildPath 'install.ps1'
& $wcnInstallScript @Arguments
if (Test-Path -Path $wcnInstallScript -PathType Leaf) {
Write-Log "Expecting windows cilium install script at: $wcnInstallScript"
& $wcnInstallScript @Arguments
} else {
Write-Log "Windows Cilium Networking installation script could not be found: $wcnInstallScript"
}
Comment on lines 97 to +103
Comment on lines +98 to +103
}
Loading