Skip to content

Commit 81252a6

Browse files
committed
added env var WINDOWS_CNI_STORAGE_PATH and WINDOWS_CNI_VERSION
1 parent 9f6f608 commit 81252a6

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

build/dependencies.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ dependencies:
5656
match: CNI_VERSION =
5757
- path: cluster/gce/gci/configure.sh
5858
match: DEFAULT_CNI_VERSION=
59-
- path: cluster/gce/windows/k8s-node-setup.psm1
60-
match: CNI_RELEASE_VERSION =
59+
- path: cluster/gce/config-common.sh
60+
match: WINDOWS_CNI_VERSION=
6161
- path: test/e2e_node/remote/utils.go
6262
match: cniVersion[\t\n\f\r ]*=
6363

cluster/gce/config-common.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ export WINDOWS_LOGS_DIR="${WINDOWS_K8S_DIR}\logs"
140140
export WINDOWS_CNI_DIR="${WINDOWS_K8S_DIR}\cni"
141141
# Directory where CNI config files will be stored on Windows nodes.
142142
export WINDOWS_CNI_CONFIG_DIR="${WINDOWS_K8S_DIR}\cni\config"
143+
# CNI storage path for Windows nodes
144+
export WINDOWS_CNI_STORAGE_PATH="https://storage.googleapis.com/k8s-artifacts-cni/release"
145+
# CNI version for Windows nodes
146+
export WINDOWS_CNI_VERSION="v0.8.5"
143147
# Pod manifests directory for Windows nodes on Windows nodes.
144148
export WINDOWS_MANIFESTS_DIR="${WINDOWS_K8S_DIR}\manifests"
145149
# Directory where cert/key files will be stores on Windows nodes.

cluster/gce/util.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,6 +1538,8 @@ NODE_DIR: $(yaml-quote ${WINDOWS_NODE_DIR})
15381538
LOGS_DIR: $(yaml-quote ${WINDOWS_LOGS_DIR})
15391539
CNI_DIR: $(yaml-quote ${WINDOWS_CNI_DIR})
15401540
CNI_CONFIG_DIR: $(yaml-quote ${WINDOWS_CNI_CONFIG_DIR})
1541+
WINDOWS_CNI_STORAGE_PATH: $(yaml-quote ${WINDOWS_CNI_STORAGE_PATH})
1542+
WINDOWS_CNI_VERSION: $(yaml-quote ${WINDOWS_CNI_VERSION})
15411543
MANIFESTS_DIR: $(yaml-quote ${WINDOWS_MANIFESTS_DIR})
15421544
PKI_DIR: $(yaml-quote ${WINDOWS_PKI_DIR})
15431545
CA_FILE_PATH: $(yaml-quote ${WINDOWS_CA_FILE})

cluster/gce/windows/k8s-node-setup.psm1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@ function Set-EnvironmentVars {
236236
"NODE_DIR" = ${kube_env}['NODE_DIR']
237237
"CNI_DIR" = ${kube_env}['CNI_DIR']
238238
"CNI_CONFIG_DIR" = ${kube_env}['CNI_CONFIG_DIR']
239+
"WINDOWS_CNI_STORAGE_PATH" = ${kube_env}['WINDOWS_CNI_STORAGE_PATH']
240+
"WINDOWS_CNI_VERSION" = ${kube_env}['WINDOWS_CNI_VERSION']
239241
"PKI_DIR" = ${kube_env}['PKI_DIR']
240242
"CA_FILE_PATH" = ${kube_env}['CA_FILE_PATH']
241243
"KUBELET_CONFIG" = ${kube_env}['KUBELET_CONFIG_FILE']
@@ -300,7 +302,7 @@ function Download-HelperScripts {
300302
return
301303
}
302304
MustDownload-File -OutFile ${env:K8S_DIR}\hns.psm1 `
303-
-URLs "https://www.googleapis.com/storage/v1/b/gke-release/o/winnode%2fconfig%2fsdn%2fmaster%2fhns.psm1?alt=media"
305+
-URLs "https://storage.googleapis.com/gke-release/winnode/config/sdn/master/hns.psm1"
304306
}
305307

306308
# Takes the Windows version string from the cluster bash scripts (e.g.
@@ -916,7 +918,7 @@ function Configure-HostNetworkingService {
916918
function Configure-GcePdTools {
917919
if (ShouldWrite-File ${env:K8S_DIR}\GetGcePdName.dll) {
918920
MustDownload-File -OutFile ${env:K8S_DIR}\GetGcePdName.dll `
919-
-URLs "https://www.googleapis.com/storage/v1/b/gke-release/o/winnode%2fconfig%2fgce-tools%2fmaster%2fGetGcePdName%2fGetGcePdName.dll?alt=media"
921+
-URLs "https://storage.googleapis.com/gke-release/winnode/config/gce-tools/master/GetGcePdName/GetGcePdName.dll"
920922
}
921923
if (-not (Test-Path $PsHome\profile.ps1)) {
922924
New-Item -path $PsHome\profile.ps1 -type file
@@ -953,16 +955,14 @@ function Configure-CniNetworking {
953955
# CLUSTER_IP_RANGE
954956
# SERVICE_CLUSTER_IP_RANGE
955957
function Configure_Dockerd_CniNetworking {
956-
$CNI_RELEASE_VERSION = 'v0.8.5'
957958
if ((ShouldWrite-File ${env:CNI_DIR}\win-bridge.exe) -or
958959
(ShouldWrite-File ${env:CNI_DIR}\host-local.exe)) {
959960
$tmp_dir = 'C:\cni_tmp'
960961
New-Item $tmp_dir -ItemType 'directory' -Force | Out-Null
961962

962-
$release_url = ('https://storage.googleapis.com/k8s-artifacts-cni/release%2f' +
963-
$CNI_RELEASE_VERSION + '%2f')
963+
$release_url = (${env:WINDOWS_CNI_STORAGE_PATH} + '/' + ${env:WINDOWS_CNI_VERSION} + '/')
964964
$tgz_url = ($release_url +
965-
"cni-plugins-windows-amd64-$CNI_RELEASE_VERSION.tgz")
965+
"cni-plugins-windows-amd64-${env:WINDOWS_CNI_VERSION}.tgz")
966966
$sha_url = ($tgz_url + ".sha1")
967967
MustDownload-File -URLs $sha_url -OutFile $tmp_dir\cni-plugins.sha1
968968
$sha1_val = ($(Get-Content $tmp_dir\cni-plugins.sha1) -split ' ',2)[0]
@@ -1582,8 +1582,8 @@ function Install-LoggingAgent {
15821582
return
15831583
}
15841584

1585-
$url = ("https://www.googleapis.com/storage/v1/b/gke-release/o/winnode%2fstackdriver%2f" +
1586-
"StackdriverLogging-${STACKDRIVER_VERSION}.exe?alt=media")
1585+
$url = ("https://storage.googleapis.com/gke-release/winnode/stackdriver/" +
1586+
"StackdriverLogging-${STACKDRIVER_VERSION}.exe")
15871587
$tmp_dir = 'C:\stackdriver_tmp'
15881588
New-Item $tmp_dir -ItemType 'directory' -Force | Out-Null
15891589
$installer_file = "${tmp_dir}\StackdriverLogging-${STACKDRIVER_VERSION}.exe"

0 commit comments

Comments
 (0)