KubeArmor
KubeArmor copied to clipboard
feat:Adding support for KubeArmorClusterPolicy
Purpose of PR?: Adding support for KubeArmorClusterPolicy
Fixes #1769
Does this PR introduce a breaking change?
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
- Added a separate watcher
WatchClusterSecurityPolicies()
forKubeArmorClusterPolicy
. - Leverage
CreateSecurityPolicy()
for creating security policy object:- To handle
matchExpressions
, addedNamespaceList
totp.SecurityPolicy
. -
NamespaceList
contains list of namespaces on which cluster policy will be enforced. - we do all computations w.r.t.
matchExpressions
inCreateSecurityPolicy()
.
- To handle
-
UpdateSecurityPolicy()
is used to updateendPoints
security policies.
Checklist:
- [ ] Bug fix. Fixes #
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [x] This change requires a documentation update
- [x] PR Title follows the convention of
<type>(<scope>): <subject>
- [ ] Commit has unit tests
- [x] Commit has integration tests