Skip to content

Commit 7ce6f8a

Browse files
committed
Merge branch 'main' of github.com:kubernetes-sigs/cluster-api-provider-cloudstack into reconcile-capc-cluster-to-cks
2 parents 254d93b + d597e80 commit 7ce6f8a

File tree

81 files changed

+991
-1436
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+991
-1436
lines changed

Makefile

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ GH_REPO ?= kubernetes-sigs/cluster-api-provider-cloudstack
2727

2828
# Binaries
2929
CONTROLLER_GEN := $(TOOLS_BIN_DIR)/controller-gen
30-
GINKGO_V1 := $(TOOLS_BIN_DIR)/ginkgo_v1
31-
GINKGO_V2 := $(TOOLS_BIN_DIR)/ginkgo_v2
30+
GINKGO := $(TOOLS_BIN_DIR)/ginkgo
3231
GOLANGCI_LINT := $(TOOLS_BIN_DIR)/golangci-lint
3332
KUSTOMIZE := $(TOOLS_BIN_DIR)/kustomize
3433
MOCKGEN := $(TOOLS_BIN_DIR)/mockgen
@@ -70,10 +69,6 @@ endif
7069
# Options are set to exit when a recipe line exits non-zero or a piped command fails.
7170
# SHELL = /usr/bin/env bash -o pipefail
7271
.SHELLFLAGS = -ec
73-
# Quiet Ginkgo for now.
74-
# The warnings are in regards to a future release.
75-
export ACK_GINKGO_DEPRECATIONS := 1.16.5
76-
export ACK_GINKGO_RC=true
7772

7873
export PATH := $(TOOLS_BIN_DIR):$(PATH)
7974

@@ -85,7 +80,7 @@ all: build
8580
## --------------------------------------
8681

8782
.PHONY: binaries
88-
binaries: $(CONTROLLER_GEN) $(GOLANGCI_LINT) $(STATIC_CHECK) $(GINKGO_V1) $(GINKGO_V2) $(MOCKGEN) $(KUSTOMIZE) managers # Builds and installs all binaries
83+
binaries: $(CONTROLLER_GEN) $(GOLANGCI_LINT) $(STATIC_CHECK) $(GINKGO) $(MOCKGEN) $(KUSTOMIZE) managers # Builds and installs all binaries
8984

9085
.PHONY: managers
9186
managers:
@@ -95,7 +90,7 @@ managers:
9590
manager-cloudstack-infrastructure: ## Build manager binary.
9691
CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} go build -ldflags "${LDFLAGS} -extldflags '-static'" -o $(BIN_DIR)/manager .
9792

98-
export K8S_VERSION=1.25.0
93+
export K8S_VERSION=1.26.1
9994
$(KUBECTL) $(API_SERVER) $(ETCD) &:
10095
cd $(TOOLS_DIR) && curl --silent -L "https://go.kubebuilder.io/test-tools/${K8S_VERSION}/$(shell go env GOOS)/$(shell go env GOARCH)" --output - | \
10196
tar -C ./ --strip-components=1 -zvxf -
@@ -159,7 +154,7 @@ $(shell grep -qs "$(IMG)" config/default/manager_image_patch_edited.yaml || rm -
159154
generate-manifests: config/.flag.mk ## Generates crd, webhook, rbac, and other configuration manifests from kubebuilder instructions in go comments.
160155
config/.flag.mk: $(CONTROLLER_GEN) $(MANIFEST_GEN_INPUTS)
161156
sed -e 's@image: .*@image: '"$(IMG)"'@' config/default/manager_image_patch.yaml > config/default/manager_image_patch_edited.yaml
162-
$(CONTROLLER_GEN) crd:crdVersions=v1 rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
157+
$(CONTROLLER_GEN) crd:crdVersions=v1 rbac:roleName=manager-role webhook paths="{./api/...,./controllers/...}" output:crd:artifacts:config=config/crd/bases
163158
@touch config/.flag.mk
164159

165160
CONVERSION_GEN_TARGET=$(shell find api -type d -name "v*1" -exec echo {}\/zz_generated.conversion.go \;)
@@ -245,7 +240,7 @@ delete-kind-cluster:
245240
kind delete cluster --name $(KIND_CLUSTER_NAME)
246241

247242
cluster-api: ## Clone cluster-api repository for tilt use.
248-
git clone --branch v1.4.4 --depth 1 https://github.com/kubernetes-sigs/cluster-api.git
243+
git clone --branch v1.4.8 --depth 1 https://github.com/kubernetes-sigs/cluster-api.git
249244

250245
cluster-api/tilt-settings.json: hack/tilt-settings.json cluster-api
251246
cp ./hack/tilt-settings.json cluster-api
@@ -272,10 +267,10 @@ config/.flag-test.mk: $(CONTROLLER_GEN) $(MANIFEST_GEN_INPUTS_TEST)
272267

273268
.PHONY: test
274269
test: ## Run tests.
275-
test: generate-deepcopy-test generate-manifest-test generate-mocks lint $(GINKGO_V2) $(KUBECTL) $(API_SERVER) $(ETCD)
270+
test: generate-deepcopy-test generate-manifest-test generate-mocks lint $(GINKGO) $(KUBECTL) $(API_SERVER) $(ETCD)
276271
@./hack/testing_ginkgo_recover_statements.sh --add # Add ginkgo.GinkgoRecover() statements to controllers.
277272
@# The following is a slightly funky way to make sure the ginkgo statements are removed regardless the test results.
278-
@$(GINKGO_V2) --label-filter="!integ" --cover -coverprofile cover.out --covermode=atomic -v ./api/... ./controllers/... ./pkg/...; EXIT_STATUS=$$?;\
273+
@$(GINKGO) --label-filter="!integ" --cover -coverprofile cover.out --covermode=atomic -v ./api/... ./controllers/... ./pkg/...; EXIT_STATUS=$$?;\
279274
./hack/testing_ginkgo_recover_statements.sh --remove; exit $$EXIT_STATUS
280275

281276
CLUSTER_TEMPLATES_INPUT_FILES=$(shell find test/e2e/data/infrastructure-cloudstack/v1beta*/cluster-template* test/e2e/data/infrastructure-cloudstack/*/bases/* -type f)
@@ -285,15 +280,16 @@ e2e-cluster-templates: $(CLUSTER_TEMPLATES_OUTPUT_FILES) ## Generate cluster tem
285280
cluster-template%yaml: $(KUSTOMIZE) $(CLUSTER_TEMPLATES_INPUT_FILES)
286281
$(KUSTOMIZE) build --load-restrictor LoadRestrictionsNone $(basename $@) > $@
287282

288-
e2e-essentials: $(GINKGO_V1) $(KUBECTL) e2e-cluster-templates create-kind-cluster ## Fulfill essential tasks for e2e testing.
283+
e2e-essentials: $(GINKGO) $(KUBECTL) e2e-cluster-templates create-kind-cluster ## Fulfill essential tasks for e2e testing.
289284
IMG=$(IMG_LOCAL) make generate-manifests docker-build docker-push
290285

291286
JOB ?= .*
292287
E2E_CONFIG ?= ${REPO_ROOT}/test/e2e/config/cloudstack.yaml
288+
E2E_TIMEOUT ?= 3h
293289
run-e2e: e2e-essentials ## Run e2e testing. JOB is an optional REGEXP to select certainn test cases to run. e.g. JOB=PR-Blocking, JOB=Conformance
294290
$(KUBECTL) apply -f cloud-config.yaml && \
295291
cd test/e2e && \
296-
$(GINKGO_V1) -v -trace -tags=e2e -focus=$(JOB) -skip=Conformance -skipPackage=kubeconfig_helper -nodes=1 -noColor=false ./... -- \
292+
$(GINKGO) -v --trace --tags=e2e --focus=$(JOB) --timeout=$(E2E_TIMEOUT) --skip=Conformance --skip-package=kubeconfig_helper --nodes=1 --no-color=false ./... -- \
297293
-e2e.artifacts-folder=${REPO_ROOT}/_artifacts \
298294
-e2e.config=${E2E_CONFIG} \
299295
-e2e.skip-resource-cleanup=false -e2e.use-existing-cluster=true
@@ -340,13 +336,12 @@ release-manifests-metrics-port:
340336
make release-manifests RELEASE_MANIFEST_SOURCE_BASE=config/default-with-metrics-port
341337

342338
.PHONY: release-staging
343-
release-staging: ## Builds and push container images and manifests to the staging bucket.
344-
$(MAKE) docker-build
345-
$(MAKE) docker-push
346-
$(MAKE) release-alias-tag
339+
release-staging: ## Builds and uploads manifests to the staging bucket and creates new tag
347340
$(MAKE) release-templates
348341
$(MAKE) release-manifests TAG=$(RELEASE_ALIAS_TAG)
349342
$(MAKE) upload-staging-artifacts
343+
git tag $(RELEASE_ALIAS_TAG)
344+
git push upstream $(RELEASE_ALIAS_TAG)
350345

351346
.PHONY: release-alias-tag
352347
release-alias-tag: # Adds the tag to the last build tag.

0 commit comments

Comments
 (0)