Skip to content

Commit

Permalink
Fix clusterUID null issue (#306)
Browse files Browse the repository at this point in the history
Signed-off-by: shn27 <[email protected]>
  • Loading branch information
shn27 authored Jun 13, 2024
1 parent f5e94f7 commit c921cc9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/apiserver/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ func (c completedConfig) New(ctx context.Context) (*UIServer, error) {
os.Exit(1)
}

err = clustermetacontroller.NewReconciler(mgr.GetClient(), bc).SetupWithManager(mgr)
err = clustermetacontroller.NewReconciler(mgr.GetClient(), bc, cid).SetupWithManager(mgr)
if err != nil {
klog.Error(err, "unable to create controller", "controller", "ConfigMap")
os.Exit(1)
Expand Down
7 changes: 4 additions & 3 deletions pkg/controllers/clustermetadata/cm_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ type ClusterMetadataReconciler struct {

var _ reconcile.Reconciler = &ClusterMetadataReconciler{}

func NewReconciler(kc client.Client, bc *identitylib.Client) *ClusterMetadataReconciler {
func NewReconciler(kc client.Client, bc *identitylib.Client, clusterId string) *ClusterMetadataReconciler {
return &ClusterMetadataReconciler{
kc: kc,
bc: bc,
kc: kc,
bc: bc,
clusterID: clusterId,
}
}

Expand Down

0 comments on commit c921cc9

Please sign in to comment.