diff --git a/controllers/core/openstackcontrolplane_controller.go b/controllers/core/openstackcontrolplane_controller.go index 3bc496466..f9e02b6a8 100644 --- a/controllers/core/openstackcontrolplane_controller.go +++ b/controllers/core/openstackcontrolplane_controller.go @@ -91,11 +91,6 @@ type OpenStackControlPlaneReconciler struct { // For more details, check Reconcile and its Result here: // - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.1/pkg/reconcile -// GetLog returns a logger object with a prefix of "conroller.name" and aditional controller context fields -func GetLog(ctx context.Context) logr.Logger { - return log.FromContext(ctx).WithName("Controllers").WithName("OpenstackControlPlane") -} - func (r *OpenStackControlPlaneReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, _err error) { l := GetLog(ctx) diff --git a/pkg/openstack/ceilometer.go b/pkg/openstack/ceilometer.go index cddecc541..23300877b 100644 --- a/pkg/openstack/ceilometer.go +++ b/pkg/openstack/ceilometer.go @@ -30,6 +30,8 @@ func ReconcileCeilometer(ctx context.Context, instance *corev1beta1.OpenStackCon }, } + l := GetLog(ctx) + if !instance.Spec.Ceilometer.Enabled { if res, err := EnsureDeleted(ctx, helper, ceilometer); err != nil { return res, err @@ -38,7 +40,7 @@ func ReconcileCeilometer(ctx context.Context, instance *corev1beta1.OpenStackCon return ctrl.Result{}, nil } - helper.GetLogger().Info("Reconciling Ceilometer", ceilometerNamespaceLabel, instance.Namespace, ceilometerNameLabel, ceilometerName) + l.Info("Reconciling Ceilometer", ceilometerNamespaceLabel, instance.Namespace, ceilometerNameLabel, ceilometerName) op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), ceilometer, func() error { instance.Spec.Ceilometer.Template.DeepCopyInto(&ceilometer.Spec) @@ -63,7 +65,7 @@ func ReconcileCeilometer(ctx context.Context, instance *corev1beta1.OpenStackCon return ctrl.Result{}, err } if op != controllerutil.OperationResultNone { - helper.GetLogger().Info(fmt.Sprintf("%s %s - %s", ceilometerName, ceilometer.Name, op)) + l.Info(fmt.Sprintf("%s %s - %s", ceilometerName, ceilometer.Name, op)) } if ceilometer.IsReady() { diff --git a/pkg/openstack/cinder.go b/pkg/openstack/cinder.go index 3b8118661..8202b279e 100644 --- a/pkg/openstack/cinder.go +++ b/pkg/openstack/cinder.go @@ -11,7 +11,6 @@ import ( cinderv1 "github.com/openstack-k8s-operators/cinder-operator/api/v1beta1" corev1beta1 "github.com/openstack-k8s-operators/openstack-operator/apis/core/v1beta1" - "github.com/openstack-k8s-operators/openstack-operator/controllers/core" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ctrl "sigs.k8s.io/controller-runtime" ) @@ -32,7 +31,7 @@ func ReconcileCinder(ctx context.Context, instance *corev1beta1.OpenStackControl instance.Status.Conditions.Remove(corev1beta1.OpenStackControlPlaneCinderReadyCondition) return ctrl.Result{}, nil } - l := core.GetLog(ctx) + l := GetLog(ctx) l.Info("Reconciling Cinder", "Cinder.Namespace", instance.Namespace, "Cinder.Name", "cinder") op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), cinder, func() error { diff --git a/pkg/openstack/common.go b/pkg/openstack/common.go index 760a87c0a..75fa3950b 100644 --- a/pkg/openstack/common.go +++ b/pkg/openstack/common.go @@ -3,12 +3,19 @@ package openstack import ( "context" + "github.com/go-logr/logr" "github.com/openstack-k8s-operators/lib-common/modules/common/helper" k8s_errors "k8s.io/apimachinery/pkg/api/errors" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/log" ) +// GetLog returns a logger object with a prefix of "conroller.name" and aditional controller context fields +func GetLog(ctx context.Context) logr.Logger { + return log.FromContext(ctx).WithName("Controllers").WithName("OpenstackControlPlane") +} + // EnsureDeleted - Delete the object which in turn will clean the sub resources func EnsureDeleted(ctx context.Context, helper *helper.Helper, obj client.Object) (ctrl.Result, error) { key := client.ObjectKeyFromObject(obj) diff --git a/pkg/openstack/dnsmasq.go b/pkg/openstack/dnsmasq.go index cbcdb8493..e86a24ea4 100644 --- a/pkg/openstack/dnsmasq.go +++ b/pkg/openstack/dnsmasq.go @@ -33,7 +33,9 @@ func ReconcileDNSMasqs(ctx context.Context, instance *corev1beta1.OpenStackContr return ctrl.Result{}, nil } - helper.GetLogger().Info("Reconciling DNSMasq", "DNSMasq.Namespace", instance.Namespace, "DNSMasq.Name", "dnsmasq") + l := GetLog(ctx) + + l.Info("Reconciling DNSMasq", "DNSMasq.Namespace", instance.Namespace, "DNSMasq.Name", "dnsmasq") op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), dnsmasq, func() error { instance.Spec.DNS.Template.DeepCopyInto(&dnsmasq.Spec) if dnsmasq.Spec.NodeSelector == nil && instance.Spec.NodeSelector != nil { @@ -56,7 +58,7 @@ func ReconcileDNSMasqs(ctx context.Context, instance *corev1beta1.OpenStackContr return ctrl.Result{}, err } if op != controllerutil.OperationResultNone { - helper.GetLogger().Info(fmt.Sprintf("dnsmasq %s - %s", dnsmasq.Name, op)) + l.Info(fmt.Sprintf("dnsmasq %s - %s", dnsmasq.Name, op)) } if dnsmasq.IsReady() { diff --git a/pkg/openstack/galera.go b/pkg/openstack/galera.go index c987ce0fa..f2757ecbe 100644 --- a/pkg/openstack/galera.go +++ b/pkg/openstack/galera.go @@ -12,7 +12,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" corev1beta1 "github.com/openstack-k8s-operators/openstack-operator/apis/core/v1beta1" - "github.com/openstack-k8s-operators/openstack-operator/controllers/core" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ctrl "sigs.k8s.io/controller-runtime" ) @@ -94,7 +93,7 @@ func reconcileGalera( Namespace: instance.Namespace, }, } - l := core.GetLog(ctx) + l := GetLog(ctx) if !instance.Spec.Galera.Enabled { if _, err := EnsureDeleted(ctx, helper, galera); err != nil { diff --git a/pkg/openstack/glance.go b/pkg/openstack/glance.go index dade955d0..beecd444b 100644 --- a/pkg/openstack/glance.go +++ b/pkg/openstack/glance.go @@ -11,7 +11,6 @@ import ( glancev1 "github.com/openstack-k8s-operators/glance-operator/api/v1beta1" corev1beta1 "github.com/openstack-k8s-operators/openstack-operator/apis/core/v1beta1" - "github.com/openstack-k8s-operators/openstack-operator/controllers/core" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ctrl "sigs.k8s.io/controller-runtime" ) @@ -25,7 +24,7 @@ func ReconcileGlance(ctx context.Context, instance *corev1beta1.OpenStackControl }, } - l := core.GetLog(ctx) + l := GetLog(ctx) if !instance.Spec.Glance.Enabled { if res, err := EnsureDeleted(ctx, helper, glance); err != nil { diff --git a/pkg/openstack/heat.go b/pkg/openstack/heat.go index ff3ef8ade..933eb2a44 100644 --- a/pkg/openstack/heat.go +++ b/pkg/openstack/heat.go @@ -31,7 +31,10 @@ func ReconcileHeat(ctx context.Context, instance *corev1beta1.OpenStackControlPl instance.Status.Conditions.Remove(corev1beta1.OpenStackControlPlaneHeatReadyCondition) return ctrl.Result{}, nil } - helper.GetLogger().Info("Reconcile heat", "heat.Namespace", instance.Namespace, "heat.Name", "heat") + + l := GetLog(ctx) + + l.Info("Reconcile heat", "heat.Namespace", instance.Namespace, "heat.Name", "heat") op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), heat, func() error { instance.Spec.Heat.Template.DeepCopyInto(&heat.Spec) err := controllerutil.SetControllerReference(helper.GetBeforeObject(), heat, helper.GetScheme()) @@ -51,7 +54,7 @@ func ReconcileHeat(ctx context.Context, instance *corev1beta1.OpenStackControlPl return ctrl.Result{}, err } if op != controllerutil.OperationResultNone { - helper.GetLogger().Info(fmt.Sprintf("heat %s - %s", heat.Name, op)) + l.Info(fmt.Sprintf("heat %s - %s", heat.Name, op)) } if heat.IsReady() { diff --git a/pkg/openstack/horizon.go b/pkg/openstack/horizon.go index 4e8b08ab9..b9d3a2fad 100644 --- a/pkg/openstack/horizon.go +++ b/pkg/openstack/horizon.go @@ -11,7 +11,6 @@ import ( horizonv1 "github.com/openstack-k8s-operators/horizon-operator/api/v1beta1" corev1beta1 "github.com/openstack-k8s-operators/openstack-operator/apis/core/v1beta1" - "github.com/openstack-k8s-operators/openstack-operator/controllers/core" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ctrl "sigs.k8s.io/controller-runtime" ) @@ -24,7 +23,7 @@ func ReconcileHorizon(ctx context.Context, instance *corev1beta1.OpenStackContro Namespace: instance.Namespace, }, } - l := core.GetLog(ctx) + l := GetLog(ctx) if !instance.Spec.Horizon.Enabled { if res, err := EnsureDeleted(ctx, helper, horizon); err != nil { diff --git a/pkg/openstack/ironic.go b/pkg/openstack/ironic.go index ec144c812..57f84a718 100644 --- a/pkg/openstack/ironic.go +++ b/pkg/openstack/ironic.go @@ -11,7 +11,6 @@ import ( ironicv1 "github.com/openstack-k8s-operators/ironic-operator/api/v1beta1" corev1beta1 "github.com/openstack-k8s-operators/openstack-operator/apis/core/v1beta1" - "github.com/openstack-k8s-operators/openstack-operator/controllers/core" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ctrl "sigs.k8s.io/controller-runtime" ) @@ -24,7 +23,7 @@ func ReconcileIronic(ctx context.Context, instance *corev1beta1.OpenStackControl Namespace: instance.Namespace, }, } - l := core.GetLog(ctx) + l := GetLog(ctx) if !instance.Spec.Ironic.Enabled { if res, err := EnsureDeleted(ctx, helper, ironic); err != nil { diff --git a/pkg/openstack/keystone.go b/pkg/openstack/keystone.go index a2f6698b3..6bcfdfe28 100644 --- a/pkg/openstack/keystone.go +++ b/pkg/openstack/keystone.go @@ -11,7 +11,6 @@ import ( keystonev1 "github.com/openstack-k8s-operators/keystone-operator/api/v1beta1" corev1beta1 "github.com/openstack-k8s-operators/openstack-operator/apis/core/v1beta1" - "github.com/openstack-k8s-operators/openstack-operator/controllers/core" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ctrl "sigs.k8s.io/controller-runtime" ) @@ -25,7 +24,7 @@ func ReconcileKeystoneAPI(ctx context.Context, instance *corev1beta1.OpenStackCo }, } - l := core.GetLog(ctx) + l := GetLog(ctx) if !instance.Spec.Keystone.Enabled { if res, err := EnsureDeleted(ctx, helper, keystoneAPI); err != nil { diff --git a/pkg/openstack/manila.go b/pkg/openstack/manila.go index de05cbc19..b045e38d7 100644 --- a/pkg/openstack/manila.go +++ b/pkg/openstack/manila.go @@ -11,7 +11,6 @@ import ( manilav1 "github.com/openstack-k8s-operators/manila-operator/api/v1beta1" corev1beta1 "github.com/openstack-k8s-operators/openstack-operator/apis/core/v1beta1" - "github.com/openstack-k8s-operators/openstack-operator/controllers/core" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ctrl "sigs.k8s.io/controller-runtime" ) @@ -24,7 +23,7 @@ func ReconcileManila(ctx context.Context, instance *corev1beta1.OpenStackControl Namespace: instance.Namespace, }, } - l := core.GetLog(ctx) + l := GetLog(ctx) if !instance.Spec.Manila.Enabled { if res, err := EnsureDeleted(ctx, helper, manila); err != nil { diff --git a/pkg/openstack/mariadb.go b/pkg/openstack/mariadb.go index 89851d13b..6b488783c 100644 --- a/pkg/openstack/mariadb.go +++ b/pkg/openstack/mariadb.go @@ -12,7 +12,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" corev1beta1 "github.com/openstack-k8s-operators/openstack-operator/apis/core/v1beta1" - "github.com/openstack-k8s-operators/openstack-operator/controllers/core" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ctrl "sigs.k8s.io/controller-runtime" ) @@ -95,7 +94,7 @@ func reconcileMariaDB( }, } - l := core.GetLog(ctx) + l := GetLog(ctx) if !instance.Spec.Mariadb.Enabled { if _, err := EnsureDeleted(ctx, helper, mariadb); err != nil { diff --git a/pkg/openstack/memcached.go b/pkg/openstack/memcached.go index c933a7673..1e4683ba9 100644 --- a/pkg/openstack/memcached.go +++ b/pkg/openstack/memcached.go @@ -12,7 +12,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" corev1beta1 "github.com/openstack-k8s-operators/openstack-operator/apis/core/v1beta1" - "github.com/openstack-k8s-operators/openstack-operator/controllers/core" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -139,7 +138,7 @@ func reconcileMemcached( }, } - l := core.GetLog(ctx) + l := GetLog(ctx) if !instance.Spec.Memcached.Enabled { if _, err := EnsureDeleted(ctx, helper, memcached); err != nil { diff --git a/pkg/openstack/neutron.go b/pkg/openstack/neutron.go index 2a1ab36ea..19283e2ff 100644 --- a/pkg/openstack/neutron.go +++ b/pkg/openstack/neutron.go @@ -11,7 +11,6 @@ import ( neutronv1 "github.com/openstack-k8s-operators/neutron-operator/api/v1beta1" corev1beta1 "github.com/openstack-k8s-operators/openstack-operator/apis/core/v1beta1" - "github.com/openstack-k8s-operators/openstack-operator/controllers/core" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ctrl "sigs.k8s.io/controller-runtime" ) @@ -24,7 +23,7 @@ func ReconcileNeutron(ctx context.Context, instance *corev1beta1.OpenStackContro Namespace: instance.Namespace, }, } - l := core.GetLog(ctx) + l := GetLog(ctx) if !instance.Spec.Neutron.Enabled { if res, err := EnsureDeleted(ctx, helper, neutronAPI); err != nil { diff --git a/pkg/openstack/nova.go b/pkg/openstack/nova.go index 3cc140f47..7eaba65dd 100644 --- a/pkg/openstack/nova.go +++ b/pkg/openstack/nova.go @@ -22,12 +22,10 @@ import ( "github.com/openstack-k8s-operators/lib-common/modules/common/condition" "github.com/openstack-k8s-operators/lib-common/modules/common/helper" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" novav1 "github.com/openstack-k8s-operators/nova-operator/api/v1beta1" corev1beta1 "github.com/openstack-k8s-operators/openstack-operator/apis/core/v1beta1" - "github.com/openstack-k8s-operators/openstack-operator/controllers/core" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ctrl "sigs.k8s.io/controller-runtime" ) @@ -40,7 +38,7 @@ func ReconcileNova(ctx context.Context, instance *corev1beta1.OpenStackControlPl Namespace: instance.Namespace, }, } - l := core.GetLog(ctx) + l := GetLog(ctx) if !instance.Spec.Nova.Enabled { if res, err := EnsureDeleted(ctx, helper, nova); err != nil { diff --git a/pkg/openstack/openstackclient.go b/pkg/openstack/openstackclient.go index 984d186d2..b1c0466ac 100644 --- a/pkg/openstack/openstackclient.go +++ b/pkg/openstack/openstackclient.go @@ -23,7 +23,6 @@ import ( condition "github.com/openstack-k8s-operators/lib-common/modules/common/condition" "github.com/openstack-k8s-operators/lib-common/modules/common/helper" corev1beta1 "github.com/openstack-k8s-operators/openstack-operator/apis/core/v1beta1" - "github.com/openstack-k8s-operators/openstack-operator/controllers/core" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -44,7 +43,7 @@ func ReconcileOpenStackClient(ctx context.Context, instance *corev1beta1.OpenSta Namespace: instance.Namespace, }, } - l := core.GetLog(ctx) + l := GetLog(ctx) l.Info("Reconciling OpenStackClient", "OpenStackClient.Namespace", instance.Namespace, "OpenStackClient.Name", openstackclient.Name) op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), openstackclient, func() error { diff --git a/pkg/openstack/ovn.go b/pkg/openstack/ovn.go index 2226c2e28..8a826159d 100644 --- a/pkg/openstack/ovn.go +++ b/pkg/openstack/ovn.go @@ -10,7 +10,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" corev1beta1 "github.com/openstack-k8s-operators/openstack-operator/apis/core/v1beta1" - "github.com/openstack-k8s-operators/openstack-operator/controllers/core" ovnv1 "github.com/openstack-k8s-operators/ovn-operator/api/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ctrl "sigs.k8s.io/controller-runtime" @@ -18,6 +17,9 @@ import ( // ReconcileOVN - func ReconcileOVN(ctx context.Context, instance *corev1beta1.OpenStackControlPlane, helper *helper.Helper) (ctrl.Result, error) { + + l := GetLog(ctx) + OVNDBClustersReady := len(instance.Spec.Ovn.Template.OVNDBCluster) != 0 for name, dbcluster := range instance.Spec.Ovn.Template.OVNDBCluster { OVNDBCluster := &ovnv1.OVNDBCluster{ @@ -26,7 +28,6 @@ func ReconcileOVN(ctx context.Context, instance *corev1beta1.OpenStackControlPla Namespace: instance.Namespace, }, } - l := core.GetLog(ctx) if !instance.Spec.Ovn.Enabled { if res, err := EnsureDeleted(ctx, helper, OVNDBCluster); err != nil { @@ -129,7 +130,7 @@ func ReconcileOVN(ctx context.Context, instance *corev1beta1.OpenStackControlPla return ctrl.Result{}, nil } - helper.GetLogger().Info("Reconciling OVNController", "OVNController.Namespace", instance.Namespace, "OVNController.Name", "ovncontroller") + l.Info("Reconciling OVNController", "OVNController.Namespace", instance.Namespace, "OVNController.Name", "ovncontroller") op, err = controllerutil.CreateOrPatch(ctx, helper.GetClient(), OVNController, func() error { instance.Spec.Ovn.Template.OVNController.DeepCopyInto(&OVNController.Spec) @@ -155,7 +156,7 @@ func ReconcileOVN(ctx context.Context, instance *corev1beta1.OpenStackControlPla return ctrl.Result{}, err } if op != controllerutil.OperationResultNone { - helper.GetLogger().Info(fmt.Sprintf("OVNController %s - %s", OVNController.Name, op)) + l.Info(fmt.Sprintf("OVNController %s - %s", OVNController.Name, op)) } // Expect all services (dbclusters, northd, ovn-controller) ready diff --git a/pkg/openstack/placement.go b/pkg/openstack/placement.go index de91a5d03..f311a5be3 100644 --- a/pkg/openstack/placement.go +++ b/pkg/openstack/placement.go @@ -10,7 +10,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" corev1beta1 "github.com/openstack-k8s-operators/openstack-operator/apis/core/v1beta1" - "github.com/openstack-k8s-operators/openstack-operator/controllers/core" placementv1 "github.com/openstack-k8s-operators/placement-operator/api/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ctrl "sigs.k8s.io/controller-runtime" @@ -24,7 +23,7 @@ func ReconcilePlacementAPI(ctx context.Context, instance *corev1beta1.OpenStackC Namespace: instance.Namespace, }, } - l := core.GetLog(ctx) + l := GetLog(ctx) if !instance.Spec.Placement.Enabled { if res, err := EnsureDeleted(ctx, helper, placementAPI); err != nil { diff --git a/pkg/openstack/rabbitmq.go b/pkg/openstack/rabbitmq.go index 6e6e3f99a..9d6f2766b 100644 --- a/pkg/openstack/rabbitmq.go +++ b/pkg/openstack/rabbitmq.go @@ -18,7 +18,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" corev1beta1 "github.com/openstack-k8s-operators/openstack-operator/apis/core/v1beta1" - "github.com/openstack-k8s-operators/openstack-operator/controllers/core" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -98,7 +97,7 @@ func reconcileRabbitMQ( }, } - l := core.GetLog(ctx) + l := GetLog(ctx) l.Info("Reconciling RabbitMQ", "RabbitMQ.Namespace", instance.Namespace, "RabbitMQ.Name", name) if !instance.Spec.Rabbitmq.Enabled { if _, err := EnsureDeleted(ctx, helper, rabbitmq); err != nil { diff --git a/pkg/openstack/swift.go b/pkg/openstack/swift.go index ae40f9dc3..4823bb97a 100644 --- a/pkg/openstack/swift.go +++ b/pkg/openstack/swift.go @@ -24,6 +24,8 @@ func ReconcileSwift(ctx context.Context, instance *corev1beta1.OpenStackControlP }, } + l := GetLog(ctx) + if !instance.Spec.Swift.Enabled { if res, err := EnsureDeleted(ctx, helper, swift); err != nil { return res, err @@ -32,7 +34,7 @@ func ReconcileSwift(ctx context.Context, instance *corev1beta1.OpenStackControlP return ctrl.Result{}, nil } - helper.GetLogger().Info("Reconciling Swift", "Swift.Namespace", instance.Namespace, "Swift.Name", "swift") + l.Info("Reconciling Swift", "Swift.Namespace", instance.Namespace, "Swift.Name", "swift") op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), swift, func() error { instance.Spec.Swift.Template.DeepCopyInto(&swift.Spec) err := controllerutil.SetControllerReference(helper.GetBeforeObject(), swift, helper.GetScheme()) @@ -52,7 +54,7 @@ func ReconcileSwift(ctx context.Context, instance *corev1beta1.OpenStackControlP return ctrl.Result{}, err } if op != controllerutil.OperationResultNone { - helper.GetLogger().Info(fmt.Sprintf("Swift %s - %s", swift.Name, op)) + l.Info(fmt.Sprintf("Swift %s - %s", swift.Name, op)) } if swift.IsReady() {