Skip to content

Commit

Permalink
Pass reconcile options (#454)
Browse files Browse the repository at this point in the history
* pass in options

* cl
  • Loading branch information
jenshu committed May 26, 2023
1 parent 9b1f093 commit 8c0d770
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelog/v0.30.1/input-reconciler-options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changelog:
- type: NON_USER_FACING
description: >
Pass through the reconciler options in input reconciler template
2 changes: 1 addition & 1 deletion contrib/codegen/templates/input/input_reconciler.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8c0d770

Please sign in to comment.