kubernetes-sigs / aws-load-balancer-controller

A Kubernetes controller for Elastic Load Balancers
https://kubernetes-sigs.github.io/aws-load-balancer-controller/
Apache License 2.0
3.82k stars 1.41k forks source link

feat: replaced go.uber.zap log config with controller runtime logging config, enables more logging options #3745

Open cnmcavoy opened 2 weeks ago

cnmcavoy commented 2 weeks ago

Issue

https://github.com/kubernetes-sigs/aws-load-balancer-controller/issues/3744

Description

Removed go.uber.org config, replaced with controller-runtime logging configuration. Used the kubernetes-sigs/cluster-api project as a good example to template changes from.

The previous arg, --log-level is still allowed for compatibility, but does nothing. --v, like most other k8s controllers, is now used for setting log visibility.

Note: to restore the json log output that the controller previously had, users can set --logging-format=json and I verified that worked as expected.

Checklist

BONUS POINTS checklist: complete for good vibes and maybe prizes?! :exploding_head:

k8s-ci-robot commented 2 weeks ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: cnmcavoy Once this PR has been reviewed and has the lgtm label, please assign oliviassss for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/main/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment