@@ -33,6 +33,7 @@ import (
3333 "github.com/pdok/mapserver-operator/internal/controller/legendgenerator"
3434 "github.com/pdok/mapserver-operator/internal/controller/ogcwebserviceproxy"
3535 smoothoperatorv1 "github.com/pdok/smooth-operator/api/v1"
36+ smoothoperatorstatus "github.com/pdok/smooth-operator/pkg/status"
3637 smoothoperatorutils "github.com/pdok/smooth-operator/pkg/util"
3738 corev1 "k8s.io/api/core/v1"
3839 apierrors "k8s.io/apimachinery/pkg/api/errors"
@@ -115,7 +116,7 @@ func (r *WMSReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result
115116 defer func () {
116117 if rec := recover (); rec != nil {
117118 err = recoveredPanicToError (rec )
118- logAndUpdateStatusError (ctx , r , wms , err )
119+ smoothoperatorstatus . LogAndUpdateStatusError (ctx , r . Client , wms , err )
119120 }
120121 }()
121122
@@ -132,11 +133,11 @@ func (r *WMSReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result
132133 operationResults , err := createOrUpdateAllForWMSWFS (ctx , r , wms , ownerInfo )
133134 if err != nil {
134135 lgr .Info ("failed creating resources for wms" , "wms" , wms .Name )
135- logAndUpdateStatusError (ctx , r , wms , err )
136+ smoothoperatorstatus . LogAndUpdateStatusError (ctx , r . Client , wms , err )
136137 return result , err
137138 }
138139 lgr .Info ("finished creating resources for wms" , "wms" , wms .Name )
139- logAndUpdateStatusFinished (ctx , r , wms , operationResults )
140+ smoothoperatorstatus . LogAndUpdateStatusFinished (ctx , r . Client , wms , operationResults )
140141
141142 return result , err
142143}
0 commit comments