@@ -36,7 +36,6 @@ import (
3636 "github.com/crunchydata/postgres-operator/internal/naming"
3737 "github.com/crunchydata/postgres-operator/internal/pki"
3838 "github.com/crunchydata/postgres-operator/internal/postgres"
39- "github.com/crunchydata/postgres-operator/internal/registration"
4039 "github.com/crunchydata/postgres-operator/internal/tracing"
4140 "github.com/crunchydata/postgres-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1"
4241)
@@ -64,8 +63,7 @@ type Reconciler struct {
6463 Patch (context.Context , client.Object , client.Patch , ... client.SubResourcePatchOption ) error
6564 }
6665
67- Recorder record.EventRecorder
68- Registration registration.Registration
66+ Recorder record.EventRecorder
6967}
7068
7169// +kubebuilder:rbac:groups="",resources="events",verbs={create,patch}
@@ -183,12 +181,6 @@ func (r *Reconciler) Reconcile(
183181 return nil
184182 }
185183
186- if r .Registration != nil && r .Registration .Required (r .Recorder , cluster , & cluster .Status .Conditions ) {
187- registration .SetAdvanceWarning (r .Recorder , cluster , & cluster .Status .Conditions )
188- }
189- cluster .Status .RegistrationRequired = nil
190- cluster .Status .TokenRequired = ""
191-
192184 // if the cluster is paused, set a condition and return
193185 if cluster .Spec .Paused != nil && * cluster .Spec .Paused {
194186 meta .SetStatusCondition (& cluster .Status .Conditions , metav1.Condition {
@@ -444,7 +436,7 @@ func (r *Reconciler) setOwnerReference(
444436// +kubebuilder:rbac:groups="postgres-operator.crunchydata.com",resources="postgresclusters",verbs={get,list,watch}
445437
446438// ManagedReconciler creates a [Reconciler] and adds it to m.
447- func ManagedReconciler (m manager.Manager , r registration. Registration ) error {
439+ func ManagedReconciler (m manager.Manager ) error {
448440 exec , err := runtime .NewPodExecutor (m .GetConfig ())
449441 kubernetes := client .WithFieldOwner (m .GetClient (), naming .ControllerPostgresCluster )
450442 recorder := m .GetEventRecorderFor (naming .ControllerPostgresCluster )
@@ -453,7 +445,6 @@ func ManagedReconciler(m manager.Manager, r registration.Registration) error {
453445 PodExec : exec ,
454446 Reader : kubernetes ,
455447 Recorder : recorder ,
456- Registration : r ,
457448 StatusWriter : kubernetes .Status (),
458449 Writer : kubernetes ,
459450 }
0 commit comments