mirror of https://github.com/k3s-io/k3s
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. @thockinpull/6/head
commit
8a04506546
|
@ -0,0 +1,3 @@
|
|||
/.container-*
|
||||
/.push-*
|
||||
/bin
|
|
@ -13,5 +13,6 @@
|
|||
# limitations under the License.
|
||||
|
||||
FROM scratch
|
||||
ADD pause /
|
||||
ARG ARCH
|
||||
ADD bin/pause-${ARCH} /pause
|
||||
ENTRYPOINT ["/pause"]
|
||||
|
|
|
@ -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)
|
||||
|
||||
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/
|
||||
|
|
|
@ -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 <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
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;
|
||||
}
|
|
@ -684,7 +684,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},
|
||||
},
|
||||
|
|
|
@ -40,17 +40,13 @@ 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
|
||||
}
|
||||
}
|
||||
|
||||
// KubeletServer encapsulates all of the parameters necessary for starting up
|
||||
// a kubelet. These can either be set via command line or directly.
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
|
|
|
@ -623,9 +623,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"
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"containers": [
|
||||
{
|
||||
"name": "kubernetes-pause",
|
||||
"image": "kubernetes/pause"
|
||||
"image": "gcr.io/google_containers/pause-amd64:3.0"
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Never",
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -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{},
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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())
|
||||
})
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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())
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -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",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -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())
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"spec": {
|
||||
"containers": [{
|
||||
"name": "test-container",
|
||||
"image": "kubernetes/pause"
|
||||
"image": "gcr.io/google_containers/pause-amd64:3.0"
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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"}},
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue