Skip to content
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

Merged
merged 2 commits into from Oct 25, 2023

Conversation

jsafrane
Copy link
Member

@jsafrane jsafrane commented Oct 12, 2023

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?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

- [KEP]: https://github.com/kubernetes/enhancements/issues/1710

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 12, 2023
@k8s-ci-robot k8s-ci-robot added area/kubelet do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. sig/node Categorizes an issue or PR as relevant to SIG Node. approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 12, 2023
@bart0sh bart0sh added this to Triage in SIG Node PR Triage Oct 12, 2023
@bart0sh
Copy link
Contributor

bart0sh commented Oct 14, 2023

/retest

@bart0sh
Copy link
Contributor

bart0sh commented Oct 14, 2023

/triage accepted
/priority important-longterm
/sig storage

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. sig/storage Categorizes an issue or PR as relevant to SIG Storage. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Oct 14, 2023
@bart0sh bart0sh moved this from Triage to Needs Reviewer in SIG Node PR Triage Oct 14, 2023
@dims
Copy link
Member

dims commented Oct 24, 2023

/assign @xing-yang @msau42

@xing-yang
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 24, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 586890821f2f12d2b694300886037ac3deb75adb

@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@bertinatto
Copy link
Member

/test pull-kubernetes-unit

@dims
Copy link
Member

dims commented Oct 24, 2023

/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.
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 25, 2023
@jsafrane
Copy link
Member Author

/retest

@gnufied
Copy link
Member

gnufied commented Oct 25, 2023

How far are we going to backport this fix?

@jsafrane
Copy link
Member Author

It's a beta feature, I don't plan to backport it right now.

@gnufied
Copy link
Member

gnufied commented Oct 25, 2023

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 25, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: e61759b029ab04bd0ddb315b0ba6234c61a80721

@k8s-ci-robot k8s-ci-robot merged commit aa28e6e into kubernetes:master Oct 25, 2023
18 checks passed
SIG Node PR Triage automation moved this from Needs Reviewer to Done Oct 25, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.29 milestone Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubelet cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. release-note-none Denotes a PR that doesn't merit a release note. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Development

Successfully merging this pull request may close these issues.

None yet

8 participants