Created
December 19, 2018 21:21
-
-
Save jmervine/5c0cdf69664be7275e2bc17c84bdf50c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE_TYPE ?= sts | |
STS ?= | |
indexers: ## Select indexer as actionable StatefultSet | |
indexers: | |
$(eval STS := indexer) | |
@echo "Set indexer as actionable StatefulSet" | |
indexer: indexers | |
index: indexers | |
searchers: ## Select search as actionable StatefultSet | |
searchers: | |
$(eval STS := search) | |
@echo "Set search as actionable StatefulSet" | |
searcher: searchers | |
search: searchers | |
update: ## Perform rolling update on selected actionable StatefulSet | |
update: | |
@if test -z "$(STS)"; then \ | |
echo "ERROR: Please provide a StatefulSet to update: 'make <sts> update'."; \ | |
else \ | |
echo "kubectl patch $(UPDATE_TYPE) $(STS) -p '{\"spec\":{\"updateStrategy\":{\"type\":\"RollingUpdate\"}}}'"; \ | |
kubectl patch $(UPDATE_TYPE) $(STS) -p '{"spec":{"updateStrategy":{"type":"RollingUpdate"}}}'; \ | |
fi | |
.PHONY: indexers indexer index searchers searcher search update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
doesn't work as expected, revisit