Skip to content

Commit

Permalink
Improve rebalancing
Browse files Browse the repository at this point in the history
  • Loading branch information
falko committed Jul 24, 2023
1 parent dbfa611 commit dcbee3c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions include/camunda.mk
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,15 @@ update:
--set connectors.inbound.auth.existingSecret=$CONNECTORS_SECRET

.PHONY: rebalance-leaders
rebalance-leaders:
kubectl port-forward --namespace camunda $$(kubectl get pod --namespace camunda --selector="app=camunda-platform,app.kubernetes.io/component=zeebe-gateway,app.kubernetes.io/instance=camunda,app.kubernetes.io/managed-by=Helm,app.kubernetes.io/name=zeebe-gateway,app.kubernetes.io/part-of=camunda-platform" --output jsonpath='{.items[0].metadata.name}') 5433:9600 &
rebalance-leaders: # TODO make this a k8s job
kubectl port-forward svc/$(release)-zeebe-gateway 9600:9600 -n $(namespace) &
sleep 10
curl -X POST http://localhost:5433/actuator/rebalance/
kill $$(ps aux | grep '[k]ubectl' | awk '{print $$2}')
curl -X POST http://localhost:9600/actuator/rebalance
kill $$(ps aux | grep '[k]ubectl' | awk '{print $$2}')

.PHONY: curl-rebalance # can be used together with `make port-actuator`
curl-rebalance:
curl -X POST http://localhost:9600/actuator/rebalance

.PHONY: uninstall-camunda
uninstall-camunda:
Expand Down

0 comments on commit dcbee3c

Please sign in to comment.