Merge pull request #66741 from dims/switch-to-multi-arch-images-with-manifests-2

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Switch to multi arch test/images with manifests

**What this PR does / why we need it**:

Recently we updated the test container images to use multi-arch fat manifests and pushed the new images to the `gcr.io/kubernetes-e2e-test-images` repository. In this changeset, we are switching to using the new images and cleaning up some of the unused image definitions from manifest.go. We are removing the folders corresponding to the unused images as well.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #66626

**Special notes for your reviewer**:
/cc @mkumatag 
/cc @luxas 

**Release note**:

```release-note
NONE
```
pull/8/head
Kubernetes Submit Queue 2018-08-01 08:28:24 -07:00 committed by GitHub
commit fda2b024d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 34 additions and 467 deletions

View File

@ -65,7 +65,7 @@ var CommonImageWhiteList = sets.NewString(
imageutils.GetE2EImage(imageutils.Hostexec),
imageutils.GetE2EImage(imageutils.VolumeNFSServer),
imageutils.GetE2EImage(imageutils.VolumeGlusterServer),
imageutils.GetE2EImage(imageutils.E2ENet),
imageutils.GetE2EImage(imageutils.Net),
)
func svcByName(name string, port int) *v1.Service {

View File

@ -286,7 +286,7 @@ func generateDNSServerPod(aRecords map[string]string) *v1.Pod {
Containers: []v1.Container{
{
Name: "dns",
Image: imageutils.GetE2EImage(imageutils.DNSMasq),
Image: imageutils.GetE2EImage(imageutils.Dnsutils),
Command: []string{
"/usr/sbin/dnsmasq",
"-u", "root",
@ -338,7 +338,7 @@ func (t *dnsTestCommon) createDNSServerWithPtrRecord() {
Containers: []v1.Container{
{
Name: "dns",
Image: imageutils.GetE2EImage(imageutils.DNSMasq),
Image: imageutils.GetE2EImage(imageutils.Dnsutils),
Command: []string{
"/usr/sbin/dnsmasq",
"-u", "root",

View File

@ -11,14 +11,11 @@ filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//test/images/clusterapi-tester:all-srcs",
"//test/images/entrypoint-tester:all-srcs",
"//test/images/fakegitserver:all-srcs",
"//test/images/goproxy:all-srcs",
"//test/images/liveness:all-srcs",
"//test/images/logs-generator:all-srcs",
"//test/images/mounttest:all-srcs",
"//test/images/n-way-http:all-srcs",
"//test/images/net:all-srcs",
"//test/images/netexec:all-srcs",
"//test/images/nettest:all-srcs",

View File

@ -1,5 +0,0 @@
amd64=busybox
arm=arm32v6/busybox
arm64=arm64v8/busybox
ppc64le=ppc64le/busybox
s390x=s390x/busybox

View File

@ -1,36 +0,0 @@
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
)
go_binary(
name = "clusterapi-tester",
embed = [":go_default_library"],
)
go_library(
name = "go_default_library",
srcs = ["clusterapi-tester.go"],
importpath = "k8s.io/kubernetes/test/images/clusterapi-tester",
deps = [
"//pkg/client/clientset_generated/internalclientset:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/client-go/rest:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)

View File

@ -1,17 +0,0 @@
# Copyright 2016 The Kubernetes Authors.
#
# 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.
FROM BASEIMAGE
ADD clusterapi-tester /clusterapi-tester
ENTRYPOINT ["/clusterapi-tester"]

View File

@ -1,25 +0,0 @@
# Copyright 2016 The Kubernetes Authors.
#
# 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.
SRCS = clusterapi-tester
ARCH ?= amd64
TARGET ?= $(CURDIR)
GOLANG_VERSION ?= latest
SRC_DIR = $(notdir $(shell pwd))
export
bin:
../image-util.sh bin $(SRCS)
.PHONY: bin

View File

@ -1 +0,0 @@
1.0

View File

@ -1,64 +0,0 @@
/*
Copyright 2014 The Kubernetes Authors.
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.
*/
// A simple pod that first lists all nodes/services through the Kubernetes
// api, then serves a 200 on /healthz.
package main
import (
"log"
"fmt"
"net/http"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
restclient "k8s.io/client-go/rest"
clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
)
func main() {
cc, err := restclient.InClusterConfig()
if err != nil {
log.Fatalf("Failed to create client: %v", err)
}
kubeClient, err := clientset.NewForConfig(cc)
if err != nil {
log.Fatalf("Failed to create client: %v", err)
}
listAll := metav1.ListOptions{}
nodes, err := kubeClient.Core().Nodes().List(listAll)
if err != nil {
log.Fatalf("Failed to list nodes: %v", err)
}
log.Printf("Nodes:")
for _, node := range nodes.Items {
log.Printf("\t%v", node.Name)
}
services, err := kubeClient.Core().Services(metav1.NamespaceDefault).List(listAll)
if err != nil {
log.Fatalf("Failed to list services: %v", err)
}
log.Printf("Services:")
for _, svc := range services.Items {
log.Printf("\t%v", svc.Name)
}
log.Printf("Success")
http.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Ok")
})
log.Fatal(http.ListenAndServe(":8080", nil))
}

View File

@ -1,19 +0,0 @@
apiVersion: v1
kind: Pod
metadata:
name: clusterapi-tester
spec:
containers:
- image: gcr.io/kubernetes-e2e-test-images/clusterapi-tester-amd64:1.0
name: clusterapi-tester
readinessProbe:
httpGet:
path: /healthz
port: 8080
scheme: HTTP
initialDelaySeconds: 10
timeoutSeconds: 5
failureThreshold: 3
periodSeconds: 10
successThreshold: 1
restartPolicy: OnFailure

View File

@ -1 +0,0 @@
goproxy

View File

@ -1,32 +0,0 @@
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
)
go_binary(
name = "goproxy",
embed = [":go_default_library"],
)
go_library(
name = "go_default_library",
srcs = ["goproxy.go"],
importpath = "k8s.io/kubernetes/test/images/goproxy",
deps = ["//vendor/github.com/elazarl/goproxy:go_default_library"],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)

View File

@ -1,18 +0,0 @@
# Copyright 2016 The Kubernetes Authors.
#
# 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.
FROM scratch
ADD goproxy goproxy
EXPOSE 8080
ENTRYPOINT ["/goproxy"]

View File

@ -1,25 +0,0 @@
# Copyright 2016 The Kubernetes Authors.
#
# 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.
SRCS=goproxy
ARCH ?= amd64
TARGET ?= $(CURDIR)
GOLANG_VERSION ?= latest
SRC_DIR = $(notdir $(shell pwd))
export
bin:
../image-util.sh bin $(SRCS)
.PHONY: bin

View File

@ -1 +0,0 @@
1.0

View File

@ -1,30 +0,0 @@
/*
Copyright 2015 The Kubernetes Authors.
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 (
"log"
"net/http"
"github.com/elazarl/goproxy"
)
func main() {
proxy := goproxy.NewProxyHttpServer()
proxy.Verbose = true
log.Fatal(http.ListenAndServe(":8080", proxy))
}

View File

@ -1,16 +0,0 @@
apiVersion: v1
kind: Pod
metadata:
name: goproxy
labels:
app: goproxy
spec:
containers:
- name: goproxy
image: gcr.io/kubernetes-e2e-test-images/goproxy-amd64:1.0
ports:
- containerPort: 8080
readinessProbe:
tcpSocket:
port: 8080

View File

@ -1,5 +0,0 @@
amd64=busybox
arm=arm32v6/busybox
arm64=arm64v8/busybox
ppc64le=ppc64le/busybox
s390x=s390x/busybox

View File

@ -1,31 +0,0 @@
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
)
go_binary(
name = "n-way-http",
embed = [":go_default_library"],
)
go_library(
name = "go_default_library",
srcs = ["server.go"],
importpath = "k8s.io/kubernetes/test/images/n-way-http",
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)

View File

@ -1,17 +0,0 @@
# Copyright 2016 The Kubernetes Authors.
#
# 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.
FROM BASEIMAGE
COPY n-way-http /
ENTRYPOINT ["/n-way-http"]

View File

@ -1,25 +0,0 @@
# Copyright 2016 The Kubernetes Authors.
#
# 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.
SRCS=n-way-http
ARCH ?= amd64
TARGET ?= $(CURDIR)
GOLANG_VERSION ?= latest
SRC_DIR = $(notdir $(shell pwd))
export
bin:
../image-util.sh bin $(SRCS)
.PHONY: bin

View File

@ -1 +0,0 @@
1.0

View File

@ -1,55 +0,0 @@
/*
Copyright 2015 The Kubernetes Authors.
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.
*/
// A webserver that runs n http handlers. Example invocation:
// - server -port 8080 -prefix foo -num 10 -start 0
// Will given you 10 /foo(i) endpoints that simply echo foo(i) when requested.
// - server -start 3 -num 1
// Will create just one endpoint, at /foo3
package main
import (
"flag"
"fmt"
"log"
"net/http"
)
var (
port = flag.Int("port", 8080, "Port number for requests.")
prefix = flag.String("prefix", "foo", "String used as path prefix")
num = flag.Int("num", 10, "Number of endpoints to create.")
start = flag.Int("start", 0, "Index to start, only makes sense with --num")
)
func main() {
flag.Parse()
// This container is used to test the GCE L7 controller which expects "/"
// to return a 200 response.
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
fmt.Fprint(w, "ok")
})
for i := *start; i < *start+*num; i++ {
path := fmt.Sprintf("%v%d", *prefix, i)
http.HandleFunc(fmt.Sprintf("/%v", path), func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
fmt.Fprint(w, path)
})
}
log.Printf("server -port %d -prefix %v -num %d -start %d", *port, *prefix, *num, *start)
http.ListenAndServe(fmt.Sprintf(":%d", *port), nil)
}

View File

@ -48,51 +48,45 @@ func (i *ImageConfig) SetVersion(version string) {
}
var (
AdmissionWebhook = ImageConfig{e2eRegistry, "k8s-sample-admission-webhook", "1.10v2", true}
APIServer = ImageConfig{e2eRegistry, "k8s-aggregator-sample-apiserver", "1.7v2", true}
AdmissionWebhook = ImageConfig{e2eRegistry, "webhook", "1.10v2", false}
APIServer = ImageConfig{e2eRegistry, "sample-apiserver", "1.0", false}
AppArmorLoader = ImageConfig{gcRegistry, "apparmor-loader", "0.1", false}
BusyBox = ImageConfig{gcRegistry, "busybox", "1.24", false}
CheckMetadataConcealment = ImageConfig{gcRegistry, "check-metadata-concealment", "v0.0.3", false}
ClusterTester = ImageConfig{e2eRegistry, "clusterapi-tester", "1.0", true}
CudaVectorAdd = ImageConfig{e2eRegistry, "cuda-vector-add", "1.0", true}
Dnsutils = ImageConfig{e2eRegistry, "dnsutils", "1.0", true}
DNSMasq = ImageConfig{gcRegistry, "k8s-dns-dnsmasq", "1.14.5", true}
CudaVectorAdd = ImageConfig{e2eRegistry, "cuda-vector-add", "1.0", false}
Dnsutils = ImageConfig{e2eRegistry, "dnsutils", "1.1", false}
EchoServer = ImageConfig{gcRegistry, "echoserver", "1.10", false}
EntrypointTester = ImageConfig{e2eRegistry, "entrypoint-tester", "1.0", true}
E2ENet = ImageConfig{gcRegistry, "e2e-net", "1.0", true}
Fakegitserver = ImageConfig{e2eRegistry, "fakegitserver", "1.0", true}
GBFrontend = ImageConfig{sampleRegistry, "gb-frontend", "v5", true}
GBRedisSlave = ImageConfig{sampleRegistry, "gb-redisslave", "v2", true}
Goproxy = ImageConfig{e2eRegistry, "goproxy", "1.0", true}
Hostexec = ImageConfig{e2eRegistry, "hostexec", "1.1", true}
IpcUtils = ImageConfig{e2eRegistry, "ipc-utils", "1.0", true}
Iperf = ImageConfig{e2eRegistry, "iperf", "1.0", true}
JessieDnsutils = ImageConfig{e2eRegistry, "jessie-dnsutils", "1.0", true}
Kitten = ImageConfig{e2eRegistry, "kitten", "1.0", true}
Liveness = ImageConfig{e2eRegistry, "liveness", "1.0", true}
LogsGenerator = ImageConfig{e2eRegistry, "logs-generator", "1.0", true}
Mounttest = ImageConfig{e2eRegistry, "mounttest", "1.0", true}
MounttestUser = ImageConfig{e2eRegistry, "mounttest-user", "1.0", true}
Nautilus = ImageConfig{e2eRegistry, "nautilus", "1.0", true}
Net = ImageConfig{e2eRegistry, "net", "1.0", true}
Netexec = ImageConfig{e2eRegistry, "netexec", "1.0", true}
Nettest = ImageConfig{e2eRegistry, "nettest", "1.0", true}
EntrypointTester = ImageConfig{e2eRegistry, "entrypoint-tester", "1.0", false}
Fakegitserver = ImageConfig{e2eRegistry, "fakegitserver", "1.0", false}
GBFrontend = ImageConfig{sampleRegistry, "gb-frontend", "v5", false}
GBRedisSlave = ImageConfig{sampleRegistry, "gb-redisslave", "v2", false}
Hostexec = ImageConfig{e2eRegistry, "hostexec", "1.1", false}
IpcUtils = ImageConfig{e2eRegistry, "ipc-utils", "1.0", false}
Iperf = ImageConfig{e2eRegistry, "iperf", "1.0", false}
JessieDnsutils = ImageConfig{e2eRegistry, "jessie-dnsutils", "1.0", false}
Kitten = ImageConfig{e2eRegistry, "kitten", "1.0", false}
Liveness = ImageConfig{e2eRegistry, "liveness", "1.0", false}
LogsGenerator = ImageConfig{e2eRegistry, "logs-generator", "1.0", false}
Mounttest = ImageConfig{e2eRegistry, "mounttest", "1.0", false}
MounttestUser = ImageConfig{e2eRegistry, "mounttest-user", "1.0", false}
Nautilus = ImageConfig{e2eRegistry, "nautilus", "1.0", false}
Net = ImageConfig{e2eRegistry, "net", "1.0", false}
Netexec = ImageConfig{e2eRegistry, "netexec", "1.0", false}
Nettest = ImageConfig{e2eRegistry, "nettest", "1.0", false}
NginxSlim = ImageConfig{gcRegistry, "nginx-slim", "0.20", true}
NginxSlimNew = ImageConfig{gcRegistry, "nginx-slim", "0.21", true}
Nonewprivs = ImageConfig{e2eRegistry, "nonewprivs", "1.0", true}
NoSnatTest = ImageConfig{e2eRegistry, "no-snat-test", "1.0", true}
NoSnatTestProxy = ImageConfig{e2eRegistry, "no-snat-test-proxy", "1.0", true}
NWayHTTP = ImageConfig{e2eRegistry, "n-way-http", "1.0", true}
Nonewprivs = ImageConfig{e2eRegistry, "nonewprivs", "1.0", false}
NoSnatTest = ImageConfig{e2eRegistry, "no-snat-test", "1.0", false}
NoSnatTestProxy = ImageConfig{e2eRegistry, "no-snat-test-proxy", "1.0", false}
// When these values are updated, also update cmd/kubelet/app/options/container_runtime.go
Pause = ImageConfig{gcRegistry, "pause", "3.1", false}
Porter = ImageConfig{e2eRegistry, "porter", "1.0", true}
PortForwardTester = ImageConfig{e2eRegistry, "port-forward-tester", "1.0", true}
Redis = ImageConfig{e2eRegistry, "redis", "1.0", true}
ResourceConsumer = ImageConfig{e2eRegistry, "resource-consumer", "1.3", true}
ResourceController = ImageConfig{e2eRegistry, "resource-consumer/controller", "1.0", true}
SDDummyExporter = ImageConfig{gcRegistry, "sd-dummy-exporter", "v0.1.0", false}
ServeHostname = ImageConfig{e2eRegistry, "serve-hostname", "1.0", true}
TestWebserver = ImageConfig{e2eRegistry, "test-webserver", "1.0", true}
Porter = ImageConfig{e2eRegistry, "porter", "1.0", false}
PortForwardTester = ImageConfig{e2eRegistry, "port-forward-tester", "1.0", false}
Redis = ImageConfig{e2eRegistry, "redis", "1.0", false}
ResourceConsumer = ImageConfig{e2eRegistry, "resource-consumer", "1.3", false}
ResourceController = ImageConfig{e2eRegistry, "resource-consumer/controller", "1.0", false}
ServeHostname = ImageConfig{e2eRegistry, "serve-hostname", "1.1", false}
TestWebserver = ImageConfig{e2eRegistry, "test-webserver", "1.0", false}
VolumeNFSServer = ImageConfig{e2eRegistry, "volume-nfs", "0.8", false}
VolumeISCSIServer = ImageConfig{e2eRegistry, "volume-iscsi", "0.2", false}
VolumeGlusterServer = ImageConfig{e2eRegistry, "volume-gluster", "0.5", false}