Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: auto generate helm docs #1278

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ jobs:
run: go mod vendor
- name: Verify all generated
run: make verify-generated
- name: Verify Generated Helm docs
run: make generate-helm-docs
tests:
name: Run tests
runs-on: ubuntu-latest
Expand Down
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,15 @@ So if modifying the operator resources, please do so by modifying the Helm
chart, then run `make manifests` to ensure the static
resources are up-to-date.

## Update helm docs

We consider the Helm chart to be the master for deploying trivy-operator.
Since some prefer to not use Helm, we also provide helm config documentation to
install the operator.

So if modifying the operator helm params, please do so by modifying the Helm
chart, then run `make generate-helm-docs` to ensure the helm docs are up-to-date.

## Operator Lifecycle Manager (OLM)

### Install OLM
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ $(LOCALBIN):

## Tool Binaries
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
HELM_DOCS_GEN ?= $(LOCALBIN)/helm-docs
ENVTEST ?= $(LOCALBIN)/setup-envtest

## Tool Versions
Expand Down Expand Up @@ -157,6 +158,13 @@ manifests: controller-gen
.PHONY: generate-all
generate-all: generate manifests

.PHONY: generate-helm-docs
generate-helm-docs:
GOBIN=$(LOCALBIN) go install github.com/norwoodj/helm-docs/cmd/helm-docs@latest
$(HELM_DOCS_GEN) ./deploy
./hack/verify-generated.sh


.PHONY: \
clean \
docker-build \
Expand Down
Loading