Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
Fix gateway controller deploy target
Browse files Browse the repository at this point in the history
`make deploy-gateway-controller` deploys both the gateway and policy
controller but was only updating the image for the gateway controller to
the locally built version. This change updates the make targets to
ensure that both the gateway and policy controller images are updated
when testing the combined gateway/policy controller installation (e2e
tests).
  • Loading branch information
mikenairn committed Nov 15, 2023
1 parent f3f25cf commit a768f5b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ resources:
images:
- name: controller
newName: quay.io/kuadrant/multicluster-gateway-controller
newTag: main
newTag: main
4 changes: 1 addition & 3 deletions config/policy-controller/manager/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@


resources:
- manager.yaml

images:
- name: policy-controller
newName: quay.io/kuadrant/policy-controller
newTag: main
newTag: main
7 changes: 5 additions & 2 deletions hack/make/gateway_controller.make
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ kind-load-gateway-controller: docker-build-gateway-controller
docker-push-gateway-controller: ## Push docker image with the controller.
docker push ${CONTROLLER_IMG}

.PHONY: deploy-gateway-controller
deploy-gateway-controller: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
.PHONY: update-gateway-controller-image
update-gateway-controller-image: kustomize ## Update gateway controller image to CONTROLLER_IMG.
cd config/manager && $(KUSTOMIZE) edit set image controller=${CONTROLLER_IMG}

.PHONY: deploy-gateway-controller
deploy-gateway-controller: manifests kustomize update-gateway-controller-image update-policy-controller-image ## Deploy controller to the K8s cluster specified in ~/.kube/config.
$(KUSTOMIZE) --load-restrictor LoadRestrictionsNone build config/deploy/local | kubectl apply -f -
@if [ "$(METRICS)" = "true" ]; then\
$(KUSTOMIZE) build config/prometheus | kubectl apply -f -;\
Expand Down
7 changes: 5 additions & 2 deletions hack/make/policy_controller.make
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ kind-load-policy-controller: docker-build-policy-controller
docker-push-policy-controller: ## Push docker image with the controller.
docker push ${POLICY_CONTROLLER_IMG}

.PHONY: update-policy-controller-image
update-policy-controller-image: kustomize ## Update policy controller image to POLICY_CONTROLLER_IMG.
cd config/policy-controller/manager && $(KUSTOMIZE) edit set image policy-controller=${POLICY_CONTROLLER_IMG}

.PHONY: deploy-policy-controller
deploy-policy-controller: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
cd config/policy-controller/default && $(KUSTOMIZE) edit set image policy-controller=${POLICY_CONTROLLER_IMG}
deploy-policy-controller: kustomize manifests update-policy-controller-image ## Deploy policy controller to the K8s cluster specified in ~/.kube/config.
$(KUSTOMIZE) --load-restrictor LoadRestrictionsNone build config/policy-controller/default | kubectl apply -f -
@if [ "$(METRICS)" = "true" ]; then\
$(KUSTOMIZE) build config/prometheus | kubectl apply -f -;\
Expand Down

0 comments on commit a768f5b

Please sign in to comment.