refactor(reloader): replace CreateOrUpdate with Runnable for metadata publishing and update RBAC to include watch permission

This commit is contained in:
TheiLLeniumStudios
2025-12-28 14:52:44 +01:00
parent 8bce8e9b38
commit 9f331cac4f
5 changed files with 30 additions and 11 deletions
+2 -2
View File
@@ -119,8 +119,8 @@ func run(cmd *cobra.Command, args []string) error {
return fmt.Errorf("setting up reconcilers: %w", err)
}
if err := metadata.CreateOrUpdate(mgr.GetClient(), cfg, log); err != nil {
log.Error(err, "Failed to create metadata ConfigMap")
if err := mgr.Add(metadata.Runnable(mgr.GetClient(), cfg, log)); err != nil {
log.Error(err, "Failed to add metadata publisher")
// Non-fatal, continue starting
}