Skip to content

Commit

Permalink
Use helm-docs to automatically generate Helm docs
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lucacome committed Jun 3, 2024
1 parent e689ab4 commit 04153d7
Show file tree
Hide file tree
Showing 6 changed files with 398 additions and 116 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ jobs:
- name: Check if generated manifests are up to date
run: make generate-manifests && git diff --exit-code

- name: Check if helm docs are up to date
run: make helm-docs && git diff --exit-code


unit-tests:
name: Unit Tests
runs-on: ubuntu-22.04
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ njs-unit-test: ## Run unit tests for the njs httpmatches module
lint-helm: ## Run the helm chart linter
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

.PHONY: helm-docs
helm-docs: ## Generate the Helm chart documentation
docker run --pull always --rm -v $(CURDIR):/nginx-gateway-fabric -w /nginx-gateway-fabric jnorwood/helm-docs:latest --chart-search-root=charts

.PHONY: load-images
load-images: ## Load NGF and NGINX images on configured kind cluster.
kind load docker-image $(PREFIX):$(TAG) $(NGINX_PREFIX):$(TAG)
Expand Down
1 change: 1 addition & 0 deletions charts/nginx-gateway-fabric/.helmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Patterns to ignore when building packages.
*.png
*.gotmpl
Loading

0 comments on commit 04153d7

Please sign in to comment.