Skip to content

Commit

Permalink
test: add a Makefile target to update image (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkoshkin authored Feb 12, 2024
1 parent fed7237 commit 0511fb4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ example), run:
make SKIP_BUILD=true dev.run-on-kind
```

You can just update the image in the webhook Deployment on an existing KIND cluster:

```shell
make KIND_CLUSTER_NAME=<> dev.update-webhook-image-on-kind
```

If creating an AWS cluster using the example files, you will also need to create a secret with your AWS credentials:

```shell
Expand Down
10 changes: 10 additions & 0 deletions make/dev.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,13 @@ endif
--wait --wait-for-jobs
kubectl rollout restart deployment capi-runtime-extensions
kubectl rollout status deployment capi-runtime-extensions

dev.update-webhook-image-on-kind:
ifndef SKIP_BUILD
$(MAKE) release-snapshot
endif
kind load docker-image --name $(KIND_CLUSTER_NAME) \
ko.local/capi-runtime-extensions:$$(gojq -r .version dist/metadata.json)
kubectl set image deployment capi-runtime-extensions webhook=ko.local/capi-runtime-extensions:$$(gojq -r .version dist/metadata.json)
kubectl rollout restart deployment capi-runtime-extensions
kubectl rollout status deployment capi-runtime-extensions

0 comments on commit 0511fb4

Please sign in to comment.