-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update makefile to support standalone Podman #687
Conversation
Makefile
Outdated
|
||
kind-load-bundle: ## Load image to local cluster | ||
$(KIND) load docker-image $(BUNDLE_IMG) --name $(KIND_CLUSTER_NAME) | ||
@mkdir -p ./tmp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK make target kind-load-bundle
is not being used. And if it was being used, I would not DRY. instead:
kind-load-bundle: ## Load image to local cluster
$(MAKE) kind-load-image IMG=$(BUNDLE_IMG)
I would remove the target if not being used.
make/development-environments.mk
Outdated
@@ -49,7 +49,12 @@ namespace: ## Creates a namespace where to deploy Kuadrant Operator | |||
.PHONY: local-deploy | |||
local-deploy: ## Deploy Kuadrant Operator from the current code | |||
$(MAKE) docker-build IMG=$(IMAGE_TAG_BASE):dev | |||
$(KIND) load docker-image $(IMAGE_TAG_BASE):dev --name $(KIND_CLUSTER_NAME) | |||
|
|||
@mkdir -p ./tmp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
call kind-load-image
?
Makefile
Outdated
|
||
kind-load-image: ## Load image to local cluster | ||
$(KIND) load docker-image $(IMG) --name $(KIND_CLUSTER_NAME) | ||
@mkdir -p ./tmp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is how I would do this. wdyt?
kind-load-image: ## Load image to local cluster
$(eval TMP_DIR := $(shell mktemp -d))
docker save -o $(TMP_DIR)/image.tar $(IMG) \
&& KIND_EXPERIMENTAL_PROVIDER=$(CONTAINER_ENGINE) $(KIND) load image-archive $(TMP_DIR)/image.tar $(IMG) --name $(KIND_CLUSTER_NAME) ; \
EXITVAL=$$? ; \
rm -rf $(TMP_DIR) ;\
exit $${EXITVAL}
* Support the use of sole podman installation without the need for docker. * updates from PR comments
Changes allow podman to be used as the standalone container engine.
This PR introduces a new environment variable call
CONTAINER_ENGINE
which defaults to docker. The variable is used in the building of images and tells kind what engine to use.Loading images to the kind clusters has being changed from
kind load docker-image ...
tokind load image-archive ...
which allows supporting both docker and podman. This does have the extra step of creating the archives for the images.