Skip to content
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

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

Boomatang
Copy link
Contributor

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 ... to kind load image-archive ... which allows supporting both docker and podman. This does have the extra step of creating the archives for the images.

@Boomatang Boomatang requested a review from a team as a code owner June 4, 2024 14:06
Makefile Show resolved Hide resolved
Makefile Outdated

kind-load-bundle: ## Load image to local cluster
$(KIND) load docker-image $(BUNDLE_IMG) --name $(KIND_CLUSTER_NAME)
@mkdir -p ./tmp
Copy link
Contributor

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.

@@ -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
Copy link
Contributor

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
Copy link
Contributor

@eguzki eguzki Jun 5, 2024

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}

@Boomatang Boomatang merged commit dee1682 into Kuadrant:main Jun 6, 2024
18 checks passed
dlaw4608 pushed a commit to dlaw4608/kuadrant-operator that referenced this pull request Jun 17, 2024
* Support the use of sole podman installation without the need for docker.

* updates from PR comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants