Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
weinimo committed Jun 18, 2024
1 parent 441044e commit 772ade5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions api/v1beta1/octavia_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var octavialog = logf.Log.WithName("octavia-resource")
// SetupOctaviaDefaults - initialize Octavia spec defaults for use with either internal or external webhooks
func SetupOctaviaDefaults(defaults OctaviaDefaults) {
octaviaDefaults = defaults
octavialog.Info("Octavia defaults initialized", "defaults", defaults)
octavialog.V(1).Info("Octavia defaults initialized", "defaults", defaults)
}

// SetupWebhookWithManager sets up the webhook with the Manager
Expand All @@ -63,7 +63,7 @@ var _ webhook.Defaulter = &Octavia{}

// Default implements webhook.Defaulter so a webhook will be registered for the type
func (r *Octavia) Default() {
octavialog.Info("default", "name", r.Name)
octavialog.V(1).Info("default", "name", r.Name)

r.Spec.Default()
}
Expand Down Expand Up @@ -99,7 +99,7 @@ var _ webhook.Validator = &Octavia{}

// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (r *Octavia) ValidateCreate() (admission.Warnings, error) {
octavialog.Info("validate create", "name", r.Name)
octavialog.V(1).Info("validate create", "name", r.Name)

var allErrs field.ErrorList
basePath := field.NewPath("spec")
Expand Down Expand Up @@ -142,7 +142,7 @@ func (r *OctaviaSpecCore) ValidateCreate(basePath *field.Path) field.ErrorList {

// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
func (r *Octavia) ValidateUpdate(old runtime.Object) (admission.Warnings, error) {
octavialog.Info("validate update", "name", r.Name)
octavialog.V(1).Info("validate update", "name", r.Name)

oldOctavia, ok := old.(*Octavia)
if !ok || oldOctavia == nil {
Expand Down
6 changes: 3 additions & 3 deletions controllers/amphoracontroller_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ func (r *OctaviaAmphoraControllerReconciler) reconcileNormal(ctx context.Context
if err != nil {
return ctrl.Result{}, err
}
r.Log.Info(fmt.Sprintf("Using default flavor \"%s\"", defaultFlavorID))
r.Log.V(1).Info(fmt.Sprintf("Using default flavor \"%s\"", defaultFlavorID))

templateVars := OctaviaTemplateVars{
LbMgmtNetworkID: instance.Spec.LbMgmtNetworkID,
Expand Down Expand Up @@ -457,11 +457,11 @@ func (r *OctaviaAmphoraControllerReconciler) reconcileNormal(ctx context.Context
// We reached the end of the Reconcile, update the Ready condition based on
// the sub conditions
if instance.Status.Conditions.AllSubConditionIsTrue() {
Log.V(1).Info("Setting Ready condition to true.")
Log.Info("Amphora controller is now ready.")
instance.Status.Conditions.MarkTrue(
condition.ReadyCondition, condition.ReadyMessage)
} else {
Log.Info("Not all conditions are ready for Amphora controller")
Log.V(1).Info("Not all conditions are ready for Amphora controller yet")
}
return ctrl.Result{}, nil
}
Expand Down
4 changes: 2 additions & 2 deletions controllers/octavia_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ func (r *OctaviaReconciler) reconcileInit(
serviceAnnotations map[string]string,
) (ctrl.Result, error) {
Log := r.GetLogger(ctx)
Log.V(1).Info("Reconciling Service init")
Log.Info("Reconciling Service init")

// ConfigMap
configMapVars := make(map[string]env.Setter)
Expand Down Expand Up @@ -939,7 +939,7 @@ func (r *OctaviaReconciler) reconcileNormal(ctx context.Context, instance *octav
instance.Status.Conditions.MarkTrue(
condition.ReadyCondition, condition.ReadyMessage)
}
Log.V(1).Info("Reconciled Service successfully")
Log.Info("Reconciled Service successfully")
return ctrl.Result{}, nil
}

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func main() {
Development: true,
TimeEncoder: zapcore.ISO8601TimeEncoder,
// Set level to 0 in order to hide all debug logs
// Level: zapcore.Level(0),
Level: zapcore.Level(0),
}
opts.BindFlags(flag.CommandLine)
flag.Parse()
Expand Down

0 comments on commit 772ade5

Please sign in to comment.