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

apparmor: Add AppArmor info at start time #1079

Merged
merged 2 commits into from
Aug 15, 2022

Conversation

pjbgf
Copy link
Member

@pjbgf pjbgf commented Aug 9, 2022

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Provides additional information for users using AppArmor to debug potential setup issues.
An example of what the SPO will write onto logs at the start:

I0809 18:39:30.678856   21442 apparmorprofile.go:279] apparmor-spod "msg"="detecting apparmor support..." 
I0809 18:39:30.679580   21442 apparmorprofile.go:286] apparmor-spod "msg"="apparmor enabled: OK" 
I0809 18:39:30.679682   21442 apparmorprofile.go:289] apparmor-spod "msg"="apparmor fs:  (appArmor mount point: could not complete operation)" 
I0809 18:39:30.679768   21442 apparmorprofile.go:292] apparmor-spod "msg"="apparmor enforceable: OK" 

Which issue(s) this PR fixes:

None

Does this PR have test?

N/A

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Additional debug information about AppArmor state is now provided at start-up.

@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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Aug 9, 2022
@k8s-ci-robot k8s-ci-robot requested review from cmurphy and JAORMX August 9, 2022 18:51
@codecov-commenter
Copy link

codecov-commenter commented Aug 9, 2022

Codecov Report

Merging #1079 (01a3bbd) into main (8e1b375) will decrease coverage by 0.29%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #1079      +/-   ##
==========================================
- Coverage   50.43%   50.13%   -0.30%     
==========================================
  Files          42       42              
  Lines        4761     4789      +28     
==========================================
  Hits         2401     2401              
- Misses       2281     2309      +28     
  Partials       79       79              

@pjbgf
Copy link
Member Author

pjbgf commented Aug 9, 2022

Noticed that some dependencies were being downgraded as part of the change - reverted such changes.

@jhrozek
Copy link
Contributor

jhrozek commented Aug 10, 2022

This linter warning is confusing:

 internal/pkg/daemon/apparmorprofile/apparmorprofile.go:29:2: Expected 'a', Found 'c' at internal/pkg/daemon/apparmorprofile/apparmorprofile.go[line 29,col 2] (gci)
	ctrl "sigs.k8s.io/controller-runtime" 

but it pretty much means that the imports must be sorted alphabetically. I think the linter has a --fix option that should do all that.

@jhrozek
Copy link
Contributor

jhrozek commented Aug 10, 2022

the code looks OK to me btw

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 12, 2022
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Aug 13, 2022
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 13, 2022
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
@pjbgf pjbgf force-pushed the aa-info branch 2 times, most recently from e197bc4 to 7d207e2 Compare August 13, 2022 09:34
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
@pjbgf
Copy link
Member Author

pjbgf commented Aug 13, 2022

@jhrozek thank you for the review and pointing out the linter issue. PTAL

Copy link
Contributor

@jhrozek jhrozek 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 Aug 15, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jhrozek, pjbgf

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 e259f4f into kubernetes-sigs:main Aug 15, 2022
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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants