Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GCE Windows node images with March's Windows updates #89601

Merged
merged 1 commit into from Mar 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion cluster/gce/config-common.sh
Expand Up @@ -159,4 +159,4 @@ export WINDOWS_BOOTSTRAP_KUBECONFIG_FILE="${WINDOWS_K8S_DIR}\kubelet.bootstrap-k
# Path for kube-proxy kubeconfig file on Windows nodes.
export WINDOWS_KUBEPROXY_KUBECONFIG_FILE="${WINDOWS_K8S_DIR}\kubeproxy.kubeconfig"
# Pause container image for Windows container.
export WINDOWS_INFRA_CONTAINER="gcr.io/gke-release/pause-win:1.1.0"
export WINDOWS_INFRA_CONTAINER="gcr.io/gke-release/pause-win:1.2.0"
6 changes: 3 additions & 3 deletions cluster/gce/util.sh
Expand Up @@ -88,11 +88,11 @@ function set-linux-node-image() {
function set-windows-node-image() {
WINDOWS_NODE_IMAGE_PROJECT="windows-cloud"
if [[ "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win2019" ]]; then
WINDOWS_NODE_IMAGE="windows-server-2019-dc-core-for-containers-v20200114"
WINDOWS_NODE_IMAGE="windows-server-2019-dc-core-for-containers-v20200310"
elif [[ "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win1909" ]]; then
WINDOWS_NODE_IMAGE="windows-server-1909-dc-core-for-containers-v20200114"
WINDOWS_NODE_IMAGE="windows-server-1909-dc-core-for-containers-v20200310"
elif [[ "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win1809" ]]; then
WINDOWS_NODE_IMAGE="windows-server-1809-dc-core-for-containers-v20200114"
WINDOWS_NODE_IMAGE="windows-server-1809-dc-core-for-containers-v20200310"
else
echo "Unknown WINDOWS_NODE_OS_DISTRIBUTION ${WINDOWS_NODE_OS_DISTRIBUTION}" >&2
exit 1
Expand Down
15 changes: 14 additions & 1 deletion cluster/gce/windows/k8s-node-setup.psm1
Expand Up @@ -135,11 +135,24 @@ function Add_GceMetadataServerRoute {
}
}

# Returns a PowerShell object representing the Windows version.
function Get_WindowsVersion {
# Unlike checking `[System.Environment]::OSVersion.Version`, this long-winded
# approach gets the OS revision/patch number correctly
# (https://superuser.com/a/1160428/652018).
$win_ver = New-Object -TypeName PSObject
$win_ver | Add-Member -MemberType NoteProperty -Name Major -Value $(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion' CurrentMajorVersionNumber).CurrentMajorVersionNumber
$win_ver | Add-Member -MemberType NoteProperty -Name Minor -Value $(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion' CurrentMinorVersionNumber).CurrentMinorVersionNumber
$win_ver | Add-Member -MemberType NoteProperty -Name Build -Value $(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion' CurrentBuild).CurrentBuild
$win_ver | Add-Member -MemberType NoteProperty -Name Revision -Value $(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion' UBR).UBR
return $win_ver
}

# Writes debugging information, such as Windows version and patch info, to the
# console.
function Dump-DebugInfoToConsole {
Try {
$version = "$([System.Environment]::OSVersion.Version | Out-String)"
$version = Get_WindowsVersion | Out-String
$hotfixes = "$(Get-Hotfix | Out-String)"
$image = "$(Get-InstanceMetadata 'image' | Out-String)"
Log-Output "Windows version:`n$version"
Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/windows/smoke-test.sh
Expand Up @@ -358,7 +358,7 @@ spec:
spec:
containers:
- name: pause-win
image: gcr.io/gke-release/pause-win:1.1.0
image: gcr.io/gke-release/pause-win:1.2.0
nodeSelector:
kubernetes.io/os: windows
tolerations:
Expand Down