mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-27 18:18:41 +00:00
This PR introduces a new fluxcd-kustomize.sh script that can be used as post-processor for helm for adding a common fluxcd labels. This is very useful for `make diff`, so it will not include diff between these labels anymore Also for debugging specific kustomize cases, eg: - https://github.com/fluxcd/helm-controller/issues/283 - https://github.com/fluxcd/flux2/issues/4368 Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
21 lines
1.3 KiB
Makefile
21 lines
1.3 KiB
Makefile
.DEFAULT_GOAL=help
|
|
.PHONY=help show diff apply delete update image
|
|
|
|
help: ## Show this help.
|
|
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
|
|
|
|
show: ## Show output of rendered templates
|
|
kubectl get hr -n $(NAMESPACE) $(NAME) -o jsonpath='{.spec.values}' | helm template --dry-run=server --post-renderer ../../../scripts/fluxcd-kustomize.sh -n $(NAMESPACE) $(NAME) . -f -
|
|
|
|
apply: suspend ## Apply Helm release to a Kubernetes cluster
|
|
kubectl get hr -n $(NAMESPACE) $(NAME) -o jsonpath='{.spec.values}' | helm upgrade -i --post-renderer ../../../scripts/fluxcd-kustomize.sh -n $(NAMESPACE) $(NAME) . -f -
|
|
|
|
diff: ## Diff Helm release against objects in a Kubernetes cluster
|
|
kubectl get hr -n $(NAMESPACE) $(NAME) -o jsonpath='{.spec.values}' | helm diff upgrade --allow-unreleased --post-renderer ../../../scripts/fluxcd-kustomize.sh -n $(NAMESPACE) $(NAME) . -f -
|
|
|
|
suspend: ## Suspend reconciliation for an existing Helm release
|
|
kubectl patch hr -n $(NAMESPACE) $(NAME) -p '{"spec": {"suspend": true}}' --type=merge --field-manager=flux-client-side-apply
|
|
|
|
resume: ## Resume reconciliation for an existing Helm release
|
|
kubectl patch hr -n $(NAMESPACE) $(NAME) -p '{"spec": {"suspend": null}}' --type=merge --field-manager=flux-client-side-apply
|