forked from cloudnative-pg/charts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
26 lines (21 loc) · 1.06 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
.DEFAULT_GOAL := help
# Credits: https://gist.github.com/prwhite/8168133
.PHONY: help
help: ## Prints help command output
@awk 'BEGIN {FS = ":.*##"; printf "\ncnpg CLI\nUsage:\n"} /^[$$()% 0-9a-zA-Z_-]+:.*?##/ { printf " \033[36m%-30s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
## Update chart's README.md
.PHONY: docs
docs: ## Generate charts' docs using helm-docs
helm-docs || \
(echo "Please, install https://github.com/norwoodj/helm-docs first" && exit 1)
.PHONY: schema
schema: ## Generate charts' schema usign helm schema-gen plugin
@helm schema-gen charts/cloudnative-pg/values.yaml > charts/cloudnative-pg/values.schema.json || \
(echo "Please, run: helm plugin install https://github.com/karuppiah7890/helm-schema-gen.git" && exit 1)
.PHONY: pgbench-deploy
pgbench-deploy: ## Installs pgbench chart
helm dependency update charts/pgbench
helm upgrade --install pgbench --atomic charts/pgbench
.PHONY: pgbench-uninstall
pgbench-uninstall: ## Uninstalls cnpg-pgbench chart if present
@helm uninstall pgbench