kubernetes-sigs / controller-tools

Tools to use with the controller-runtime libraries
Apache License 2.0
699 stars 405 forks source link

Add verbosity to `controller-gen` #889

Open grzesuav opened 4 months ago

grzesuav commented 4 months ago

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 commented 4 months ago

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

k8s-triage-robot commented 1 month ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 1 day ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten