Skip to content

Commit

Permalink
Merge pull request #1075 from ulucinar/multiversion-crds
Browse files Browse the repository at this point in the history
Add support for generating multi-version CRDs and CRD conversion webhooks
  • Loading branch information
ulucinar authored Jan 31, 2024
2 parents 702122c + 7c7f28b commit 8d879bc
Show file tree
Hide file tree
Showing 5,162 changed files with 167,340 additions and 126,436 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
run:
deadline: 20m
timeout: 20m

skip-files:
- "zz_\\..+\\.go$"
- "zz_.+\\.go$"

output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
Expand Down
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ KIND_VERSION = v0.20.0
UP_VERSION = v0.20.0
UP_CHANNEL = stable
UPTEST_VERSION = v0.8.0
KUSTOMIZE_VERSION = v5.3.0
YQ_VERSION = v4.40.5

export UP_VERSION := $(UP_VERSION)
export UP_CHANNEL := $(UP_CHANNEL)
Expand All @@ -91,9 +93,13 @@ XPKG_REG_ORGS ?= xpkg.upbound.io/upbound
# NOTE(hasheddan): skip promoting on xpkg.upbound.io as channel tags are
# inferred.
XPKG_REG_ORGS_NO_PROMOTE ?= xpkg.upbound.io/upbound
XPKG_DIR = $(OUTPUT_DIR)/package
XPKG_IGNORE = kustomization.yaml

export XPKG_REG_ORGS := $(XPKG_REG_ORGS)
export XPKG_REG_ORGS_NO_PROMOTE := $(XPKG_REG_ORGS_NO_PROMOTE)
export XPKG_DIR := $(XPKG_DIR)
export XPKG_IGNORE := $(XPKG_IGNORE)

-include build/makelib/xpkg.mk

Expand Down Expand Up @@ -307,3 +313,17 @@ go.mod.cachedir:
@go env GOMODCACHE

.PHONY: cobertura reviewable submodules fallthrough go.mod.cachedir go.cachedir run crds.clean $(TERRAFORM_PROVIDER_SCHEMA)

build.init: kustomize-crds

kustomize-crds: output.init $(KUSTOMIZE) $(YQ)
@$(INFO) Kustomizing CRDs...
@rm -fr $(OUTPUT_DIR)/package || $(FAIL)
@cp -R package $(OUTPUT_DIR) && \
cd $(OUTPUT_DIR)/package/crds && \
kustomize create --autodetect || $(FAIL)
@export YQ=$(YQ) && \
XDG_CONFIG_HOME=$(PWD)/package $(KUSTOMIZE) build --enable-alpha-plugins $(OUTPUT_DIR)/package/kustomize -o $(OUTPUT_DIR)/package/crds.yaml || $(FAIL)
@$(OK) Kustomizing CRDs.

.PHONY: kustomize-crds
133 changes: 133 additions & 0 deletions apis/accessanalyzer/v1beta1/zz_analyzer_terraformed.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/accessanalyzer/v1beta1/zz_analyzer_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/accessanalyzer/v1beta1/zz_archiverule_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions apis/accessanalyzer/v1beta1/zz_generated.conversion_hubs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/account/v1beta1/zz_alternatecontact_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions apis/account/v1beta1/zz_generated.conversion_hubs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8d879bc

Please sign in to comment.