Merge pull request #23009 from uluyol/c-pause

Automatic merge from submit-queue

Reimplement 'pause' in C - smaller footprint all around

Statically links against musl. Size of amd64 binary is 3560 bytes.

I couldn't test the arm binary since I have no hardware to test it on, though I assume we want it to work on a raspberry pi.

This PR also adds the gcc5/musl cross compiling image used to build the binaries.

@thockin
pull/6/head
k8s-merge-robot 2016-05-08 09:29:32 -07:00
commit 8a04506546
30 changed files with 141 additions and 95 deletions

3
build/pause/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
/.container-*
/.push-*
/bin

View File

@ -13,5 +13,6 @@
# limitations under the License. # limitations under the License.
FROM scratch FROM scratch
ADD pause / ARG ARCH
ADD bin/pause-${ARCH} /pause
ENTRYPOINT ["/pause"] ENTRYPOINT ["/pause"]

View File

@ -12,42 +12,85 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # 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 # Architectures supported: amd64, arm, arm64 and ppc64le
ARCH?=amd64 ARCH ?= amd64
GOLANG_VERSION=1.6
TEMP_DIR:=$(shell mktemp -d)
all: push-legacy-too ALL_ARCH = amd64 arm arm64 ppc64le
build: CFLAGS = -Os -Wall -static
cp pause.go Dockerfile $(TEMP_DIR) 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 \ BIN = pause
"cd /build && CGO_ENABLED=0 GOARM=6 GOARCH=$(ARCH) go build -a -installsuffix cgo -ldflags '-w' ./pause.go" SRCS = pause.c
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)
ifeq ($(ARCH),amd64) ifeq ($(ARCH),amd64)
docker tag -f $(REGISTRY)/pause-$(ARCH):$(TAG) $(REGISTRY)/pause:$(TAG) TRIPLE ?= x86_64-linux-gnu
endif endif
push: build ifeq ($(ARCH),arm)
gcloud docker --server=gcr.io push $(REGISTRY)/pause-$(ARCH):$(TAG) 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) ifeq ($(ARCH),amd64)
gcloud docker push $(REGISTRY)/pause:$(TAG) docker tag -f $(IMAGE):$(TAG) $(LEGACY_AMD64_IMAGE):$(TAG)
endif 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/

View File

@ -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"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with 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. limitations under the License.
*/ */
package main #include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
import ( static void sigdown(int signo) {
"os" psignal(signo, "shutting down, got signal");
"os/signal" exit(0);
"syscall" }
)
int main() {
func main() { if (signal(SIGINT, sigdown) == SIG_ERR)
c := make(chan os.Signal, 1) return 1;
signal.Notify(c, os.Interrupt, os.Kill, syscall.SIGTERM) if (signal(SIGTERM, sigdown) == SIG_ERR)
return 2;
// Block until a signal is received. signal(SIGKILL, sigdown);
<-c for (;;) pause();
fprintf(stderr, "error: infinite loop terminated\n");
return 42;
} }

View File

