Skip to content

Commit

Permalink
Merge pull request #1785 from Aryan-sharma11/kernel-headers
Browse files Browse the repository at this point in the history
chore : remove kernel headers mount if btf found with `initDeploy = true`
  • Loading branch information
DelusionalOptimist authored Jun 20, 2024
2 parents 322dd5a + e5cbb70 commit 9ce5979
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/KubeArmorOperator/internal/controller/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ func generateDaemonset(name, enforcer, runtime, socket, btfPresent, apparmorfs,
commonVols := common.CommonVolumes
commonVolMnts := common.CommonVolumesMount

if btfPresent == "no" || initDeploy {
if initDeploy || btfPresent == "no" {
if btfPresent == "no" {
commonVols = append(commonVols, common.KernelHeaderVolumes...)
commonVolMnts = append(commonVolMnts, common.KernelHeaderVolumesMount...)
}
commonVols = append(commonVols, common.BPFVolumes...)
commonVolMnts = append(commonVolMnts, common.BPFVolumesMount...)
commonVols = append(commonVols, common.KernelHeaderVolumes...)
commonVolMnts = append(commonVolMnts, common.KernelHeaderVolumesMount...)
}
vols = append(vols, commonVols...)
volMnts = append(volMnts, commonVolMnts...)
Expand Down

0 comments on commit 9ce5979

Please sign in to comment.