Improve pod logs related to Supervisor TLS certificate problems #1662
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.
This PR is meant to improve the situation described in #1393.
Because the certificate is selected inside a function which does not know the full details of the request, I was not able to log everything that I had hoped about each request. However, this PR is still an improvement and will hopefully be good enough.
This PR logs warnings that are visible at the default logging level when:
FederationDomain.spec.tls.secretName
The PR also changes the log level of some useful log lines for more verbose logging to make them available at the
info
log level, which is a level that should be safe to use on a production server for debugging. Previously, some of these useful log statements were at higher levels that are not safe or not convenient to use on production Supervisor servers.All of these log messages include the SNI name from the request, to help the user see if their ingress is stripping SNI names from incoming requests.
Any changes aside from log statements are intended to be supporting refactors only, and are not intended to change any behavior at all. Please review for any possible accidental behavior changes.
Note that in the
plog
package, onlyplog.Error
andplog.Warning
are printed to the pod logs at the default log level. In order to seeplog.Info
messages, a user would need to choose to deploy the Supervisor with theinfo
log level setting (or a higher level).Release note: