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

test: add a Makefile target to update image #346

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
supershal marked this conversation as resolved.
Show resolved Hide resolved
kubectl rollout restart deployment capi-runtime-extensions
kubectl rollout status deployment capi-runtime-extensions
Loading