@ -684,7 +684,7 @@ func runSchedulerNoPhantomPodsTest(client *client.Client) {
Containers: []api.Container{ Containers: []api.Container{
{ {
Name: "c1", Name: "c1",
Image: "kubernetes/pause", Image: "gcr.io/google_containers/pause-amd64:3.0",
Ports: []api.ContainerPort{ Ports: []api.ContainerPort{
{ContainerPort: 1234, HostPort: 9999}, {ContainerPort: 1234, HostPort: 9999},
}, },

View File

@ -40,16 +40,12 @@ const (
experimentalFlannelOverlay = false experimentalFlannelOverlay = false
defaultPodInfraContainerImageName = "gcr.io/google_containers/pause" 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 // Returns the arch-specific pause image that kubelet should use as the default
func GetDefaultPodInfraContainerImage() string { func GetDefaultPodInfraContainerImage() string {
if runtime.GOARCH == "amd64" { return defaultPodInfraContainerImageName + "-" + runtime.GOARCH + ":" + defaultPodInfraContainerImageVersion
return defaultPodInfraContainerImageName + ":" + defaultPodInfraContainerImageVersion
} else {
return defaultPodInfraContainerImageName + "-" + runtime.GOARCH + ":" + defaultPodInfraContainerImageVersion
}
} }
// KubeletServer encapsulates all of the parameters necessary for starting up // KubeletServer encapsulates all of the parameters necessary for starting up

View File

@ -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] --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 --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-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. --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) --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. --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' --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
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->

View File

@ -623,9 +623,9 @@ runTests() {
kube::test::get_object_assert pods "{{range.items}}{{$image_field}}:{{end}}" 'changed-with-yaml:' kube::test::get_object_assert pods "{{range.items}}{{$image_field}}:{{end}}" 'changed-with-yaml:'
## Patch pod from JSON can change image ## Patch pod from JSON can change image
# Command # Command
kubectl patch "${kube_flags[@]}" -f docs/admin/limitrange/valid-pod.yaml -p='{"spec":{"containers":[{"name": "kubernetes-serve-hostname", "image": "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 kubernetes/pause # 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}}" 'kubernetes/pause:' 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 ## 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" ERROR_FILE="${KUBE_TEMP}/conflict-error"

View File

@ -9,7 +9,7 @@
"containers": [ "containers": [
{ {
"name": "kubernetes-pause", "name": "kubernetes-pause",
"image": "kubernetes/pause" "image": "gcr.io/google_containers/pause-amd64:3.0"
} }
], ],
"restartPolicy": "Never", "restartPolicy": "Never",

View File

@ -150,7 +150,7 @@ func ReserveCpu(f *framework.Framework, id string, millicores int) {
Name: id, Name: id,
Namespace: f.Namespace.Name, Namespace: f.Namespace.Name,
Timeout: 10 * time.Minute, Timeout: 10 * time.Minute,
Image: "gcr.io/google_containers/pause:2.0", Image: "gcr.io/google_containers/pause-amd64:3.0",
Replicas: millicores / 100, Replicas: millicores / 100,
CpuRequest: 100, CpuRequest: 100,
} }
@ -164,7 +164,7 @@ func ReserveMemory(f *framework.Framework, id string, megabytes int) {
Name: id, Name: id,
Namespace: f.Namespace.Name, Namespace: f.Namespace.Name,
Timeout: 10 * time.Minute, Timeout: 10 * time.Minute,
Image: "gcr.io/google_containers/pause:2.0", Image: "gcr.io/google_containers/pause-amd64:3.0",
Replicas: megabytes / 500, Replicas: megabytes / 500,
MemRequest: 500 * 1024 * 1024, MemRequest: 500 * 1024 * 1024,
} }

View File

@ -209,7 +209,7 @@ var _ = framework.KubeDescribe("DaemonRestart [Disruptive]", func() {
Client: f.Client, Client: f.Client,
Name: rcName, Name: rcName,
Namespace: ns, Namespace: ns,
Image: "gcr.io/google_containers/pause:2.0", Image: "gcr.io/google_containers/pause-amd64:3.0",
Replicas: numPods, Replicas: numPods,
CreatedPods: &[]*api.Pod{}, CreatedPods: &[]*api.Pod{},
} }

View File

@ -232,7 +232,7 @@ var _ = framework.KubeDescribe("Density", func() {
for i := 0; i < numberOrRCs; i++ { for i := 0; i < numberOrRCs; i++ {
RCName = "density" + strconv.Itoa(totalPods) + "-" + strconv.Itoa(i) + "-" + uuid RCName = "density" + strconv.Itoa(totalPods) + "-" + strconv.Itoa(i) + "-" + uuid
RCConfigs[i] = framework.RCConfig{Client: c, 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, Name: RCName,
Namespace: ns, Namespace: ns,
Labels: map[string]string{"type": "densityPod"}, Labels: map[string]string{"type": "densityPod"},
@ -460,7 +460,7 @@ var _ = framework.KubeDescribe("Density", func() {
} }
for i := 1; i <= nodeCount; i++ { for i := 1; i <= nodeCount; i++ {
name := additionalPodsPrefix + "-" + strconv.Itoa(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) time.Sleep(200 * time.Millisecond)
} }
wg.Wait() wg.Wait()

View File

@ -44,7 +44,7 @@ var _ = framework.KubeDescribe("Etcd failure [Disruptive]", func() {
Client: f.Client, Client: f.Client,
Name: "baz", Name: "baz",
Namespace: f.Namespace.Name, Namespace: f.Namespace.Name,
Image: "gcr.io/google_containers/pause:2.0", Image: "gcr.io/google_containers/pause-amd64:3.0",
Replicas: 1, Replicas: 1,
})).NotTo(HaveOccurred()) })).NotTo(HaveOccurred())
}) })

