This is an automated email from the ASF dual-hosted git repository. astefanutti pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit bc9572e509c44de536dbea484d3e8a1c9fc5df91 Author: Antonin Stefanutti <anto...@stefanutti.fr> AuthorDate: Mon Jan 9 14:42:23 2023 +0100 api: Add apply configuration generation --- script/Makefile | 1 + script/gen_client.sh | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/script/Makefile b/script/Makefile index b9e17b711..c7f305ea6 100644 --- a/script/Makefile +++ b/script/Makefile @@ -212,6 +212,7 @@ codegen-tools-install: controller-gen @# We must force the installation to make sure we are using the correct version @# Note: as there is no --version in the tools, we cannot rely on cached local versions @echo "Installing k8s.io/code-generator tools with version $(CODEGEN_VERSION)" + go install k8s.io/code-generator/cmd/applyconfiguration-gen@$(CODEGEN_VERSION) go install k8s.io/code-generator/cmd/client-gen@$(CODEGEN_VERSION) go install k8s.io/code-generator/cmd/lister-gen@$(CODEGEN_VERSION) go install k8s.io/code-generator/cmd/informer-gen@$(CODEGEN_VERSION) diff --git a/script/gen_client.sh b/script/gen_client.sh index 25437af84..6207a0697 100755 --- a/script/gen_client.sh +++ b/script/gen_client.sh @@ -25,11 +25,18 @@ cd $location/../pkg/client/camel echo "Generating Go client code..." +$(go env GOPATH)/bin/applyconfiguration-gen \ + --input-dirs=github.com/apache/camel-k/pkg/apis/camel/v1,github.com/apache/camel-k/pkg/apis/camel/v1alpha1 \ + --go-header-file=../../../script/headers/default.txt \ + --output-base=. \ + --output-package=github.com/apache/camel-k/pkg/client/camel/applyconfiguration + $(go env GOPATH)/bin/client-gen \ --input=camel/v1,camel/v1alpha1 \ --go-header-file=../../../script/headers/default.txt \ --clientset-name "versioned" \ --input-base=github.com/apache/camel-k/pkg/apis \ + --apply-configuration-package=github.com/apache/camel-k/pkg/client/camel/applyconfiguration \ --output-base=. \ --output-package=github.com/apache/camel-k/pkg/client/camel/clientset