kubernetes-csi / livenessprobe

A sidecar container that can be included in a CSI plugin pod to enable integration with Kubernetes Liveness Probe.
Apache License 2.0
74 stars 98 forks source link

Support contextual logging #259

Closed bells17 closed 4 months ago

bells17 commented 5 months ago

What type of PR is this?

/kind feature

What this PR does / why we need it:

I've updated the klog functions used within livenessprobe to contextual logging functions, following the guidelines below: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/migration-to-structured-logging.md

In a previous PR below, I addressed structured logging, but I realized that I only handled structured logging and did not address contextual logging. https://github.com/kubernetes-csi/livenessprobe/pull/202

Therefore, in this PR, I have addressed contextual logging.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Added support for contextual logging.
bells17 commented 5 months ago

/wg structured-logging /priority important-longterm /kind cleanup /cc @pohly (I did cc because @pohly is the only member of @kubernetes/wg-structured-logging-reviews within kubernetes-csi org.)

https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/migration-to-structured-logging.md#what-to-include-in-the-pull-request

bells17 commented 5 months ago

/hold

https://kubernetes.slack.com/archives/C09QZFCE5/p1715087356356999

jsafrane commented 4 months ago

/lgtm /approve

k8s-ci-robot commented 4 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bells17, jsafrane

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

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-csi/livenessprobe/blob/master/OWNERS)~~ [jsafrane] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
jsafrane commented 4 months ago

/hold cancel logcheck crash was fixed.