Skip to content

Commit

Permalink
feat:Adding support for KubeArmorClusterPolicy
Browse files Browse the repository at this point in the history
Signed-off-by: Prateek Nandle <[email protected]>
  • Loading branch information
Prateeknandle committed Jul 2, 2024
1 parent 1fc5a38 commit b29405f
Show file tree
Hide file tree
Showing 57 changed files with 7,067 additions and 128 deletions.
1 change: 1 addition & 0 deletions KubeArmor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ build-test: testall
.PHONY: run
run: build
cd $(CRDDIR); kubectl apply -f KubeArmorPolicy.yaml
cd $(CRDDIR); kubectl apply -f KubeArmorClusterPolicy.yaml
cd $(CRDDIR); kubectl apply -f KubeArmorHostPolicy.yaml
cd $(CURDIR); sudo rm -f /tmp/kubearmor.log
cd $(CURDIR)/BPF; make clean
Expand Down
10 changes: 10 additions & 0 deletions KubeArmor/core/kubeArmor.go
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,16 @@ func KubeArmor() {
}
dm.Logger.Print("Started to monitor security policies")

// watch cluster security policies
clusterSecurityPoliciesSynced := dm.WatchClusterSecurityPolicies()
if clusterSecurityPoliciesSynced == nil {
// destroy the daemon
dm.DestroyKubeArmorDaemon()

return
}
dm.Logger.Print("Started to monitor cluster security policies")

// watch default posture
defaultPostureSynced := dm.WatchDefaultPosture()
if defaultPostureSynced == nil {
Expand Down
Loading

0 comments on commit b29405f

Please sign in to comment.