forked from mvisonneau/helm-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (32 loc) · 1.08 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
.DEFAULT_GOAL := help
# https://github.com/instrumenta/kubernetes-json-schema
KUBEVAL_SCHEMA_VERSION := 1.21.0
KUBEVAL_SCHEMA_LOCATION := https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/
CHARTS := $(shell find charts/* -type d -maxdepth 0)
.PHONY: lint-charts
lint-charts: ## Lint the charts syntax
ct lint --all
.PHONY: docs
docs: ## Generate charts docs
helm-docs
.PHONY: lint-kubeval
lint-kubeval: ## 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 | \
kubeval \
--strict \
-v $(KUBEVAL_SCHEMA_VERSION) \
-s $(KUBEVAL_SCHEMA_LOCATION); \
done; \
done
.PHONY: update-deps
update-deps: ## Update dependencies of the charts
@for chart in $(CHARTS); do \
helm dependency update $$chart; \
done
.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}'