BOT: run 'make upgrade-klone' and 'make generate'
Signed-off-by: cert-manager-bot <cert-manager-bot@users.noreply.github.com>
This commit is contained in:
parent
f3743ddfe5
commit
fa300fc67a
18
klone.yaml
18
klone.yaml
@ -10,46 +10,46 @@ targets:
|
||||
- folder_name: boilerplate
|
||||
repo_url: https://github.com/cert-manager/makefile-modules.git
|
||||
repo_ref: main
|
||||
repo_hash: 8187c6497881beb7829253c3467002b6cb5c5fb7
|
||||
repo_hash: 197cd670dbf70eb7b0f09fd3accb12cda8d6a188
|
||||
repo_path: modules/boilerplate
|
||||
- folder_name: generate-verify
|
||||
repo_url: https://github.com/cert-manager/makefile-modules.git
|
||||
repo_ref: main
|
||||
repo_hash: 8187c6497881beb7829253c3467002b6cb5c5fb7
|
||||
repo_hash: 197cd670dbf70eb7b0f09fd3accb12cda8d6a188
|
||||
repo_path: modules/generate-verify
|
||||
- folder_name: go
|
||||
repo_url: https://github.com/cert-manager/makefile-modules.git
|
||||
repo_ref: main
|
||||
repo_hash: 8187c6497881beb7829253c3467002b6cb5c5fb7
|
||||
repo_hash: 197cd670dbf70eb7b0f09fd3accb12cda8d6a188
|
||||
repo_path: modules/go
|
||||
- folder_name: help
|
||||
repo_url: https://github.com/cert-manager/makefile-modules.git
|
||||
repo_ref: main
|
||||
repo_hash: 8187c6497881beb7829253c3467002b6cb5c5fb7
|
||||
repo_hash: 197cd670dbf70eb7b0f09fd3accb12cda8d6a188
|
||||
repo_path: modules/help
|
||||
- folder_name: klone
|
||||
repo_url: https://github.com/cert-manager/makefile-modules.git
|
||||
repo_ref: main
|
||||
repo_hash: 8187c6497881beb7829253c3467002b6cb5c5fb7
|
||||
repo_hash: 197cd670dbf70eb7b0f09fd3accb12cda8d6a188
|
||||
repo_path: modules/klone
|
||||
- folder_name: licenses
|
||||
repo_url: https://github.com/cert-manager/makefile-modules.git
|
||||
repo_ref: main
|
||||
repo_hash: 8187c6497881beb7829253c3467002b6cb5c5fb7
|
||||
repo_hash: 197cd670dbf70eb7b0f09fd3accb12cda8d6a188
|
||||
repo_path: modules/licenses
|
||||
- folder_name: repository-base
|
||||
repo_url: https://github.com/cert-manager/makefile-modules.git
|
||||
repo_ref: main
|
||||
repo_hash: 8187c6497881beb7829253c3467002b6cb5c5fb7
|
||||
repo_hash: 197cd670dbf70eb7b0f09fd3accb12cda8d6a188
|
||||
repo_path: modules/repository-base
|
||||
- folder_name: tools
|
||||
repo_url: https://github.com/cert-manager/makefile-modules.git
|
||||
repo_ref: main
|
||||
repo_hash: 8187c6497881beb7829253c3467002b6cb5c5fb7
|
||||
repo_hash: 197cd670dbf70eb7b0f09fd3accb12cda8d6a188
|
||||
repo_path: modules/tools
|
||||
make/_shared_new:
|
||||
- folder_name: helm
|
||||
repo_url: https://github.com/cert-manager/makefile-modules.git
|
||||
repo_ref: main
|
||||
repo_hash: 8187c6497881beb7829253c3467002b6cb5c5fb7
|
||||
repo_hash: 197cd670dbf70eb7b0f09fd3accb12cda8d6a188
|
||||
repo_path: modules/helm
|
||||
|
||||
@ -40,6 +40,15 @@ endif
|
||||
crds_dir ?= deploy/crds
|
||||
crds_dir_readme := $(dir $(lastword $(MAKEFILE_LIST)))/crds_dir.README.md
|
||||
crds_expression ?= .Values.crds.enabled
|
||||
crds_template_include_pattern := *.yaml
|
||||
# Space-separated list of basenames to exclude (e.g. foo.yaml *_test.yaml)
|
||||
crds_template_exclude_pattern ?=
|
||||
|
||||
define filter-out-basenames
|
||||
$(if $(strip $(2)), \
|
||||
$(foreach f,$(1),$(if $(filter $(2),$(notdir $(f))),,$(f))), \
|
||||
$(1))
|
||||
endef
|
||||
|
||||
.PHONY: generate-crds
|
||||
## Generate CRD manifests.
|
||||
@ -57,14 +66,20 @@ generate-crds: | $(NEEDS_CONTROLLER-GEN) $(NEEDS_YQ)
|
||||
|
||||
@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); \
|
||||
cat $(crd_template_header) > $(helm_chart_source_dir)/templates/crd-$$i; \
|
||||
$(sed_inplace) "s/REPLACE_CRD_EXPRESSION/$(crds_expression)/g" $(helm_chart_source_dir)/templates/crd-$$i; \
|
||||
$(sed_inplace) "s/REPLACE_CRD_NAME/$$crd_name/g" $(helm_chart_source_dir)/templates/crd-$$i; \
|
||||
$(sed_inplace) "s/REPLACE_LABELS_TEMPLATE/$(helm_labels_template_name)/g" $(helm_chart_source_dir)/templates/crd-$$i; \
|
||||
$(YQ) -I2 '{"spec": .spec}' $(crds_gen_temp)/$$i >> $(helm_chart_source_dir)/templates/crd-$$i; \
|
||||
cat $(crd_template_footer) >> $(helm_chart_source_dir)/templates/crd-$$i; \
|
||||
$(eval crds_gen_temp_all_files := $(wildcard $(crds_gen_temp)/$(crds_template_include_pattern)))
|
||||
$(eval crds_gen_temp_files := $(if $(crds_template_exclude_pattern), \
|
||||
$(call filter-out-basenames,$(crds_gen_temp_all_files),$(crds_template_exclude_pattern)), \
|
||||
$(crds_gen_temp_all_files)))
|
||||
|
||||
@for f in $(crds_gen_temp_files); do \
|
||||
crd_name=$$($(YQ) eval '.metadata.name' $$f); \
|
||||
crd_template_file="$(helm_chart_source_dir)/templates/crd-$$(basename $$f)"; \
|
||||
cat $(crd_template_header) > $$crd_template_file; \
|
||||
$(sed_inplace) "s/REPLACE_CRD_EXPRESSION/$(crds_expression)/g" $$crd_template_file; \
|
||||
$(sed_inplace) "s/REPLACE_CRD_NAME/$$crd_name/g" $$crd_template_file; \
|
||||
$(sed_inplace) "s/REPLACE_LABELS_TEMPLATE/$(helm_labels_template_name)/g" $$crd_template_file; \
|
||||
$(YQ) -I2 '{"spec": .spec}' $$f >> $$crd_template_file; \
|
||||
cat $(crd_template_footer) >> $$crd_template_file; \
|
||||
done
|
||||
|
||||
@if [ -n "$$(ls $(crds_gen_temp) 2>/dev/null)" ]; then \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user