@@ -187,32 +187,32 @@ func (r *OctaviaAmphoraControllerReconciler) Reconcile(ctx context.Context, req
187187func (r * OctaviaAmphoraControllerReconciler ) reconcileDelete (ctx context.Context , instance * octaviav1.OctaviaAmphoraController ,
188188 helper * helper.Helper ) (ctrl.Result , error ) {
189189 Log := r .GetLogger (ctx )
190- Log .Info ("Reconciling Service delete" )
190+ Log .V ( 1 ). Info ("Reconciling Service delete" )
191191
192192 controllerutil .RemoveFinalizer (instance , helper .GetFinalizer ())
193193
194- Log .Info ("Reconciled Service delete successfully" )
194+ Log .V ( 1 ). Info ("Reconciled Service delete successfully" )
195195 return ctrl.Result {}, nil
196196}
197197
198198func (r * OctaviaAmphoraControllerReconciler ) reconcileUpdate (ctx context.Context ) (ctrl.Result , error ) {
199199 Log := r .GetLogger (ctx )
200- Log .Info ("Reconciling Service update" )
201- Log .Info ("Reconciled Service update successfully" )
200+ Log .V ( 1 ). Info ("Reconciling Service update" )
201+ Log .V ( 1 ). Info ("Reconciled Service update successfully" )
202202 return ctrl.Result {}, nil
203203}
204204
205205func (r * OctaviaAmphoraControllerReconciler ) reconcileUpgrade (ctx context.Context ) (ctrl.Result , error ) {
206206 Log := r .GetLogger (ctx )
207- Log .Info ("Reconciling Service upgrade" )
208- Log .Info ("Reconciled Service upgrade successfully" )
207+ Log .V ( 1 ). Info ("Reconciling Service upgrade" )
208+ Log .V ( 1 ). Info ("Reconciled Service upgrade successfully" )
209209 return ctrl.Result {}, nil
210210}
211211
212212func (r * OctaviaAmphoraControllerReconciler ) reconcileNormal (ctx context.Context , instance * octaviav1.OctaviaAmphoraController ,
213213 helper * helper.Helper ) (ctrl.Result , error ) {
214214 Log := r .GetLogger (ctx )
215- Log .Info ("Reconciling Service" )
215+ Log .V ( 1 ). Info ("Reconciling Service" )
216216
217217 // Prepare NetworkAttachments first, it must be done before generating the
218218 // configuration as the config uses IP addresses of the attachments.
@@ -459,6 +459,7 @@ func (r *OctaviaAmphoraControllerReconciler) reconcileNormal(ctx context.Context
459459 // We reached the end of the Reconcile, update the Ready condition based on
460460 // the sub conditions
461461 if instance .Status .Conditions .AllSubConditionIsTrue () {
462+ Log .V (1 ).Info ("Setting Ready condition to true." )
462463 instance .Status .Conditions .MarkTrue (
463464 condition .ReadyCondition , condition .ReadyMessage )
464465 } else {
@@ -475,7 +476,7 @@ func (r *OctaviaAmphoraControllerReconciler) generateServiceConfigMaps(
475476 templateVars OctaviaTemplateVars ,
476477 ospSecret * corev1.Secret ,
477478) error {
478- r .Log .Info (fmt .Sprintf ("generating service config map for %s (%s)" , instance .Name , instance .Kind ))
479+ r .Log .V ( 1 ). Info (fmt .Sprintf ("generating service config map for %s (%s)" , instance .Name , instance .Kind ))
479480 cmLabels := labels .GetLabels (instance , labels .GetGroupLabel (instance .ObjectMeta .Name ), map [string ]string {})
480481 db , err := mariadbv1 .GetDatabaseByNameAndAccount (ctx , helper , octavia .DatabaseName , instance .Spec .DatabaseAccount , instance .Namespace )
481482 if err != nil {
@@ -666,8 +667,7 @@ func (r *OctaviaAmphoraControllerReconciler) generateServiceConfigMaps(
666667 return err
667668 }
668669
669- r .Log .Info ("Service config map generated" )
670-
670+ r .Log .V (1 ).Info ("Service config map generated" )
671671 return nil
672672}
673673
@@ -732,7 +732,7 @@ func listHealthManagerPods(name string, ns string, client kubernetes.Interface,
732732 LabelSelector : fmt .Sprintf ("%s=%s" , common .AppSelector , name ),
733733 FieldSelector : "status.phase==Running" ,
734734 }
735- log .Info (fmt .Sprintf ("Listing pods using label selector %s and field selector %s" , listOptions .LabelSelector , listOptions .FieldSelector ))
735+ log .V ( 1 ). Info (fmt .Sprintf ("Listing pods using label selector %s and field selector %s" , listOptions .LabelSelector , listOptions .FieldSelector ))
736736 pods , err := client .CoreV1 ().Pods (ns ).List (context .Background (), listOptions )
737737 if err != nil {
738738 return nil , err
0 commit comments