Skip to content

Commit b5a9585

Browse files
Clean the transport connection (#1161)
Signed-off-by: clyang82 <[email protected]> Co-authored-by: clyang82 <[email protected]>
1 parent 4d12c93 commit b5a9585

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

operator/pkg/controllers/hubofhubs/prune/prune_reconciler.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func (r *PruneReconciler) Reconcile(ctx context.Context,
6161
return true, err
6262
}
6363
if hasmanagedHub {
64-
klog.Errorf("please detach all the managedhub clusters before uninstall globalhub")
64+
klog.Errorf("You need to detach all the managed hub clusters before uninstalling")
6565
return true, nil
6666
}
6767
}
@@ -83,6 +83,8 @@ func (r *PruneReconciler) Reconcile(ctx context.Context,
8383
if err := r.MetricsResources(ctx); err != nil {
8484
return true, err
8585
}
86+
// clean the kafka connection so that the manager can use the new one after reinstall
87+
config.SetTransporterConn(nil)
8688
return false, nil
8789
}
8890
// If webhook do not need to enable, should remove the related resources

operator/pkg/controllers/hubofhubs/transporter/protocol/strimzi_transporter.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ func (k *strimziTransporter) EnsureKafka() (bool, error) {
195195
}
196196

197197
if !config.GetKafkaResourceReady() {
198-
klog.Infof("Wait kafka crd ready")
198+
klog.Infof("wait for the Kafka CRD to be ready")
199199
return true, nil
200200
}
201201

@@ -599,7 +599,7 @@ func (k *strimziTransporter) kafkaClusterReady() (bool, error) {
599599
return isReady, nil
600600
}
601601
}
602-
klog.Infof("Wait kafka cluster ready")
602+
klog.Infof("wait for the Kafka cluster to be ready")
603603
return isReady, nil
604604
}
605605

0 commit comments

Comments
 (0)