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
14 changes: 13 additions & 1 deletion pkg/secrets/secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,19 @@ func generateUserDataWithPubKey(platformType oconfig.PlatformType, pubKey string
}
}

Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
# This requires a network connection, which is not guaranteed at VM initialization. Retry to work around this.
$attempt = 0
$success = $false
while (-not $success -and $attempt -lt 10) {
try {
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 -ErrorAction Stop
$success = $true
}
catch {
$attempt++
Start-Sleep -Seconds 5
}
}
$firewallRuleName = "ContainerLogsPort"
$containerLogsPort = "10250"
New-NetFirewallRule -DisplayName $firewallRuleName -Direction Inbound -Action Allow -Protocol TCP -LocalPort $containerLogsPort -EdgeTraversalPolicy Allow
Expand Down