Files
k8sgpt/pkg/analyzer
lee jaeyoung ca0d3eba3f fix: improve ConfigMap usage detection for sidecar patterns (#1602)
- Add detection for dynamically loaded ConfigMaps (Grafana sidecar)
- Support grafana_dashboard and grafana_datasource labels
- Support prometheus_rule and fluentd_config labels
- Add k8sgpt.ai/dynamically-loaded label for custom patterns
- Add k8sgpt.ai/skip-usage-check annotation to opt-out
- Add comprehensive test cases for sidecar patterns

Fixes false positives where ConfigMaps loaded dynamically by sidecar
containers (via Kubernetes API watches with label selectors) were
incorrectly flagged as unused.

Tested on production cluster with kube-prometheus-stack:
- Before: 29 ConfigMaps incorrectly flagged as unused
- After:  No false positives (29 eliminated - 100% reduction)

Signed-off-by: sqautboy <migonyoung01@gmail.com>
Co-authored-by: Alex Jones <1235925+AlexsJones@users.noreply.github.com>
2026-04-18 12:40:16 +01:00
..
2025-04-15 13:43:38 +01:00
2024-07-18 14:31:41 +01:00
2024-07-18 14:31:41 +01:00
2024-02-07 11:30:45 +00:00
2024-07-18 14:31:41 +01:00
2025-05-14 09:22:05 +01:00
2025-05-14 09:22:05 +01:00
2024-07-18 14:31:41 +01:00
2024-07-18 14:31:41 +01:00
2024-07-18 14:31:41 +01:00
2024-07-18 14:31:41 +01:00
2025-06-20 13:27:49 +01:00
2024-07-18 14:31:41 +01:00
2024-07-18 14:31:41 +01:00
2024-07-18 14:31:41 +01:00
2024-07-18 14:31:41 +01:00
2024-07-18 14:31:41 +01:00
2024-07-18 14:31:41 +01:00
2025-04-15 13:43:38 +01:00
2025-04-15 13:43:38 +01:00
2024-11-12 12:04:01 +00:00
2025-04-15 13:43:38 +01:00
2025-04-15 13:43:38 +01:00
2025-04-15 13:43:38 +01:00
2024-09-17 08:39:39 +01:00