Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Makefiles #83

Closed
kvaps opened this issue Apr 17, 2024 · 0 comments · Fixed by #86
Closed

Refactor Makefiles #83

kvaps opened this issue Apr 17, 2024 · 0 comments · Fixed by #86
Assignees
Labels
good first issue Good for newcomers

Comments

@kvaps
Copy link
Member

kvaps commented Apr 17, 2024

As part of #76

Let's create common Makefile ./hack/package-system.mk with the folowing content:

.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
	helm template --dry-run=server -n $(NAMESPACE) $(NAME) .

apply: suspend ## Apply Helm release to a Kubernetes cluster 
	helm upgrade -i -n $(NAMESPACE) $(NAME) .

diff: ## Diff Helm release against objects in a Kubernetes cluster
	helm diff upgrade --allow-unreleased --normalize-manifests -n $(NAMESPACE) $(NAME) .

suspend: ## Suspend reconciliation for an existing Helm release
	flux suspend hr -n $(NAMESPACE) $(NAME)

resume: ## Resume reconciliation for an existing Helm release
	flux resume hr -n $(NAMESPACE) $(NAME)

And include it in every packages/system/* package:

include ../../hack/package-system.mk
@kvaps kvaps added the good first issue Good for newcomers label Apr 17, 2024
@themoriarti themoriarti self-assigned this Apr 17, 2024
themoriarti added a commit that referenced this issue Apr 17, 2024
@themoriarti themoriarti linked a pull request Apr 17, 2024 that will close this issue
themoriarti added a commit that referenced this issue Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants