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(operator): fetch cluster name from providers #1881

Merged
merged 1 commit into from
Dec 26, 2024

Conversation

rootxrishabh
Copy link
Member

Purpose of PR?:

This PR adds fetching cluster name from cluster providers.

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

Copy link
Collaborator

@Prateeknandle Prateeknandle left a comment

Choose a reason for hiding this comment

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

what happens in case there is no operator, should we have a fallback logic in kubearmor?
cc: @daemon1024

@rootxrishabh
Copy link
Member Author

Yes, cluster name goes to "default".

@Prateeknandle
Copy link
Collaborator

Yes, cluster name goes to "default".

@rootxrishabh i meant shouldn't we fetch cluster name from providers in case operator is not there?

@rksharma95
Copy link
Collaborator

@rootxrishabh can you please add args handling in operator helm chart? It should support any args list values.

@rootxrishabh rootxrishabh force-pushed the addClusterName branch 5 times, most recently from c4ae336 to 0251593 Compare December 23, 2024 05:46
Prateeknandle
Prateeknandle previously approved these changes Dec 23, 2024
Copy link
Collaborator

@Prateeknandle Prateeknandle left a comment

Choose a reason for hiding this comment

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

Tested on both GKE and AWS, working as expected.

@rksharma95
Copy link
Collaborator

@Prateeknandle @rootxrishabh does kubearmor uses clusterName value from cofigmap?

@Prateeknandle
Copy link
Collaborator

Prateeknandle commented Dec 23, 2024

@Prateeknandle @rootxrishabh does kubearmor uses clusterName value from cofigmap?

No, sry totally forgot this point, @rootxrishabh we should update cluster name in kubearmor, it should get updated based on conifgmap value.
https://github.com/Prateeknandle/KubeArmor/blob/main/KubeArmor/core/kubeUpdate.go#L2749

check whether correct cluster name is reflected in alerts/logs or not.

Prateeknandle
Prateeknandle previously approved these changes Dec 23, 2024
Signed-off-by: Rishabh Soni <[email protected]>

Add support for EKS

Signed-off-by: Rishabh Soni <[email protected]>

Remove AKS reference

Signed-off-by: Rishabh Soni <[email protected]>

Make provider hostname and endpoint configurable

Signed-off-by: Rishabh Soni <[email protected]>

Make provider hostname and endpoint configurable

Signed-off-by: Rishabh Soni <[email protected]>
Copy link
Collaborator

@rksharma95 rksharma95 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 merged commit 2023897 into kubearmor:main Dec 26, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

4 participants