A lightweight Go-based tool that monitors Kubernetes ConfigMap and Pod events in real-time using the client-go informer framework.
- 🔍 Watches ConfigMap and Pod add, update, and delete events
- 🔗 Indexes Pods based on referenced ConfigMaps
- 📌 Maps ConfigMap updates to affected Pods
- 🛑 Graceful shutdown with signal handling
- ⚡ Built using Kubernetes Shared Informer framework
- Go 1.24.5+ (for local development)
- Access to a Kubernetes cluster
- kubectl configured with appropriate cluster access
go mod tidy
go build -o configmap-watcher
./configmap-watcher -kubeconfig=/path/to/kubeconfigThe included manifest creates all necessary RBAC resources and deploys the watcher:
kubectl apply -f configmap-watcher.yamlTo view logs:
kubectl logs -f deployment/configmap-watcher -n configmap-watcherNote: When running inside a Kubernetes cluster, the
-kubeconfigflag is optional as it uses in-cluster configuration.