feat(core): support regex-based label selector matching for standalone policies - #2808
Open
Rucha0901 wants to merge 1 commit into
Open
feat(core): support regex-based label selector matching for standalone policies#2808Rucha0901 wants to merge 1 commit into
Rucha0901 wants to merge 1 commit into
Conversation
…e policies Signed-off-by: Rucha0901 <imt_2025071@iiitm.ac.in>
Rucha0901
requested review from
Aryan-sharma11,
AryanBakliwal and
achrefbensaad
as code owners
July 26, 2026 14:53
Rucha0901
force-pushed
the
feat/unorchestrated-regex-selectors
branch
from
July 26, 2026 15:52
4d60f45 to
a0ea108
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of PR?:
This PR implements POSIX regular expression matching for selector label values in standalone (unorchestrated) KubeArmor. It addresses the existing TODO to support regex-based matching for label selectors like
kubearmor.io/container.nameand other custom labels.Fixes #2807
Does this PR introduce a breaking change?
No.
If the changes in this PR are manually verified, list down the scenarios covered::
Unit tests have been added to verify:
pb.PolicyStatus_Invalidis returned).These tests were compiled and run on the target OS (Linux).
Additional information for reviewer? :
This changes KubeArmor's standalone policy loading and parsing in
unorchestratedUpdates.goand updatestypes.goto hold compiled regular expressions in a transientIdentitiesRegexpfield onSelectorTypeandEndPointto avoid compiling them on every match event.Checklist:
feat(core): support regex-based label selector matching for standalone policies