Skip to content

Commit 3fb6e77

Browse files
authored
Merge pull request kubernetes#74549 from yujuhong/pause-image
GCE: switch to using e2eteam/pause:3.1 for pause containers
2 parents 736baa5 + b863655 commit 3fb6e77

File tree

2 files changed

+1
-37
lines changed

2 files changed

+1
-37
lines changed

cluster/gce/windows/configure.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ try {
106106
Download-HelperScripts
107107

108108
Create-DockerRegistryKey
109-
Create-PauseImage
110109
DownloadAndInstall-KubernetesBinaries
111110
Create-NodePki
112111
Create-KubeletKubeconfig

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

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
# - Document functions using proper syntax:
4646
# https://technet.microsoft.com/en-us/library/hh847834(v=wps.620).aspx
4747

48-
$INFRA_CONTAINER = "kubeletwin/pause"
48+
$INFRA_CONTAINER = "e2eteam/pause:3.1"
4949
$GCE_METADATA_SERVER = "169.254.169.254"
5050
# The "management" interface is used by the kubelet and by Windows pods to talk
5151
# to the rest of the Kubernetes cluster *without NAT*. This interface does not
@@ -287,41 +287,6 @@ function Get_ContainerVersionLabel {
287287
"version label")
288288
}
289289

290-
# Builds the pause image with name $INFRA_CONTAINER.
291-
function Create-PauseImage {
292-
$win_version = $(Get-InstanceMetadataValue 'win-version')
293-
if ($win_version -match '2019') {
294-
# TODO(pjh): update this function to properly support 2019 vs. 1809 vs.
295-
# future Windows versions. For example, Windows Server 2019 does not
296-
# support the nanoserver container
297-
# (https://blogs.technet.microsoft.com/virtualization/2018/11/13/windows-server-2019-now-available/).
298-
Log_NotImplemented "Need to update Create-PauseImage for WS2019"
299-
}
300-
301-
$version_label = Get_ContainerVersionLabel $win_version
302-
$pause_dir = "${env:K8S_DIR}\pauseimage"
303-
$dockerfile = "$pause_dir\Dockerfile"
304-
mkdir -Force $pause_dir
305-
if (ShouldWrite-File $dockerfile) {
306-
New-Item -Force -ItemType file $dockerfile | Out-Null
307-
Set-Content `
308-
$dockerfile `
309-
("FROM mcr.microsoft.com/windows/nanoserver:${version_label}`n`n" +
310-
"CMD cmd /c ping -t localhost > nul")
311-
}
312-
313-
if (($(docker images -a) -like "*${INFRA_CONTAINER}*") -and
314-
(-not $REDO_STEPS)) {
315-
Log-Output "Skip: ${INFRA_CONTAINER} already built"
316-
return
317-
}
318-
docker build -t ${INFRA_CONTAINER} $pause_dir
319-
if ($LastExitCode -ne 0) {
320-
Log-Output -Fatal `
321-
"docker build -t ${INFRA_CONTAINER} $pause_dir failed"
322-
}
323-
}
324-
325290
# Downloads the Kubernetes binaries from kube-env's NODE_BINARY_TAR_URL and
326291
# puts them in a subdirectory of $env:K8S_DIR.
327292
#

0 commit comments

Comments
 (0)