namespace-configuration-operator icon indicating copy to clipboard operation
namespace-configuration-operator copied to clipboard

Enable Configuration of Logging Format in Helm Chart Deployment

Open iflan7744 opened this issue 2 years ago • 1 comments

This PR introduces an update to the Helm chart, enabling the selection of the logging format as either "development" or "production."

More info about log options, https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/log/zap#Options.BindFlags

opts := zap.Options{Development: true,}
opts.BindFlags(flag.CommandLine)
flag.Parse()

By default, the helm chart deployment will use the development mode settings because the above code block, allowing logs to be in plain format.

However, with my changes to the helm chart, the user has the ability to tailor the log output to match their specific needs. Whether they prefer a JSON format for easier log parsing and analysis or a plain format for more straightforward readability, the helm chart now accommodates both options.

iflan7744 avatar May 30 '23 11:05 iflan7744

@raffaelespazzoli can you review this?

iflan7744 avatar Jun 01 '23 11:06 iflan7744