Prepare switch to gcr.io
This commit is contained in:
parent
6c72e42fb6
commit
86534b5124
8 changed files with 22 additions and 21 deletions
3
.github/workflows/ci.yaml
vendored
3
.github/workflows/ci.yaml
vendored
|
@ -33,6 +33,7 @@ jobs:
|
||||||
- 'go.sum'
|
- 'go.sum'
|
||||||
- 'rootfs/**/*'
|
- 'rootfs/**/*'
|
||||||
- 'TAG'
|
- 'TAG'
|
||||||
|
- 'test/e2e/**/*'
|
||||||
charts:
|
charts:
|
||||||
- 'charts/ingress-nginx/Chart.yaml'
|
- 'charts/ingress-nginx/Chart.yaml'
|
||||||
- 'charts/ingress-nginx/*'
|
- 'charts/ingress-nginx/*'
|
||||||
|
@ -85,7 +86,7 @@ jobs:
|
||||||
echo "creating images cache..."
|
echo "creating images cache..."
|
||||||
docker save \
|
docker save \
|
||||||
nginx-ingress-controller:e2e \
|
nginx-ingress-controller:e2e \
|
||||||
ingress-controller/nginx-ingress-controller:1.0.0-dev \
|
ingress-controller/controller:1.0.0-dev \
|
||||||
| pigz > docker.tar.gz
|
| pigz > docker.tar.gz
|
||||||
|
|
||||||
- name: cache
|
- name: cache
|
||||||
|
|
10
Makefile
10
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)
|
$(error mandatory variable ARCH is empty, either set it when calling the command or make sure 'go env GOARCH' works)
|
||||||
endif
|
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
|
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 BASE_IMAGE="$(BASE_IMAGE)" \
|
||||||
--build-arg VERSION="$(TAG)" \
|
--build-arg VERSION="$(TAG)" \
|
||||||
--build-arg TARGETARCH="$(ARCH)" \
|
--build-arg TARGETARCH="$(ARCH)" \
|
||||||
-t $(REGISTRY)/nginx-ingress-controller:$(TAG) rootfs
|
-t $(REGISTRY)/controller:$(TAG) rootfs
|
||||||
|
|
||||||
.PHONY: clean-image
|
.PHONY: clean-image
|
||||||
clean-image: ## Removes local image
|
clean-image: ## Removes local image
|
||||||
echo "removing old image $(REGISTRY)/nginx-ingress-controller:$(TAG)"
|
echo "removing old image $(REGISTRY)/controller:$(TAG)"
|
||||||
@docker rmi -f $(REGISTRY)/nginx-ingress-controller:$(TAG) || true
|
@docker rmi -f $(REGISTRY)/controller:$(TAG) || true
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: ## Build ingress controller, debug tool and pre-stop hook.
|
build: ## Build ingress controller, debug tool and pre-stop hook.
|
||||||
|
@ -213,4 +213,4 @@ release: ensure-buildx clean
|
||||||
--platform $(subst $(SPACE),$(COMMA),$(PLATFORMS)) \
|
--platform $(subst $(SPACE),$(COMMA),$(PLATFORMS)) \
|
||||||
--build-arg BASE_IMAGE="$(BASE_IMAGE)" \
|
--build-arg BASE_IMAGE="$(BASE_IMAGE)" \
|
||||||
--build-arg VERSION="$(TAG)" \
|
--build-arg VERSION="$(TAG)" \
|
||||||
-t $(REGISTRY)/nginx-ingress-controller:$(TAG) rootfs
|
-t $(REGISTRY)/controller:$(TAG) rootfs
|
||||||
|
|
|
@ -27,7 +27,7 @@ DIR=$(cd $(dirname "${BASH_SOURCE}") && pwd -P)
|
||||||
export TAG=1.0.0-dev
|
export TAG=1.0.0-dev
|
||||||
export REGISTRY=${REGISTRY:-ingress-controller}
|
export REGISTRY=${REGISTRY:-ingress-controller}
|
||||||
|
|
||||||
DEV_IMAGE=${REGISTRY}/nginx-ingress-controller:${TAG}
|
DEV_IMAGE=${REGISTRY}/controller:${TAG}
|
||||||
|
|
||||||
if ! command -v kind &> /dev/null; then
|
if ! command -v kind &> /dev/null; then
|
||||||
echo "kind is not installed"
|
echo "kind is not installed"
|
||||||
|
@ -59,7 +59,7 @@ fi
|
||||||
|
|
||||||
echo "[dev-env] building image"
|
echo "[dev-env] building image"
|
||||||
make build 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}
|
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 -
|
cat << EOF | helm template ingress-nginx ${DIR}/../charts/ingress-nginx --namespace=ingress-nginx --values - | kubectl apply -n ingress-nginx -f -
|
||||||
controller:
|
controller:
|
||||||
image:
|
image:
|
||||||
repository: ${REGISTRY}/nginx-ingress-controller
|
repository: ${REGISTRY}/controller
|
||||||
tag: ${TAG}
|
tag: ${TAG}
|
||||||
config:
|
config:
|
||||||
worker-processes: "1"
|
worker-processes: "1"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
fullnameOverride: nginx-ingress
|
fullnameOverride: nginx-ingress
|
||||||
controller:
|
controller:
|
||||||
image:
|
image:
|
||||||
repository: ingress-controller/nginx-ingress-controller
|
repository: ingress-controller/controller
|
||||||
tag: 1.0.0-dev
|
tag: 1.0.0-dev
|
||||||
extraArgs:
|
extraArgs:
|
||||||
healthz-port: "9090"
|
healthz-port: "9090"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
fullnameOverride: nginx-ingress
|
fullnameOverride: nginx-ingress
|
||||||
controller:
|
controller:
|
||||||
image:
|
image:
|
||||||
repository: ingress-controller/nginx-ingress-controller
|
repository: ingress-controller/controller
|
||||||
tag: 1.0.0-dev
|
tag: 1.0.0-dev
|
||||||
containerPort:
|
containerPort:
|
||||||
http: "1080"
|
http: "1080"
|
||||||
|
|
|
@ -41,10 +41,10 @@ export KIND_CLUSTER_NAME=${KIND_CLUSTER_NAME:-ingress-nginx-dev}
|
||||||
export KUBECONFIG="${KUBECONFIG:-$HOME/.kube/kind-config-$KIND_CLUSTER_NAME}"
|
export KUBECONFIG="${KUBECONFIG:-$HOME/.kube/kind-config-$KIND_CLUSTER_NAME}"
|
||||||
|
|
||||||
# Disable execution if running as a Prow job
|
# Disable execution if running as a Prow job
|
||||||
if [[ ! -z ${PROW_JOB_ID:-} ]]; then
|
#if [[ ! -z ${PROW_JOB_ID:-} ]]; then
|
||||||
echo "skipping execution..."
|
# echo "skipping execution..."
|
||||||
exit 0
|
# exit 0
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
if [ "${SKIP_CLUSTER_CREATION:-false}" = "false" ]; then
|
if [ "${SKIP_CLUSTER_CREATION:-false}" = "false" ]; then
|
||||||
echo "[dev-env] creating Kubernetes cluster with kind"
|
echo "[dev-env] creating Kubernetes cluster with kind"
|
||||||
|
|
|
@ -40,10 +40,10 @@ trap cleanup EXIT
|
||||||
export KIND_CLUSTER_NAME=${KIND_CLUSTER_NAME:-ingress-nginx-dev}
|
export KIND_CLUSTER_NAME=${KIND_CLUSTER_NAME:-ingress-nginx-dev}
|
||||||
|
|
||||||
# Disable execution if running as a Prow job
|
# Disable execution if running as a Prow job
|
||||||
if [[ ! -z ${PROW_JOB_ID:-} ]]; then
|
#if [[ ! -z ${PROW_JOB_ID:-} ]]; then
|
||||||
echo "skipping execution..."
|
# echo "skipping execution..."
|
||||||
exit 0
|
# exit 0
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
if ! command -v kind --version &> /dev/null; then
|
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/"
|
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..."
|
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} 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}/fastcgi-helloserver:${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} ${REGISTRY}/echo:${TAG}
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ else
|
||||||
fullnameOverride: nginx-ingress
|
fullnameOverride: nginx-ingress
|
||||||
controller:
|
controller:
|
||||||
image:
|
image:
|
||||||
repository: ingress-controller/nginx-ingress-controller
|
repository: ingress-controller/controller
|
||||||
tag: 1.0.0-dev
|
tag: 1.0.0-dev
|
||||||
scope:
|
scope:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
Loading…
Reference in a new issue