Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Split Windows setup scripts, prepare for cleanup and multiple CRI (#3994
Browse files Browse the repository at this point in the history
)
  • Loading branch information
PatrickLang authored and jackfrancis committed Oct 15, 2018
1 parent 85257e0 commit 7e3249e
Show file tree
Hide file tree
Showing 10 changed files with 930 additions and 616 deletions.
3 changes: 2 additions & 1 deletion docs/clusterdefinition.md
Original file line number Diff line number Diff line change
Expand Up @@ -580,10 +580,11 @@ https://{keyvaultname}.vault.azure.net:443/secrets/{secretName}/{version}

#### Choosing a Windows version

If you want to choose a specific Windows image, but automatically use the latest - set `windowsPublisher`, `windowsOffer`, and `windowsSku`. If you need a specific version, then add `imageVersion` too.
If you want to choose a specific Windows image, but automatically use the latest - set `windowsPublisher`, `windowsOffer`, and `windowsSku`. If you need a specific version, then add `agentWindowsVersion` too.

You can find all available images with `az vm image list`


```bash
$ az vm image list --publisher MicrosoftWindowsServer --all -o table

Expand Down
34 changes: 34 additions & 0 deletions parts/k8s/kuberneteswindowsfunctions.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This is a temporary file to test dot-sourcing functions stored in separate scripts in a zip file

filter Timestamp {"$(Get-Date -Format o): $_"}

function
Write-Log($message)
{
$msg = $message | Timestamp
Write-Output $msg
}

function DownloadFileOverHttp
{
Param(
[Parameter(Mandatory=$true)][string]
$Url,
[Parameter(Mandatory=$true)][string]
$DestinationPath
)
$secureProtocols = @()
$insecureProtocols = @([System.Net.SecurityProtocolType]::SystemDefault, [System.Net.SecurityProtocolType]::Ssl3)

foreach ($protocol in [System.Enum]::GetValues([System.Net.SecurityProtocolType]))
{
if ($insecureProtocols -notcontains $protocol)
{
$secureProtocols += $protocol
}
}
[System.Net.ServicePointManager]::SecurityProtocol = $secureProtocols

Invoke-WebRequest $Url -UseBasicParsing -OutFile $DestinationPath -Verbose
Write-Log "Downloaded file to $DestinationPath"
}
Loading

0 comments on commit 7e3249e

Please sign in to comment.