@@ -31,8 +31,7 @@ import (
3131 "github.com/kcp-dev/api-syncagent/internal/controllerutil/predicate"
3232 "github.com/kcp-dev/api-syncagent/internal/discovery"
3333 "github.com/kcp-dev/api-syncagent/internal/projection"
34- "github.com/kcp-dev/api-syncagent/sdk/apis/services"
35- servicesv1alpha1 "github.com/kcp-dev/api-syncagent/sdk/apis/services/v1alpha1"
34+ syncagentv1alpha1 "github.com/kcp-dev/api-syncagent/sdk/apis/v1alpha1"
3635
3736 kcpdevv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/apis/v1alpha1"
3837
@@ -90,7 +89,7 @@ func Add(
9089 Named (ControllerName ).
9190 WithOptions (controller.Options {MaxConcurrentReconciles : numWorkers }).
9291 // Watch for changes to PublishedResources on the local service cluster
93- For (& servicesv1alpha1 .PublishedResource {}, builder .WithPredicates (predicate .ByLabels (prFilter ))).
92+ For (& syncagentv1alpha1 .PublishedResource {}, builder .WithPredicates (predicate .ByLabels (prFilter ))).
9493 Build (reconciler )
9594 return err
9695}
@@ -99,7 +98,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (
9998 log := r .log .With ("publishedresource" , request )
10099 log .Debug ("Processing" )
101100
102- pubResource := & servicesv1alpha1 .PublishedResource {}
101+ pubResource := & syncagentv1alpha1 .PublishedResource {}
103102 if err := r .localClient .Get (ctx , request .NamespacedName , pubResource ); err != nil {
104103 return reconcile.Result {}, ctrlruntimeclient .IgnoreNotFound (err )
105104 }
@@ -123,7 +122,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (
123122 return * result , err
124123}
125124
126- func (r * Reconciler ) reconcile (ctx context.Context , log * zap.SugaredLogger , pubResource * servicesv1alpha1 .PublishedResource ) (* reconcile.Result , error ) {
125+ func (r * Reconciler ) reconcile (ctx context.Context , log * zap.SugaredLogger , pubResource * syncagentv1alpha1 .PublishedResource ) (* reconcile.Result , error ) {
127126 // find the resource that the PublishedResource is referring to
128127 localGVK := projection .PublishedResourceSourceGVK (pubResource )
129128
@@ -180,11 +179,11 @@ func (r *Reconciler) createAPIResourceSchema(ctx context.Context, log *zap.Sugar
180179 ars := & kcpdevv1alpha1.APIResourceSchema {}
181180 ars .Name = arsName
182181 ars .Annotations = map [string ]string {
183- services .SourceGenerationAnnotation : fmt .Sprintf ("%d" , projectedCRD .Generation ),
184- services .AgentNameAnnotation : r .agentName ,
182+ syncagentv1alpha1 .SourceGenerationAnnotation : fmt .Sprintf ("%d" , projectedCRD .Generation ),
183+ syncagentv1alpha1 .AgentNameAnnotation : r .agentName ,
185184 }
186185 ars .Labels = map [string ]string {
187- services .APIGroupLabel : apigroup ,
186+ syncagentv1alpha1 .APIGroupLabel : apigroup ,
188187 }
189188 ars .Spec .Group = converted .Spec .Group
190189 ars .Spec .Names = converted .Spec .Names
@@ -196,7 +195,7 @@ func (r *Reconciler) createAPIResourceSchema(ctx context.Context, log *zap.Sugar
196195 return r .platformClient .Create (ctx , ars )
197196}
198197
199- func (r * Reconciler ) projectResourceNames (apiGroup string , crd * apiextensionsv1.CustomResourceDefinition , projection * servicesv1alpha1 .ResourceProjection ) * apiextensionsv1.CustomResourceDefinition {
198+ func (r * Reconciler ) projectResourceNames (apiGroup string , crd * apiextensionsv1.CustomResourceDefinition , projection * syncagentv1alpha1 .ResourceProjection ) * apiextensionsv1.CustomResourceDefinition {
200199 result := crd .DeepCopy ()
201200 result .Spec .Group = apiGroup
202201
0 commit comments