Skip to content

fix(operator): snitch conditional mounts #1936

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

Merged
merged 2 commits into from
Jan 13, 2025

Conversation

rksharma95
Copy link
Collaborator

Purpose of PR?:

Snitch Job would be failed to deploy if mount hostpath not exists on nodes with readonly filesystem.

Warning  Failed  11s                
kubelet  Error: failed to generate container "4cb6ea54ef292997cb29e5670d63830015704ec7c1f8fe87e55968280a54e835" 
spec: failed to apply OCI options: failed to mkdir "/etc/apparmor.d/": mkdir /etc/apparmor.d/: read-only file system

This PR adds changes to check if snitch job failed due to mount failure in both non-exist path and read-only file system cases. If so re-deploy snitch without these conflicting mounts.

Does this PR introduce a breaking change?
No
If the changes in this PR are manually verified, list down the scenarios covered::

Additional information for reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs

Checklist:

  • Bug fix.
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • PR Title follows the convention of <type>(<scope>): <subject>
  • Commit has unit tests
  • Commit has integration tests

@rksharma95 rksharma95 marked this pull request as ready for review January 8, 2025 09:13
@rootxrishabh rootxrishabh linked an issue Jan 8, 2025 that may be closed by this pull request
3 tasks
Copy link
Member

@daemon1024 daemon1024 left a comment

Choose a reason for hiding this comment

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

LGTM, One comment, WDYT?

@rksharma95 rksharma95 force-pushed the snitch-conditional-mounts branch from c2498ba to 788f39d Compare January 10, 2025 07:26
Copy link
Member

@daemon1024 daemon1024 left a comment

Choose a reason for hiding this comment

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

LGTM 👌

@daemon1024 daemon1024 force-pushed the snitch-conditional-mounts branch from 788f39d to 95be886 Compare January 12, 2025 11:51
Copy link
Member

@rootxrishabh rootxrishabh left a comment

Choose a reason for hiding this comment

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

LGTM!

@rksharma95 rksharma95 merged commit 3e3ec18 into kubearmor:main Jan 13, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Talos linux support
4 participants