This repository has been archived by the owner on Oct 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 528
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: installing csi-proxy for windows at node deployment time (#2930)
- Loading branch information
Showing
22 changed files
with
459 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# CSI Proxy for Windows | ||
|
||
CSI Proxy for Windows enables support for CSI Plugins on Kubernetes nodes running Windows. | ||
|
||
More info can be found in the following places: | ||
|
||
- <https://github.com/kubernetes/enhancements/blob/master/keps/sig-windows/20190714-windows-csi-support.md> | ||
- <https://github.com/kubernetes-csi/csi-proxy> | ||
|
||
## Requirements | ||
|
||
- CSI Proxy for Windows requires Kubernetes version 1.18.0 or greater. | ||
|
||
## Usage | ||
|
||
### Enable in aks-engine | ||
|
||
Add the following fields to `windowsProfile`: | ||
|
||
```json | ||
"windowsProfile": { | ||
... | ||
"enableCSIProxy": true, | ||
"csiProxyURL": "<Path to a package containing Windows csi proxy binaries>" | ||
... | ||
} | ||
``` | ||
|
||
For testing purposes the following csi-proxy binary may be used: | ||
|
||
- https://kubernetesartifacts.azureedge.net/csi-proxy/master/binaries/csi-proxy.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
function New-CsiProxyService { | ||
Param( | ||
[Parameter(Mandatory = $true)][string] | ||
$CsiProxyPackageUrl, | ||
[Parameter(Mandatory = $true)][string] | ||
$KubeDir | ||
) | ||
|
||
$tempdir = New-TemporaryDirectory | ||
$binaryPackage = "$tempdir\csiproxy.tar" | ||
|
||
DownloadFileOverHttp -Url $CsiProxyPackageUrl -DestinationPath $binaryPackage | ||
|
||
tar -xzf $binaryPackage -C $tempdir | ||
cp "$tempdir\build\server.exe" "$KubeDir\csi-proxy-server.exe" | ||
|
||
del $tempdir -Recurse | ||
|
||
& "$KubeDir\nssm.exe" install csi-proxy-server "$KubeDir\csi-proxy-server.exe" | RemoveNulls | ||
& "$KubeDir\nssm.exe" set csi-proxy-server AppDirectory "$KubeDir" | RemoveNulls | ||
& "$KubeDir\nssm.exe" set csi-proxy-server AppRestartDekay 5000 | RemoveNulls | ||
& "$KubeDir\nssm.exe" set csi-proxy-server Description csi-proxy-server | RemoveNulls | ||
& "$KubeDir\nssm.exe" set csi-proxy-server Start SERVICE_DEMAND_START | RemoveNulls | ||
& "$KubeDir\nssm.exe" set csi-proxy-server ObjectName LocalSystem | RemoveNulls | ||
& "$KubeDir\nssm.exe" set csi-proxy-server Type SERVICE_WIN32_OWN_PROCESS | RemoveNulls | ||
& "$KubeDir\nssm.exe" set csi-proxy-server AppThrottle 1500 | RemoveNulls | ||
& "$KubeDir\nssm.exe" set csi-proxy-server AppStdout "$KubeDir\csi-proxy-server.log" | RemoveNulls | ||
& "$KubeDir\nssm.exe" set csi-proxy-server AppStderr "$KubeDir\csi-proxy-server.err.log" | RemoveNulls | ||
& "$KubeDir\nssm.exe" set csi-proxy-server AppStdoutCreationDisposition 4 | RemoveNulls | ||
& "$KubeDir\nssm.exe" set csi-proxy-server AppStderrCreationDisposition 4 | RemoveNulls | ||
& "$KubeDir\nssm.exe" set csi-proxy-server AppRotateFiles 1 | RemoveNulls | ||
& "$KubeDir\nssm.exe" set csi-proxy-server AppRotateOnline 1 | RemoveNulls | ||
& "$KubeDir\nssm.exe" set csi-proxy-server AppRotateSeconds 86400 | RemoveNulls | ||
& "$KubeDir\nssm.exe" set csi-proxy-server AppRotateBytes 10485760 | RemoveNulls | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.