Skip to content

Commit fea048b

Browse files
committed
chore: update helm chart docs
1 parent 40116dc commit fea048b

10 files changed

Lines changed: 4635 additions & 262 deletions

File tree

chart/.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Build artifacts
2+
.bin/
3+
node_modules/
4+
tmp.json
5+
6+
# Generated schemas (generated from values.yaml)
7+
values.schema.json
8+
values.schema.deref.json

chart/Makefile

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2+
LOCALBIN ?= $(shell pwd)/.bin
3+
4+
$(LOCALBIN):
5+
mkdir -p .bin
6+
7+
.PHONY: values.schema.json
8+
values.schema.json: .bin/helm-schema
9+
.bin/helm-schema -r -f values.yaml
10+
# remove empty required arrays
11+
jq 'walk(if type == "object" and has("required") and (.required | type == "array" and length == 0) then del(.required) else . end)' values.schema.json > tmp.json && mv tmp.json values.schema.json
12+
# trim spaces
13+
jq 'walk(if type == "object" and .description? then .description |= gsub("^(\\s+)|(\\s+)$$"; "") else . end )' values.schema.json > tmp.json && mv tmp.json values.schema.json
14+
15+
16+
.PHONY: chart
17+
chart: values.schema.deref.json README.md
18+
19+
.PHONY: README.md
20+
README.md: .bin/helm-docs
21+
.bin/helm-docs --skip-version-footer
22+
23+
24+
EGET=$(LOCALBIN)/eget
25+
EGET_BIN=$(LOCALBIN)
26+
$(EGET): $(LOCALBIN)
27+
GOBIN=$(LOCALBIN) go install github.com/zyedidia/eget@v1.3.4
28+
29+
.bin/helm-docs: $(EGET)
30+
$(EGET) -t v1.14.2 norwoodj/helm-docs --upgrade-only --to $(EGET_BIN)
31+
32+
.bin/helm-schema: $(EGET)
33+
$(EGET) -t 0.18.1 dadav/helm-schema --upgrade-only --to $(EGET_BIN)
34+
35+
.phony: values.schema.deref.json
36+
values.schema.deref.json: values.schema.json
37+
npm i @apidevtools/json-schema-ref-parser
38+
npx @digitak/esrun deref.ts
39+
40+
41+
.PHONY: lint
42+
lint: chart
43+
ct lint --charts .

0 commit comments

Comments
 (0)