sigs.k8s.io/cluster-api-provider-azure@v1.14.3/templates/test/ci/prow-ci-version/patches/kubeadm-bootstrap-windows-k8s-ci-binaries.yaml (about)

     1  - op: add
     2    path: /spec/template/spec/files/-
     3    value:
     4      content: |
     5        $ErrorActionPreference = 'Stop'
     6  
     7        Stop-Service kubelet -Force
     8  
     9        $$CI_VERSION="${CI_VERSION}"
    10        if($$CI_VERSION -ne "")
    11        {
    12          $$binaries=@("kubeadm", "kubectl", "kubelet", "kube-proxy")
    13          $$ci_url="https://storage.googleapis.com/k8s-release-dev/ci/$$CI_VERSION/bin/windows/amd64"
    14          foreach ( $$binary in $$binaries )
    15          {
    16            echo "downloading binary: $$ci_url/$$binary.exe"
    17            curl.exe --retry 10 --retry-delay 5 "$$ci_url/$$binary.exe" --output "c:/k/$$binary.exe"
    18          }
    19        }
    20  
    21        # Tag it to the ci version.  The image knows how to use the copy locally with the configmap
    22        # that is applied at at this stage (windows-kubeproxy-ci.yaml)
    23        ctr.exe -n k8s.io images pull docker.io/sigwindowstools/kube-proxy:v1.23.1-calico-hostprocess
    24        ctr.exe -n k8s.io images tag docker.io/sigwindowstools/kube-proxy:v1.23.1-calico-hostprocess "docker.io/sigwindowstools/kube-proxy:${CI_VERSION/+/_}-calico-hostprocess"
    25  
    26        kubeadm.exe version -o=short
    27        kubectl.exe version --client=true
    28        kubelet.exe --version
    29        kube-proxy.exe --version
    30      path: C:/replace-ci-binaries.ps1
    31      permissions: "0744"
    32  - op: add
    33    path: /spec/template/spec/preKubeadmCommands/-
    34    value:
    35      powershell C:/replace-ci-binaries.ps1