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

[v2] minor log messages improvements #758

Merged
merged 1 commit into from
Apr 17, 2020
Merged
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
6 changes: 4 additions & 2 deletions pkg/controller/scaledobject/scaledobject_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func (r *ReconcileScaledObject) reconcileScaledObject(logger logr.Logger, scaled
// Create a new HPA or update existing one according to ScaledObject
newHPACreated, err := r.ensureHPAForScaledObjectExists(logger, scaledObject, &gvkr)
if err != nil {
return "Failed to reconcile HPA for ScaledObject", err
return "Failed to ensure HPA is correctly created for ScaledObject", err
}
scaleObjectSpecChanged := false
if !newHPACreated {
Expand All @@ -214,6 +214,8 @@ func (r *ReconcileScaledObject) reconcileScaledObject(logger logr.Logger, scaled
if newHPACreated || scaleObjectSpecChanged {
if r.requestScaleLoop(logger, scaledObject) != nil {
return "Failed to start a new scale loop with scaling logic", err
} else {
logger.Info("Initializing Scaling logic according to ScaledObject Specification")
}
}

Expand Down Expand Up @@ -295,7 +297,7 @@ func (r *ReconcileScaledObject) ensureHPAForScaledObjectExists(logger logr.Logge
// new HPA created successfully -> notify Reconcile function so it could fire a new ScaleLoop
return true, nil
} else if err != nil {
logger.Error(err, "Failed to get HPA")
logger.Error(err, "Failed to get HPA from cluster")
return false, err
}

Expand Down