Skip to content

Commit

Permalink
Generate apply configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
astefanutti authored and openshift-merge-robot committed Sep 26, 2023
1 parent 68ca8a0 commit 0d1a39e
Show file tree
Hide file tree
Showing 15 changed files with 1,308 additions and 15 deletions.
27 changes: 12 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,12 @@ verify-tag-name: print-global-variables
t=${TAG} && [ $${#t} -le 128 ] || { echo "Target name $$t has 128 or more chars"; false; }
.PHONY: generate-client ## Generate client packages
generate-client: code-generator
rm -rf pkg/client/clientset/versioned pkg/client/informers/externalversions pkg/client/listers/controller/v1beta1 pkg/client/listers/quotasubtree/v1
# TODO: add this back when the version of the tool has been updated and supports this executable
# $(APPLYCONFIGURATION_GEN) \
# --input-dirs="github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/apis/controller/v1beta1" \
# --go-header-file="hack/boilerplate/boilerplate.go.txt" \
# --output-package="github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/client/applyconfiguration" \
# --trim-path-prefix "github.com/project-codeflare/multi-cluster-app-dispatcher"
rm -rf pkg/client/applyconfiguration pkg/client/clientset/versioned pkg/client/informers/externalversions pkg/client/listers/controller/v1beta1 pkg/client/listers/quotasubtree/v1
$(APPLYCONFIGURATION_GEN) \
--input-dirs="github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/apis/controller/v1beta1" \
--go-header-file="hack/boilerplate/boilerplate.go.txt" \
--output-package="github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/client/applyconfiguration" \
--trim-path-prefix "github.com/project-codeflare/multi-cluster-app-dispatcher"
$(CLIENT_GEN) \
--input="pkg/apis/controller/v1beta1" \
--input="pkg/apis/quotaplugins/quotasubtree/v1" \
Expand Down Expand Up @@ -108,14 +107,12 @@ $(CONTROLLER_GEN): $(LOCALBIN)
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)

.PHONY: code-generator
#TODO: add $(APPLYCONFIGURATION_GEN) as a dependency when the tool is supported
code-generator: $(CLIENT_GEN) $(LISTER_GEN) $(INFORMER_GEN) $(CONTROLLER_GEN)

# TODO: enable this target once the tools is supported
#.PHONY: applyconfiguration-gen
#applyconfiguration-gen: $(APPLYCONFIGURATION_GEN)
#$(APPLYCONFIGURATION_GEN): $(LOCALBIN)
# test -s $(LOCALBIN)/applyconfiguration-gen || GOBIN=$(LOCALBIN) go install k8s.io/code-generator/cmd/applyconfiguration-gen@$(CODEGEN_VERSION)
code-generator: $(APPLYCONFIGURATION_GEN) $(CLIENT_GEN) $(LISTER_GEN) $(INFORMER_GEN) $(CONTROLLER_GEN)

.PHONY: applyconfiguration-gen
applyconfiguration-gen: $(APPLYCONFIGURATION_GEN)
$(APPLYCONFIGURATION_GEN): $(LOCALBIN)
test -s $(LOCALBIN)/applyconfiguration-gen || GOBIN=$(LOCALBIN) go install k8s.io/code-generator/cmd/applyconfiguration-gen@$(CODEGEN_VERSION)

.PHONY: client-gen
client-gen: $(CLIENT_GEN)
Expand Down
219 changes: 219 additions & 0 deletions pkg/client/applyconfiguration/controller/v1beta1/appwrapper.go

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

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

Loading

0 comments on commit 0d1a39e

Please sign in to comment.