Skip to content

Commit

Permalink
chore: Small Makefile fixes (red-hat-data-services#928)
Browse files Browse the repository at this point in the history
* Go back to using `IMG ?=` rather than forcing the value with `IMG =`. This makes it easier to override the value of `IMG` for development, and it also aligns it to how `BUNDLE_IMG` is assigned.
* Add `prepare` as dependency of the `undeploy` target. This is just for convenience, although when looking at the other targets, `prepare` may simply be a missing dependency in `undeploy`.

Signed-off-by: Edgar Hernández <23639005+israel-hdez@users.noreply.github.com>
  • Loading branch information
israel-hdez authored and zdtsw committed Mar 25, 2024
1 parent 0fb4cf9 commit 53a6413
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ IMAGE_TAG_BASE ?= quay.io/opendatahub/opendatahub-operator
# keep the name based on IMG which already used from command line
IMG_TAG ?= latest
# Update IMG to a variable, to keep it consistent across versions for OpenShift CI
IMG = $(IMAGE_TAG_BASE):$(IMG_TAG)
IMG ?= $(IMAGE_TAG_BASE):$(IMG_TAG)
# BUNDLE_IMG defines the image:tag used for the bundle.
# You can use it as an arg. (E.g make bundle-build BUNDLE_IMG=<some-registry>/<project-name-bundle>:<tag>)
BUNDLE_IMG ?= $(IMAGE_TAG_BASE)-bundle:v$(VERSION)
Expand Down Expand Up @@ -221,7 +221,7 @@ deploy: prepare ## Deploy controller to the K8s cluster specified in ~/.kube/con
$(KUSTOMIZE) build config/default | kubectl apply --namespace $(OPERATOR_NAMESPACE) -f -

.PHONY: undeploy
undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
undeploy: prepare ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
$(KUSTOMIZE) build config/default | kubectl delete --ignore-not-found=$(ignore-not-found) -f -

## Location to install dependencies to
Expand Down

0 comments on commit 53a6413

Please sign in to comment.