Skip to content

Commit

Permalink
Close etcd clients after they're not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
lllamnyp committed Jan 31, 2025
1 parent 45683f4 commit b79bcf6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/controller/etcdcluster_controller_new.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ func (r *ClusterReconciler) reconcile(ctx context.Context, state *observables) (
if err != nil {
return ctrl.Result{}, err
}
defer clusterClient.Close()
for _, c := range singleClients {
defer c.Close()
}

state.clusterClient = clusterClient
state.singleClients = singleClients
Expand Down

0 comments on commit b79bcf6

Please sign in to comment.