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

Convert all singleton lists in the MR APIs to embedded objects #123

Merged
merged 9 commits into from
May 8, 2024
Merged
45 changes: 39 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,28 @@ GO_SUBDIRS += cmd internal apis
# ====================================================================================
# Setup Kubernetes tools

KIND_VERSION = v0.15.0
UP_VERSION = v0.16.1
KIND_VERSION = v0.21.0
UP_VERSION = v0.28.0
UP_CHANNEL = stable
UPTEST_VERSION = v0.7.0
UPTEST_VERSION = v0.11.1
UPTEST_LOCAL_VERSION = v0.12.0-9.gac371c9
UPTEST_LOCAL_CHANNEL = main
KUSTOMIZE_VERSION = v5.3.0
YQ_VERSION = v4.40.5
UXP_VERSION = 1.14.6-up.1

-include build/makelib/k8s_tools.mk

# uptest download and install
UPTEST_LOCAL := $(TOOLS_HOST_DIR)/uptest-$(UPTEST_LOCAL_VERSION)

$(UPTEST_LOCAL):
@$(INFO) installing uptest $(UPTEST_LOCAL)
@mkdir -p $(TOOLS_HOST_DIR)
@curl -fsSLo $(UPTEST_LOCAL) https://s3.us-west-2.amazonaws.com/crossplane.uptest.releases/$(UPTEST_LOCAL_CHANNEL)/$(UPTEST_LOCAL_VERSION)/bin/$(SAFEHOST_PLATFORM)/uptest || $(FAIL)
@chmod +x $(UPTEST_LOCAL)
@$(OK) installing uptest $(UPTEST_LOCAL)

Comment on lines +71 to +77
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a temporary workaround till upbound/build#255 is merged.

# ====================================================================================
# Setup Images

Expand All @@ -74,6 +90,9 @@ XPKG_REG_ORGS ?= xpkg.upbound.io/upbound
# inferred.
XPKG_REG_ORGS_NO_PROMOTE ?= xpkg.upbound.io/upbound
XPKGS = $(PROJECT_NAME)
XPKG_DIR = $(OUTPUT_DIR)/package
XPKG_IGNORE = kustomize/*,crds/kustomization.yaml

-include build/makelib/xpkg.mk

# NOTE(hasheddan): we force image building to happen prior to xpkg build so that
Expand Down Expand Up @@ -164,7 +183,7 @@ submodules:
run: go.build
@$(INFO) Running Crossplane locally out-of-cluster . . .
@# To see other arguments that can be provided, run the command with --help instead
UPBOUND_CONTEXT="local" $(GO_OUT_DIR)/provider --debug
UPBOUND_CONTEXT="local" $(GO_OUT_DIR)/provider --debug --certs-dir=""

# ====================================================================================
# End to End Testing
Expand All @@ -176,9 +195,9 @@ CROSSPLANE_NAMESPACE = upbound-system
# - UPTEST_EXAMPLE_LIST, a comma-separated list of examples to test
# - UPTEST_CLOUD_CREDENTIALS (optional), cloud credentials for the provider being tested, e.g. export UPTEST_CLOUD_CREDENTIALS=$(cat ~/.aws/credentials)
# - UPTEST_DATASOURCE_PATH (optional), see https://github.com/upbound/uptest#injecting-dynamic-values-and-datasource
uptest: $(UPTEST) $(KUBECTL) $(KUTTL)
uptest: $(UPTEST_LOCAL) $(KUBECTL) $(KUTTL)
@$(INFO) running automated tests
@KUBECTL=$(KUBECTL) KUTTL=$(KUTTL) $(UPTEST) e2e "${UPTEST_EXAMPLE_LIST}" --setup-script=cluster/test/setup.sh || $(FAIL)
@KUBECTL=$(KUBECTL) KUTTL=$(KUTTL) CROSSPLANE_NAMESPACE=$(CROSSPLANE_NAMESPACE) $(UPTEST_LOCAL) e2e "${UPTEST_EXAMPLE_LIST}" --setup-script=cluster/test/setup.sh || $(FAIL)
@$(OK) running automated tests

local-deploy: build controlplane.up local.xpkg.deploy.provider.$(PROJECT_NAME)
Expand Down Expand Up @@ -244,3 +263,17 @@ crossplane.help:
help-special: crossplane.help

.PHONY: crossplane.help help-special

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

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

54 changes: 33 additions & 21 deletions apis/administrativeunits/v1beta1/zz_generated.resolvers.go

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

12 changes: 6 additions & 6 deletions apis/administrativeunits/v1beta1/zz_member_types.go

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

103 changes: 60 additions & 43 deletions apis/app/v1beta1/zz_generated.resolvers.go

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

8 changes: 4 additions & 4 deletions apis/app/v1beta1/zz_roleassignment_types.go

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

Loading
Loading