Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Reduce log level of noisy logs in ExtensionConfig and Cluster controller #11660

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu
}

// Register the ExtensionConfig if it was found and patched without error.
log.Info("Registering ExtensionConfig information into registry")
log.V(4).Info("Registering ExtensionConfig information into registry")
if err = r.RuntimeClient.Register(discoveredExtensionConfig); err != nil {
return ctrl.Result{}, errors.Wrapf(err, "failed to register ExtensionConfig %s/%s", extensionConfig.Namespace, extensionConfig.Name)
}
Expand Down Expand Up @@ -246,7 +246,7 @@ func reconcileCABundle(ctx context.Context, client client.Client, config *runtim
}
secretName := splitNamespacedName(secretNameRaw)

log.Info(fmt.Sprintf("Injecting CA Bundle into ExtensionConfig from secret %q", secretNameRaw))
log.V(4).Info(fmt.Sprintf("Injecting CA Bundle into ExtensionConfig from secret %q", secretNameRaw))

if secretName.Namespace == "" || secretName.Name == "" {
return errors.Errorf("failed to reconcile caBundle: secret name %q must be in the form <namespace>/<name>", secretNameRaw)
Expand Down
3 changes: 0 additions & 3 deletions internal/controllers/topology/cluster/reconcile_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ const (
// the entire reconcile operation will fail. This might be improved in the future if support for reconciling
// subset of a topology will be implemented.
func (r *Reconciler) reconcileState(ctx context.Context, s *scope.Scope) error {
log := ctrl.LoggerFrom(ctx)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the only controller in CAPI that logged every single Reconcile

log.Info("Reconciling state for topology owned objects")

// Reconcile the Cluster shim, a temporary object used a mean to collect
// objects/templates that can be orphaned in case of errors during the
// remaining part of the reconcile process.
Expand Down
2 changes: 1 addition & 1 deletion internal/runtime/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (c *client) IsReady() bool {

func (c *client) Discover(ctx context.Context, extensionConfig *runtimev1.ExtensionConfig) (*runtimev1.ExtensionConfig, error) {
log := ctrl.LoggerFrom(ctx)
log.Info("Performing discovery for ExtensionConfig")
log.V(4).Info("Performing discovery for ExtensionConfig")

hookGVH, err := c.catalog.GroupVersionHook(runtimehooksv1.Discovery)
if err != nil {
Expand Down
Loading