diff --git a/changelog/v0.30.1/input-reconciler-options.yaml b/changelog/v0.30.1/input-reconciler-options.yaml new file mode 100644 index 000000000..9e1e19d01 --- /dev/null +++ b/changelog/v0.30.1/input-reconciler-options.yaml @@ -0,0 +1,4 @@ +changelog: + - type: NON_USER_FACING + description: > + Pass through the reconciler options in input reconciler template diff --git a/contrib/codegen/templates/input/input_reconciler.gotmpl b/contrib/codegen/templates/input/input_reconciler.gotmpl index b3ddce0a7..268e655a0 100644 --- a/contrib/codegen/templates/input/input_reconciler.gotmpl +++ b/contrib/codegen/templates/input/input_reconciler.gotmpl @@ -86,7 +86,7 @@ func RegisterMultiCluster{{ $snapshotName }}Reconciler( {{- $kindLowerCamel := lower_camel $resource.Kind }} {{- $kindLowerCamelPlural := pluralize $kindLowerCamel }} - multicluster_reconcile_v2.NewLoop("das", clusters, &{{ $types_import_prefix }}.{{ $resource.Kind }}{}, reconcile_v2.Options{}). + multicluster_reconcile_v2.NewLoop("das", clusters, &{{ $types_import_prefix }}.{{ $resource.Kind }}{}, reconcile_v2.Options(options.{{ $kindPlural }})). AddReconciler(ctx, &multicluster_v2.ReconcilerFuncs[*{{ $types_import_prefix }}.{{ $resource.Kind }}]{ ReconcileFunc: func(ctx context.Context, clusterName string, obj *{{ $types_import_prefix }}.{{ $resource.Kind }}) (reconcile.Result, error) { ezkube.SetClusterName(obj, clusterName)