Skip to content

Commit 04153d7

Browse files
committed
Use helm-docs to automatically generate Helm docs
Problem: It's hard to keep the README up-to-date and it's a manual process Solution: Use norwoodj/helm-docs to automatically generate the docs from the values.yaml file
1 parent e689ab4 commit 04153d7

File tree

6 files changed

+398
-116
lines changed

6 files changed

+398
-116
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ jobs:
7575
- name: Check if generated manifests are up to date
7676
run: make generate-manifests && git diff --exit-code
7777

78+
- name: Check if helm docs are up to date
79+
run: make helm-docs && git diff --exit-code
80+
81+
7882
unit-tests:
7983
name: Unit Tests
8084
runs-on: ubuntu-22.04

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ njs-unit-test: ## Run unit tests for the njs httpmatches module
191191
lint-helm: ## Run the helm chart linter
192192
docker run --pull always --rm -v $(CURDIR):/nginx-gateway-fabric -w /nginx-gateway-fabric quay.io/helmpack/chart-testing:latest ct lint --config .ct.yaml
193193

194+
.PHONY: helm-docs
195+
helm-docs: ## Generate the Helm chart documentation
196+
docker run --pull always --rm -v $(CURDIR):/nginx-gateway-fabric -w /nginx-gateway-fabric jnorwood/helm-docs:latest --chart-search-root=charts
197+
194198
.PHONY: load-images
195199
load-images: ## Load NGF and NGINX images on configured kind cluster.
196200
kind load docker-image $(PREFIX):$(TAG) $(NGINX_PREFIX):$(TAG)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Patterns to ignore when building packages.
22
*.png
3+
*.gotmpl

0 commit comments

Comments
 (0)