-
Notifications
You must be signed in to change notification settings - Fork 58
/
Makefile
45 lines (37 loc) · 1.41 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
CHARTS ?= $(shell find charts/* -type d -maxdepth 0)
KUBERNETES_VERSION ?= 1.27.2
.DEFAULT_GOAL := help
.PHONY: lint
lint: docs ## Lint the charts syntax
pip3 install -r ./.ct/requirements.txt
go run github.com/helm/chart-testing/v3/[email protected] lint --all --config .ct/ct.yaml
git diff --exit-code
.PHONY: test
test: ## Test installing the charts
go run github.com/helm/chart-testing/v3/[email protected] install --all --config .ct/ct.yaml
.PHONY: docs
docs: ## Generate charts docs
go run github.com/norwoodj/helm-docs/cmd/[email protected]
.PHONY: kubeconform
kubeconform: ## Lint the charts templated kubernetes values
@for chart in $(CHARTS); do \
helm dependency build $$chart; \
for values in $$chart/tests/*.yaml; do \
echo "\ntesting $$values..."; \
helm template --values $$values $$chart | \
go run github.com/yannh/kubeconform/cmd/[email protected] \
-strict \
-kubernetes-version $(KUBERNETES_VERSION); \
done; \
done
.PHONY: update-deps
update-deps: ## Update dependencies of the charts
@for chart in $(CHARTS); do \
helm dependency update $$chart; \
done
.PHONY: configure-deps-repos
configure-deps-repos: ## Configure dependencies repositories
helm repo add bitnami https://charts.bitnami.com/bitnami
.PHONY: help
help: ## Displays this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'