Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add verbosity to controller-gen #889

Open
grzesuav opened this issue Mar 6, 2024 · 1 comment
Open

Add verbosity to controller-gen #889

grzesuav opened this issue Mar 6, 2024 · 1 comment

Comments

@grzesuav
Copy link

grzesuav commented Mar 6, 2024

Recently I stumble upon a situation when running controller gen had no effect

controller-gen crd:headerFile="hack/boilerplate.go.txt",year=2024 paths="./pkg/api/..." output:dir="."

for the crd gen, but worked fine for object gen

controller-gen object:headerFile="hack/boilerplate.go.txt",year=2024 paths="./pkg/api/..."

(it produced output)

When I wanted to dig into it, I realized there is no way to enable verbose output in controller-gen, which would help to debug it.

Would be nice to have this feature

@grzesuav
Copy link
Author

grzesuav commented Mar 7, 2024

Initial idea would be to add logr.Logger interface, configure some initial logger (like zap) and add a flag to enable verbose logging - of course as writing to sdtout it would conflict with output:stdout but it is expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant