diff --git a/Makefile b/Makefile index 9d78805d2..de41e66e3 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,8 @@ include $(addprefix ./vendor/github.com/openshift/build-machinery-go/make/, \ ) IMAGE_REGISTRY?=quay.io +IMAGE_TAG?=latest +IMAGE_NAME?=$(IMAGE_REGISTRY)/open-cluster-management/registration:$(IMAGE_TAG) KUBECONFIG ?= ./.kubeconfig $(call add-bindata,spokecluster,./pkg/hub/spokecluster/manifests/...,bindata,bindata,./pkg/hub/spokecluster/bindata/bindata.go) @@ -28,7 +30,10 @@ clean: .PHONY: clean deploy-hub: + cp deploy/hub/kustomization.yaml deploy/hub/kustomization.yaml.tmp + cd deploy/hub && kustomize edit set image quay.io/open-cluster-management/registration:latest=$(IMAGE_NAME) kustomize build deploy/hub | kubectl apply -f - + mv deploy/hub/kustomization.yaml.tmp deploy/hub/kustomization.yaml cluster-ip: CLUSTER_IP?=$(shell kubectl get svc kubernetes -n default -o jsonpath="{.spec.clusterIP}") @@ -39,7 +44,10 @@ bootstrap-secret: cluster-ip kubectl create secret generic bootstrap-secret --from-file=kubeconfig=dev-kubeconfig -n open-cluster-management deploy-spoke: + cp deploy/spoke/kustomization.yaml deploy/spoke/kustomization.yaml.tmp + cd deploy/spoke && kustomize edit set image quay.io/open-cluster-management/registration:latest=$(IMAGE_NAME) kustomize build deploy/spoke | kubectl apply -f - + mv deploy/spoke/kustomization.yaml.tmp deploy/spoke/kustomization.yaml # test-e2e target is currently a NOP that deploys the hub and self-joins the # hosting cluster to itself as a spoke; it will be used to prototype e2e in ci. diff --git a/deploy/hub/kustomization.yaml b/deploy/hub/kustomization.yaml index 859eadca5..ae0148f6f 100644 --- a/deploy/hub/kustomization.yaml +++ b/deploy/hub/kustomization.yaml @@ -31,3 +31,10 @@ resources: - ./clusterrole_binding.yaml - ./clusterrole.yaml - ./deployment.yaml + +images: +- name: quay.io/open-cluster-management/registration:latest + newName: quay.io/open-cluster-management/registration + newTag: latest +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization diff --git a/deploy/spoke/kustomization.yaml b/deploy/spoke/kustomization.yaml index e3dea86f1..ff4c91d4a 100644 --- a/deploy/spoke/kustomization.yaml +++ b/deploy/spoke/kustomization.yaml @@ -30,3 +30,10 @@ resources: - ./clusterrole_binding.yaml - ./deployment.yaml - ./secret.yaml + +images: +- name: quay.io/open-cluster-management/registration:latest + newName: quay.io/open-cluster-management/registration + newTag: latest +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization