diff --git a/controllers/pkg/reconcilers/generic-specializer/reconciler.go b/controllers/pkg/reconcilers/generic-specializer/reconciler.go index 635589f3..e7803529 100644 --- a/controllers/pkg/reconcilers/generic-specializer/reconciler.go +++ b/controllers/pkg/reconcilers/generic-specializer/reconciler.go @@ -136,7 +136,7 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu vlankrmfn := fn.ResourceListProcessorFunc(vlanf.Run) vlanFor := vlanf.GetConfig().For - configInjectf := configinjectfn.New(r.porchClient) + configInjectf := configinjectfn.New(r.apiReader) configInjectkrmfn := fn.ResourceListProcessorFunc(configInjectf.Run) configInjectFor := configInjectf.GetConfig().For diff --git a/krm-functions/configinject-fn/fn/function.go b/krm-functions/configinject-fn/fn/function.go index cdf0290f..456b2df0 100644 --- a/krm-functions/configinject-fn/fn/function.go +++ b/krm-functions/configinject-fn/fn/function.go @@ -46,14 +46,14 @@ import ( const revisionPrefix = "v" type FnR struct { - client.Client + client.Reader workloadCluster *infrav1alpha1.WorkloadCluster sdkConfig *condkptsdk.Config } -func New(c client.Client) *FnR { +func New(c client.Reader) *FnR { f := &FnR{ - Client: c, + Reader: c, } f.sdkConfig = &condkptsdk.Config{ For: corev1.ObjectReference{ diff --git a/krm-functions/configinject-fn/main.go b/krm-functions/configinject-fn/main.go index 75aee08d..e824da1b 100644 --- a/krm-functions/configinject-fn/main.go +++ b/krm-functions/configinject-fn/main.go @@ -25,7 +25,7 @@ import ( func main() { r := &fnr.FnR{ - Client: nil, + Reader: nil, } if err := fn.AsMain(fn.ResourceListProcessorFunc(r.Run)); err != nil {