2018-10-16 01:37:32 +03:00
|
|
|
function Get-HnsPsm1
|
|
|
|
{
|
|
|
|
Param(
|
|
|
|
[string]
|
|
|
|
$HnsUrl = "https://github.com/Microsoft/SDN/raw/master/Kubernetes/windows/hns.psm1",
|
|
|
|
[Parameter(Mandatory=$true)][string]
|
|
|
|
$HNSModule
|
|
|
|
)
|
|
|
|
DownloadFileOverHttp -Url $HnsUrl -DestinationPath "$HNSModule"
|
|
|
|
}
|
|
|
|
|
|
|
|
function Update-WinCNI
|
|
|
|
{
|
|
|
|
Param(
|
|
|
|
[string]
|
2019-08-06 21:42:23 +03:00
|
|
|
$WinCniUrl = "https://github.com/Microsoft/SDN/raw/master/Kubernetes/flannel/l2bridge/cni/win-bridge.exe",
|
2018-10-16 01:37:32 +03:00
|
|
|
[Parameter(Mandatory=$true)][string]
|
|
|
|
$CNIPath
|
|
|
|
)
|
2019-08-06 21:42:23 +03:00
|
|
|
$wincni = "win-bridge.exe"
|
2018-10-16 01:37:32 +03:00
|
|
|
$wincniFile = [Io.path]::Combine($CNIPath, $wincni)
|
|
|
|
DownloadFileOverHttp -Url $WinCniUrl -DestinationPath $wincniFile
|
|
|
|
}
|
|
|
|
|
2020-03-05 23:40:01 +03:00
|
|
|
function Install-SdnBridge
|
|
|
|
{
|
|
|
|
Param(
|
|
|
|
[Parameter(Mandatory=$true)][string]
|
|
|
|
$Url,
|
|
|
|
[Parameter(Mandatory=$true)][string]
|
|
|
|
$CNIPath
|
|
|
|
)
|
|
|
|
|
|
|
|
$cnizip = [Io.path]::Combine($CNIPath, "cni.zip")
|
|
|
|
DownloadFileOverHttp -Url $Url -DestinationPath $cnizip
|
|
|
|
Expand-Archive -path $cnizip -DestinationPath $CNIPath
|
|
|
|
del $cnizip
|
|
|
|
}
|
|
|
|
|
2019-10-25 18:17:07 +03:00
|
|
|
# TODO: Move the code that creates the wincni configuration file out of windowskubeletfunc.ps1 and put it here
|