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

feat: mount procfs instead of using hostpid (#1688) #1833

Closed
wants to merge 1 commit into from

Conversation

yp969803
Copy link

Signed-off-by: Yash Patel [email protected]

Purpose of PR?:

Fixes #1688

Does this PR introduce a breaking change?

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. Fixes #
  • 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

@yp969803
Copy link
Author

@daemon1024 can you review the pr

@yp969803
Copy link
Author

yp969803 commented Aug 12, 2024

@daemon1024 getting

Could not read path from procfs due to readlink /proc/0/exe: no such file or directory

but i have mounted the /proc directory in the kubearmor pod

@yp969803
Copy link
Author

Getting the same thing while using HostPID

Could not read path from procfs due to readlink /proc/0/exe: no such file or directory

Comment on lines +286 to +290
{
Name: "procfs-path", //BPF (read-only)
MountPath: "/proc",
ReadOnly: true,
},
Copy link
Member

Choose a reason for hiding this comment

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

We will need to mount it in a custom directory, maybe /host/proc and configure KubeArmor to consider the custom procfs path wherever it's using it.

Copy link
Author

Choose a reason for hiding this comment

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

@daemon1024 so i have to check if the env is k8s and if true i have to change "/proc" to "/host/proc" whereever the proc directory is used in the Kuberarmor

@daemon1024
Copy link
Member

Closing in favor of #1831

@daemon1024 daemon1024 closed this Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mount procfs instead of using hostpid
2 participants