node-driver-registrar
node-driver-registrar copied to clipboard
Support structured logging
The node-driver-registrar
container should support structured logging when given the --log-format-json
flag, like for instance the secrets-store-csi-driver
does.
A simple implementation can be found here: https://github.com/kubernetes-sigs/secrets-store-csi-driver/blob/main/cmd/secrets-store-csi-driver/main.go#L90-L94
Thanks for the pointer, I was reading how the kubelet does it and it's very similar, on top of this change we need to update the log methods to the suffix S e.g. Infof
-> InfoS
, etc
References:
- https://kubernetes.io/blog/2020/09/04/kubernetes-1-19-introducing-structured-logs/
- kubelet
- init https://github.com/kubernetes/component-base/blob/v0.25.3/logs/json/register/register.go#L26,
- setup https://github.com/kubernetes/kubernetes/blob/v1.25.3/cmd/kubelet/app/options/options.go#L521 -> https://github.com/kubernetes/component-base/blob/v0.25.3/logs/api/v1/options.go#L185
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the PR is closed
You can:
- Mark this PR as fresh with
/remove-lifecycle stale
- Close this PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
If that's ok and nobody it is working on this issue, I'd like to take this one
If that's ok and nobody it is working on this issue, I'd like to take this one
Seems there is already a PR working on this issue, so I am not taking this one