From e3e16941e5033db6de71b8567f5fdd8d158cacd9 Mon Sep 17 00:00:00 2001 From: Manuel Alejandro de Brito Fontes Date: Tue, 25 Feb 2020 09:35:44 -0300 Subject: [PATCH] Use local chart directory for dev-env and e2e tests (#5165) --- build/dev-env.sh | 5 +---- charts/ingress-nginx/Chart.yaml | 2 +- charts/ingress-nginx/README.md | 4 ++-- test/e2e-image/.gitignore | 3 +-- test/e2e-image/Dockerfile | 2 ++ test/e2e-image/Makefile | 9 +++++---- test/e2e/wait-for-nginx.sh | 2 ++ 7 files changed, 14 insertions(+), 13 deletions(-) diff --git a/build/dev-env.sh b/build/dev-env.sh index 8d551dd3d..ef04f35c2 100755 --- a/build/dev-env.sh +++ b/build/dev-env.sh @@ -99,10 +99,7 @@ kind load docker-image --name="${KIND_CLUSTER_NAME}" "${DEV_IMAGE}" echo "[dev-env] deploying NGINX Ingress controller..." kubectl create namespace ingress-nginx &> /dev/null || true -helm repo add stable https://kubernetes-charts.storage.googleapis.com &> /dev/null || true -helm repo update &> /dev/null || true - -cat << EOF | helm template nginx-ingress stable/nginx-ingress --namespace=ingress-nginx --values - | kubectl apply -n ingress-nginx -f - +cat << EOF | helm template ingress-nginx ${DIR}/../charts/ingress-nginx --namespace=ingress-nginx --values - | kubectl apply -n ingress-nginx -f - controller: image: repository: ${REGISTRY}/nginx-ingress-controller diff --git a/charts/ingress-nginx/Chart.yaml b/charts/ingress-nginx/Chart.yaml index 89caa18ad..fb45bcf1c 100644 --- a/charts/ingress-nginx/Chart.yaml +++ b/charts/ingress-nginx/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 -name: nginx-ingress +name: ingress-nginx version: 1.32.0 appVersion: 0.30.0 home: https://github.com/kubernetes/ingress-nginx diff --git a/charts/ingress-nginx/README.md b/charts/ingress-nginx/README.md index f9dfb1bf2..9ce50ce5d 100644 --- a/charts/ingress-nginx/README.md +++ b/charts/ingress-nginx/README.md @@ -16,7 +16,7 @@ $ helm install ingress-nginx ## Introduction -This chart bootstraps an nginx-ingress deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. +This chart bootstraps an ingress-nginx deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. ## Prerequisites @@ -263,7 +263,7 @@ $ helm install ingress-nginx --name my-release \ You can add Prometheus annotations to the metrics service using `controller.metrics.service.annotations`. Alternatively, if you use the Prometheus Operator, you can enable ServiceMonitor creation using `controller.metrics.serviceMonitor.enabled`. -## nginx-ingress nginx\_status page/stats server +## ingress-nginx nginx\_status page/stats server Previous versions of this chart had a `controller.stats.*` configuration block, which is now obsolete due to the following changes in nginx ingress controller: * in [0.16.1](https://github.com/kubernetes/ingress-nginx/blob/master/Changelog.md#0161), the vts (virtual host traffic status) dashboard was removed diff --git a/test/e2e-image/.gitignore b/test/e2e-image/.gitignore index 260b7c282..f72c2c7c1 100644 --- a/test/e2e-image/.gitignore +++ b/test/e2e-image/.gitignore @@ -1,5 +1,4 @@ e2e.test ginkgo kubectl -/cloud-generic/ -/cluster-wide/ +charts diff --git a/test/e2e-image/Dockerfile b/test/e2e-image/Dockerfile index 10dfed3dc..77cf1705e 100644 --- a/test/e2e-image/Dockerfile +++ b/test/e2e-image/Dockerfile @@ -23,4 +23,6 @@ COPY namespace-overlays /namespace-overlays COPY wait-for-nginx.sh / COPY e2e.test / +COPY charts /charts + CMD [ "/e2e.sh" ] diff --git a/test/e2e-image/Makefile b/test/e2e-image/Makefile index 78986ec06..59e26c3fd 100644 --- a/test/e2e-image/Makefile +++ b/test/e2e-image/Makefile @@ -15,13 +15,14 @@ endif .PHONY: container container: ifeq ($(USE_DOCKER), true) - @${DIR}/../../build/run-in-docker.sh make e2e-test-binary + @$(DIR)/../../build/run-in-docker.sh make e2e-test-binary else - @make -C ${DIR}/../../ e2e-test-binary + @make -C $(DIR)/../../ e2e-test-binary endif - cp ../e2e/e2e.test . - cp ../e2e/wait-for-nginx.sh . + cp $(DIR)/../e2e/e2e.test . + cp $(DIR)/../e2e/wait-for-nginx.sh . + cp -R $(DIR)/../../charts . docker buildx build \ --load \ diff --git a/test/e2e/wait-for-nginx.sh b/test/e2e/wait-for-nginx.sh index 0da33ab75..ba79b0f8e 100755 --- a/test/e2e/wait-for-nginx.sh +++ b/test/e2e/wait-for-nginx.sh @@ -186,6 +186,8 @@ controller: # e2e tests do not require information about ingress status update-status: "false" terminationGracePeriodSeconds: 1 + admissionWebhooks: + enabled: false defaultBackend: enabled: false