From 86534b5124bde2b11b5b761b35256309433e5ada Mon Sep 17 00:00:00 2001 From: Manuel Alejandro de Brito Fontes Date: Wed, 8 Jul 2020 17:56:50 -0400 Subject: [PATCH] Prepare switch to gcr.io --- .github/workflows/ci.yaml | 3 ++- Makefile | 10 +++++----- build/dev-env.sh | 6 +++--- .../custom-health-check-path/values.yaml | 2 +- .../forwarded-port-headers/values.yaml | 2 +- test/e2e/run-chart-test.sh | 8 ++++---- test/e2e/run.sh | 10 +++++----- test/e2e/wait-for-nginx.sh | 2 +- 8 files changed, 22 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7f6c3cffb..7cfe456cd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,6 +33,7 @@ jobs: - 'go.sum' - 'rootfs/**/*' - 'TAG' + - 'test/e2e/**/*' charts: - 'charts/ingress-nginx/Chart.yaml' - 'charts/ingress-nginx/*' @@ -85,7 +86,7 @@ jobs: echo "creating images cache..." docker save \ nginx-ingress-controller:e2e \ - ingress-controller/nginx-ingress-controller:1.0.0-dev \ + ingress-controller/controller:1.0.0-dev \ | pigz > docker.tar.gz - name: cache diff --git a/Makefile b/Makefile index 6a900bba5..84f5efc15 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ ifeq ($(ARCH),) $(error mandatory variable ARCH is empty, either set it when calling the command or make sure 'go env GOARCH' works) endif -REGISTRY ?= quay.io/kubernetes-ingress-controller +REGISTRY ?= gcr.io/k8s-staging-ingress-nginx BASE_IMAGE ?= us.gcr.io/k8s-artifacts-prod/ingress-nginx/nginx:v20200708-g00f4a215d@sha256:b0727cebafc35f5ab50f3fa0be5fda7f79937f1683f525f40982e75b882195d8 @@ -65,12 +65,12 @@ image: clean-image ## Build image for a particular arch. --build-arg BASE_IMAGE="$(BASE_IMAGE)" \ --build-arg VERSION="$(TAG)" \ --build-arg TARGETARCH="$(ARCH)" \ - -t $(REGISTRY)/nginx-ingress-controller:$(TAG) rootfs + -t $(REGISTRY)/controller:$(TAG) rootfs .PHONY: clean-image clean-image: ## Removes local image - echo "removing old image $(REGISTRY)/nginx-ingress-controller:$(TAG)" - @docker rmi -f $(REGISTRY)/nginx-ingress-controller:$(TAG) || true + echo "removing old image $(REGISTRY)/controller:$(TAG)" + @docker rmi -f $(REGISTRY)/controller:$(TAG) || true .PHONY: build build: ## Build ingress controller, debug tool and pre-stop hook. @@ -213,4 +213,4 @@ release: ensure-buildx clean --platform $(subst $(SPACE),$(COMMA),$(PLATFORMS)) \ --build-arg BASE_IMAGE="$(BASE_IMAGE)" \ --build-arg VERSION="$(TAG)" \ - -t $(REGISTRY)/nginx-ingress-controller:$(TAG) rootfs + -t $(REGISTRY)/controller:$(TAG) rootfs diff --git a/build/dev-env.sh b/build/dev-env.sh index 022c37e4c..51a3dd1dc 100755 --- a/build/dev-env.sh +++ b/build/dev-env.sh @@ -27,7 +27,7 @@ DIR=$(cd $(dirname "${BASH_SOURCE}") && pwd -P) export TAG=1.0.0-dev export REGISTRY=${REGISTRY:-ingress-controller} -DEV_IMAGE=${REGISTRY}/nginx-ingress-controller:${TAG} +DEV_IMAGE=${REGISTRY}/controller:${TAG} if ! command -v kind &> /dev/null; then echo "kind is not installed" @@ -59,7 +59,7 @@ fi echo "[dev-env] building image" make build image -docker tag "${REGISTRY}/nginx-ingress-controller:${TAG}" "${DEV_IMAGE}" +docker tag "${REGISTRY}/controller:${TAG}" "${DEV_IMAGE}" export K8S_VERSION=${K8S_VERSION:-v1.18.4@sha256:d8ff5fc405fc679dd3dd0cccc01543ba4942ed90823817d2e9e2c474a5343c4f} @@ -100,7 +100,7 @@ kubectl create namespace ingress-nginx &> /dev/null || true 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 + repository: ${REGISTRY}/controller tag: ${TAG} config: worker-processes: "1" diff --git a/test/e2e-image/namespace-overlays/custom-health-check-path/values.yaml b/test/e2e-image/namespace-overlays/custom-health-check-path/values.yaml index 8e1897013..10212c461 100644 --- a/test/e2e-image/namespace-overlays/custom-health-check-path/values.yaml +++ b/test/e2e-image/namespace-overlays/custom-health-check-path/values.yaml @@ -2,7 +2,7 @@ fullnameOverride: nginx-ingress controller: image: - repository: ingress-controller/nginx-ingress-controller + repository: ingress-controller/controller tag: 1.0.0-dev extraArgs: healthz-port: "9090" diff --git a/test/e2e-image/namespace-overlays/forwarded-port-headers/values.yaml b/test/e2e-image/namespace-overlays/forwarded-port-headers/values.yaml index bea73f316..35429dc19 100644 --- a/test/e2e-image/namespace-overlays/forwarded-port-headers/values.yaml +++ b/test/e2e-image/namespace-overlays/forwarded-port-headers/values.yaml @@ -2,7 +2,7 @@ fullnameOverride: nginx-ingress controller: image: - repository: ingress-controller/nginx-ingress-controller + repository: ingress-controller/controller tag: 1.0.0-dev containerPort: http: "1080" diff --git a/test/e2e/run-chart-test.sh b/test/e2e/run-chart-test.sh index 243a34576..a31b2deab 100755 --- a/test/e2e/run-chart-test.sh +++ b/test/e2e/run-chart-test.sh @@ -41,10 +41,10 @@ export KIND_CLUSTER_NAME=${KIND_CLUSTER_NAME:-ingress-nginx-dev} export KUBECONFIG="${KUBECONFIG:-$HOME/.kube/kind-config-$KIND_CLUSTER_NAME}" # Disable execution if running as a Prow job -if [[ ! -z ${PROW_JOB_ID:-} ]]; then - echo "skipping execution..." - exit 0 -fi +#if [[ ! -z ${PROW_JOB_ID:-} ]]; then +# echo "skipping execution..." +# exit 0 +#fi if [ "${SKIP_CLUSTER_CREATION:-false}" = "false" ]; then echo "[dev-env] creating Kubernetes cluster with kind" diff --git a/test/e2e/run.sh b/test/e2e/run.sh index 0d9d38673..ecaff2ef5 100755 --- a/test/e2e/run.sh +++ b/test/e2e/run.sh @@ -40,10 +40,10 @@ trap cleanup EXIT export KIND_CLUSTER_NAME=${KIND_CLUSTER_NAME:-ingress-nginx-dev} # Disable execution if running as a Prow job -if [[ ! -z ${PROW_JOB_ID:-} ]]; then - echo "skipping execution..." - exit 0 -fi +#if [[ ! -z ${PROW_JOB_ID:-} ]]; then +# echo "skipping execution..." +# exit 0 +#fi if ! command -v kind --version &> /dev/null; then echo "kind is not installed. Use the package manager or visit the official site https://kind.sigs.k8s.io/" @@ -96,7 +96,7 @@ KIND_WORKERS=$(kind get nodes --name="${KIND_CLUSTER_NAME}" | grep worker | awk echo "[dev-env] copying docker images to cluster..." 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}/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} ${REGISTRY}/echo:${TAG} diff --git a/test/e2e/wait-for-nginx.sh b/test/e2e/wait-for-nginx.sh index b1c772b36..8bee7313d 100755 --- a/test/e2e/wait-for-nginx.sh +++ b/test/e2e/wait-for-nginx.sh @@ -58,7 +58,7 @@ else fullnameOverride: nginx-ingress controller: image: - repository: ingress-controller/nginx-ingress-controller + repository: ingress-controller/controller tag: 1.0.0-dev scope: enabled: true