Backport of first pass making gateway controllers less chatty into release/1.2.x #2550
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport
This PR is auto-generated from #2524 to be assessed for backporting due to the inclusion of the label backport/1.2.x.
The below text is copied from the body of the original PR.
Changes proposed in this PR:
The gateway controllers are very chatty. This change allows for the log level in the helm chart to be utilized in the gateway controllers by setting the verbosity on the info statements we use.
I think it makes most sense to just put all of our info logging under a different level. I think the info logs are most useful as an all-or-nothing type of thing (besides a couple of exceptions, see below). I think this because if a user really wanted to debug something with these logs, it would make sense to be able to see the whole lifecycle of the reconcile calls:
On their own they do not make a ton of sense. To turn on this log level, the user just changes
global.logLevel
todebug
.Exceptions to log-level:
When a user tries to delete a gatewayClass or a gatewayClassConfig, I left the info statements in saying that they cannot be deleted as they are still in use. These make sense to leave in, as they can happen outside of a general reconciliation loop.
gatewayClass controller
gatewayClassConfig controller
Room for improvement
Probably need to review the actual logging statements I added, make sure there is no copy-pasta errors
How I've tested this PR:
Ran the helm chart locally with log levels at debug/info, created resources to see the logging.
How I expect reviewers to test this PR:
Same as above
Overview of commits