Build multi-arch images by default
This commit is contained in:
parent
0f20548386
commit
d250b97b43
18 changed files with 226 additions and 206 deletions
|
|
@ -1,6 +1,6 @@
|
|||
FROM quay.io/kubernetes-ingress-controller/e2e:v05262020-209405940c6 AS BASE
|
||||
FROM quay.io/kubernetes-ingress-controller/e2e:v05312020-2a72fd981 AS BASE
|
||||
|
||||
FROM alpine:3.11
|
||||
FROM alpine:3.12
|
||||
|
||||
RUN apk add -U --no-cache \
|
||||
ca-certificates \
|
||||
|
|
@ -10,11 +10,10 @@ RUN apk add -U --no-cache \
|
|||
libc6-compat \
|
||||
openssl
|
||||
|
||||
RUN curl -sSL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
|
||||
|
||||
COPY --from=BASE /go/bin/ginkgo /usr/local/bin/
|
||||
COPY --from=BASE /usr/local/bin/kubectl /usr/local/bin/
|
||||
COPY --from=BASE /usr/local/bin/cfssl /usr/local/bin/
|
||||
COPY --from=BASE /usr/local/bin/helm /usr/local/bin/
|
||||
COPY --from=BASE /usr/local/bin/cfssljson /usr/local/bin/
|
||||
|
||||
COPY . /
|
||||
|
|
|
|||
|
|
@ -53,9 +53,7 @@ func (f *Framework) NewEchoDeploymentWithReplicas(replicas int) {
|
|||
// name is configurable
|
||||
func (f *Framework) NewEchoDeploymentWithNameAndReplicas(name string, replicas int) {
|
||||
deployment := newDeployment(name, f.Namespace, "ingress-controller/echo:1.0.0-dev", 80, int32(replicas),
|
||||
[]string{
|
||||
"openresty",
|
||||
},
|
||||
nil,
|
||||
[]corev1.VolumeMount{},
|
||||
[]corev1.Volume{},
|
||||
)
|
||||
|
|
@ -91,21 +89,35 @@ func (f *Framework) NewEchoDeploymentWithNameAndReplicas(name string, replicas i
|
|||
// NewSlowEchoDeployment creates a new deployment of the slow echo server image in a particular namespace.
|
||||
func (f *Framework) NewSlowEchoDeployment() {
|
||||
data := map[string]string{}
|
||||
data["default.conf"] = `#
|
||||
data["nginx.conf"] = `#
|
||||
|
||||
server {
|
||||
access_log on;
|
||||
access_log /dev/stdout;
|
||||
events {
|
||||
worker_connections 1024;
|
||||
multi_accept on;
|
||||
}
|
||||
|
||||
listen 80;
|
||||
http {
|
||||
default_type 'text/plain';
|
||||
client_max_body_size 0;
|
||||
|
||||
location / {
|
||||
echo ok;
|
||||
}
|
||||
server {
|
||||
access_log on;
|
||||
access_log /dev/stdout;
|
||||
|
||||
location ~ ^/sleep/(?<sleepTime>[0-9]+)$ {
|
||||
echo_sleep $sleepTime;
|
||||
echo "ok after $sleepTime seconds";
|
||||
listen 80;
|
||||
|
||||
location / {
|
||||
content_by_lua_block {
|
||||
ngx.print("ok")
|
||||
}
|
||||
}
|
||||
|
||||
location ~ ^/sleep/(?<sleepTime>[0-9]+)$ {
|
||||
content_by_lua_block {
|
||||
ngx.sleep(ngx.var.sleepTime)
|
||||
ngx.print("ok after " .. ngx.var.sleepTime .. " seconds")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -120,12 +132,13 @@ server {
|
|||
}, metav1.CreateOptions{})
|
||||
assert.Nil(ginkgo.GinkgoT(), err, "creating configmap")
|
||||
|
||||
deployment := newDeployment(SlowEchoService, f.Namespace, "openresty/openresty:1.15.8.2-alpine", 80, 1,
|
||||
deployment := newDeployment(SlowEchoService, f.Namespace, "quay.io/kubernetes-ingress-controller/nginx:e3c49c52f4b74fe47ad65d6f3266a02e8b6b622f", 80, 1,
|
||||
nil,
|
||||
[]corev1.VolumeMount{
|
||||
{
|
||||
Name: SlowEchoService,
|
||||
MountPath: "/etc/nginx/conf.d",
|
||||
MountPath: "/etc/nginx/nginx.conf",
|
||||
SubPath: "nginx.conf",
|
||||
ReadOnly: true,
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -78,15 +78,15 @@ kind create cluster \
|
|||
echo "Kubernetes cluster:"
|
||||
kubectl get nodes -o wide
|
||||
|
||||
echo "[dev-env] building container"
|
||||
echo "[dev-env] building image"
|
||||
export EXIT_CODE=-1
|
||||
echo "
|
||||
make -C ${DIR}/../../ build container
|
||||
make -C ${DIR}/../../ build image
|
||||
make -C ${DIR}/../../ e2e-test-image
|
||||
make -C ${DIR}/../../images/fastcgi-helloserver/ GO111MODULE=\"on\" build container
|
||||
make -C ${DIR}/../../images/echo/ container
|
||||
make -C ${DIR}/../../images/httpbin/ container
|
||||
make -C ${DIR}/../../images/cfssl/ container
|
||||
make -C ${DIR}/../../images/fastcgi-helloserver/ GO111MODULE=\"on\" build image
|
||||
make -C ${DIR}/../../images/httpbin/ image
|
||||
make -C ${DIR}/../../images/echo/ image
|
||||
make -C ${DIR}/../../images/cfssl/ image
|
||||
" | parallel --joblog /tmp/log {} || EXIT_CODE=$?
|
||||
if [ ${EXIT_CODE} -eq 0 ] || [ ${EXIT_CODE} -eq -1 ];
|
||||
then
|
||||
|
|
@ -102,8 +102,8 @@ fi
|
|||
docker tag ${REGISTRY}/nginx-ingress-controller-${ARCH}:${TAG} ${REGISTRY}/nginx-ingress-controller:${TAG}
|
||||
|
||||
# Preload images used in e2e tests
|
||||
docker pull openresty/openresty:1.15.8.2-alpine
|
||||
docker pull moul/grpcbin
|
||||
docker pull quay.io/kubernetes-ingress-controller/nginx:e3c49c52f4b74fe47ad65d6f3266a02e8b6b622f
|
||||
|
||||
KIND_WORKERS=$(kind get nodes --name="${KIND_CLUSTER_NAME}" | grep worker | awk '{printf (NR>1?",":"") $1}')
|
||||
|
||||
|
|
@ -113,9 +113,9 @@ echo "
|
|||
kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes=${KIND_WORKERS} nginx-ingress-controller:e2e
|
||||
kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes=${KIND_WORKERS} ${REGISTRY}/nginx-ingress-controller:${TAG}
|
||||
kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes=${KIND_WORKERS} ${REGISTRY}/fastcgi-helloserver:${TAG}
|
||||
kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes=${KIND_WORKERS} openresty/openresty:1.15.8.2-alpine
|
||||
kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes=${KIND_WORKERS} ${REGISTRY}/httpbin:${TAG}
|
||||
kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes=${KIND_WORKERS} ${REGISTRY}/echo:${TAG}
|
||||
kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes=${KIND_WORKERS} quay.io/kubernetes-ingress-controller/nginx:e3c49c52f4b74fe47ad65d6f3266a02e8b6b622f
|
||||
kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes=${KIND_WORKERS} moul/grpcbin
|
||||
kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes=${KIND_WORKERS} ${REGISTRY}/cfssl:${TAG}
|
||||
" | parallel --joblog /tmp/log {} || EXIT_CODE=$?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue