bug(operator): annotateResource flag accepted but never passed to KubeArmor daemonset args
bug
## Bug Report
**General Information**
- Environment: Any Kubernetes cluster with KubeArmor Operator deployed
- Kernel version: N/A (code-level bug, not environment specific)
- Orchestration: Any
- Relevant code: pkg/KubeArmorOperator/internal/controller/resources.go lines 136-144
**To Reproduce**
1. Deploy operator with --annotateResource=true flag
2. Check the deployed KubeArmor daemonset container args:
kubectl get daemonset -n kubearmor -o yaml | grep -A10 "args"
3. Notice -annotateResource is missing from the container args
**Expected behavior**
When operator is started with --annotateResource=true, the KubeArmor
daemonset container should receive -annotateResource=true as an argument.
Currently the operator correctly adds extra RBAC rules to the ClusterRole
when annotateResource=true (resources.go line 807), but the corresponding
argument is never passed to the daemonset container — the code responsible
for this is commented out at lines 140-144 with a TODO comment:
// TODO: handle passing annotateResource flag to kubearmor
// ideally this configuration should be part of kubearmorconfig to avoid
// hardcoding version checks to detect flag compatibility
0 条评论