Skip to content

Commit 772ade5

Browse files
committed
WIP
1 parent 441044e commit 772ade5

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

api/v1beta1/octavia_webhook.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ var octavialog = logf.Log.WithName("octavia-resource")
4747
// SetupOctaviaDefaults - initialize Octavia spec defaults for use with either internal or external webhooks
4848
func SetupOctaviaDefaults(defaults OctaviaDefaults) {
4949
octaviaDefaults = defaults
50-
octavialog.Info("Octavia defaults initialized", "defaults", defaults)
50+
octavialog.V(1).Info("Octavia defaults initialized", "defaults", defaults)
5151
}
5252

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

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

6868
r.Spec.Default()
6969
}
@@ -99,7 +99,7 @@ var _ webhook.Validator = &Octavia{}
9999

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

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

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

147147
oldOctavia, ok := old.(*Octavia)
148148
if !ok || oldOctavia == nil {

controllers/amphoracontroller_controller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ func (r *OctaviaAmphoraControllerReconciler) reconcileNormal(ctx context.Context
304304
if err != nil {
305305
return ctrl.Result{}, err
306306
}
307-
r.Log.Info(fmt.Sprintf("Using default flavor \"%s\"", defaultFlavorID))
307+
r.Log.V(1).Info(fmt.Sprintf("Using default flavor \"%s\"", defaultFlavorID))
308308

309309
templateVars := OctaviaTemplateVars{
310310
LbMgmtNetworkID: instance.Spec.LbMgmtNetworkID,
@@ -457,11 +457,11 @@ func (r *OctaviaAmphoraControllerReconciler) reconcileNormal(ctx context.Context
457457
// We reached the end of the Reconcile, update the Ready condition based on
458458
// the sub conditions
459459
if instance.Status.Conditions.AllSubConditionIsTrue() {
460-
Log.V(1).Info("Setting Ready condition to true.")
460+
Log.Info("Amphora controller is now ready.")
461461
instance.Status.Conditions.MarkTrue(
462462
condition.ReadyCondition, condition.ReadyMessage)
463463
} else {
464-
Log.Info("Not all conditions are ready for Amphora controller")
464+
Log.V(1).Info("Not all conditions are ready for Amphora controller yet")
465465
}
466466
return ctrl.Result{}, nil
467467
}

controllers/octavia_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ func (r *OctaviaReconciler) reconcileInit(
299299
serviceAnnotations map[string]string,
300300
) (ctrl.Result, error) {
301301
Log := r.GetLogger(ctx)
302-
Log.V(1).Info("Reconciling Service init")
302+
Log.Info("Reconciling Service init")
303303

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

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func main() {
8282
Development: true,
8383
TimeEncoder: zapcore.ISO8601TimeEncoder,
8484
// Set level to 0 in order to hide all debug logs
85-
// Level: zapcore.Level(0),
85+
Level: zapcore.Level(0),
8686
}
8787
opts.BindFlags(flag.CommandLine)
8888
flag.Parse()

0 commit comments

Comments
 (0)