@@ -70,10 +70,10 @@ OBSERVABILITY_DIR := hack/observability
70
70
71
71
export PATH := $(abspath $(TOOLS_BIN_DIR ) ) :$(PATH )
72
72
73
- # Set --output-base for conversion-gen if we are not within GOPATH
73
+ # Set --output-dir for conversion-gen if we are not within GOPATH
74
74
ifneq ($(abspath $(ROOT_DIR ) ) ,$(shell go env GOPATH) /src/sigs.k8s.io/cluster-api)
75
- CONVERSION_GEN_OUTPUT_BASE := --output-base =$(ROOT_DIR)
76
- CONVERSION_GEN_OUTPUT_BASE_CAPD := --output-base =$(ROOT_DIR)/$(CAPD_DIR)
75
+ CONVERSION_GEN_OUTPUT_BASE := --output-dir =$(ROOT_DIR)
76
+ CONVERSION_GEN_OUTPUT_BASE_CAPD := --output-dir =$(ROOT_DIR)/$(CAPD_DIR)
77
77
else
78
78
export GOPATH := $(shell go env GOPATH)
79
79
endif
@@ -124,7 +124,7 @@ GOTESTSUM_BIN := gotestsum
124
124
GOTESTSUM := $(abspath $(TOOLS_BIN_DIR ) /$(GOTESTSUM_BIN ) -$(GOTESTSUM_VER ) )
125
125
GOTESTSUM_PKG := gotest.tools/gotestsum
126
126
127
- CONVERSION_GEN_VER := v0.29.2
127
+ CONVERSION_GEN_VER := v0.30.0
128
128
CONVERSION_GEN_BIN := conversion-gen
129
129
# We are intentionally using the binary without version suffix, to avoid the version
130
130
# in generated files.
@@ -184,7 +184,7 @@ IMPORT_BOSS_PKG := k8s.io/code-generator/cmd/import-boss
184
184
CONVERSION_VERIFIER_BIN := conversion-verifier
185
185
CONVERSION_VERIFIER := $(abspath $(TOOLS_BIN_DIR ) /$(CONVERSION_VERIFIER_BIN ) )
186
186
187
- OPENAPI_GEN_VER := 70dd376
187
+ OPENAPI_GEN_VER := dc4e619 # main branch as of 22.04.2024
188
188
OPENAPI_GEN_BIN := openapi-gen
189
189
# We are intentionally using the binary without version suffix, to avoid the version
190
190
# in generated files.
@@ -447,90 +447,78 @@ generate-go-conversions-core: ## Run all generate-go-conversions-core-* targets
447
447
generate-go-conversions-core-api : $(CONVERSION_GEN ) # # Generate conversions go code for core api
448
448
$(MAKE ) clean-generated-conversions SRC_DIRS=" ./internal/apis/core/v1alpha3,./internal/apis/core/v1alpha4"
449
449
$(CONVERSION_GEN ) \
450
- --input-dirs=./internal/apis/core/v1alpha3 \
451
- --input-dirs=./internal/apis/core/v1alpha4 \
452
- --build-tag=ignore_autogenerated_core \
453
- --output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE ) \
454
- --go-header-file=./hack/boilerplate/boilerplate.generatego.txt
450
+ --output-file=zz_generated.conversion.go $(CONVERSION_GEN_OUTPUT_BASE ) \
451
+ --go-header-file=./hack/boilerplate/boilerplate.generatego.txt \
452
+ ./internal/apis/core/v1alpha3 \
453
+ ./internal/apis/core/v1alpha4
455
454
456
455
.PHONY : generate-go-conversions-core-exp
457
456
generate-go-conversions-core-exp : $(CONVERSION_GEN ) # # Generate conversions go code for core exp
458
457
$(MAKE ) clean-generated-conversions SRC_DIRS=" ./internal/apis/core/exp/v1alpha3,./internal/apis/core/exp/addons/v1alpha3,./internal/apis/core/exp/v1alpha4,./internal/apis/core/exp/addons/v1alpha4"
459
458
$(CONVERSION_GEN ) \
460
- --input-dirs=./internal/apis/core/exp/v1alpha3 \
461
- --input-dirs=./internal/apis/core/exp/v1alpha4 \
462
- --input-dirs=./internal/apis/core/exp/addons/v1alpha3 \
463
- --input-dirs=./internal/apis/core/exp/addons/v1alpha4 \
464
- --build-tag=ignore_autogenerated_core_exp \
465
- --extra-peer-dirs=sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3 \
466
- --extra-peer-dirs=sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4 \
467
- --output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE ) \
468
- --go-header-file=./hack/boilerplate/boilerplate.generatego.txt
459
+ --extra-dirs=sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3 \
460
+ --extra-dirs=sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4 \
461
+ --output-file=zz_generated.conversion.go $(CONVERSION_GEN_OUTPUT_BASE ) \
462
+ --go-header-file=./hack/boilerplate/boilerplate.generatego.txt \
463
+ ./internal/apis/core/exp/v1alpha3 \
464
+ ./internal/apis/core/exp/v1alpha4 \
465
+ ./internal/apis/core/exp/addons/v1alpha3 \
466
+ ./internal/apis/core/exp/addons/v1alpha4
469
467
470
468
.PHONY : generate-go-conversions-core-exp-ipam
471
469
generate-go-conversions-core-exp-ipam : $(CONVERSION_GEN ) # # Generate conversions go code for core exp IPAM
472
470
$(MAKE ) clean-generated-conversions SRC_DIRS=" ./$( EXP_DIR) /ipam/api/v1alpha1"
473
471
$(CONVERSION_GEN ) \
474
- --input-dirs=./$(EXP_DIR ) /ipam/api/v1alpha1 \
475
- --build-tag=ignore_autogenerated_core_exp_ipam \
476
- --output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE ) \
477
- --go-header-file=./hack/boilerplate/boilerplate.generatego.txt
472
+ --output-file=zz_generated.conversion.go $(CONVERSION_GEN_OUTPUT_BASE ) \
473
+ --go-header-file=./hack/boilerplate/boilerplate.generatego.txt \
474
+ ./$(EXP_DIR ) /ipam/api/v1alpha1
478
475
479
476
.PHONY : generate-go-conversions-core-runtime
480
477
generate-go-conversions-core-runtime : $(CONVERSION_GEN ) # # Generate conversions go code for core runtime
481
478
$(MAKE ) clean-generated-conversions SRC_DIRS=" ./internal/runtime/test/v1alpha1,./internal/runtime/test/v1alpha2"
482
479
$(CONVERSION_GEN ) \
483
- --input-dirs=./internal/runtime/test/v1alpha1 \
484
- --input-dirs=./internal/runtime/test/v1alpha2 \
485
- --build-tag=ignore_autogenerated_core_runtime \
486
- --output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE ) \
487
- --go-header-file=./hack/boilerplate/boilerplate.generatego.txt
480
+ --output-file=zz_generated.conversion.go $(CONVERSION_GEN_OUTPUT_BASE ) \
481
+ --go-header-file=./hack/boilerplate/boilerplate.generatego.txt \
482
+ ./internal/runtime/test/v1alpha1 \
483
+ ./internal/runtime/test/v1alpha2
488
484
489
485
.PHONY : generate-go-conversions-kubeadm-bootstrap
490
486
generate-go-conversions-kubeadm-bootstrap : $(CONVERSION_GEN ) # # Generate conversions go code for kubeadm bootstrap
491
487
$(MAKE ) clean-generated-conversions SRC_DIRS=" ./internal/apis/bootstrap/kubeadm"
492
488
$(CONVERSION_GEN ) \
493
- --input-dirs=./internal/apis/bootstrap/kubeadm/v1alpha3 \
494
- --input-dirs=./internal/apis/bootstrap/kubeadm/v1alpha4 \
495
- --build-tag=ignore_autogenerated_kubeadm_bootstrap \
496
- --extra-peer-dirs=sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3 \
497
- --extra-peer-dirs=sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4 \
498
- --output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE ) \
499
- --go-header-file=./hack/boilerplate/boilerplate.generatego.txt
489
+ --output-file=zz_generated.conversion.go $(CONVERSION_GEN_OUTPUT_BASE ) \
490
+ --go-header-file=./hack/boilerplate/boilerplate.generatego.txt \
491
+ ./internal/apis/bootstrap/kubeadm/v1alpha3 \
492
+ ./internal/apis/bootstrap/kubeadm/v1alpha4
500
493
$(MAKE ) clean-generated-conversions SRC_DIRS=" ./bootstrap/kubeadm/types/upstreamv1beta2,./bootstrap/kubeadm/types/upstreamv1beta3"
501
494
$(CONVERSION_GEN ) \
502
- --input-dirs=./bootstrap/kubeadm/types/upstreamv1beta2 \
503
- --input-dirs=./bootstrap/kubeadm/types/upstreamv1beta3 \
504
- --build-tag=ignore_autogenerated_kubeadm_types \
505
- --output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE ) \
506
- --go-header-file=./hack/boilerplate/boilerplate.generatego.txt
495
+ --output-file=zz_generated.conversion.go $(CONVERSION_GEN_OUTPUT_BASE ) \
496
+ --go-header-file=./hack/boilerplate/boilerplate.generatego.txt \
497
+ ./bootstrap/kubeadm/types/upstreamv1beta2 \
498
+ ./bootstrap/kubeadm/types/upstreamv1beta3
507
499
508
500
.PHONY : generate-go-conversions-kubeadm-control-plane
509
501
generate-go-conversions-kubeadm-control-plane : $(CONVERSION_GEN ) # # Generate conversions go code for kubeadm control plane
510
502
$(MAKE ) clean-generated-conversions SRC_DIRS=" ./internal/apis/controlplane/kubeadm"
511
503
$(CONVERSION_GEN ) \
512
- --input-dirs=./internal/apis/controlplane/kubeadm/v1alpha3 \
513
- --input-dirs=./internal/apis/controlplane/kubeadm/v1alpha4 \
514
- --build-tag=ignore_autogenerated_kubeadm_controlplane \
515
- --extra-peer-dirs=sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3 \
516
- --extra-peer-dirs=sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4 \
517
- --extra-peer-dirs=sigs.k8s.io/cluster-api/internal/apis/bootstrap/kubeadm/v1alpha3 \
518
- --extra-peer-dirs=sigs.k8s.io/cluster-api/internal/apis/bootstrap/kubeadm/v1alpha4 \
519
- --output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE ) \
520
- --go-header-file=./hack/boilerplate/boilerplate.generatego.txt
504
+ --extra-dirs=sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3 \
505
+ --extra-dirs=sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4 \
506
+ --extra-dirs=sigs.k8s.io/cluster-api/internal/apis/bootstrap/kubeadm/v1alpha3 \
507
+ --extra-dirs=sigs.k8s.io/cluster-api/internal/apis/bootstrap/kubeadm/v1alpha4 \
508
+ --output-file=zz_generated.conversion.go $(CONVERSION_GEN_OUTPUT_BASE ) \
509
+ --go-header-file=./hack/boilerplate/boilerplate.generatego.txt \
510
+ ./internal/apis/controlplane/kubeadm/v1alpha3 \
511
+ ./internal/apis/controlplane/kubeadm/v1alpha4
521
512
522
513
.PHONY : generate-go-conversions-docker-infrastructure
523
514
generate-go-conversions-docker-infrastructure : $(CONVERSION_GEN ) # # Generate conversions go code for docker infrastructure provider
524
515
cd $(CAPD_DIR ) ; $(CONVERSION_GEN ) \
525
- --input-dirs=./api/v1alpha3 \
526
- --input-dirs=./api/v1alpha4 \
527
- --input-dirs=./$(EXP_DIR ) /api/v1alpha3 \
528
- --input-dirs=./$(EXP_DIR ) /api/v1alpha4 \
529
- --build-tag=ignore_autogenerated_capd \
530
- --extra-peer-dirs=sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3 \
531
- --extra-peer-dirs=sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4 \
532
- --output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE_CAPD ) \
533
- --go-header-file=../../../hack/boilerplate/boilerplate.generatego.txt
516
+ --output-file=zz_generated.conversion.go $(CONVERSION_GEN_OUTPUT_BASE_CAPD ) \
517
+ --go-header-file=../../../hack/boilerplate/boilerplate.generatego.txt \
518
+ ./api/v1alpha3 \
519
+ ./api/v1alpha4 \
520
+ ./$(EXP_DIR ) /api/v1alpha3 \
521
+ ./$(EXP_DIR ) /api/v1alpha4
534
522
535
523
.PHONY : generate-go-conversions-in-memory-infrastructure
536
524
generate-go-conversions-in-memory-infrastructure : $(CONVERSION_GEN ) # # Generate conversions go code for in-memory infrastructure provider
0 commit comments