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

Fix log enricher read and automatically add /dev/kmsg device #479

Merged
merged 1 commit into from
Jun 16, 2021

Conversation

saschagrunert
Copy link
Member

What type of PR is this?

/kind feature

What this PR does / why we need it:

When using CRI-O, we can utilize the annotation
io.kubernetes.cri-o.Devices to correctly mount the device into the
container. This means we do not rely on a symlink any more and can use
the device directly.

The enricher read has been fixed because one read always returns a full
line which makes the offset calculation obsolete.

Which issue(s) this PR fixes:

None

Does this PR have test?

None

Special notes for your reviewer:

None

Does this PR introduce a user-facing change?

Automatically mount /dev/kmsg for log enricher usage if running with CRI-O and an allowed `io.kubernetes.cri-o.Devices` annotation.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 9, 2021
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 9, 2021
@saschagrunert saschagrunert changed the title Fix log enricher read and automatically add /dev/kmsg device Fix log enricher read and automatically add /dev/kmsg device Jun 9, 2021
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 9, 2021
@codecov-commenter
Copy link

codecov-commenter commented Jun 9, 2021

Codecov Report

Merging #479 (dfa7067) into master (cb9760d) will decrease coverage by 0.13%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #479      +/-   ##
==========================================
- Coverage   37.92%   37.79%   -0.14%     
==========================================
  Files          23       23              
  Lines        1110     1114       +4     
==========================================
  Hits          421      421              
- Misses        674      678       +4     
  Partials       15       15              

@saschagrunert
Copy link
Member Author

/test pull-security-profiles-operator-test-e2e

2 similar comments
@saschagrunert
Copy link
Member Author

/test pull-security-profiles-operator-test-e2e

@saschagrunert
Copy link
Member Author

/test pull-security-profiles-operator-test-e2e

@JAORMX
Copy link
Contributor

JAORMX commented Jun 16, 2021

/retest

When using CRI-O, we can utilize the annotation
`io.kubernetes.cri-o.Devices` to correctly mount the device into the
container. This means we do not rely on a symlink any more and can use
the device directly.

The enricher read has been fixed because one read always returns a full
line which makes the offset calculation obsolete.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
@saschagrunert
Copy link
Member Author

Rebased, let's see if the tests pass now otherwise it's a bug in the PR.

@saschagrunert
Copy link
Member Author

/retest

Copy link
Contributor

@JAORMX JAORMX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JAORMX, saschagrunert

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

@k8s-ci-robot k8s-ci-robot merged commit 1ebabb4 into kubernetes-sigs:master Jun 16, 2021
@saschagrunert saschagrunert deleted the enricher-fix branch June 16, 2021 08:59
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. 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. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants