mirror of https://github.com/k3s-io/k3s
Merge pull request #44910 from mkumatag/ppc64le_test_images
Automatic merge from submit-queue (batch tested with PRs 48295, 48298, 47339, 44910, 48037) Make Makefiles in `test/images/` compatible with multiple architectures **What this PR does / why we need it**: This PR is for making test images multi architecture for different platforms like amd64, arm, arm64, ppc64le **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #31331 **Special notes for your reviewer**: - Actual tests need to be modified to use these images based on the architecture later. - Not covering the cross building of docker images for `s390x` platform due to problem faced while running containers with `qemu-s390x-static` - Will submit separate PR for `volume and pet` test images - This PR depends on - https://github.com/kubernetes/ingress/pull/587 **Release note**: ```NONE```pull/6/head
commit
228822a95b
|
@ -472,14 +472,14 @@ test/images/entrypoint-tester
|
|||
test/images/fakegitserver
|
||||
test/images/goproxy
|
||||
test/images/logs-generator
|
||||
test/images/mount-tester
|
||||
test/images/mounttest
|
||||
test/images/n-way-http
|
||||
test/images/net
|
||||
test/images/net/common
|
||||
test/images/port-forward-tester
|
||||
test/images/porter
|
||||
test/images/resource-consumer/consume-cpu
|
||||
test/images/serve_hostname
|
||||
test/images/serve-hostname
|
||||
test/integration/apiserver
|
||||
test/integration/client
|
||||
test/integration/configmap
|
||||
|
|
|
@ -23,17 +23,17 @@ filegroup(
|
|||
"//test/images/fakegitserver:all-srcs",
|
||||
"//test/images/goproxy:all-srcs",
|
||||
"//test/images/logs-generator:all-srcs",
|
||||
"//test/images/mount-tester: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/network-tester:all-srcs",
|
||||
"//test/images/nettest:all-srcs",
|
||||
"//test/images/no-snat-test:all-srcs",
|
||||
"//test/images/no-snat-test-proxy:all-srcs",
|
||||
"//test/images/port-forward-tester:all-srcs",
|
||||
"//test/images/porter:all-srcs",
|
||||
"//test/images/resource-consumer:all-srcs",
|
||||
"//test/images/serve_hostname:all-srcs",
|
||||
"//test/images/serve-hostname:all-srcs",
|
||||
],
|
||||
tags = ["automanaged"],
|
||||
)
|
||||
|
|
|
@ -12,17 +12,29 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
.PHONY: all push build
|
||||
REGISTRY ?= gcr.io/kubernetes-e2e-test-images
|
||||
GOARM=7
|
||||
QEMUVERSION=v2.7.0
|
||||
GOLANG_VERSION=1.8.3
|
||||
export
|
||||
|
||||
TAG ?= v0.1
|
||||
ifndef WHAT
|
||||
$(error WHAT is a required variable, ex: make all WHAT=net)
|
||||
endif
|
||||
|
||||
REGISTRY ?= gcr.io/google-containers
|
||||
IMAGE = $(REGISTRY)/cuda-vector-add
|
||||
# Build code.
|
||||
#
|
||||
# Args:
|
||||
# WHAT: Directory names to build.
|
||||
#
|
||||
# Example:
|
||||
# make all WHAT=clusterapi-tester
|
||||
all: all-container
|
||||
|
||||
build:
|
||||
docker build --pull -t $(IMAGE):$(TAG) .
|
||||
all-container:
|
||||
./image-util.sh build $(WHAT)
|
||||
|
||||
push:
|
||||
gcloud docker -- push $(IMAGE):$(TAG)
|
||||
all-push: all-container
|
||||
./image-util.sh push $(WHAT)
|
||||
|
||||
all: build
|
||||
.PHONY: all all-push all-container
|
|
@ -0,0 +1,5 @@
|
|||
amd64=busybox
|
||||
arm=arm32v6/busybox
|
||||
arm64=arm64v8/busybox
|
||||
ppc64le=ppc64le/busybox
|
||||
s390x=s390x/busybox
|
|
@ -16,7 +16,7 @@ go_binary(
|
|||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["main.go"],
|
||||
srcs = ["clusterapi-tester.go"],
|
||||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/client/clientset_generated/internalclientset:go_default_library",
|
||||
|
|
|
@ -12,6 +12,6 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM busybox
|
||||
ADD main main
|
||||
ENTRYPOINT ["/main"]
|
||||
FROM BASEIMAGE
|
||||
ADD clusterapi-tester /clusterapi-tester
|
||||
ENTRYPOINT ["/clusterapi-tester"]
|
||||
|
|
|
@ -12,20 +12,14 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
all: push
|
||||
SRCS = clusterapi-tester
|
||||
ARCH ?= amd64
|
||||
TARGET ?= $(CURDIR)
|
||||
GOLANG_VERSION ?= latest
|
||||
SRC_DIR = $(notdir $(shell pwd))
|
||||
export
|
||||
|
||||
# 0.0 shouldn't clobber any released builds
|
||||
TAG = 1.0
|
||||
PREFIX = gcr.io/google_containers/clusterapi-tester
|
||||
bin:
|
||||
../image-util.sh bin $(SRCS)
|
||||
|
||||
main: main.go
|
||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' -o main ./main.go
|
||||
|
||||
container: main
|
||||
docker build --pull -t $(PREFIX):$(TAG) .
|
||||
|
||||
push: container
|
||||
gcloud docker -- push $(PREFIX):$(TAG)
|
||||
|
||||
clean:
|
||||
rm -f main
|
||||
.PHONY: bin
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -0,0 +1,2 @@
|
|||
amd64=nvidia/cuda:8.0-devel-ubuntu16.04
|
||||
ppc64le=nvidia/cuda-ppc64le:8.0-devel-ubuntu16.04
|
|
@ -12,7 +12,9 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM nvidia/cuda:8.0-devel-ubuntu16.04
|
||||
FROM BASEIMAGE
|
||||
|
||||
CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
cuda-samples-$CUDA_PKG_VERSION && \
|
||||
|
@ -21,4 +23,4 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
WORKDIR /usr/local/cuda/samples/0_Simple/vectorAdd
|
||||
RUN make
|
||||
|
||||
CMD ./vectorAdd
|
||||
CMD ./vectorAdd
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -0,0 +1,4 @@
|
|||
amd64=alpine:3.6
|
||||
arm=arm32v6/alpine:3.6
|
||||
arm64=arm64v8/alpine:3.6
|
||||
ppc64le=ppc64le/alpine:3.6
|
|
@ -12,6 +12,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM alpine
|
||||
FROM BASEIMAGE
|
||||
|
||||
CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/
|
||||
|
||||
RUN apk add --no-cache bind-tools
|
||||
|
|
|
@ -1,27 +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.
|
||||
|
||||
# This image does not tag
|
||||
TAG ?=
|
||||
PREFIX ?= gcr.io/google_containers
|
||||
|
||||
all: push
|
||||
|
||||
image:
|
||||
docker build --pull -t $(PREFIX)/dnsutils .
|
||||
|
||||
push: image
|
||||
gcloud docker -- push $(PREFIX)/dnsutils
|
||||
|
||||
clean:
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -12,19 +12,14 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
TAG = 0.1
|
||||
PREFIX = kubernetes
|
||||
SRCS=ep
|
||||
ARCH ?= amd64
|
||||
TARGET ?= $(CURDIR)
|
||||
GOLANG_VERSION ?= latest
|
||||
SRC_DIR = $(notdir $(shell pwd))
|
||||
export
|
||||
|
||||
all: push
|
||||
bin:
|
||||
../image-util.sh bin $(SRCS)
|
||||
|
||||
ep: ep.go
|
||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./ep.go
|
||||
|
||||
image: ep
|
||||
sudo docker build --pull -t $(PREFIX)/eptest:$(TAG) .
|
||||
|
||||
push: image
|
||||
sudo docker push $(PREFIX)/eptest:$(TAG)
|
||||
|
||||
clean:
|
||||
rm -f ep
|
||||
.PHONY: bin
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -13,6 +13,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
FROM scratch
|
||||
ADD GITHASH.txt /
|
||||
ADD gitserver /
|
||||
ENTRYPOINT ["/gitserver"]
|
||||
COPY GITHASH.txt /
|
||||
COPY fakegitserver /
|
||||
ENTRYPOINT ["/fakegitserver"]
|
||||
|
||||
|
|
|
@ -12,21 +12,16 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
.PHONY: all image push clean
|
||||
SRCS = fakegitserver
|
||||
ARCH ?= amd64
|
||||
TARGET ?= $(CURDIR)
|
||||
GOLANG_VERSION ?= latest
|
||||
SRC_DIR = $(notdir $(shell pwd))
|
||||
export
|
||||
|
||||
TAG = 0.1
|
||||
PREFIX = gcr.io/google_containers
|
||||
IMAGE = fakegitserver
|
||||
ARCH = amd64
|
||||
IGNORE := $(shell git rev-parse HEAD > $(TARGET)/GITHASH.txt)
|
||||
|
||||
image:
|
||||
./prepare.sh $(ARCH)
|
||||
docker build --pull -t $(PREFIX)/$(IMAGE):$(TAG) .
|
||||
bin:
|
||||
../image-util.sh bin $(SRCS)
|
||||
|
||||
push: image
|
||||
gcloud docker -- push $(PREFIX)/$(IMAGE):$(TAG)
|
||||
|
||||
all: push
|
||||
|
||||
clean:
|
||||
rm -f gitserver GITHASH.txt
|
||||
.PHONY: bin
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -1,26 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# 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.
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
ARCH=$1
|
||||
|
||||
# Build the binary.
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} go build -a -installsuffix cgo -ldflags '-w' ./gitserver.go
|
||||
|
||||
# Write down the current commit hash.
|
||||
echo $(git rev-parse HEAD) >> GITHASH.txt
|
|
@ -12,19 +12,14 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
TAG = 0.1
|
||||
PREFIX = gcr.io/google_containers
|
||||
SRCS=goproxy
|
||||
ARCH ?= amd64
|
||||
TARGET ?= $(CURDIR)
|
||||
GOLANG_VERSION ?= latest
|
||||
SRC_DIR = $(notdir $(shell pwd))
|
||||
export
|
||||
|
||||
all: push
|
||||
bin:
|
||||
../image-util.sh bin $(SRCS)
|
||||
|
||||
goproxy: goproxy.go
|
||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./goproxy.go
|
||||
|
||||
image: goproxy
|
||||
docker build --pull -t $(PREFIX)/goproxy:$(TAG) .
|
||||
|
||||
push: image
|
||||
gcloud docker -- push $(PREFIX)/goproxy:$(TAG)
|
||||
|
||||
clean:
|
||||
rm -f goproxy
|
||||
.PHONY: bin
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -0,0 +1,4 @@
|
|||
amd64=alpine:3.6
|
||||
arm=arm32v6/alpine:3.6
|
||||
arm64=arm64v8/alpine:3.6
|
||||
ppc64le=ppc64le/alpine:3.6
|
|
@ -12,12 +12,14 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM alpine:3.2
|
||||
FROM BASEIMAGE
|
||||
|
||||
CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/
|
||||
|
||||
# install necessary packages:
|
||||
# - curl, nc: used by a lot of e2e tests
|
||||
# - iproute2: includes ss used in NodePort tests
|
||||
run apk --update add curl netcat-openbsd iproute2 && rm -rf /var/cache/apk/*
|
||||
RUN apk --update add curl netcat-openbsd iproute2 && rm -rf /var/cache/apk/*
|
||||
|
||||
# wait forever
|
||||
CMD rm -f /fifo && mkfifo /fifo && exec cat </fifo
|
||||
|
|
|
@ -1,30 +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.
|
||||
|
||||
.PHONY: all image push clean
|
||||
|
||||
TAG = 1.2
|
||||
PREFIX = gcr.io/google_containers
|
||||
|
||||
|
||||
all: push
|
||||
|
||||
image:
|
||||
docker build --pull -t $(PREFIX)/hostexec:$(TAG) .
|
||||
|
||||
push: image
|
||||
gcloud docker -- push $(PREFIX)/hostexec:$(TAG)
|
||||
|
||||
clean:
|
||||
rm -f hostexec
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -0,0 +1,118 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2017 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.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
TASK=$1
|
||||
IMAGE=$2
|
||||
|
||||
KUBE_ROOT="$(cd "$(dirname "${BASH_SOURCE}")/../.." && pwd -P)"
|
||||
|
||||
# Mapping of go ARCH to actual architectures shipped part of multiarch/qemu-user-static project
|
||||
declare -A QEMUARCHS=( ["amd64"]="x86_64" ["arm"]="arm" ["arm64"]="aarch64" ["ppc64le"]="ppc64le" ["s390x"]="s390x" )
|
||||
|
||||
# Returns list of all supported architectures from BASEIMAGE file
|
||||
listArchs() {
|
||||
cut -d "=" -f 1 ${IMAGE}/BASEIMAGE
|
||||
}
|
||||
|
||||
# Returns baseimage need to used in Dockerfile for any given architecture
|
||||
getBaseImage() {
|
||||
arch=$1
|
||||
echo $(grep "${arch}=" BASEIMAGE | cut -d= -f2)
|
||||
}
|
||||
|
||||
# This function will build test image for all the architectures
|
||||
# mentioned in BASEIMAGE file. In the absence of BASEIMAGE file,
|
||||
# it will build for all the supported arch list - amd64, arm,
|
||||
# arm64, ppc64le, s390x
|
||||
build() {
|
||||
if [[ -f ${IMAGE}/BASEIMAGE ]]; then
|
||||
archs=$(listArchs)
|
||||
else
|
||||
archs=${!QEMUARCHS[@]}
|
||||
fi
|
||||
|
||||
for arch in ${archs}; do
|
||||
echo "Building image for ${IMAGE} ARCH: ${arch}..."
|
||||
|
||||
# Create a temporary directory for every architecture and copy the image content
|
||||
# and build the image from temporary directory
|
||||
temp_dir=$(mktemp -d)
|
||||
cp -r ${IMAGE}/* ${temp_dir}
|
||||
if [[ -f ${IMAGE}/Makefile ]]; then
|
||||
# make bin will take care of all the prerequisites needed
|
||||
# for building the docker image
|
||||
make -C ${IMAGE} bin ARCH=${arch} TARGET=${temp_dir}
|
||||
fi
|
||||
pushd ${temp_dir}
|
||||
# image tag
|
||||
TAG=$(<VERSION)
|
||||
|
||||
if [[ -f BASEIMAGE ]]; then
|
||||
BASEIMAGE=$(getBaseImage ${arch})
|
||||
sed -i "s|BASEIMAGE|${BASEIMAGE}|g" Dockerfile
|
||||
fi
|
||||
|
||||
# copy the qemu-*-static binary to docker image to build the multi architecture image on x86 platform
|
||||
if [[ $(grep "CROSS_BUILD_" Dockerfile) ]]; then
|
||||
if [[ "${arch}" == "amd64" ]]; then
|
||||
sed -i "/CROSS_BUILD_/d" Dockerfile
|
||||
else
|
||||
sed -i "s|QEMUARCH|${QEMUARCHS[$arch]}|g" Dockerfile
|
||||
# Register qemu-*-static for all supported processors except the current one
|
||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||
curl -sSL https://github.com/multiarch/qemu-user-static/releases/download/${QEMUVERSION}/x86_64_qemu-${QEMUARCHS[$arch]}-static.tar.gz | tar -xz -C ${temp_dir}
|
||||
sed -i "s/CROSS_BUILD_//g" Dockerfile
|
||||
fi
|
||||
fi
|
||||
|
||||
docker build --pull -t ${REGISTRY}/${IMAGE}-${arch}:${TAG} .
|
||||
|
||||
popd
|
||||
done
|
||||
}
|
||||
|
||||
# This function will push the docker images
|
||||
push() {
|
||||
if [[ -f ${IMAGE}/BASEIMAGE ]]; then
|
||||
archs=$(listArchs)
|
||||
else
|
||||
archs=${!QEMUARCHS[@]}
|
||||
fi
|
||||
for arch in ${archs}; do
|
||||
TAG=$(<${IMAGE}/VERSION)
|
||||
gcloud docker -- push ${REGISTRY}/${IMAGE}-${arch}:${TAG}
|
||||
done
|
||||
}
|
||||
|
||||
# This function is for building the go code
|
||||
bin() {
|
||||
for SRC in $@;
|
||||
do
|
||||
docker run --rm -it -v ${TARGET}:${TARGET}:Z -v ${KUBE_ROOT}:/go/src/k8s.io/kubernetes:Z \
|
||||
golang:${GOLANG_VERSION} \
|
||||
/bin/bash -c "\
|
||||
cd /go/src/k8s.io/kubernetes/test/images/${SRC_DIR} && \
|
||||
CGO_ENABLED=0 GOARM=${GOARM} GOARCH=${ARCH} go build -a -installsuffix cgo --ldflags '-w' -o ${TARGET}/${SRC} ./$(dirname ${SRC})"
|
||||
done
|
||||
}
|
||||
|
||||
shift
|
||||
|
||||
eval ${TASK} "$@"
|
|
@ -0,0 +1,4 @@
|
|||
amd64=gcr.io/google_containers/ubuntu-slim:0.12
|
||||
arm=gcr.io/google_containers/ubuntu-slim-arm:0.12
|
||||
arm64=gcr.io/google_containers/ubuntu-slim-arm64:0.12
|
||||
ppc64le=gcr.io/google_containers/ubuntu-slim-ppc64le:0.12
|
|
@ -12,7 +12,10 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM gcr.io/google_containers/ubuntu-slim:0.6
|
||||
FROM BASEIMAGE
|
||||
|
||||
CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends iperf bash \
|
||||
&& apt-get clean -y \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
|
|
|
@ -1,31 +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.
|
||||
|
||||
TAG = e2e
|
||||
PREFIX = gcr.io/google_containers
|
||||
IMAGE = iperf
|
||||
|
||||
all: push
|
||||
|
||||
container: image
|
||||
|
||||
image:
|
||||
docker build --pull -t $(PREFIX)/${IMAGE} . # Build new image and automatically tag it as latest
|
||||
docker tag $(PREFIX)/${IMAGE} $(PREFIX)/${IMAGE}:$(TAG) # Add the version tag to the latest image
|
||||
|
||||
push: image
|
||||
gcloud docker -- push $(PREFIX)/${IMAGE} # Push image tagged as latest to repository
|
||||
gcloud docker -- push $(PREFIX)/${IMAGE}:$(TAG) # Push version tagged image to repository (since this image is already pushed it will simply create or update version tag)
|
||||
|
||||
clean:
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -0,0 +1,4 @@
|
|||
amd64=debian:jessie
|
||||
arm=arm32v7/debian:jessie
|
||||
arm64=arm64v8/debian:jessie
|
||||
ppc64le=ppc64le/debian:jessie
|
|
@ -12,7 +12,9 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM debian:jessie
|
||||
FROM BASEIMAGE
|
||||
|
||||
CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/
|
||||
|
||||
RUN apt-get -q update && \
|
||||
apt-get install -y dnsutils && \
|
||||
|
|
|
@ -1,27 +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.
|
||||
|
||||
# This image does not tag
|
||||
#TAG =
|
||||
PREFIX = gcr.io/google_containers
|
||||
|
||||
all: push
|
||||
|
||||
image:
|
||||
docker build --pull -t $(PREFIX)/jessie-dnsutils .
|
||||
|
||||
push: image
|
||||
gcloud docker -- push $(PREFIX)/jessie-dnsutils
|
||||
|
||||
clean:
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -0,0 +1,4 @@
|
|||
amd64=busybox
|
||||
arm=arm32v6/busybox
|
||||
arm64=arm64v8/busybox
|
||||
ppc64le=ppc64le/busybox
|
|
@ -12,11 +12,11 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM gcr.io/google_containers/ubuntu-slim:0.6
|
||||
FROM BASEIMAGE
|
||||
|
||||
ENV LOGS_GENERATOR_LINES_TOTAL 1
|
||||
ENV LOGS_GENERATOR_DURATION 1s
|
||||
|
||||
COPY logs-generator /
|
||||
|
||||
CMD /logs-generator --logtostderr \
|
||||
--log-lines-total=${LOGS_GENERATOR_LINES_TOTAL} \
|
||||
--run-duration=${LOGS_GENERATOR_DURATION}
|
||||
CMD ["sh", "-c", "/logs-generator --logtostderr --log-lines-total=${LOGS_GENERATOR_LINES_TOTAL} --run-duration=${LOGS_GENERATOR_DURATION}"]
|
||||
|
|
|
@ -12,21 +12,14 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
TAG = v0.1.1
|
||||
PREFIX = gcr.io/google_containers
|
||||
SRCS=logs-generator
|
||||
ARCH ?= amd64
|
||||
TARGET ?= $(CURDIR)
|
||||
GOLANG_VERSION ?= latest
|
||||
SRC_DIR = $(notdir $(shell pwd))
|
||||
export
|
||||
|
||||
all: build
|
||||
bin:
|
||||
../image-util.sh bin $(SRCS)
|
||||
|
||||
build: binary container
|
||||
|
||||
binary:
|
||||
go build -a --ldflags '-w' -o logs-generator .
|
||||
|
||||
container:
|
||||
docker build --pull -t $(PREFIX)/logs-generator:$(TAG) .
|
||||
|
||||
push:
|
||||
gcloud docker -- push $(PREFIX)/logs-generator:$(TAG)
|
||||
|
||||
clean:
|
||||
rm -f logs-generator
|
||||
.PHONY: bin
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -1,26 +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.
|
||||
|
||||
TAG = 0.5
|
||||
PREFIX = gcr.io/google_containers
|
||||
|
||||
all: push
|
||||
|
||||
image:
|
||||
sudo docker build --pull -t $(PREFIX)/mounttest-user:$(TAG) .
|
||||
|
||||
push: image
|
||||
gcloud docker -- push $(PREFIX)/mounttest-user:$(TAG)
|
||||
|
||||
clean:
|
|
@ -1,31 +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.
|
||||
|
||||
TAG = 0.8
|
||||
PREFIX = gcr.io/google_containers
|
||||
|
||||
all: push
|
||||
|
||||
mt: mt.go
|
||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./mt.go && \
|
||||
chmod a+rx mt
|
||||
|
||||
image: mt
|
||||
sudo docker build --pull -t $(PREFIX)/mounttest:$(TAG) .
|
||||
|
||||
push: image
|
||||
gcloud docker -- push $(PREFIX)/mounttest:$(TAG)
|
||||
|
||||
clean:
|
||||
rm -f mt
|
|
@ -0,0 +1,5 @@
|
|||
amd64=gcr.io/kubernetes-e2e-test-images/mounttest-amd64:1.0
|
||||
arm=gcr.io/kubernetes-e2e-test-images/mounttest-arm:1.0
|
||||
arm64=gcr.io/kubernetes-e2e-test-images/mounttest-arm64:1.0
|
||||
ppc64le=gcr.io/kubernetes-e2e-test-images/mounttest-ppc64le:1.0
|
||||
s390x=gcr.io/kubernetes-e2e-test-images/mounttest-s390x:1.0
|
|
@ -12,6 +12,5 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM scratch
|
||||
ADD mt mt
|
||||
ENTRYPOINT ["/mt"]
|
||||
FROM BASEIMAGE
|
||||
USER 1001
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -8,12 +8,6 @@ load(
|
|||
"go_library",
|
||||
)
|
||||
|
||||
go_binary(
|
||||
name = "mount-tester",
|
||||
library = ":go_default_library",
|
||||
tags = ["automanaged"],
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["mt.go"],
|
||||
|
@ -32,3 +26,9 @@ filegroup(
|
|||
srcs = [":package-srcs"],
|
||||
tags = ["automanaged"],
|
||||
)
|
||||
|
||||
go_binary(
|
||||
name = "mounttest",
|
||||
library = ":go_default_library",
|
||||
tags = ["automanaged"],
|
||||
)
|
|
@ -12,5 +12,6 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM gcr.io/google_containers/mounttest:0.8
|
||||
USER 1001
|
||||
FROM scratch
|
||||
COPY mounttest /
|
||||
ENTRYPOINT ["/mounttest"]
|
|
@ -0,0 +1,25 @@
|
|||
# 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=mounttest
|
||||
ARCH ?= amd64
|
||||
TARGET ?= $(CURDIR)
|
||||
GOLANG_VERSION ?= latest
|
||||
SRC_DIR = $(notdir $(shell pwd))
|
||||
export
|
||||
|
||||
bin:
|
||||
../image-util.sh bin $(SRCS)
|
||||
|
||||
.PHONY: bin
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -0,0 +1,5 @@
|
|||
amd64=busybox
|
||||
arm=arm32v6/busybox
|
||||
arm64=arm64v8/busybox
|
||||
ppc64le=ppc64le/busybox
|
||||
s390x=s390x/busybox
|
|
@ -12,6 +12,6 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM busybox
|
||||
ADD server server
|
||||
ENTRYPOINT ["/server"]
|
||||
FROM BASEIMAGE
|
||||
COPY n-way-http /
|
||||
ENTRYPOINT ["/n-way-http"]
|
||||
|
|
|
@ -12,20 +12,14 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
all: push
|
||||
SRCS=n-way-http
|
||||
ARCH ?= amd64
|
||||
TARGET ?= $(CURDIR)
|
||||
GOLANG_VERSION ?= latest
|
||||
SRC_DIR = $(notdir $(shell pwd))
|
||||
export
|
||||
|
||||
# 0.0 shouldn't clobber any released builds
|
||||
TAG = 0.0
|
||||
PREFIX = gcr.io/google_containers/n-way-http
|
||||
bin:
|
||||
../image-util.sh bin $(SRCS)
|
||||
|
||||
server: server.go
|
||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' -o server ./server.go
|
||||
|
||||
container: server
|
||||
docker build --pull -t $(PREFIX):$(TAG) .
|
||||
|
||||
push: container
|
||||
gcloud docker -- push $(PREFIX):$(TAG)
|
||||
|
||||
clean:
|
||||
rm -f server
|
||||
.PHONY: bin
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -0,0 +1,4 @@
|
|||
amd64=alpine:3.6
|
||||
arm=arm32v6/alpine:3.6
|
||||
arm64=arm64v8/alpine:3.6
|
||||
ppc64le=ppc64le/alpine:3.6
|
|
@ -12,6 +12,9 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM alpine
|
||||
FROM BASEIMAGE
|
||||
|
||||
CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/
|
||||
|
||||
COPY net /net
|
||||
RUN apk update && apk add curl
|
||||
|
|
|
@ -12,28 +12,14 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ARCH := amd64
|
||||
PREFIX ?= gcr.io/google_containers
|
||||
TAG ?= 1.0
|
||||
IMAGE ?= e2e-net-$(ARCH)
|
||||
SRCS=net
|
||||
ARCH ?= amd64
|
||||
TARGET ?= $(CURDIR)
|
||||
GOLANG_VERSION ?= latest
|
||||
SRC_DIR = $(notdir $(shell pwd))
|
||||
export
|
||||
|
||||
SRCS := $(shell find . -name \*.go)
|
||||
bin:
|
||||
../image-util.sh bin $(SRCS)
|
||||
|
||||
all: image
|
||||
|
||||
net: $(SRCS)
|
||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w'
|
||||
|
||||
image: test net
|
||||
docker build --pull -t $(PREFIX)/$(IMAGE):$(TAG) .
|
||||
|
||||
push: image
|
||||
gcloud docker -- push $(PREFIX)/$(IMAGE):$(TAG)
|
||||
|
||||
clean:
|
||||
rm -f net
|
||||
|
||||
test:
|
||||
go test ./...
|
||||
|
||||
.PHONY: all clean image push test
|
||||
.PHONY: bin
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -0,0 +1,5 @@
|
|||
amd64=busybox
|
||||
arm=arm32v6/busybox
|
||||
arm64=arm64v8/busybox
|
||||
ppc64le=ppc64le/busybox
|
||||
s390x=s390x/busybox
|
|
@ -12,10 +12,11 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM busybox
|
||||
FROM BASEIMAGE
|
||||
|
||||
CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/
|
||||
|
||||
ADD netexec netexec
|
||||
ADD netexec.go netexec.go
|
||||
EXPOSE 8080
|
||||
EXPOSE 8081
|
||||
|
||||
|
|
|
@ -12,22 +12,14 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
.PHONY: all netexec image push clean
|
||||
SRCS=netexec
|
||||
ARCH ?= amd64
|
||||
TARGET ?= $(CURDIR)
|
||||
GOLANG_VERSION ?= latest
|
||||
SRC_DIR = $(notdir $(shell pwd))
|
||||
export
|
||||
|
||||
TAG = 1.7
|
||||
PREFIX = gcr.io/google_containers
|
||||
bin:
|
||||
../image-util.sh bin $(SRCS)
|
||||
|
||||
|
||||
all: push
|
||||
|
||||
netexec: netexec.go
|
||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./netexec.go
|
||||
|
||||
image: netexec
|
||||
docker build --pull -t $(PREFIX)/netexec:$(TAG) .
|
||||
|
||||
push: image
|
||||
gcloud docker -- push $(PREFIX)/netexec:$(TAG)
|
||||
|
||||
clean:
|
||||
rm -f netexec
|
||||
.PHONY: bin
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -8,15 +8,9 @@ load(
|
|||
"go_library",
|
||||
)
|
||||
|
||||
go_binary(
|
||||
name = "network-tester",
|
||||
library = ":go_default_library",
|
||||
tags = ["automanaged"],
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["webserver.go"],
|
||||
srcs = ["nettest.go"],
|
||||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/client/clientset_generated/internalclientset:go_default_library",
|
||||
|
@ -38,3 +32,9 @@ filegroup(
|
|||
srcs = [":package-srcs"],
|
||||
tags = ["automanaged"],
|
||||
)
|
||||
|
||||
go_binary(
|
||||
name = "nettest",
|
||||
library = ":go_default_library",
|
||||
tags = ["automanaged"],
|
||||
)
|
|
@ -13,6 +13,6 @@
|
|||
# limitations under the License.
|
||||
|
||||
FROM scratch
|
||||
ADD webserver webserver
|
||||
COPY nettest /
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["/webserver"]
|
||||
ENTRYPOINT ["/nettest"]
|
|
@ -0,0 +1,25 @@
|
|||
# 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=nettest
|
||||
ARCH ?= amd64
|
||||
TARGET ?= $(CURDIR)
|
||||
GOLANG_VERSION ?= latest
|
||||
SRC_DIR = $(notdir $(shell pwd))
|
||||
export
|
||||
|
||||
bin:
|
||||
../image-util.sh bin $(SRCS)
|
||||
|
||||
.PHONY: bin
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -1,32 +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.
|
||||
|
||||
TAG = 1.9
|
||||
PREFIX = gcr.io/google_containers
|
||||
|
||||
all: push
|
||||
|
||||
webserver: webserver.go
|
||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./webserver.go
|
||||
|
||||
container: image
|
||||
|
||||
image: webserver
|
||||
docker build --pull -t $(PREFIX)/nettest:$(TAG) .
|
||||
|
||||
push: image
|
||||
gcloud docker -- push $(PREFIX)/nettest:$(TAG)
|
||||
|
||||
clean:
|
||||
rm -f webserver
|
|
@ -0,0 +1,4 @@
|
|||
amd64=alpine:3.6
|
||||
arm=arm32v6/alpine:3.6
|
||||
arm64=arm64v8/alpine:3.6
|
||||
ppc64le=ppc64le/alpine:3.6
|
|
@ -12,9 +12,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM alpine:3.5
|
||||
FROM BASEIMAGE
|
||||
|
||||
ADD no-snat-test-proxy /usr/bin/no-snat-test-proxy
|
||||
RUN chmod +x /usr/bin/no-snat-test-proxy
|
||||
COPY no-snat-test-proxy /
|
||||
|
||||
ENTRYPOINT ["/usr/bin/no-snat-test-proxy"]
|
||||
ENTRYPOINT ["/no-snat-test-proxy"]
|
||||
|
|
|
@ -12,18 +12,14 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
REGISTRY?=gcr.io/google_containers
|
||||
REGISTRY_TAG?=1.0.1
|
||||
ARCH?=amd64
|
||||
NAME?=no-snat-test-proxy
|
||||
SRCS=no-snat-test-proxy
|
||||
ARCH ?= amd64
|
||||
TARGET ?= $(CURDIR)
|
||||
GOLANG_VERSION ?= latest
|
||||
SRC_DIR = $(notdir $(shell pwd))
|
||||
export
|
||||
|
||||
build:
|
||||
go build --ldflags '-linkmode external -extldflags "-static"' -o $(NAME) main.go
|
||||
docker build -t $(REGISTRY)/$(NAME)-$(ARCH):$(REGISTRY_TAG) .
|
||||
rm $(NAME)
|
||||
bin:
|
||||
../image-util.sh bin $(SRCS)
|
||||
|
||||
push: build
|
||||
gcloud docker -- push $(REGISTRY)/$(NAME)-$(ARCH):$(REGISTRY_TAG)
|
||||
|
||||
all: build
|
||||
.PHONY: build push
|
||||
.PHONY: bin
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -0,0 +1,4 @@
|
|||
amd64=alpine:3.6
|
||||
arm=arm32v6/alpine:3.6
|
||||
arm64=arm64v8/alpine:3.6
|
||||
ppc64le=ppc64le/alpine:3.6
|
|
@ -12,9 +12,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM alpine:3.5
|
||||
FROM BASEIMAGE
|
||||
|
||||
ADD no-snat-test /usr/bin/no-snat-test
|
||||
RUN chmod +x /usr/bin/no-snat-test
|
||||
COPY no-snat-test /
|
||||
|
||||
ENTRYPOINT ["/usr/bin/no-snat-test"]
|
||||
ENTRYPOINT ["/no-snat-test"]
|
||||
|
|
|
@ -12,18 +12,14 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
REGISTRY?=gcr.io/google_containers
|
||||
REGISTRY_TAG?=1.0.1
|
||||
ARCH?=amd64
|
||||
NAME?=no-snat-test
|
||||
SRCS=no-snat-test
|
||||
ARCH ?= amd64
|
||||
TARGET ?= $(CURDIR)
|
||||
GOLANG_VERSION ?= latest
|
||||
SRC_DIR = $(notdir $(shell pwd))
|
||||
export
|
||||
|
||||
build:
|
||||
go build --ldflags '-linkmode external -extldflags "-static"' -o $(NAME) main.go
|
||||
docker build -t $(REGISTRY)/$(NAME)-$(ARCH):$(REGISTRY_TAG) .
|
||||
rm $(NAME)
|
||||
bin:
|
||||
../image-util.sh bin $(SRCS)
|
||||
|
||||
push: build
|
||||
gcloud docker -- push $(REGISTRY)/$(NAME)-$(ARCH):$(REGISTRY_TAG)
|
||||
|
||||
all: build
|
||||
.PHONY: build push
|
||||
.PHONY: bin
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -12,19 +12,14 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
TAG = 1.2
|
||||
PREFIX = gcr.io/google_containers
|
||||
SRSC=portforwardtester
|
||||
ARCH ?= amd64
|
||||
TARGET ?= $(CURDIR)
|
||||
GOLANG_VERSION ?= latest
|
||||
SRC_DIR = $(notdir $(shell pwd))
|
||||
export
|
||||
|
||||
all: push
|
||||
bin:
|
||||
../image-util.sh bin $(SRCS)
|
||||
|
||||
portforwardtester: portforwardtester.go
|
||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./portforwardtester.go
|
||||
|
||||
image: portforwardtester
|
||||
docker build --pull -t $(PREFIX)/portforwardtester:$(TAG) .
|
||||
|
||||
push: image
|
||||
gcloud docker -- push $(PREFIX)/portforwardtester:$(TAG)
|
||||
|
||||
clean:
|
||||
rm -f portforwardtester
|
||||
.PHONY: bin
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -12,36 +12,14 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Use:
|
||||
#
|
||||
# `make porter` will build porter.
|
||||
# `make tag` will suggest a tag.
|
||||
# `make image` will build an image-- you must supply a tag.
|
||||
# `make push` will push the image-- you must supply a tag.
|
||||
SRCS=porter
|
||||
ARCH ?= amd64
|
||||
TARGET ?= $(CURDIR)
|
||||
GOLANG_VERSION ?= latest
|
||||
SRC_DIR = $(notdir $(shell pwd))
|
||||
export
|
||||
|
||||
# This image does not tag in the normal way
|
||||
# TAG =
|
||||
PREFIX = gcr.io/google_containers
|
||||
SUGGESTED_TAG = $(shell git rev-parse --verify HEAD)
|
||||
bin:
|
||||
../image-util.sh bin $(SRCS)
|
||||
|
||||
porter: porter.go
|
||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./porter.go
|
||||
|
||||
tag:
|
||||
@echo "If all relevant changes are committed, suggest using TAG=$(SUGGESTED_TAG)"
|
||||
@echo "$$ make container TAG=$(SUGGESTED_TAG)"
|
||||
@echo "or"
|
||||
@echo "$$ make push TAG=$(SUGGESTED_TAG)"
|
||||
|
||||
container: image
|
||||
|
||||
image:
|
||||
$(if $(TAG),,$(error TAG is not defined. Use 'make tag' after committing changes to see a suggestion))
|
||||
docker build --pull -t $(PREFIX)/porter:$(TAG) .
|
||||
|
||||
push:
|
||||
$(if $(TAG),,$(error TAG is not defined. Use 'make tag' after committing changes to see a suggestion))
|
||||
gcloud docker -- push $(PREFIX)/porter:$(TAG)
|
||||
|
||||
clean:
|
||||
rm -f porter
|
||||
.PHONY: bin
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -0,0 +1,4 @@
|
|||
amd64=alpine:3.6
|
||||
arm=arm32v6/alpine:3.6
|
||||
arm64=arm64v8/alpine:3.6
|
||||
ppc64le=ppc64le/alpine:3.6
|
|
@ -12,7 +12,9 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM alpine:3.5
|
||||
FROM BASEIMAGE
|
||||
|
||||
CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/
|
||||
|
||||
RUN apk add --no-cache redis
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -0,0 +1,3 @@
|
|||
consumer
|
||||
consume-cpu/consume-cpu
|
||||
controller/controller
|
|
@ -0,0 +1,4 @@
|
|||
amd64=gcr.io/google-containers/ubuntu-slim-amd64:0.12
|
||||
arm=gcr.io/google-containers/ubuntu-slim-arm:0.12
|
||||
arm64=gcr.io/google-containers/ubuntu-slim-arm64:0.12
|
||||
ppc64le=gcr.io/google-containers/ubuntu-slim-ppc64le:0.12
|
|
@ -12,7 +12,13 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM jess/stress
|
||||
FROM BASEIMAGE
|
||||
|
||||
CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends stress && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ADD consumer /consumer
|
||||
ADD consume-cpu /consume-cpu
|
||||
EXPOSE 8080
|
||||
|
|
|
@ -12,30 +12,14 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
TAG = beta4
|
||||
PREFIX = gcr.io/google_containers
|
||||
SRCS = consumer consume-cpu/consume-cpu
|
||||
ARCH ?= amd64
|
||||
TARGET ?= $(CURDIR)
|
||||
GOLANG_VERSION ?= latest
|
||||
SRC_DIR = $(notdir $(shell pwd))
|
||||
export
|
||||
|
||||
all: clean consumer
|
||||
bin:
|
||||
../image-util.sh bin $(SRCS)
|
||||
|
||||
consumer:
|
||||
CGO_ENABLED=0 go build -a -installsuffix cgo --ldflags '-w' -o consume-cpu/consume-cpu ./consume-cpu/consume_cpu.go
|
||||
CGO_ENABLED=0 go build -a -installsuffix cgo --ldflags '-w' -o consumer .
|
||||
CGO_ENABLED=0 go build -a -installsuffix cgo --ldflags '-w' -o controller/controller ./controller/controller.go
|
||||
|
||||
container: image
|
||||
|
||||
image:
|
||||
sudo docker build --pull -t $(PREFIX)/resource_consumer:$(TAG) .
|
||||
sudo docker build --pull -t $(PREFIX)/resource_consumer/controller:$(TAG) controller
|
||||
|
||||
run_container:
|
||||
docker run --publish=8080:8080 $(PREFIX)/resource_consumer:$(TAG)
|
||||
|
||||
push:
|
||||
gcloud docker -- push ${PREFIX}/resource_consumer:${TAG}
|
||||
gcloud docker -- push ${PREFIX}/resource_consumer/controller:${TAG}
|
||||
|
||||
clean:
|
||||
rm -f consumer
|
||||
rm -f consume-cpu/consume-cpu
|
||||
rm -f controller/controller
|
||||
.PHONY: bin
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -0,0 +1,5 @@
|
|||
amd64=busybox
|
||||
arm=arm32v6/busybox
|
||||
arm64=arm64v8/busybox
|
||||
ppc64le=ppc64le/busybox
|
||||
s390x=s390x/busybox
|
|
@ -12,7 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM busybox
|
||||
FROM BASEIMAGE
|
||||
ADD controller /controller
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["/controller"]
|
||||
|
|
|
@ -12,15 +12,14 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
TAG ?= e2e
|
||||
PREFIX ?= gcr.io/k8s-testimages
|
||||
SRCS=controller
|
||||
ARCH ?= amd64
|
||||
TARGET ?= $(CURDIR)
|
||||
GOLANG_VERSION ?= latest
|
||||
SRC_DIR = resource-consumer/$(notdir $(shell pwd))
|
||||
export
|
||||
|
||||
all: push
|
||||
bin:
|
||||
../../image-util.sh bin $(SRCS)
|
||||
|
||||
image:
|
||||
docker build --pull -t $(PREFIX)/redis:$(TAG) .
|
||||
|
||||
push: image
|
||||
gcloud docker -- push $(PREFIX)/redis:$(TAG)
|
||||
|
||||
clean:
|
||||
.PHONY: bin
|
|
@ -0,0 +1 @@
|
|||
1.0
|
|
@ -0,0 +1,5 @@
|
|||
amd64=busybox
|
||||
arm=arm32v6/busybox
|
||||
arm64=arm64v8/busybox
|
||||
ppc64le=ppc64le/busybox
|
||||
s390x=s390x/busybox
|
|
@ -8,12 +8,6 @@ load(
|
|||
"go_library",
|
||||
)
|
||||
|
||||
go_binary(
|
||||
name = "serve_hostname",
|
||||
library = ":go_default_library",
|
||||
tags = ["automanaged"],
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["serve_hostname.go"],
|
||||
|
@ -32,3 +26,9 @@ filegroup(
|
|||
srcs = [":package-srcs"],
|
||||
tags = ["automanaged"],
|
||||
)
|
||||
|
||||
go_binary(
|
||||
name = "serve-hostname",
|
||||
library = ":go_default_library",
|
||||
tags = ["automanaged"],
|
||||
)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue