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

perf: Improve KubeBench Performance on OCP Cluster #1597

Merged
merged 1 commit into from Apr 18, 2024

Conversation

mjshastha
Copy link
Contributor

Currently, certain commands involve retrieving all node names or pods and then executing additional commands in a loop, resulting in a time complexity linearly proportional to the number of nodes.This approach becomes time-consuming for larger clusters.

As kube-bench is executed as a job on every node in the cluster, To enhance performance, Streamlined the commands to execute directly on current node where kube-bench operates. This change ensures that the time complexity remains constant, regardless of the cluster size. By running the necessary commands only once per node, regardless of how many nodes are in the cluster, this approach significantly boosts performance and efficiency.

@mjshastha mjshastha force-pushed the ocpOptimisation branch 3 times, most recently from 91d35bf to 0fdc65c Compare April 12, 2024 12:11
… and then executing additional commands in a loop, resulting in a time complexity linearly proportional to the number of nodes.

This approach becomes time-consuming for larger clusters.

As kube-bench is executed as a job on every node in the cluster, To enhance performance, Streamlined the commands to execute directly on current node where kube-bench operates.
This change ensures that the time complexity remains constant, regardless of the cluster size.
By running the necessary commands only once per node, regardless of how many nodes are in the cluster, this approach significantly boosts performance and efficiency.
@mjshastha mjshastha changed the title Improve KubeBench Performance on OCP Cluster perf: Improve KubeBench Performance on OCP Cluster Apr 14, 2024
Copy link
Contributor

@deven0t deven0t left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@KiranBodipi KiranBodipi left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@mjshastha
Copy link
Contributor Author

@chen-keinan Could you verify and merge ?

@chen-keinan chen-keinan merged commit d2d3e72 into aquasecurity:main Apr 18, 2024
5 checks passed
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.

None yet

4 participants