Skip to content

Commit 24d8a17

Browse files
authored
Merge pull request kubernetes#89601 from pjh/gce-march-images
Update GCE Windows node images with March's Windows updates
2 parents b712fcb + 55df85b commit 24d8a17

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

cluster/gce/config-common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,4 @@ export WINDOWS_BOOTSTRAP_KUBECONFIG_FILE="${WINDOWS_K8S_DIR}\kubelet.bootstrap-k
159159
# Path for kube-proxy kubeconfig file on Windows nodes.
160160
export WINDOWS_KUBEPROXY_KUBECONFIG_FILE="${WINDOWS_K8S_DIR}\kubeproxy.kubeconfig"
161161
# Pause container image for Windows container.
162-
export WINDOWS_INFRA_CONTAINER="gcr.io/gke-release/pause-win:1.1.0"
162+
export WINDOWS_INFRA_CONTAINER="gcr.io/gke-release/pause-win:1.2.0"

cluster/gce/util.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ function set-linux-node-image() {
8888
function set-windows-node-image() {
8989
WINDOWS_NODE_IMAGE_PROJECT="windows-cloud"
9090
if [[ "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win2019" ]]; then
91-
WINDOWS_NODE_IMAGE="windows-server-2019-dc-core-for-containers-v20200114"
91+
WINDOWS_NODE_IMAGE="windows-server-2019-dc-core-for-containers-v20200310"
9292
elif [[ "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win1909" ]]; then
93-
WINDOWS_NODE_IMAGE="windows-server-1909-dc-core-for-containers-v20200114"
93+
WINDOWS_NODE_IMAGE="windows-server-1909-dc-core-for-containers-v20200310"
9494
elif [[ "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win1809" ]]; then
95-
WINDOWS_NODE_IMAGE="windows-server-1809-dc-core-for-containers-v20200114"
95+
WINDOWS_NODE_IMAGE="windows-server-1809-dc-core-for-containers-v20200310"
9696
else
9797
echo "Unknown WINDOWS_NODE_OS_DISTRIBUTION ${WINDOWS_NODE_OS_DISTRIBUTION}" >&2
9898
exit 1

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,24 @@ function Add_GceMetadataServerRoute {
135135
}
136136
}
137137

138+
# Returns a PowerShell object representing the Windows version.
139+
function Get_WindowsVersion {
140+
# Unlike checking `[System.Environment]::OSVersion.Version`, this long-winded
141+
# approach gets the OS revision/patch number correctly
142+
# (https://superuser.com/a/1160428/652018).
143+
$win_ver = New-Object -TypeName PSObject
144+
$win_ver | Add-Member -MemberType NoteProperty -Name Major -Value $(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion' CurrentMajorVersionNumber).CurrentMajorVersionNumber
145+
$win_ver | Add-Member -MemberType NoteProperty -Name Minor -Value $(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion' CurrentMinorVersionNumber).CurrentMinorVersionNumber
146+
$win_ver | Add-Member -MemberType NoteProperty -Name Build -Value $(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion' CurrentBuild).CurrentBuild
147+
$win_ver | Add-Member -MemberType NoteProperty -Name Revision -Value $(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion' UBR).UBR
148+
return $win_ver
149+
}
150+
138151
# Writes debugging information, such as Windows version and patch info, to the
139152
# console.
140153
function Dump-DebugInfoToConsole {
141154
Try {
142-
$version = "$([System.Environment]::OSVersion.Version | Out-String)"
155+
$version = Get_WindowsVersion | Out-String
143156
$hotfixes = "$(Get-Hotfix | Out-String)"
144157
$image = "$(Get-InstanceMetadata 'image' | Out-String)"
145158
Log-Output "Windows version:`n$version"

cluster/gce/windows/smoke-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ spec:
358358
spec:
359359
containers:
360360
- name: pause-win
361-
image: gcr.io/gke-release/pause-win:1.1.0
361+
image: gcr.io/gke-release/pause-win:1.2.0
362362
nodeSelector:
363363
kubernetes.io/os: windows
364364
tolerations:

0 commit comments

Comments
 (0)