From 7dd4c45a9de78ebf73234ae80ffb0029ac8d361c Mon Sep 17 00:00:00 2001 From: Jenny Shu Date: Thu, 20 Mar 2025 11:27:47 -0400 Subject: [PATCH 1/2] use unique names --- contrib/codegen/templates/input/input_reconciler.gotmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/codegen/templates/input/input_reconciler.gotmpl b/contrib/codegen/templates/input/input_reconciler.gotmpl index 268e655a0..679683e52 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(options.{{ $kindPlural }})). + multicluster_reconcile_v2.NewLoop("{{$kindLowerCamel}}", 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) @@ -143,7 +143,7 @@ func RegisterSingleCluster{{ $snapshotName }}Reconciler( {{- $kindPlural := pluralize $resource.Kind }} {{- $kindLowerCamel := lower_camel $resource.Kind }} {{- $kindLowerCamelPlural := pluralize $kindLowerCamel }} - if err := reconcile_v2.NewLoop("Service", "", mgr, &{{ $types_import_prefix }}.{{ $resource.Kind }}{}, options). + if err := reconcile_v2.NewLoop("{{$kindLowerCamel}}", "", mgr, &{{ $types_import_prefix }}.{{ $resource.Kind }}{}, options). RunReconciler(ctx, &reconcile_v2.ReconcileFuncs[*{{ $types_import_prefix }}.{{ $resource.Kind }}]{ ReconcileFunc:func(ctx context.Context, object *{{ $types_import_prefix }}.{{ $resource.Kind }}) (reconcile.Result, error){ return r.base.ReconcileRemoteGeneric(object) From 26969dbe9216a0f1ce0e91d3e773451c7c1bf7f7 Mon Sep 17 00:00:00 2001 From: Jenny Shu Date: Thu, 20 Mar 2025 12:11:14 -0400 Subject: [PATCH 2/2] changelog --- changelog/v0.43.1/input-reconciler-unique-names.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog/v0.43.1/input-reconciler-unique-names.yaml diff --git a/changelog/v0.43.1/input-reconciler-unique-names.yaml b/changelog/v0.43.1/input-reconciler-unique-names.yaml new file mode 100644 index 000000000..bb8192438 --- /dev/null +++ b/changelog/v0.43.1/input-reconciler-unique-names.yaml @@ -0,0 +1,5 @@ +changelog: + - type: FIX + issueLink: https://github.com/solo-io/skv2/issues/590 + resolvesIssue: false + description: Give each reconciler loop a unique name based on kind