Created
December 19, 2018 21:21
-
-
Save jmervine/5c0cdf69664be7275e2bc17c84bdf50c to your computer and use it in GitHub Desktop.
Revisions
-
jmervine created this gist
Dec 19, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ 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