Commit 8a045065 authored by k8s-merge-robot's avatar k8s-merge-robot

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
parents f2f3b49f f3690e2d
/.container-*
/.push-*
/bin
...@@ -13,5 +13,6 @@ ...@@ -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"]
...@@ -12,42 +12,85 @@ ...@@ -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_ARCH = amd64 arm arm64 ppc64le
CFLAGS = -Os -Wall -static
KUBE_CROSS_IMAGE ?= gcr.io/google_containers/kube-cross
KUBE_CROSS_VERSION ?= $(shell cat ../build-image/cross/VERSION)
BIN = pause
SRCS = pause.c
all: push-legacy-too ifeq ($(ARCH),amd64)
TRIPLE ?= x86_64-linux-gnu
endif
build: ifeq ($(ARCH),arm)
cp pause.go Dockerfile $(TEMP_DIR) TRIPLE ?= arm-linux-gnueabi
endif
docker run -it -v $(TEMP_DIR):/build golang:$(GOLANG_VERSION) /bin/bash -c \ ifeq ($(ARCH),arm64)
"cd /build && CGO_ENABLED=0 GOARM=6 GOARCH=$(ARCH) go build -a -installsuffix cgo -ldflags '-w' ./pause.go" TRIPLE ?= aarch64-linux-gnu
endif
ifeq ($(ARCH),$(filter $(ARCH),amd64 arm)) ifeq ($(ARCH),ppc64le)
# Run goupx for amd64 and arm. The condition above is equal to 'if [[ $ARCH == "amd64" || $ARCH == "arm" ]]' in bash TRIPLE ?= powerpc64le-linux-gnu
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 endif
# And build the image # If you want to build AND push all containers, see the 'all-push' rule.
docker build -t $(REGISTRY)/pause-$(ARCH):$(TAG) $(TEMP_DIR) 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)
docker tag -f $(REGISTRY)/pause-$(ARCH):$(TAG) $(REGISTRY)/pause:$(TAG) docker tag -f $(IMAGE):$(TAG) $(LEGACY_AMD64_IMAGE):$(TAG)
endif endif
touch $@
push: build push: .push-$(ARCH)
gcloud docker --server=gcr.io push $(REGISTRY)/pause-$(ARCH):$(TAG) .push-$(ARCH): .container-$(ARCH)
gcloud docker push $(IMAGE):$(TAG)
touch $@
push-legacy-too: push push-legacy: .push-legacy-$(ARCH)
.push-legacy-$(ARCH): .container-$(ARCH)
ifeq ($(ARCH),amd64) ifeq ($(ARCH),amd64)
gcloud docker push $(REGISTRY)/pause:$(TAG) gcloud docker push $(LEGACY_AMD64_IMAGE):$(TAG)
endif endif
touch $@
clean:
rm -rf .container-* .push-* bin/
/*
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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
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;
}
// +build linux
/*
Copyright 2014 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main
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
}
...@@ -684,7 +684,7 @@ func runSchedulerNoPhantomPodsTest(client *client.Client) { ...@@ -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},
}, },
......
...@@ -40,16 +40,12 @@ const ( ...@@ -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
......
...@@ -130,7 +130,7 @@ kubelet ...@@ -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 ...@@ -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 -->
......
...@@ -623,9 +623,9 @@ runTests() { ...@@ -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"
......
...@@ -9,7 +9,7 @@ ...@@ -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",
......
...@@ -150,7 +150,7 @@ func ReserveCpu(f *framework.Framework, id string, millicores int) { ...@@ -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) { ...@@ -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,
} }
......
...@@ -209,7 +209,7 @@ var _ = framework.KubeDescribe("DaemonRestart [Disruptive]", func() { ...@@ -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{},
} }
......
...@@ -232,7 +232,7 @@ var _ = framework.KubeDescribe("Density", func() { ...@@ -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() { ...@@ -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()
......
...@@ -44,7 +44,7 @@ var _ = framework.KubeDescribe("Etcd failure [Disruptive]", func() { ...@@ -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())
}) })
......
...@@ -128,7 +128,7 @@ var _ = framework.KubeDescribe("kubelet", func() { ...@@ -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
......
...@@ -69,7 +69,7 @@ func runResourceTrackingTest(f *framework.Framework, podsPerNode int, nodeNames ...@@ -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())
......
...@@ -176,7 +176,7 @@ func newTestPod(name string, requests api.ResourceList, limits api.ResourceList) ...@@ -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,
......
...@@ -94,7 +94,7 @@ var _ = framework.KubeDescribe("Mesos", func() { ...@@ -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",
}, },
}, },
}, },
......
...@@ -97,7 +97,7 @@ func ensurePodsAreRemovedWhenNamespaceIsDeleted(f *framework.Framework) { ...@@ -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",
}, },
}, },
}, },
......
...@@ -179,7 +179,7 @@ func createOutOfDiskPod(c *client.Client, ns, name string, milliCPU int64) { ...@@ -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.
......
...@@ -219,7 +219,7 @@ var _ = framework.KubeDescribe("Pods", func() { ...@@ -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() { ...@@ -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),
......
...@@ -706,7 +706,7 @@ func newTestPodForQuota(name string, requests api.ResourceList, limits api.Resou ...@@ -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,
......
...@@ -231,7 +231,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() { ...@@ -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() { ...@@ -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() { ...@@ -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() { ...@@ -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() { ...@@ -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() { ...@@ -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() { ...@@ -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() { ...@@ -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() { ...@@ -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() { ...@@ -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() { ...@@ -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() { ...@@ -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",
}, },
}, },
}, },
......
...@@ -1078,7 +1078,7 @@ func createPodOrFail(c *client.Client, ns, name string, labels map[string]string ...@@ -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
......
...@@ -118,7 +118,7 @@ var _ = framework.KubeDescribe("Service endpoints latency", func() { ...@@ -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,
......
...@@ -88,7 +88,7 @@ func SpreadServiceOrFail(f *framework.Framework, replicaCount int, image string) ...@@ -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",
}, },
}, },
}, },
......
...@@ -62,7 +62,7 @@ var _ = Describe("MirrorPod", func() { ...@@ -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())
......
...@@ -17,7 +17,7 @@ ...@@ -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"
}] }]
} }
} }
......
...@@ -235,7 +235,7 @@ func TestMultiWatch(t *testing.T) { ...@@ -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) { ...@@ -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) { ...@@ -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))
......
...@@ -283,7 +283,7 @@ func DoTestPodScheduling(t *testing.T, restClient *client.Client) { ...@@ -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"}},
}, },
} }
......
...@@ -232,7 +232,7 @@ func DoTestUnschedulableNodes(t *testing.T, restClient *client.Client, nodeStore ...@@ -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 { ...@@ -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) { ...@@ -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),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment