From f3690e2d5e87904f6d8bd668083de14e65910fd7 Mon Sep 17 00:00:00 2001 From: Muhammed Uluyol Date: Wed, 20 Apr 2016 17:07:06 -0400 Subject: [PATCH] build/pause: write in C Builds statically against glibc. References to the old pause image have been updated. --- build/pause/.gitignore | 3 + build/pause/Dockerfile | 3 +- build/pause/Makefile | 95 ++++++++++++++++------ build/pause/{pause.go => pause.c} | 35 ++++---- cmd/integration/integration.go | 2 +- cmd/kubelet/app/options/options.go | 8 +- docs/admin/kubelet.md | 4 +- hack/test-cmd.sh | 6 +- hack/testdata/pod-with-precision.json | 2 +- test/e2e/cluster_size_autoscaling.go | 4 +- test/e2e/daemon_restart.go | 2 +- test/e2e/density.go | 4 +- test/e2e/etcd_failure.go | 2 +- test/e2e/kubelet.go | 2 +- test/e2e/kubelet_perf.go | 2 +- test/e2e/limit_range.go | 2 +- test/e2e/mesos.go | 2 +- test/e2e/namespace.go | 2 +- test/e2e/nodeoutofdisk.go | 2 +- test/e2e/pods.go | 4 +- test/e2e/resource_quota.go | 2 +- test/e2e/scheduler_predicates.go | 24 +++--- test/e2e/service.go | 2 +- test/e2e/service_latency.go | 2 +- test/e2e/ubernetes_lite.go | 2 +- test/e2e_node/mirror_pod_test.go | 2 +- test/integration/benchmark-controller.json | 2 +- test/integration/client_test.go | 6 +- test/integration/extender_test.go | 2 +- test/integration/scheduler_test.go | 6 +- 30 files changed, 141 insertions(+), 95 deletions(-) create mode 100644 build/pause/.gitignore rename build/pause/{pause.go => pause.c} (53%) diff --git a/build/pause/.gitignore b/build/pause/.gitignore new file mode 100644 index 0000000000..b7735d5603 --- /dev/null +++ b/build/pause/.gitignore @@ -0,0 +1,3 @@ +/.container-* +/.push-* +/bin diff --git a/build/pause/Dockerfile b/build/pause/Dockerfile index 30858ee78c..b565b631f7 100644 --- a/build/pause/Dockerfile +++ b/build/pause/Dockerfile @@ -13,5 +13,6 @@ # limitations under the License. FROM scratch -ADD pause / +ARG ARCH +ADD bin/pause-${ARCH} /pause ENTRYPOINT ["/pause"] diff --git a/build/pause/Makefile b/build/pause/Makefile index 77798fe200..e4ca218e29 100644 --- a/build/pause/Makefile +++ b/build/pause/Makefile @@ -12,42 +12,85 @@ # See the License for the specific language governing permissions and # limitations under the License. -.PHONY: build push +.PHONY: all push push-legacy container clean -TAG=2.0 -REGISTRY?="gcr.io/google_containers" +REGISTRY ?= gcr.io/google_containers +IMAGE = $(REGISTRY)/pause-$(ARCH) +LEGACY_AMD64_IMAGE = $(REGISTRY)/pause + +TAG = 3.0 # Architectures supported: amd64, arm, arm64 and ppc64le -ARCH?=amd64 -GOLANG_VERSION=1.6 -TEMP_DIR:=$(shell mktemp -d) +ARCH ?= amd64 -all: push-legacy-too +ALL_ARCH = amd64 arm arm64 ppc64le -build: - cp pause.go Dockerfile $(TEMP_DIR) +CFLAGS = -Os -Wall -static +KUBE_CROSS_IMAGE ?= gcr.io/google_containers/kube-cross +KUBE_CROSS_VERSION ?= $(shell cat ../build-image/cross/VERSION) - docker run -it -v $(TEMP_DIR):/build golang:$(GOLANG_VERSION) /bin/bash -c \ - "cd /build && CGO_ENABLED=0 GOARM=6 GOARCH=$(ARCH) go build -a -installsuffix cgo -ldflags '-w' ./pause.go" - -ifeq ($(ARCH),$(filter $(ARCH),amd64 arm)) -# Run goupx for amd64 and arm. The condition above is equal to 'if [[ $ARCH == "amd64" || $ARCH == "arm" ]]' in bash - docker run -it -v $(TEMP_DIR):/build golang:$(GOLANG_VERSION) /bin/bash -c \ - "cd /build && apt-get update && apt-get install -y upx \ - && go get github.com/pwaller/goupx && goupx pause" -endif - - # And build the image - docker build -t $(REGISTRY)/pause-$(ARCH):$(TAG) $(TEMP_DIR) +BIN = pause +SRCS = pause.c ifeq ($(ARCH),amd64) - docker tag -f $(REGISTRY)/pause-$(ARCH):$(TAG) $(REGISTRY)/pause:$(TAG) + TRIPLE ?= x86_64-linux-gnu endif -push: build - gcloud docker --server=gcr.io push $(REGISTRY)/pause-$(ARCH):$(TAG) +ifeq ($(ARCH),arm) + TRIPLE ?= arm-linux-gnueabi +endif -push-legacy-too: push +ifeq ($(ARCH),arm64) + TRIPLE ?= aarch64-linux-gnu +endif + +ifeq ($(ARCH),ppc64le) + TRIPLE ?= powerpc64le-linux-gnu +endif + +# If you want to build AND push all containers, see the 'all-push' rule. +all: all-container + +sub-container-%: + $(MAKE) ARCH=$* container + +sub-push-%: + $(MAKE) ARCH=$* push + +all-container: $(addprefix sub-container-,$(ALL_ARCH)) + +all-push: $(addprefix sub-push-,$(ALL_ARCH)) + +build: bin/$(BIN)-$(ARCH) + +bin/$(BIN)-$(ARCH): $(SRCS) + mkdir -p bin + docker run -u $$(id -u):$$(id -g) -v $$(pwd):/build \ + $(KUBE_CROSS_IMAGE):$(KUBE_CROSS_VERSION) \ + /bin/bash -c "\ + cd /build && \ + $(TRIPLE)-gcc $(CFLAGS) -o $@ $^ && \ + $(TRIPLE)-strip $@" + +container: .container-$(ARCH) +.container-$(ARCH): bin/$(BIN)-$(ARCH) + docker build -t $(IMAGE):$(TAG) --build-arg ARCH=$(ARCH) . ifeq ($(ARCH),amd64) - gcloud docker push $(REGISTRY)/pause:$(TAG) + docker tag -f $(IMAGE):$(TAG) $(LEGACY_AMD64_IMAGE):$(TAG) endif + touch $@ + +push: .push-$(ARCH) +.push-$(ARCH): .container-$(ARCH) + gcloud docker push $(IMAGE):$(TAG) + touch $@ + +push-legacy: .push-legacy-$(ARCH) +.push-legacy-$(ARCH): .container-$(ARCH) +ifeq ($(ARCH),amd64) + gcloud docker push $(LEGACY_AMD64_IMAGE):$(TAG) +endif + touch $@ + +clean: + rm -rf .container-* .push-* bin/ diff --git a/build/pause/pause.go b/build/pause/pause.c similarity index 53% rename from build/pause/pause.go rename to build/pause/pause.c index a17ab7c100..375a38a26e 100644 --- a/build/pause/pause.go +++ b/build/pause/pause.c @@ -1,7 +1,5 @@ -// +build linux - /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,18 +14,23 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +#include +#include +#include +#include -import ( - "os" - "os/signal" - "syscall" -) - -func main() { - c := make(chan os.Signal, 1) - signal.Notify(c, os.Interrupt, os.Kill, syscall.SIGTERM) - - // Block until a signal is received. - <-c +static void sigdown(int signo) { + psignal(signo, "shutting down, got signal"); + exit(0); +} + +int main() { + if (signal(SIGINT, sigdown) == SIG_ERR) + return 1; + if (signal(SIGTERM, sigdown) == SIG_ERR) + return 2; + signal(SIGKILL, sigdown); + for (;;) pause(); + fprintf(stderr, "error: infinite loop terminated\n"); + return 42; } diff --git a/cmd/integration/integration.go b/cmd/integration/integration.go index da331d1af5..d536b0a1a5 100644 --- a/cmd/integration/integration.go +++ b/cmd/integration/integration.go @@ -844,7 +844,7 @@ func runSchedulerNoPhantomPodsTest(client *client.Client) { Containers: []api.Container{ { Name: "c1", - Image: "kubernetes/pause", + Image: "gcr.io/google_containers/pause-amd64:3.0", Ports: []api.ContainerPort{ {ContainerPort: 1234, HostPort: 9999}, }, diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go index 102b280287..dc57e325d2 100644 --- a/cmd/kubelet/app/options/options.go +++ b/cmd/kubelet/app/options/options.go @@ -40,16 +40,12 @@ const ( experimentalFlannelOverlay = false defaultPodInfraContainerImageName = "gcr.io/google_containers/pause" - defaultPodInfraContainerImageVersion = "2.0" + defaultPodInfraContainerImageVersion = "3.0" ) // Returns the arch-specific pause image that kubelet should use as the default func GetDefaultPodInfraContainerImage() string { - if runtime.GOARCH == "amd64" { - return defaultPodInfraContainerImageName + ":" + defaultPodInfraContainerImageVersion - } else { - return defaultPodInfraContainerImageName + "-" + runtime.GOARCH + ":" + defaultPodInfraContainerImageVersion - } + return defaultPodInfraContainerImageName + "-" + runtime.GOARCH + ":" + defaultPodInfraContainerImageVersion } // KubeletServer encapsulates all of the parameters necessary for starting up diff --git a/docs/admin/kubelet.md b/docs/admin/kubelet.md index a4f8c31dc9..990933d152 100644 --- a/docs/admin/kubelet.md +++ b/docs/admin/kubelet.md @@ -130,7 +130,7 @@ kubelet --oom-score-adj=-999: The oom-score-adj value for kubelet process. Values must be within the range [-1000, 1000] --outofdisk-transition-frequency=5m0s: Duration for which the kubelet has to wait before transitioning out of out-of-disk node condition status. Default: 5m0s --pod-cidr="": The CIDR to use for pod IP addresses, only used in standalone mode. In cluster mode, this is obtained from the master. - --pod-infra-container-image="gcr.io/google_containers/pause:2.0": The image whose network/ipc namespaces containers in each pod will use. + --pod-infra-container-image="gcr.io/google_containers/pause-amd64:3.0": The image whose network/ipc namespaces containers in each pod will use. --port=10250: The port for the Kubelet to serve on. --read-only-port=10255: The read-only port for the Kubelet to serve on with no authentication/authorization (set to 0 to disable) --really-crash-for-testing[=false]: If true, when panics occur crash. Intended for testing. @@ -156,7 +156,7 @@ kubelet --volume-stats-agg-period=1m0s: Specifies interval for kubelet to calculate and cache the volume disk usage for all pods and volumes. To disable volume calculations, set to 0. Default: '1m' ``` -###### Auto generated by spf13/cobra on 21-Apr-2016 +###### Auto generated by spf13/cobra on 3-May-2016 diff --git a/hack/test-cmd.sh b/hack/test-cmd.sh index db79fd24dd..5a60b2cc5c 100755 --- a/hack/test-cmd.sh +++ b/hack/test-cmd.sh @@ -597,9 +597,9 @@ runTests() { kube::test::get_object_assert pods "{{range.items}}{{$image_field}}:{{end}}" 'changed-with-yaml:' ## Patch pod from JSON can change image # Command - kubectl patch "${kube_flags[@]}" -f docs/admin/limitrange/valid-pod.yaml -p='{"spec":{"containers":[{"name": "kubernetes-serve-hostname", "image": "kubernetes/pause"}]}}' - # Post-condition: valid-pod POD has image kubernetes/pause - kube::test::get_object_assert pods "{{range.items}}{{$image_field}}:{{end}}" 'kubernetes/pause:' + kubectl patch "${kube_flags[@]}" -f docs/admin/limitrange/valid-pod.yaml -p='{"spec":{"containers":[{"name": "kubernetes-serve-hostname", "image": "gcr.io/google_containers/pause-amd64:3.0"}]}}' + # Post-condition: valid-pod POD has image gcr.io/google_containers/pause-amd64:3.0 + kube::test::get_object_assert pods "{{range.items}}{{$image_field}}:{{end}}" 'gcr.io/google_containers/pause-amd64:3.0:' ## If resourceVersion is specified in the patch, it will be treated as a precondition, i.e., if the resourceVersion is different from that is stored in the server, the Patch should be rejected ERROR_FILE="${KUBE_TEMP}/conflict-error" diff --git a/hack/testdata/pod-with-precision.json b/hack/testdata/pod-with-precision.json index c7b9f377a3..5aac946cd2 100644 --- a/hack/testdata/pod-with-precision.json +++ b/hack/testdata/pod-with-precision.json @@ -9,7 +9,7 @@ "containers": [ { "name": "kubernetes-pause", - "image": "kubernetes/pause" + "image": "gcr.io/google_containers/pause-amd64:3.0" } ], "restartPolicy": "Never", diff --git a/test/e2e/cluster_size_autoscaling.go b/test/e2e/cluster_size_autoscaling.go index 052e0a72cd..fd351dc76f 100644 --- a/test/e2e/cluster_size_autoscaling.go +++ b/test/e2e/cluster_size_autoscaling.go @@ -150,7 +150,7 @@ func ReserveCpu(f *framework.Framework, id string, millicores int) { Name: id, Namespace: f.Namespace.Name, Timeout: 10 * time.Minute, - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", Replicas: millicores / 100, CpuRequest: 100, } @@ -164,7 +164,7 @@ func ReserveMemory(f *framework.Framework, id string, megabytes int) { Name: id, Namespace: f.Namespace.Name, Timeout: 10 * time.Minute, - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", Replicas: megabytes / 500, MemRequest: 500 * 1024 * 1024, } diff --git a/test/e2e/daemon_restart.go b/test/e2e/daemon_restart.go index e7c137e604..bbfc8a12e6 100644 --- a/test/e2e/daemon_restart.go +++ b/test/e2e/daemon_restart.go @@ -209,7 +209,7 @@ var _ = framework.KubeDescribe("DaemonRestart [Disruptive]", func() { Client: f.Client, Name: rcName, Namespace: ns, - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", Replicas: numPods, CreatedPods: &[]*api.Pod{}, } diff --git a/test/e2e/density.go b/test/e2e/density.go index 291d0e42f8..f60345d993 100644 --- a/test/e2e/density.go +++ b/test/e2e/density.go @@ -232,7 +232,7 @@ var _ = framework.KubeDescribe("Density", func() { for i := 0; i < numberOrRCs; i++ { RCName = "density" + strconv.Itoa(totalPods) + "-" + strconv.Itoa(i) + "-" + uuid RCConfigs[i] = framework.RCConfig{Client: c, - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", Name: RCName, Namespace: ns, Labels: map[string]string{"type": "densityPod"}, @@ -460,7 +460,7 @@ var _ = framework.KubeDescribe("Density", func() { } for i := 1; i <= nodeCount; i++ { name := additionalPodsPrefix + "-" + strconv.Itoa(i) - go createRunningPodFromRC(&wg, c, name, ns, "gcr.io/google_containers/pause:2.0", additionalPodsPrefix, cpuRequest, memRequest) + go createRunningPodFromRC(&wg, c, name, ns, "gcr.io/google_containers/pause-amd64:3.0", additionalPodsPrefix, cpuRequest, memRequest) time.Sleep(200 * time.Millisecond) } wg.Wait() diff --git a/test/e2e/etcd_failure.go b/test/e2e/etcd_failure.go index d585ee00c3..8071c035d9 100644 --- a/test/e2e/etcd_failure.go +++ b/test/e2e/etcd_failure.go @@ -44,7 +44,7 @@ var _ = framework.KubeDescribe("Etcd failure [Disruptive]", func() { Client: f.Client, Name: "baz", Namespace: f.Namespace.Name, - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", Replicas: 1, })).NotTo(HaveOccurred()) }) diff --git a/test/e2e/kubelet.go b/test/e2e/kubelet.go index d9da606ba2..b9949298e2 100644 --- a/test/e2e/kubelet.go +++ b/test/e2e/kubelet.go @@ -128,7 +128,7 @@ var _ = framework.KubeDescribe("kubelet", func() { Client: f.Client, Name: rcName, Namespace: f.Namespace.Name, - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", Replicas: totalPods, })).NotTo(HaveOccurred()) // Perform a sanity check so that we know all desired pods are diff --git a/test/e2e/kubelet_perf.go b/test/e2e/kubelet_perf.go index afc87df2ee..a1b627468a 100644 --- a/test/e2e/kubelet_perf.go +++ b/test/e2e/kubelet_perf.go @@ -69,7 +69,7 @@ func runResourceTrackingTest(f *framework.Framework, podsPerNode int, nodeNames Client: f.Client, Name: rcName, Namespace: f.Namespace.Name, - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", Replicas: totalPods, })).NotTo(HaveOccurred()) diff --git a/test/e2e/limit_range.go b/test/e2e/limit_range.go index 79d4734e14..c59feeed67 100644 --- a/test/e2e/limit_range.go +++ b/test/e2e/limit_range.go @@ -176,7 +176,7 @@ func newTestPod(name string, requests api.ResourceList, limits api.ResourceList) Containers: []api.Container{ { Name: "nginx", - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", Resources: api.ResourceRequirements{ Requests: requests, Limits: limits, diff --git a/test/e2e/mesos.go b/test/e2e/mesos.go index 242f893f76..e20cd8fc94 100644 --- a/test/e2e/mesos.go +++ b/test/e2e/mesos.go @@ -94,7 +94,7 @@ var _ = framework.KubeDescribe("Mesos", func() { Containers: []api.Container{ { Name: podName, - Image: "beta.gcr.io/google_containers/pause:2.0", + Image: "beta.gcr.io/google_containers/pause-amd64:3.0", }, }, }, diff --git a/test/e2e/namespace.go b/test/e2e/namespace.go index bdb4c2225a..297f4a1977 100644 --- a/test/e2e/namespace.go +++ b/test/e2e/namespace.go @@ -97,7 +97,7 @@ func ensurePodsAreRemovedWhenNamespaceIsDeleted(f *framework.Framework) { Containers: []api.Container{ { Name: "nginx", - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", }, }, }, diff --git a/test/e2e/nodeoutofdisk.go b/test/e2e/nodeoutofdisk.go index acbc480c58..6df5162696 100644 --- a/test/e2e/nodeoutofdisk.go +++ b/test/e2e/nodeoutofdisk.go @@ -179,7 +179,7 @@ func createOutOfDiskPod(c *client.Client, ns, name string, milliCPU int64) { Containers: []api.Container{ { Name: "pause", - Image: "beta.gcr.io/google_containers/pause:2.0", + Image: "beta.gcr.io/google_containers/pause-amd64:3.0", Resources: api.ResourceRequirements{ Requests: api.ResourceList{ // Request enough CPU to fit only two pods on a given node. diff --git a/test/e2e/pods.go b/test/e2e/pods.go index 6ba649fcb9..47f5868b80 100644 --- a/test/e2e/pods.go +++ b/test/e2e/pods.go @@ -219,7 +219,7 @@ var _ = framework.KubeDescribe("Pods", func() { Containers: []api.Container{ { Name: "test", - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", }, }, }, @@ -244,7 +244,7 @@ var _ = framework.KubeDescribe("Pods", func() { Containers: []api.Container{ { Name: "nginx", - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", Resources: api.ResourceRequirements{ Limits: api.ResourceList{ api.ResourceCPU: *resource.NewMilliQuantity(100, resource.DecimalSI), diff --git a/test/e2e/resource_quota.go b/test/e2e/resource_quota.go index fdb55139d7..9844dc1846 100644 --- a/test/e2e/resource_quota.go +++ b/test/e2e/resource_quota.go @@ -706,7 +706,7 @@ func newTestPodForQuota(name string, requests api.ResourceList, limits api.Resou Containers: []api.Container{ { Name: "nginx", - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", Resources: api.ResourceRequirements{ Requests: requests, Limits: limits, diff --git a/test/e2e/scheduler_predicates.go b/test/e2e/scheduler_predicates.go index 95c2d21ccc..ecd9577b41 100644 --- a/test/e2e/scheduler_predicates.go +++ b/test/e2e/scheduler_predicates.go @@ -231,7 +231,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() { Containers: []api.Container{ { Name: "", - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", }, }, }, @@ -250,7 +250,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() { Containers: []api.Container{ { Name: podName, - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", }, }, }, @@ -308,7 +308,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() { Containers: []api.Container{ { Name: "", - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", Resources: api.ResourceRequirements{ Limits: api.ResourceList{ "cpu": *resource.NewMilliQuantity(milliCpuPerPod, "DecimalSI"), @@ -335,7 +335,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() { Containers: []api.Container{ { Name: podName, - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", Resources: api.ResourceRequirements{ Limits: api.ResourceList{ "cpu": *resource.NewMilliQuantity(milliCpuPerPod, "DecimalSI"), @@ -375,7 +375,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() { Containers: []api.Container{ { Name: podName, - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", }, }, NodeSelector: map[string]string{ @@ -418,7 +418,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() { Containers: []api.Container{ { Name: podName, - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", }, }, }, @@ -454,7 +454,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() { Containers: []api.Container{ { Name: podName, - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", }, }, }, @@ -492,7 +492,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() { Containers: []api.Container{ { Name: labelPodName, - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", }, }, NodeSelector: map[string]string{ @@ -556,7 +556,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() { Containers: []api.Container{ { Name: podName, - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", }, }, }, @@ -591,7 +591,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() { Containers: []api.Container{ { Name: podName, - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", }, }, }, @@ -647,7 +647,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() { Containers: []api.Container{ { Name: labelPodName, - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", }, }, }, @@ -685,7 +685,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() { Containers: []api.Container{ { Name: podName, - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", }, }, }, diff --git a/test/e2e/service.go b/test/e2e/service.go index b7f9ac2c8b..7314d818d1 100644 --- a/test/e2e/service.go +++ b/test/e2e/service.go @@ -1078,7 +1078,7 @@ func createPodOrFail(c *client.Client, ns, name string, labels map[string]string Containers: []api.Container{ { Name: "test", - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", Ports: containerPorts, // Add a dummy environment variable to work around a docker issue. // https://github.com/docker/docker/issues/14203 diff --git a/test/e2e/service_latency.go b/test/e2e/service_latency.go index fd24e44942..a88dfa2750 100644 --- a/test/e2e/service_latency.go +++ b/test/e2e/service_latency.go @@ -118,7 +118,7 @@ var _ = framework.KubeDescribe("Service endpoints latency", func() { func runServiceLatencies(f *framework.Framework, inParallel, total int) (output []time.Duration, err error) { cfg := framework.RCConfig{ Client: f.Client, - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", Name: "svc-latency-rc", Namespace: f.Namespace.Name, Replicas: 1, diff --git a/test/e2e/ubernetes_lite.go b/test/e2e/ubernetes_lite.go index 29dfae604d..52aaa9fe1b 100644 --- a/test/e2e/ubernetes_lite.go +++ b/test/e2e/ubernetes_lite.go @@ -88,7 +88,7 @@ func SpreadServiceOrFail(f *framework.Framework, replicaCount int, image string) Containers: []api.Container{ { Name: "test", - Image: "gcr.io/google_containers/pause:2.0", + Image: "gcr.io/google_containers/pause-amd64:3.0", }, }, }, diff --git a/test/e2e_node/mirror_pod_test.go b/test/e2e_node/mirror_pod_test.go index 7dfdcc55a3..6a0b8a7de0 100644 --- a/test/e2e_node/mirror_pod_test.go +++ b/test/e2e_node/mirror_pod_test.go @@ -62,7 +62,7 @@ var _ = Describe("MirrorPod", func() { uid := pod.UID By("update the static pod container image") - image := "gcr.io/google_containers/pause:2.0" + image := "gcr.io/google_containers/pause-amd64:3.0" err = createStaticPod(e2es.kubeletStaticPodDir, staticPodName, ns, image, api.RestartPolicyAlways) Expect(err).ShouldNot(HaveOccurred()) diff --git a/test/integration/benchmark-controller.json b/test/integration/benchmark-controller.json index cd80958297..00444f8900 100644 --- a/test/integration/benchmark-controller.json +++ b/test/integration/benchmark-controller.json @@ -17,7 +17,7 @@ "spec": { "containers": [{ "name": "test-container", - "image": "kubernetes/pause" + "image": "gcr.io/google_containers/pause-amd64:3.0" }] } } diff --git a/test/integration/client_test.go b/test/integration/client_test.go index ff902dda74..d459ccb343 100644 --- a/test/integration/client_test.go +++ b/test/integration/client_test.go @@ -235,7 +235,7 @@ func TestMultiWatch(t *testing.T) { Spec: api.PodSpec{ Containers: []api.Container{{ Name: "nothing", - Image: "kubernetes/pause", + Image: "gcr.io/google_containers/pause-amd64:3.0", }}, }, }) @@ -341,7 +341,7 @@ func TestMultiWatch(t *testing.T) { Spec: api.PodSpec{ Containers: []api.Container{{ Name: "nothing", - Image: "kubernetes/pause", + Image: "gcr.io/google_containers/pause-amd64:3.0", }}, }, }) @@ -372,7 +372,7 @@ func TestMultiWatch(t *testing.T) { if err != nil { panic(fmt.Sprintf("Couldn't get %v: %v", name, err)) } - pod.Spec.Containers[0].Image = "kubernetes/pause:1" + pod.Spec.Containers[0].Image = "gcr.io/google_containers/pause-amd64:3.0" sentTimes <- timePair{time.Now(), name} if _, err := client.Pods(ns).Update(pod); err != nil { panic(fmt.Sprintf("Couldn't make %v: %v", name, err)) diff --git a/test/integration/extender_test.go b/test/integration/extender_test.go index 28b153a30f..d4b4da8202 100644 --- a/test/integration/extender_test.go +++ b/test/integration/extender_test.go @@ -283,7 +283,7 @@ func DoTestPodScheduling(t *testing.T, restClient *client.Client) { pod := &api.Pod{ ObjectMeta: api.ObjectMeta{Name: "extender-test-pod"}, Spec: api.PodSpec{ - Containers: []api.Container{{Name: "container", Image: "kubernetes/pause:go"}}, + Containers: []api.Container{{Name: "container", Image: "gcr.io/google_containers/pause-amd64:3.0"}}, }, } diff --git a/test/integration/scheduler_test.go b/test/integration/scheduler_test.go index b8a74a7dc3..cf4b889a2b 100644 --- a/test/integration/scheduler_test.go +++ b/test/integration/scheduler_test.go @@ -232,7 +232,7 @@ func DoTestUnschedulableNodes(t *testing.T, restClient *client.Client, nodeStore pod := &api.Pod{ ObjectMeta: api.ObjectMeta{Name: "node-scheduling-test-pod"}, Spec: api.PodSpec{ - Containers: []api.Container{{Name: "container", Image: "kubernetes/pause:go"}}, + Containers: []api.Container{{Name: "container", Image: "gcr.io/google_containers/pause-amd64:3.0"}}, }, } myPod, err := restClient.Pods(api.NamespaceDefault).Create(pod) @@ -460,7 +460,7 @@ func createPod(name string, annotation map[string]string) *api.Pod { return &api.Pod{ ObjectMeta: api.ObjectMeta{Name: name, Annotations: annotation}, Spec: api.PodSpec{ - Containers: []api.Container{{Name: "container", Image: "kubernetes/pause:go"}}, + Containers: []api.Container{{Name: "container", Image: "gcr.io/google_containers/pause-amd64:3.0"}}, }, } } @@ -521,7 +521,7 @@ func TestAllocatable(t *testing.T) { Containers: []api.Container{ { Name: "container", - Image: "kubernetes/pause:go", + Image: "gcr.io/google_containers/pause-amd64:3.0", Resources: api.ResourceRequirements{ Requests: api.ResourceList{ api.ResourceCPU: *resource.NewMilliQuantity(20, resource.DecimalSI),