Skip to content

Commit

Permalink
fix: update kind-load target to support local kind clusters
Browse files Browse the repository at this point in the history
- Replaced the use of 'kind export kubeconfig' and 'kind load docker-image'
  with a combination of 'docker save' piped to 'kind load image-archive'.
- This change ensures that the `kind-load` target works seamlessly with any
  local kind cluster created by the developer, without relying on a
  bingo-provided version of kind.

Example usage:
1. Create a custom kind cluster:
   kind create cluster --name catalogd
2. Build and load the container into the cluster:
   make build-container kind-load

This ensures the image is loaded into the correct kind cluster, improving
developer flexibility and avoiding conflicts with predefined configurations.
  • Loading branch information
camilamacedo86 committed Nov 18, 2024
1 parent dd64145 commit 12a5977
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,7 @@ kind-cluster-cleanup: $(KIND) ## Delete the kind cluster

.PHONY: kind-load
kind-load: check-cluster $(KIND) ## Load the built images onto the local cluster
$(KIND) export kubeconfig --name $(KIND_CLUSTER_NAME)
$(KIND) load docker-image $(IMAGE) --name $(KIND_CLUSTER_NAME)
docker save $(IMAGE) | $(KIND) load image-archive /dev/stdin --name $(KIND_CLUSTER_NAME)

.PHONY: install
install: check-cluster build-container kind-load deploy wait ## Install local catalogd to an existing cluster
Expand Down

0 comments on commit 12a5977

Please sign in to comment.