View File

@ -128,7 +128,7 @@ var _ = framework.KubeDescribe("kubelet", func() {
Client: f.Client, Client: f.Client,
Name: rcName, Name: rcName,
Namespace: f.Namespace.Name, Namespace: f.Namespace.Name,
Image: "gcr.io/google_containers/pause:2.0", Image: "gcr.io/google_containers/pause-amd64:3.0",
Replicas: totalPods, Replicas: totalPods,
})).NotTo(HaveOccurred()) })).NotTo(HaveOccurred())
// Perform a sanity check so that we know all desired pods are // Perform a sanity check so that we know all desired pods are

View File

@ -69,7 +69,7 @@ func runResourceTrackingTest(f *framework.Framework, podsPerNode int, nodeNames
Client: f.Client, Client: f.Client,
Name: rcName, Name: rcName,
Namespace: f.Namespace.Name, Namespace: f.Namespace.Name,
Image: "gcr.io/google_containers/pause:2.0", Image: "gcr.io/google_containers/pause-amd64:3.0",
Replicas: totalPods, Replicas: totalPods,
})).NotTo(HaveOccurred()) })).NotTo(HaveOccurred())

View File

@ -176,7 +176,7 @@ func newTestPod(name string, requests api.ResourceList, limits api.ResourceList)
Containers: []api.Container{ Containers: []api.Container{
{ {
Name: "nginx", Name: "nginx",
Image: "gcr.io/google_containers/pause:2.0", Image: "gcr.io/google_containers/pause-amd64:3.0",
Resources: api.ResourceRequirements{ Resources: api.ResourceRequirements{
Requests: requests, Requests: requests,
Limits: limits, Limits: limits,

View File

@ -94,7 +94,7 @@ var _ = framework.KubeDescribe("Mesos", func() {
Containers: []api.Container{ Containers: []api.Container{
{ {
Name: podName, Name: podName,
Image: "beta.gcr.io/google_containers/pause:2.0", Image: "beta.gcr.io/google_containers/pause-amd64:3.0",
}, },
}, },
}, },

View File

@ -97,7 +97,7 @@ func ensurePodsAreRemovedWhenNamespaceIsDeleted(f *framework.Framework) {
Containers: []api.Container{ Containers: []api.Container{
{ {
Name: "nginx", Name: "nginx",
Image: "gcr.io/google_containers/pause:2.0", Image: "gcr.io/google_containers/pause-amd64:3.0",
}, },
}, },
}, },

View File

@ -179,7 +179,7 @@ func createOutOfDiskPod(c *client.Client, ns, name string, milliCPU int64) {
Containers: []api.Container{ Containers: []api.Container{
{ {
Name: "pause", Name: "pause",
Image: "beta.gcr.io/google_containers/pause:2.0", Image: "beta.gcr.io/google_containers/pause-amd64:3.0",
Resources: api.ResourceRequirements{ Resources: api.ResourceRequirements{
Requests: api.ResourceList{ Requests: api.ResourceList{
// Request enough CPU to fit only two pods on a given node. // Request enough CPU to fit only two pods on a given node.

View File

@ -219,7 +219,7 @@ var _ = framework.KubeDescribe("Pods", func() {
Containers: []api.Container{ Containers: []api.Container{
{ {
Name: "test", 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{ Containers: []api.Container{
{ {
Name: "nginx", Name: "nginx",
Image: "gcr.io/google_containers/pause:2.0", Image: "gcr.io/google_containers/pause-amd64:3.0",
Resources: api.ResourceRequirements{ Resources: api.ResourceRequirements{
Limits: api.ResourceList{ Limits: api.ResourceList{
api.ResourceCPU: *resource.NewMilliQuantity(100, resource.DecimalSI), api.ResourceCPU: *resource.NewMilliQuantity(100, resource.DecimalSI),

View File

@ -706,7 +706,7 @@ func newTestPodForQuota(name string, requests api.ResourceList, limits api.Resou
Containers: []api.Container{ Containers: []api.Container{
{ {
Name: "nginx", Name: "nginx",
Image: "gcr.io/google_containers/pause:2.0", Image: "gcr.io/google_containers/pause-amd64:3.0",
Resources: api.ResourceRequirements{ Resources: api.ResourceRequirements{
Requests: requests, Requests: requests,
Limits: limits, Limits: limits,

View File

@ -231,7 +231,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() {
Containers: []api.Container{ Containers: []api.Container{
{ {
Name: "", 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{ Containers: []api.Container{
{ {
Name: podName, 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{ Containers: []api.Container{
{ {
Name: "", Name: "",
Image: "gcr.io/google_containers/pause:2.0", Image: "gcr.io/google_containers/pause-amd64:3.0",
Resources: api.ResourceRequirements{ Resources: api.ResourceRequirements{
Limits: api.ResourceList{ Limits: api.ResourceList{
"cpu": *resource.NewMilliQuantity(milliCpuPerPod, "DecimalSI"), "cpu": *resource.NewMilliQuantity(milliCpuPerPod, "DecimalSI"),
@ -335,7 +335,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() {
Containers: []api.Container{ Containers: []api.Container{
{ {
Name: podName, Name: podName,
Image: "gcr.io/google_containers/pause:2.0", Image: "gcr.io/google_containers/pause-amd64:3.0",
Resources: api.ResourceRequirements{ Resources: api.ResourceRequirements{
Limits: api.ResourceList{ Limits: api.ResourceList{
"cpu": *resource.NewMilliQuantity(milliCpuPerPod, "DecimalSI"), "cpu": *resource.NewMilliQuantity(milliCpuPerPod, "DecimalSI"),
@ -375,7 +375,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() {
Containers: []api.Container{ Containers: []api.Container{
{ {
Name: podName, Name: podName,
Image: "gcr.io/google_containers/pause:2.0", Image: "gcr.io/google_containers/pause-amd64:3.0",
}, },
}, },
NodeSelector: map[string]string{ NodeSelector: map[string]string{
@ -418,7 +418,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() {
Containers: []api.Container{ Containers: []api.Container{
{ {
Name: podName, 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{ Containers: []api.Container{
{ {
Name: podName, 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{ Containers: []api.Container{
{ {
Name: labelPodName, Name: labelPodName,
Image: "gcr.io/google_containers/pause:2.0", Image: "gcr.io/google_containers/pause-amd64:3.0",
}, },
}, },
NodeSelector: map[string]string{ NodeSelector: map[string]string{
@ -556,7 +556,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() {
Containers: []api.Container{ Containers: []api.Container{
{ {
Name: podName, 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{ Containers: []api.Container{
{ {
Name: podName, 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{ Containers: []api.Container{
{ {
Name: labelPodName, 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{ Containers: []api.Container{
{ {
Name: podName, Name: podName,
Image: "gcr.io/google_containers/pause:2.0", Image: "gcr.io/google_containers/pause-amd64:3.0",
}, },
}, },
}, },

View File

@ -1078,7 +1078,7 @@ func createPodOrFail(c *client.Client, ns, name string, labels map[string]string
Containers: []api.Container{ Containers: []api.Container{
{ {
Name: "test", Name: "test",
Image: "gcr.io/google_containers/pause:2.0", Image: "gcr.io/google_containers/pause-amd64:3.0",
Ports: containerPorts, Ports: containerPorts,
// Add a dummy environment variable to work around a docker issue. // Add a dummy environment variable to work around a docker issue.
// https://github.com/docker/docker/issues/14203 // https://github.com/docker/docker/issues/14203

View File

@ -118,7 +118,7 @@ var _ = framework.KubeDescribe("Service endpoints latency", func() {
func runServiceLatencies(f *framework.Framework, inParallel, total int) (output []time.Duration, err error) { func runServiceLatencies(f *framework.Framework, inParallel, total int) (output []time.Duration, err error) {
cfg := framework.RCConfig{ cfg := framework.RCConfig{
Client: f.Client, Client: f.Client,
Image: "gcr.io/google_containers/pause:2.0", Image: "gcr.io/google_containers/pause-amd64:3.0",
Name: "svc-latency-rc", Name: "svc-latency-rc",
Namespace: f.Namespace.Name, Namespace: f.Namespace.Name,
Replicas: 1, Replicas: 1,

View File

@ -88,7 +88,7 @@ func SpreadServiceOrFail(f *framework.Framework, replicaCount int, image string)
Containers: []api.Container{ Containers: []api.Container{
{ {
Name: "test", Name: "test",
Image: "gcr.io/google_containers/pause:2.0", Image: "gcr.io/google_containers/pause-amd64:3.0",
}, },
}, },
}, },

View File

@ -62,7 +62,7 @@ var _ = Describe("MirrorPod", func() {
uid := pod.UID uid := pod.UID
By("update the static pod container image") 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) err = createStaticPod(e2es.kubeletStaticPodDir, staticPodName, ns, image, api.RestartPolicyAlways)
Expect(err).ShouldNot(HaveOccurred()) Expect(err).ShouldNot(HaveOccurred())

View File

@ -17,7 +17,7 @@
"spec": { "spec": {
"containers": [{ "containers": [{
"name": "test-container", "name": "test-container",
"image": "kubernetes/pause" "image": "gcr.io/google_containers/pause-amd64:3.0"
}] }]
} }
} }

View File

@ -235,7 +235,7 @@ func TestMultiWatch(t *testing.T) {
Spec: api.PodSpec{ Spec: api.PodSpec{
Containers: []api.Container{{ Containers: []api.Container{{
Name: "nothing", 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{ Spec: api.PodSpec{
Containers: []api.Container{{ Containers: []api.Container{{
Name: "nothing", 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 { if err != nil {
panic(fmt.Sprintf("Couldn't get %v: %v", name, err)) 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} sentTimes <- timePair{time.Now(), name}
if _, err := client.Pods(ns).Update(pod); err != nil { if _, err := client.Pods(ns).Update(pod); err != nil {
panic(fmt.Sprintf("Couldn't make %v: %v", name, err)) panic(fmt.Sprintf("Couldn't make %v: %v", name, err))

View File

@ -283,7 +283,7 @@ func DoTestPodScheduling(t *testing.T, restClient *client.Client) {
pod := &api.Pod{ pod := &api.Pod{
ObjectMeta: api.ObjectMeta{Name: "extender-test-pod"}, ObjectMeta: api.ObjectMeta{Name: "extender-test-pod"},
Spec: api.PodSpec{ 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"}},
}, },
} }

View File

@ -232,7 +232,7 @@ func DoTestUnschedulableNodes(t *testing.T, restClient *client.Client, nodeStore
pod := &api.Pod{ pod := &api.Pod{
ObjectMeta: api.ObjectMeta{Name: "node-scheduling-test-pod"}, ObjectMeta: api.ObjectMeta{Name: "node-scheduling-test-pod"},
Spec: api.PodSpec{ 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) 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{ return &api.Pod{
ObjectMeta: api.ObjectMeta{Name: name, Annotations: annotation}, ObjectMeta: api.ObjectMeta{Name: name, Annotations: annotation},
Spec: api.PodSpec{ 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{ Containers: []api.Container{
{ {
Name: "container", Name: "container",
Image: "kubernetes/pause:go", Image: "gcr.io/google_containers/pause-amd64:3.0",
Resources: api.ResourceRequirements{ Resources: api.ResourceRequirements{
Requests: api.ResourceList{ Requests: api.ResourceList{
api.ResourceCPU: *resource.NewMilliQuantity(20, resource.DecimalSI), api.ResourceCPU: *resource.NewMilliQuantity(20, resource.DecimalSI),