From fd36ecdab8703f447be38c8c245986e7bf45f675 Mon Sep 17 00:00:00 2001 From: Attila Sovak Date: Wed, 4 Jun 2025 12:18:30 +0200 Subject: [PATCH 1/3] feat(universal-addon): add helm lint and README generation --- .pre-commit-config.yaml | 15 +++++++++++++++ .tool-versions | 2 ++ 2 files changed, 17 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 60a9cad..7024631 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -56,3 +56,18 @@ repos: types: [python] always_run: true pass_filenames: false + + - id: helm-lint + name: Helm Lint + entry: bash -c 'for chart in charts/*; do [ -f "$chart/Chart.yaml" ] && helm lint "$chart" || true; done' + language: system + types: [yaml] + always_run: true + + - id: helm-docs + name: Generate Helm Chart README with helm-docs + entry: bash -c 'find . -type f -name Chart.yaml | grep . && helm-docs -c charts || echo "No Helm chart found, skipping helm-docs."' + language: system + types: [yaml] + pass_filenames: false + always_run: true diff --git a/.tool-versions b/.tool-versions index c9bf870..661bc78 100644 --- a/.tool-versions +++ b/.tool-versions @@ -5,3 +5,5 @@ checkov 3.2.352 awscli 2.27.4 pre-commit 4.2.0 python 3.13.3 +helm 3.8.0 +helm-docs 1.13.1 From 39f1a3b49bcb59b6e34b42d2e8d171cde21020f2 Mon Sep 17 00:00:00 2001 From: Attila Sovak Date: Wed, 4 Jun 2025 12:37:04 +0200 Subject: [PATCH 2/3] feat(universal-addon): fix to check for docs only in charts dir --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7024631..73e07c8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -66,7 +66,7 @@ repos: - id: helm-docs name: Generate Helm Chart README with helm-docs - entry: bash -c 'find . -type f -name Chart.yaml | grep . && helm-docs -c charts || echo "No Helm chart found, skipping helm-docs."' + entry: bash -c 'find . -type f -name Chart.yaml charts | grep . && helm-docs -c charts || echo "No Helm chart found, skipping helm-docs."' language: system types: [yaml] pass_filenames: false From 6dabafaffc0c31dff8a81c032dca5fa07f383054 Mon Sep 17 00:00:00 2001 From: Attila Sovak Date: Wed, 4 Jun 2025 13:24:06 +0200 Subject: [PATCH 3/3] feat(universal-addon): fix to charts in find --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 73e07c8..33f0f04 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -66,7 +66,7 @@ repos: - id: helm-docs name: Generate Helm Chart README with helm-docs - entry: bash -c 'find . -type f -name Chart.yaml charts | grep . && helm-docs -c charts || echo "No Helm chart found, skipping helm-docs."' + entry: bash -c 'find charts -type f -name Chart.yaml | grep . && helm-docs -c charts || echo "No Helm chart found, skipping helm-docs."' language: system types: [yaml] pass_filenames: false