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

cmd(profile): improve karmor profile for unorchestrated mode #465

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

tesla59
Copy link

@tesla59 tesla59 commented Oct 25, 2024

@tesla59 tesla59 marked this pull request as ready for review October 29, 2024 08:41
@tesla59
Copy link
Author

tesla59 commented Oct 29, 2024

@DelusionalOptimist @daemon1024
Please review. This is first PR for the task for improving karmor profile for unchestrated mode. Includes

  • New flags LogType and LogFilter for karmor profile
  • Fixed the bug where karmor profile failed if grpc is not set in unorchestrated mode
  • Dynamically set the view of profile TUI based on the passed LogType

Next task includes:

  • Dynamically change the view from the TUI using a key(TBD)

@tesla59 tesla59 force-pushed the tesla/non-k8s/karmor-profile-improvements branch from a431253 to 5b3b425 Compare October 31, 2024 18:35
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.

Ignore this message, was meant for another PR xD

@Prateeknandle
Copy link
Contributor

@tesla59 does both flags(logType & logFilter) works together?

@tesla59
Copy link
Author

tesla59 commented Nov 19, 2024

@Prateeknandle yes it seem to be working together. Although I am not entirely sure how the logFilter=policy would work but judging from the output of setting it to system, policy and all, it looks like it is working

Also profile starts the observer with both flags passed so it should work as expected
https://github.com/kubearmor/kubearmor-client/pull/465/files#diff-213323d4ae136c7b733df56c9658661e0b6b6aa64f60adc7ca95b9e3a04ec367R84

@Prateeknandle
Copy link
Contributor

Prateeknandle commented Nov 19, 2024

@tesla59 consider these points:

  • simply executing karmor profile is not showing host logs, I only see container logs
  • --logFilter=policy is not working, it should show policy based logs i.e. alerts, you can check this functionality in karmor logs --logFilter=policy

Edit: by default we have --logType=ContainerLog

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.

3 participants