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(core): Add support for Kata Containers #1793

Closed

Conversation

rootxrishabh
Copy link
Member

Purpose of PR?:
This PR adds support for kata containers on Kubearmor side
Fixes #1340

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. 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

Signed-off-by: rootxrishabh <risrock02@gmail.com>
@rootxrishabh
Copy link
Member Author

rootxrishabh commented Jul 2, 2024

Deployment : https://gist.github.com/rootxrishabh/0a9142004d538fe2724459664814816d

Image side hook : https://gist.github.com/rootxrishabh/37bd8ce823e06c87005807c9b3f11f0a

Hook path - /opt/kata/share/defaults/kata-containers/configuration.toml

Hook flag - guest_hook_path = "/usr/share/oci/hooks"

Docs for hooks: https://github.com/kata-containers/kata-containers/blob/main/docs/design/hooks-handling.md#kata-hooks

@daemon1024
Copy link
Member

daemon1024 commented Jul 3, 2024

Challenges:

  1. Enabling BPFLSM in Guest Image for CVM
  2. Enforcing on individual container
    • Usage of OCI Hooks
      • Load OCI Hook into Guest Image
      • Modify Kata to enable Guest OCI Hooks in CVM

Task:

  • Verify the PR code
  • Configure Relay to Interact with KubeArmor sidecar containers for telemetry aggregation
  • Admission Controller to auto add KubeArmor as sidecar

@daemon1024
Copy link
Member

image

Prateeknandle and others added 23 commits November 6, 2024 14:03
Signed-off-by: Prateek Nandle <prateeknandle@gmail.com>
…r api version

Signed-off-by: Prateek <prateeknandle@gmail.com>
Signed-off-by: Prateek <prateeknandle@gmail.com>
Signed-off-by: Prateek <prateeknandle@gmail.com>
…and csp

Signed-off-by: daemon1024 <barun1024@gmail.com>
Signed-off-by: Rudraksh Pareek <rudraksh@accuknox.com>
Signed-off-by: tesla59 <nishant@heim.id>
Signed-off-by: Rudraksh Pareek <rudraksh@accuknox.com>
This will reduce flakiness in the tests

Signed-off-by: Navin Chandra <navinchandra772@gmail.com>
Signed-off-by: Rudraksh Pareek <rudraksh@accuknox.com>
Signed-off-by: Rahul Jadhav <nyrahul@gmail.com>
Signed-off-by: Rahul Jadhav <nyrahul@gmail.com>
Signed-off-by: Rahul Jadhav <nyrahul@gmail.com>
…found

Signed-off-by: Prateek <prateeknandle@gmail.com>
…ies work

idk why we need to do this, but this fixes things for now

Signed-off-by: daemon1024 <barun1024@gmail.com>
Signed-off-by: Aryan-sharma11 <aryan1126.sharma@gmail.com>
Signed-off-by: rksharma95 <ramakant@accuknox.com>
I think this was in there by mistake so removing the same via this
patch.

Signed-off-by: kranurag7 <81210977+kranurag7@users.noreply.github.com>
Signed-off-by: Aryan-sharma11 <aryan1126.sharma@gmail.com>
Signed-off-by: Aryan-sharma11 <aryan1126.sharma@gmail.com>
Signed-off-by: Sujay <sujaydey641@gmail.com>
Signed-off-by: rksharma95 <ramakant@accuknox.com>
Signed-off-by: Aryan-sharma11 <aryan1126.sharma@gmail.com>
navin772 and others added 28 commits November 6, 2024 14:03
Signed-off-by: Navin Chandra <navinchandra772@gmail.com>
Signed-off-by: Navin Chandra <navinchandra772@gmail.com>
Signed-off-by: Aryan-sharma11 <aryan1126.sharma@gmail.com>
Signed-off-by: Anurag Rajawat <anuragsinghrajawat22@gmail.com>
Signed-off-by: Prateek <prateeknandle@gmail.com>
Signed-off-by: Prateek <prateeknandle@gmail.com>
Signed-off-by: Prateek <prateeknandle@gmail.com>
Signed-off-by: daemon1024 <barun1024@gmail.com>
Signed-off-by: Aryan-sharma11 <aryan1126.sharma@gmail.com>
Signed-off-by: Rudraksh Pareek <rudraksh@accuknox.com>
Signed-off-by: Rudraksh Pareek <rudraksh@accuknox.com>
…h cwd

Signed-off-by: Prateek <prateeknandle@gmail.com>
Signed-off-by: Prateek <prateeknandle@gmail.com>
… template generation

- deprecating special handling of host profiles
- making reload of apparmor profiles only in k8s env

Signed-off-by: daemon1024 <barun1024@gmail.com>
The config elements, though optional, are not ptr, so they are
initialized with the respective type default values. As result,
strconv.Format... will never return an empty string, so the check is
unnecessary.

Signed-off-by: Carlos Rodriguez-Fernandez <carlosrodrifernandez@gmail.com>
…ration are empty

Signed-off-by: Prateek <prateeknandle@gmail.com>
Signed-off-by: daemon1024 <barun1024@gmail.com>
Signed-off-by: daemon1024 <barun1024@gmail.com>
Signed-off-by: rksharma95 <ramakant@accuknox.com>
Signed-off-by: prady0t <rickprimeranjan@gmail.com>
Signed-off-by: prady0t <rickprimeranjan@gmail.com>

Updating branch

Signed-off-by: prady0t <rickprimeranjan@gmail.com>

Delete KubeArmor/core/testdata/fuzz/FuzzContainerPolicy/bb2a6f290a615f3e

Signed-off-by: prady0t <rickprimeranjan@gmail.com>
Signed-off-by: daemon1024 <barun1024@gmail.com>
Signed-off-by: daemon1024 <barun1024@gmail.com>
Signed-off-by: prady0t <rickprimeranjan@gmail.com>
Signed-off-by: prady0t <rickprimeranjan@gmail.com>
…to support cwd and throttling

Signed-off-by: Prateek <prateeknandle@gmail.com>
Signed-off-by: daemon1024 <barun1024@gmail.com>
Signed-off-by: rootxrishabh <risrock02@gmail.com>
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.

check support for Kata containers