New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move SELinux warning metric to be counted once per pod #121177
Conversation
/retest |
/triage accepted |
/assign @xing-yang @msau42 |
/lgtm |
LGTM label has been added. Git tree hash: 586890821f2f12d2b694300886037ac3deb75adb
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jsafrane, xing-yang 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:
Approvers can indicate their approval by writing |
/test pull-kubernetes-unit |
/retest |
volume_manager_selinux_volume_context_mismatch_warnings_total should be counted only once per volume + pod. The previous location is evaluated periodically, so bump the metric only when a new pod is added to volume.
Use device mountable volume, to make it impossible to share the same global mount with different SELinux contexts. And fix pod2Name to actually refer to pod2.
6cee654
to
e511edf
Compare
/retest |
How far are we going to backport this fix? |
It's a beta feature, I don't plan to backport it right now. |
/lgtm |
LGTM label has been added. Git tree hash: e61759b029ab04bd0ddb315b0ba6234c61a80721
|
What type of PR is this?
/kind feature
What this PR does / why we need it:
volume_manager_selinux_volume_context_mismatch_warnings_total
should be counted only once per volume + pod. The previous location is evaluated periodically, so move the code around and bump the metric only when a new pod is added to volume.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: