Skip to content

Commit 99d351a

Browse files
authored
Generate valid schema json + pre-commit (#129)
1 parent 16df97b commit 99d351a

9 files changed

Lines changed: 2196 additions & 1 deletion

File tree

.github/workflows/lint_charts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
for chart in charts/*/; do
2828
if [ -f "$chart/Chart.yaml" ]; then
2929
echo "Validating $chart"
30-
helm lint "$chart"
30+
helm lint "$chart" --strict
3131
helm template "$chart" --debug
3232
fi
3333
done

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ terraform/**/.*
88
terraform/**/*.tfvars
99
.direnv/
1010
.envrc
11+
.venv/

.pre-commit-config.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
repos:
3+
- repo: https://github.com/dadav/helm-schema
4+
rev: 0.18.1
5+
hooks:
6+
- id: helm-schema
7+
# for all available options: helm-schema -h
8+
args:
9+
# directory to search recursively within for charts
10+
- --chart-search-root=charts
11+
12+
# don't analyze dependencies
13+
- --no-dependencies
14+
15+
# add references to values file if not exist
16+
- --add-schema-reference
17+
18+
# list of fields to skip from being created by default
19+
# e.g. generate a relatively permissive schema
20+
# - "--skip-auto-generation=required,additionalProperties"

0 commit comments

Comments
 (0)