🌱 certwatcher: add instance-specific logger with cert/key context#3293
🌱 certwatcher: add instance-specific logger with cert/key context#3293k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
Conversation
|
Hi @s-z-z. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Just curious. In which case was it necessary for you to distinguish which cert was "updated" at which time? |
|
Hi, @sbueringer |
| @@ -208,7 +208,7 @@ func (cw *CertWatcher) ReadCertificate() error { | |||
| return nil | |||
| } | |||
There was a problem hiding this comment.
Let's create a logger for CertWatcher in ~ l.68 and then use that one everywhere instead
cw := &CertWatcher{
certPath: certPath,
keyPath: keyPath,
interval: defaultWatchInterval,
log: log.WithValues("cert", certPath, "key", keyPath),
}There was a problem hiding this comment.
Good idea, this simplifies similar changes in the future. As you suggested, I've updated the code.
Signed-off-by: s-z-z <xiaoxin09@hotmail.com>
6cc0497 to
41feb4f
Compare
|
Thx! /ok-to-test /lgtm |
|
LGTM label has been added. DetailsGit tree hash: d7a33b570bb5ab309b0e382e530900507ecf58cd |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: s-z-z, sbueringer The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
After manually updating a certificate, it’s unclear whether the target certificate was updated. This PR adds identification of the source certificate.