Skip to content

Commit

Permalink
feat: providing log upon CapsuleConfiguration change
Browse files Browse the repository at this point in the history
  • Loading branch information
prometherion committed May 31, 2021
1 parent a4128b5 commit a7fff59
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions controllers/config/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,15 @@ func (r *Manager) SetupWithManager(mgr ctrl.Manager, configurationName string) e
}

func (r *Manager) Reconcile(ctx context.Context, request reconcile.Request) (res reconcile.Result, err error) {
r.Log.Info("CapsuleConfiguration reconciliation started", "request.name", request.Name)

cfg := configuration.NewCapsuleConfiguration(r.Client, request.Name)
// Validating the Capsule Configuration options
if _, err = cfg.ProtectedNamespaceRegexp(); err != nil {
panic(errors.Wrap(err, "Invalid configuration for protected Namespace regex"))
}

r.Log.Info("CapsuleConfiguration reconciliation finished", "request.name", request.Name)

return
}

0 comments on commit a7fff59

Please sign in to comment.