Skip to content

Commit

Permalink
enh: Add common commands for local development (#95)
Browse files Browse the repository at this point in the history
Added commands for local development.
- `make docker-load` builds and loads docker image to local kind cluster
- `make redeploy` rebuilds, loads, deploys manifests and forces
controller pods to recreate
  • Loading branch information
sircthulhu committed Apr 1, 2024
1 parent 0bb2e29 commit 17025dd
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,20 @@ deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in
undeploy: kustomize ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
$(KUSTOMIZE) build config/default | $(KUBECTL) delete --ignore-not-found=$(ignore-not-found) -f -

# Build and upload docker image to the local Kind cluster
.PHONY: docker-load
docker-load: docker-build
kind load docker-image ${IMG} --name etcd-operator-kind

# Redeploy controller with new docker image
.PHONY: redeploy
redeploy: manifests kustomize docker-build docker-load
$(KUBECTL) config use-context kind-etcd-operator-kind
# deploy configs
$(KUSTOMIZE) build config/default | $(KUBECTL) apply -f -
# force recreate pods
$(KUBECTL) rollout restart -n etcd-operator-system deploy/etcd-operator-controller-manager

##@ Dependencies

## Location to install dependencies to
Expand Down

0 comments on commit 17025dd

Please sign in to comment.