Skip to content

Commit

Permalink
Prepare switch to gcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf committed Jul 9, 2020
1 parent 6c72e42 commit 86534b5
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
- 'go.sum'
- 'rootfs/**/*'
- 'TAG'
- 'test/e2e/**/*'
charts:
- 'charts/ingress-nginx/Chart.yaml'
- 'charts/ingress-nginx/*'
Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand Down Expand Up @@ -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
6 changes: 3 additions & 3 deletions build/dev-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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}

Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions test/e2e/run-chart-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 5 additions & 5 deletions test/e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down Expand Up @@ -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}

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/wait-for-nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 86534b5

Please sign in to comment.