redhat-cop / cert-utils-operator

Set of functionalities around certificates packaged in a Kubernetes operator
Apache License 2.0
94 stars 35 forks source link

Disable devel mode when installed with helm #133

Closed vinzent closed 10 months ago

vinzent commented 2 years ago

Affected version: 1.3.9, 1.3.0 (not verified others)

I'm seeing about 20 lines per second with DEBUG messages like this:

2022-04-22T12:09:28.875Z        DEBUG   util.api        object is not ConditionsAware, not setting status

As Secrets and ConfigMaps don't have .status - this is somehow expected.

It seems some zap-develmode is enabled by default. At least /manager --help says, that the default for zap-devel is true.

Disabling devel mode will change the log level to Info (instead of debug), encoder to json (instead of console) and will only print stacktraces on errors (instead of warnings)

raffaelespazzoli commented 2 years ago

this is a good idea, but will it work the way you proposed it? What about this line: https://github.com/redhat-cop/cert-utils-operator/blob/7c20a03107b314a546eb3afb1e6457e94fe3e15e/main.go#L71

thanks for the contribution.

vinzent commented 2 years ago

it works for me. haven't looked at the code. I wondered why devel mode is the default. maybe the code could be changed to not enable devel mode by default. if somebody wants devel-mode, it can be enabled by passing it as cli arg?

raffaelespazzoli commented 2 years ago

ok, let's go with it then. Can you add the same changes to the OLM-deploy manifest ./config/manager/manager.yaml?