@@ -59,8 +59,6 @@ BIN_DIR := bin
5959TEST_DIR := test
6060TOOLS_DIR := hack/tools
6161TOOLS_BIN_DIR := $(abspath $(TOOLS_DIR ) /$(BIN_DIR ) )
62- EXP_DAY2_DIR := exp/day2
63- EXP_CLUSTERCLASS_DIR := exp/clusterclass
6462
6563$(TOOLS_BIN_DIR ) :
6664 mkdir -p $@
@@ -157,7 +155,7 @@ HELM_VER := v3.18.4
157155HELM_BIN := helm
158156HELM := $(TOOLS_BIN_DIR ) /$(HELM_BIN ) -$(HELM_VER )
159157
160- CLUSTERCTL_VER := v1.10.5
158+ CLUSTERCTL_VER := v1.10.6
161159CLUSTERCTL_BIN := clusterctl
162160CLUSTERCTL := $(TOOLS_BIN_DIR ) /$(CLUSTERCTL_BIN ) -$(CLUSTERCTL_VER )
163161
@@ -230,8 +228,6 @@ generate: vendor ## Run all generators
230228 $(MAKE ) vendor
231229 $(MAKE ) generate-modules
232230 $(MAKE ) generate-manifests-api
233- $(MAKE ) generate-exp-day2-manifests-api
234- $(MAKE ) generate-exp-clusterclass-manifests-api
235231 $(MAKE ) generate-manifests-external
236232 $(MAKE ) generate-go-deepcopy
237233 $(MAKE ) vendor-clean
@@ -252,37 +248,16 @@ generate-manifests-api: controller-gen ## Generate ClusterRole and CustomResourc
252248 output:crd:artifacts:config=./config/crd/bases \
253249 output:rbac:dir=./config/rbac \
254250
255- .PHONY : generate-exp-day2-manifests-api
256- generate-exp-day2-manifests-api : controller-gen # # Generate ClusterRole and CustomResourceDefinition objects for experimental API.
257- $(CONTROLLER_GEN ) rbac:roleName=manager-role crd paths=" ./exp/day2/api/v1alpha1/..." \
258- paths=./exp/day2/controllers/... \
259- paths=./exp/day2/webhooks/... \
260- output:crd:artifacts:config=./exp/day2/config/crd/bases \
261- output:rbac:dir=./exp/day2/config/rbac \
262- output:webhook:dir=./exp/day2/config/webhook \
263- webhook
264-
265- .PHONY : generate-exp-clusterclass-manifests-api
266- generate-exp-clusterclass-manifests-api : controller-gen # # Generate ClusterRole and CustomResourceDefinition objects for experimental API.
267- $(CONTROLLER_GEN ) rbac:roleName=manager-role crd paths=" ./exp/clusterclass/api/v1alpha1/..." \
268- paths=./exp/clusterclass/internal/controller/... \
269- output:crd:artifacts:config=./exp/clusterclass/config/crd/bases \
270- output:rbac:dir=./exp/clusterclass/config/rbac
271-
272251.PHONY : generate-modules
273252generate-modules : # # Run go mod tidy to ensure modules are up to date
274253 go mod tidy
275254 cd $(TEST_DIR ) ; go mod tidy
276- cd $(EXP_DAY2_DIR ) ; go mod tidy
277- cd $(EXP_CLUSTERCLASS_DIR ) ; go mod tidy
278255
279256.PHONY : generate-go-deepcopy
280257generate-go-deepcopy : # # Run deepcopy generation
281258 $(CONTROLLER_GEN ) \
282259 object:headerFile=./hack/boilerplate.go.txt \
283- paths=./api/... \
284- paths=./exp/day2/api/...
285- paths=./exp/clusterclass/api/...
260+ paths=./api/...
286261
287262# Run go mod
288263.PHONY : vendor
@@ -334,18 +309,10 @@ updatecli-apply: $(UPDATECLI)
334309KUBEBUILDER_ASSETS ?= $(shell $(SETUP_ENVTEST ) use --use-env -p path $(KUBEBUILDER_ENVTEST_KUBERNETES_VERSION ) )
335310
336311.PHONY : test
337- test : $(SETUP_ENVTEST ) manifests test-exp-day2 test-exp-clusterclass # # Run all generators and exp tests.
312+ test : $(SETUP_ENVTEST ) manifests # # Run all generators and tests.
338313 go clean -testcache
339314 KUBEBUILDER_ASSETS=" $( KUBEBUILDER_ASSETS) " go test -tags $(TARGET_BUILD ) ./... $(TEST_ARGS )
340315
341- .PHONY : test-exp-day2
342- test-exp-day2 : $(SETUP_ENVTEST ) # # Run tests for experimental day2 API.
343- cd $(EXP_DAY2_DIR ) ; KUBEBUILDER_ASSETS=" $( KUBEBUILDER_ASSETS) " go test -tags $(TARGET_BUILD ) ./... $(TEST_ARGS )
344-
345- .PHONY : test-exp-clusterclass
346- test-exp-clusterclass : $(SETUP_ENVTEST ) # # Run tests for experimental clusterclass API.
347- cd $(EXP_CLUSTERCLASS_DIR ) ; KUBEBUILDER_ASSETS=" $( KUBEBUILDER_ASSETS) " go test -tags $(TARGET_BUILD ) ./... $(TEST_ARGS )
348-
349316# #@ Build
350317
351318.PHONY : build
@@ -591,26 +558,13 @@ release: clean-release $(RELEASE_DIR) ## Builds and push container images using
591558build-chart : $(HELM ) $(KUSTOMIZE ) $(RELEASE_DIR ) $(CHART_RELEASE_DIR ) $(CHART_PACKAGE_DIR ) # # Builds the chart to publish with a release
592559 $(KUSTOMIZE ) build ./config/chart > $(CHART_DIR ) /templates/rancher-turtles-components.yaml
593560 $(KUSTOMIZE ) build ./config/operatorchart > $(CHART_DIR ) /templates/operator-crds.yaml
594- $(KUSTOMIZE ) build ./exp/day2/config/chart > $(CHART_DIR ) /templates/rancher-turtles-exp-day2-components.yaml
595- $(KUSTOMIZE ) build ./exp/clusterclass/config/default > $(CHART_DIR ) /templates/rancher-turtles-exp-clusterclass-components.yaml
596- ./scripts/process-manifests.sh day2operations $(CHART_DIR ) /templates/rancher-turtles-exp-day2-components.yaml
597- ./scripts/process-manifests.sh clusterclass-operations $(CHART_DIR ) /templates/rancher-turtles-exp-clusterclass-components.yaml
561+
598562 cp -rf $(CHART_DIR)/* $(CHART_RELEASE_DIR)
599563
600564 sed -i -e 's/tag:.*/tag: '${RELEASE_TAG}'/' $(CHART_RELEASE_DIR)/values.yaml
601565 sed -i -e 's/imagePullPolicy:.*/imagePullPolicy: '$(PULL_POLICY)'/' $(CHART_RELEASE_DIR)/values.yaml
602566 sed -i -e 's|repository:.*|repository: '${CONTROLLER_IMG}'|' $(CHART_RELEASE_DIR)/values.yaml
603567
604- # day2operations
605- sed -i -e '/day2operations:/,/^[^[:space:]]/ s@^\([[:space:]]*image:\).*@\1 '"${CONTROLLER_IMG}"'@' $(CHART_RELEASE_DIR)/values.yaml
606- sed -i -e '/day2operations:/,/^[^[:space:]]/ s@^\([[:space:]]*imageVersion:\).*@\1 '"${RELEASE_TAG}"'@' $(CHART_RELEASE_DIR)/values.yaml
607- sed -i -e '/day2operations:/,/^[^[:space:]]/ s@^\([[:space:]]*imagePullPolicy:\).*@\1 '"${PULL_POLICY}"'@' $(CHART_RELEASE_DIR)/values.yaml
608-
609- # clusterclass-operations
610- sed -i -e '/clusterclass-operations:/,/^[^[:space:]]/ s@^\([[:space:]]*image:\).*@\1 '"${CONTROLLER_IMG}"'@' $(CHART_RELEASE_DIR)/values.yaml
611- sed -i -e '/clusterclass-operations:/,/^[^[:space:]]/ s@^\([[:space:]]*imageVersion:\).*@\1 '"${RELEASE_TAG}"'@' $(CHART_RELEASE_DIR)/values.yaml
612- sed -i -e '/clusterclass-operations:/,/^[^[:space:]]/ s@^\([[:space:]]*imagePullPolicy:\).*@\1 '"${PULL_POLICY}"'@' $(CHART_RELEASE_DIR)/values.yaml
613-
614568 cd $(CHART_RELEASE_DIR) && $(HELM) dependency update
615569 $(HELM) package $(CHART_RELEASE_DIR) --app-version=$(HELM_CHART_TAG) --version=$(HELM_CHART_TAG) --destination=$(CHART_PACKAGE_DIR)
616570
0 commit comments