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

Add syslog support to log enricher #531

Merged
merged 1 commit into from
Jul 9, 2021

Conversation

saschagrunert
Copy link
Member

What type of PR is this?

/kind feature

What this PR does / why we need it:

This adds support for /var/log/syslog log files if auditd is not available on a node.

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?

Added syslog support for log enricher.

@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 Jul 8, 2021
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 8, 2021
@codecov-commenter
Copy link

codecov-commenter commented Jul 8, 2021

Codecov Report

Merging #531 (4edcf65) into master (c8dab31) will increase coverage by 0.06%.
The diff coverage is 71.42%.

@@            Coverage Diff             @@
##           master     #531      +/-   ##
==========================================
+ Coverage   44.06%   44.12%   +0.06%     
==========================================
  Files          25       25              
  Lines        1305     1310       +5     
==========================================
+ Hits          575      578       +3     
- Misses        694      695       +1     
- Partials       36       37       +1     

This adds support for `/var/log/syslog` log files if auditd is not
available on a node.

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

/test pull-security-profiles-operator-build-image

@JAORMX
Copy link
Contributor

JAORMX commented Jul 8, 2021

uhm... not sure if the syslog file is available in RHCOS, this might make it fail... let me verify

@saschagrunert
Copy link
Member Author

uhm... not sure if the syslog file is available in RHCOS, this might make it fail... let me verify

Is auditd not enabled in RHCOS?

@JAORMX
Copy link
Contributor

JAORMX commented Jul 8, 2021

@saschagrunert auditd is enabled in RHCOS. But this PR adds by default the bind-mount for syslog, which will fail and not deploy properly in RHCOS.

@saschagrunert
Copy link
Member Author

@saschagrunert auditd is enabled in RHCOS. But this PR adds by default the bind-mount for syslog, which will fail and not deploy properly in RHCOS.

No, it just mounts the /var/log dir, not the file itself.

Name: "host-syslog-volume",
VolumeSource: v1.VolumeSource{
HostPath: &v1.HostPathVolumeSource{
Path: filepath.Dir(config.SyslogLogPath),
Copy link
Contributor

Choose a reason for hiding this comment

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

ah! I missed that this gets filepath.Dir. This is fine!

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 Jul 9, 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
Copy link
Contributor

@saschagrunert: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-security-profiles-operator-test-e2e 4edcf65 link /test pull-security-profiles-operator-test-e2e

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@saschagrunert
Copy link
Member Author

e2e tests are broken right now, merging.

@saschagrunert saschagrunert merged commit a5930e2 into kubernetes-sigs:master Jul 9, 2021
@saschagrunert saschagrunert deleted the syslog branch July 9, 2021 07:11
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