From b1ec7cfeac9e20f5c1315b93968e50765b40c33c Mon Sep 17 00:00:00 2001 From: cert-manager-bot Date: Wed, 11 Dec 2024 10:23:27 +0000 Subject: [PATCH] BOT: run 'make upgrade-klone' and 'make generate' Signed-off-by: cert-manager-bot --- klone.yaml | 26 +++++++++++++------------- make/_shared/helm/crds.mk | 10 +++++++++- make/_shared/helm/crds_dir.README.md | 8 ++++++++ make/_shared/helm/helm.mk | 13 ------------- make/_shared/tools/00_mod.mk | 3 --- 5 files changed, 30 insertions(+), 30 deletions(-) create mode 100644 make/_shared/helm/crds_dir.README.md diff --git a/klone.yaml b/klone.yaml index cd67b58..6530380 100644 --- a/klone.yaml +++ b/klone.yaml @@ -10,65 +10,65 @@ targets: - folder_name: boilerplate repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: f8e889062c304340007ecddc9b089ab8ded26633 + repo_hash: 25ec11345ab139986fad5fe7ffb5503069e6f81b repo_path: modules/boilerplate - folder_name: cert-manager repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: f8e889062c304340007ecddc9b089ab8ded26633 + repo_hash: 25ec11345ab139986fad5fe7ffb5503069e6f81b repo_path: modules/cert-manager - folder_name: controller-gen repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: f8e889062c304340007ecddc9b089ab8ded26633 + repo_hash: 25ec11345ab139986fad5fe7ffb5503069e6f81b repo_path: modules/controller-gen - folder_name: generate-verify repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: f8e889062c304340007ecddc9b089ab8ded26633 + repo_hash: 25ec11345ab139986fad5fe7ffb5503069e6f81b repo_path: modules/generate-verify - folder_name: go repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: f8e889062c304340007ecddc9b089ab8ded26633 + repo_hash: 25ec11345ab139986fad5fe7ffb5503069e6f81b repo_path: modules/go - folder_name: helm repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: f8e889062c304340007ecddc9b089ab8ded26633 + repo_hash: 25ec11345ab139986fad5fe7ffb5503069e6f81b repo_path: modules/helm - folder_name: help repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: f8e889062c304340007ecddc9b089ab8ded26633 + repo_hash: 25ec11345ab139986fad5fe7ffb5503069e6f81b repo_path: modules/help - folder_name: kind repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: f8e889062c304340007ecddc9b089ab8ded26633 + repo_hash: 25ec11345ab139986fad5fe7ffb5503069e6f81b repo_path: modules/kind - folder_name: klone repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: f8e889062c304340007ecddc9b089ab8ded26633 + repo_hash: 25ec11345ab139986fad5fe7ffb5503069e6f81b repo_path: modules/klone - folder_name: oci-build repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: f8e889062c304340007ecddc9b089ab8ded26633 + repo_hash: 25ec11345ab139986fad5fe7ffb5503069e6f81b repo_path: modules/oci-build - folder_name: oci-publish repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: f8e889062c304340007ecddc9b089ab8ded26633 + repo_hash: 25ec11345ab139986fad5fe7ffb5503069e6f81b repo_path: modules/oci-publish - folder_name: repository-base repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: f8e889062c304340007ecddc9b089ab8ded26633 + repo_hash: 25ec11345ab139986fad5fe7ffb5503069e6f81b repo_path: modules/repository-base - folder_name: tools repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: f8e889062c304340007ecddc9b089ab8ded26633 + repo_hash: 25ec11345ab139986fad5fe7ffb5503069e6f81b repo_path: modules/tools diff --git a/make/_shared/helm/crds.mk b/make/_shared/helm/crds.mk index bcc208b..e5c4b63 100644 --- a/make/_shared/helm/crds.mk +++ b/make/_shared/helm/crds.mk @@ -37,6 +37,9 @@ ifeq ($(HOST_OS),darwin) sed_inplace := sed -i '' endif +crds_dir ?= deploy/crds +crds_dir_readme := $(dir $(lastword $(MAKEFILE_LIST)))/crds_dir.README.md + .PHONY: generate-crds ## Generate CRD manifests. ## @category [shared] Generate/ Verify @@ -51,7 +54,7 @@ generate-crds: | $(NEEDS_CONTROLLER-GEN) $(NEEDS_YQ) $(directories:%=paths=./%...) \ output:crd:artifacts:config=$(crds_gen_temp) - echo "Updating CRDs with helm templating, writing to $(helm_chart_source_dir)/templates" + @echo "Updating CRDs with helm templating, writing to $(helm_chart_source_dir)/templates" @for i in $$(ls $(crds_gen_temp)); do \ crd_name=$$($(YQ) eval '.metadata.name' $(crds_gen_temp)/$$i); \ @@ -63,4 +66,9 @@ generate-crds: | $(NEEDS_CONTROLLER-GEN) $(NEEDS_YQ) cat $(crd_template_footer) >> $(helm_chart_source_dir)/templates/crd-$$i; \ done + @if [ -n "$$(ls $(crds_gen_temp) 2>/dev/null)" ]; then \ + cp -Tr $(crds_gen_temp) $(crds_dir); \ + cp $(crds_dir_readme) $(crds_dir)/README.md; \ + fi + shared_generate_targets += generate-crds diff --git a/make/_shared/helm/crds_dir.README.md b/make/_shared/helm/crds_dir.README.md new file mode 100644 index 0000000..fba79fe --- /dev/null +++ b/make/_shared/helm/crds_dir.README.md @@ -0,0 +1,8 @@ +# CRDs source directory + +> **WARNING**: if you are an end-user, you probably should NOT need to use the +> files in this directory. These files are for **reference, development and testing purposes only**. + +This directory contains 'source code' used to build our CustomResourceDefinition +resources consumed by our officially supported deployment methods (e.g. the Helm chart). +The CRDs in this directory might be incomplete, and should **NOT** be used to provision the operator. \ No newline at end of file diff --git a/make/_shared/helm/helm.mk b/make/_shared/helm/helm.mk index d0bf94e..626affd 100644 --- a/make/_shared/helm/helm.mk +++ b/make/_shared/helm/helm.mk @@ -73,8 +73,6 @@ $(helm_chart_archive): $(helm_chart_sources) | $(NEEDS_HELM) $(NEEDS_YQ) $(bin_d ## @category [shared] Helm Chart helm-chart: $(helm_chart_archive) -ifdef helm_docs_use_helm_tool - helm_tool_header_search ?= ^ helm_tool_footer_search ?= ^ @@ -83,17 +81,9 @@ helm_tool_footer_search ?= ^ ## @category [shared] Generate/ Verify generate-helm-docs: | $(NEEDS_HELM-TOOL) $(HELM-TOOL) inject -i $(helm_chart_source_dir)/values.yaml -o $(helm_chart_source_dir)/README.md --header-search "$(helm_tool_header_search)" --footer-search "$(helm_tool_footer_search)" -else -.PHONY: generate-helm-docs -## Generate Helm chart documentation. -## @category [shared] Generate/ Verify -generate-helm-docs: | $(NEEDS_HELM-DOCS) - $(HELM-DOCS) $(helm_chart_source_dir)/ -endif shared_generate_targets += generate-helm-docs -ifdef helm_generate_schema .PHONY: generate-helm-schema ## Generate Helm chart schema. ## @category [shared] Generate/ Verify @@ -101,9 +91,7 @@ generate-helm-schema: | $(NEEDS_HELM-TOOL) $(NEEDS_GOJQ) $(HELM-TOOL) schema -i $(helm_chart_source_dir)/values.yaml | $(GOJQ) > $(helm_chart_source_dir)/values.schema.json shared_generate_targets += generate-helm-schema -endif -ifdef helm_verify_values .PHONY: verify-helm-values ## Verify Helm chart values using helm-tool. ## @category [shared] Generate/ Verify @@ -111,7 +99,6 @@ verify-helm-values: | $(NEEDS_HELM-TOOL) $(NEEDS_GOJQ) $(HELM-TOOL) lint -i $(helm_chart_source_dir)/values.yaml -d $(helm_chart_source_dir)/templates -e $(helm_chart_source_dir)/values.linter.exceptions shared_verify_targets += verify-helm-values -endif .PHONY: verify-pod-security-standards ## Verify that the Helm chart complies with the pod security standards. diff --git a/make/_shared/tools/00_mod.mk b/make/_shared/tools/00_mod.mk index 105a9b9..b939f58 100644 --- a/make/_shared/tools/00_mod.mk +++ b/make/_shared/tools/00_mod.mk @@ -95,8 +95,6 @@ tools += gojq=v0.12.16 tools += crane=v0.20.2 # https://pkg.go.dev/google.golang.org/protobuf/cmd/protoc-gen-go?tab=versions tools += protoc-gen-go=v1.34.2 -# https://pkg.go.dev/github.com/norwoodj/helm-docs/cmd/helm-docs?tab=versions -tools += helm-docs=v1.14.2 # https://pkg.go.dev/github.com/sigstore/cosign/v2/cmd/cosign?tab=versions tools += cosign=v2.4.0 # https://pkg.go.dev/github.com/cert-manager/boilersuite?tab=versions @@ -324,7 +322,6 @@ go_dependencies += kustomize=sigs.k8s.io/kustomize/kustomize/v4 go_dependencies += gojq=github.com/itchyny/gojq/cmd/gojq go_dependencies += crane=github.com/google/go-containerregistry/cmd/crane go_dependencies += protoc-gen-go=google.golang.org/protobuf/cmd/protoc-gen-go -go_dependencies += helm-docs=github.com/norwoodj/helm-docs/cmd/helm-docs go_dependencies += cosign=github.com/sigstore/cosign/v2/cmd/cosign go_dependencies += boilersuite=github.com/cert-manager/boilersuite go_dependencies += gomarkdoc=github.com/princjef/gomarkdoc/cmd/gomarkdoc