@ -164,14 +164,6 @@ waitOnline:
time . Sleep ( time . Second )
time . Sleep ( time . Second )
}
}
sr := & ServiceReconciler {
tsClient : tsClient ,
defaultTags : strings . Split ( tags , "," ) ,
operatorNamespace : tsNamespace ,
proxyImage : image ,
logger : zlog . Named ( "service-reconciler" ) ,
}
// For secrets and statefulsets, we only get permission to touch the objects
// For secrets and statefulsets, we only get permission to touch the objects
// in the controller's own namespace. This cannot be expressed by
// in the controller's own namespace. This cannot be expressed by
// .Watches(...) below, instead you have to add a per-type field selector to
// .Watches(...) below, instead you have to add a per-type field selector to
@ -193,6 +185,15 @@ waitOnline:
startlog . Fatalf ( "could not create manager: %v" , err )
startlog . Fatalf ( "could not create manager: %v" , err )
}
}
sr := & ServiceReconciler {
Client : mgr . GetClient ( ) ,
tsClient : tsClient ,
defaultTags : strings . Split ( tags , "," ) ,
operatorNamespace : tsNamespace ,
proxyImage : image ,
logger : zlog . Named ( "service-reconciler" ) ,
}
reconcileFilter := handler . EnqueueRequestsFromMapFunc ( func ( o client . Object ) [ ] reconcile . Request {
reconcileFilter := handler . EnqueueRequestsFromMapFunc ( func ( o client . Object ) [ ] reconcile . Request {
ls := o . GetLabels ( )
ls := o . GetLabels ( )
if ls [ LabelManaged ] != "true" {
if ls [ LabelManaged ] != "true" {
@ -591,11 +592,6 @@ func (a *ServiceReconciler) reconcileSTS(ctx context.Context, logger *zap.Sugare
return createOrUpdate ( ctx , a . Client , a . operatorNamespace , & ss , func ( s * appsv1 . StatefulSet ) { s . Spec = ss . Spec } )
return createOrUpdate ( ctx , a . Client , a . operatorNamespace , & ss , func ( s * appsv1 . StatefulSet ) { s . Spec = ss . Spec } )
}
}
func ( a * ServiceReconciler ) InjectClient ( c client . Client ) error {
a . Client = c
return nil
}
// ptrObject is a type constraint for pointer types that implement
// ptrObject is a type constraint for pointer types that implement
// client.Object.
// client.Object.
type ptrObject [ T any ] interface {
type ptrObject [ T any ] interface {