From 8a0f5129cfac074556c43fe2c0275cd8b64cc661 Mon Sep 17 00:00:00 2001 From: fabriziopandini Date: Wed, 7 Feb 2024 13:57:53 +0100 Subject: [PATCH] Address comments --- .../inmemory/api/v1alpha1/inmemorycluster_types.go | 4 ++-- .../internal/controllers/inmemorymachine_controller.go | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/test/infrastructure/inmemory/api/v1alpha1/inmemorycluster_types.go b/test/infrastructure/inmemory/api/v1alpha1/inmemorycluster_types.go index 9ba6d0219057..93a199a931cb 100644 --- a/test/infrastructure/inmemory/api/v1alpha1/inmemorycluster_types.go +++ b/test/infrastructure/inmemory/api/v1alpha1/inmemorycluster_types.go @@ -23,8 +23,8 @@ import ( ) const ( - // ListenerAnnotationName tracks the name of a resource group a InMemoryCluster cluster is linked to. - // NOTE: the annotation must be added by the components that creates the resource group only if using the HotRestart feature. + // ListenerAnnotationName tracks the name of the listener a cluster is linked to. + // NOTE: the annotation must be added by the components that creates the listenr only if using the HotRestart feature. ListenerAnnotationName = "inmemorycluster.infrastructure.cluster.x-k8s.io/listener" // ClusterFinalizer allows InMemoryClusterReconciler to clean up resources associated with InMemoryCluster before diff --git a/test/infrastructure/inmemory/internal/controllers/inmemorymachine_controller.go b/test/infrastructure/inmemory/internal/controllers/inmemorymachine_controller.go index 0b51f1b8d45a..51666e0d8193 100644 --- a/test/infrastructure/inmemory/internal/controllers/inmemorymachine_controller.go +++ b/test/infrastructure/inmemory/internal/controllers/inmemorymachine_controller.go @@ -236,8 +236,7 @@ func (r *InMemoryMachineReconciler) reconcileNormal(ctx context.Context, cluster } func (r *InMemoryMachineReconciler) reconcileNormalCloudMachine(ctx context.Context, cluster *clusterv1.Cluster, _ *clusterv1.Machine, inMemoryMachine *infrav1.InMemoryMachine) (ctrl.Result, error) { - // Compute the name for resource group and listener. - // NOTE: we are using the same name for convenience, but it is not required. + // Compute the name for resource group. resourceGroup := klog.KObj(cluster).String() inmemoryClient := r.InMemoryManager.GetResourceGroup(resourceGroup).GetClient() @@ -320,8 +319,7 @@ func (r *InMemoryMachineReconciler) reconcileNormalNode(ctx context.Context, clu return ctrl.Result{RequeueAfter: start.Add(provisioningDuration).Sub(now)}, nil } - // Compute the name for resource group and listener. - // NOTE: we are using the same name for convenience, but it is not required. + // Compute the name for resource group. resourceGroup := klog.KObj(cluster).String() inmemoryClient := r.InMemoryManager.GetResourceGroup(resourceGroup).GetClient()