File tree Expand file tree Collapse file tree 1 file changed +31
-1
lines changed Expand file tree Collapse file tree 1 file changed +31
-1
lines changed Original file line number Diff line number Diff line change 1+ <#
2+ . SYNOPSIS
3+ Script that builds kube-proxy images
4+
5+ . DESCRIPTION
6+ This script build all kube-proxy images.
7+ It also has the possibility to build only a specific kube-proxy image. (optional)
8+
9+ . PARAMETER KubeProxyVersion (optional)
10+ Kubernetes version to specify which kube-proxy image to build
11+
12+ . EXAMPLE
13+ PS> .\build.ps1 -KubeProxyVersion v1.24.2
14+
15+ #>
16+
117param (
18+ [parameter (Mandatory = $false )]
19+ [string ] $KubeProxyVersion ,
220 [string ]$image = " sigwindowstools/kube-proxy" ,
321 [switch ]$push ,
422 [version ]$minVersion = " 1.22.0"
@@ -33,7 +51,19 @@ function Build-KubeProxy([string]$version)
3351 }
3452}
3553
36- $versions = (curl - L k8s.gcr.io/ v2/ kube- proxy/ tags/ list | ConvertFrom-Json ).tags
54+ if ($KubeProxyVersion )
55+ {
56+ if (! $KubeProxyVersion.StartsWith (" v" ))
57+ {
58+ $KubeProxyVersion = " v" + $KubeProxyVersion
59+ }
60+ $versions = @ ($KubeProxyVersion )
61+ }
62+ else
63+ {
64+ $versions = (curl - L k8s.gcr.io/ v2/ kube- proxy/ tags/ list | ConvertFrom-Json ).tags
65+ }
66+
3767foreach ($version in $versions )
3868{
3969 if ($version -match " ^v(\d+\.\d+\.\d+)$" )
You can’t perform that action at this time.
0 commit comments