8000 Merge pull request #6704 from SgtCoDFish/release-1.14-helmreadmeci · cert-manager/cert-manager@7a45ca9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7a45ca9

Browse files
authored
Merge pull request #6704 from SgtCoDFish/release-1.14-helmreadmeci
[release-1.14] add CI check for updated helm docs
2 parents 95d6fc4 + 152b1fb commit 7a45ca9

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

deploy/charts/cert-manager/README.template.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,9 +1376,9 @@ false
13761376
<td>prometheus.enabled</td>
13771377
<td>
13781378

1379-
Enable prometheus monitoring for the cert-manager controller, to use with. Prometheus Operator either `prometheus.servicemonitor.enabled` or
1380-
`prometheus.podmonitor.enabled` can be used to create a ServiceMonitor/PodMonitor
1381-
resource
1379+
Enable Prometheus monitoring for the cert-manager controller to use with the. Prometheus Operator. If this option is enabled without enabling `prometheus.servicemonitor.enabled` or
1380+
`prometheus.podmonitor.enabled`, 'prometheus.io' annotations are added to the cert-manager Deployment
1381+
resources. Additionally, a service is created which can be used together with your own ServiceMonitor (managed outside of this Helm chart). Otherwise, a ServiceMonitor/ PodMonitor is created.
13821382

13831383
</td>
13841384
<td>bool</td>

make/ci.mk

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
## request or change is merged.
1818
##
1919
## @category CI
20-
ci-presubmit: verify-imports verify-errexit verify-boilerplate verify-codegen verify-crds verify-modules
20+
ci-presubmit: verify-imports verify-errexit verify-boilerplate verify-codegen verify-crds verify-modules verify-helm-docs
2121

2222
.PHONY: verify-golangci-lint
2323
verify-golangci-lint: test/integration/versionchecker/testdata/test_manifests.tar | $(NEEDS_GOLANGCI-LINT)
@@ -109,9 +109,23 @@ update-codegen: | k8s-codegen-tools $(NEEDS_GO)
109109
./$(BINDIR)/tools/conversion-gen \
110110
./$(BINDIR)/tools/openapi-gen
111111

112+
# inject_helm_docs performs `helm-tool inject` using $1 as the output file and $2 as the values input
113+
define inject_helm_docs
114+
$(HELM-TOOL) inject --header-search '^<!-- AUTO-GENERATED -->' --footer-search '^<!-- /AUTO-GENERATED -->' -i $2 -o $1
115+
endef
116+
112117
.PHONY: update-helm-docs
113-
update-helm-docs: | $(NEEDS_HELM-TOOL)
114-
$(HELM-TOOL) inject --header-search '^<!-- AUTO-GENERATED -->' --footer-search '^<!-- /AUTO-GENERATED -->' -i deploy/charts/cert-manager/values.yaml -o deploy/charts/cert-manager/README.template.md
118+
update-helm-docs: deploy/charts/cert-manager/README.template.md deploy/charts/cert-manager/values.yaml | $(NEEDS_HELM-TOOL)
119+
$(call inject_helm_docs,deploy/charts/cert-manager/README.template.md,deploy/charts/cert-manager/values.yaml)
120+
121+
.PHONY: verify-helm-docs
122+
verify-helm-docs: | $(NEEDS_HELM-TOOL)
123+
@if ! git diff --exit-code -- deploy/charts/cert-manager/README.template.md > /dev/null ; then \
124+
echo "\033[0;33mdeploy/charts/cert-manager/README.template.md has been modified and could be out of date; update with 'make update-helm-docs'\033[0m" ; \
125+
exit 1 ; \
126+
fi
127+
@cp deploy/charts/cert-manager/README.template.md $(BINDIR)/scratch/LATEST_HELM_README-$(HELM-TOOL_VERSION) && $(call inject_helm_docs,$(BINDIR)/scratch/LATEST_HELM_README-$(HELM-TOOL_VERSION),deploy/charts/cert-manager/values.yaml)
128+
@diff $(BINDIR)/scratch/LATEST_HELM_README-$(HELM-TOOL_VERSION) deploy/charts/cert-manager/README.template.md || (echo -e "\033[0;33mdeploy/charts/cert-manager/README.template.md seems to be out of date; update with 'make update-helm-docs'\033[0m" && exit 1)
115129

116130
.PHONY: update-all
117131
## Update CRDs, code generation and licenses to the latest versions.

0 commit comments

Comments
 (0)
0