Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syncing latest changes from main for kubernetes-csi-addons #216

Merged
merged 3 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions internal/controller/csiaddons/csiaddonsnode_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ func (r *CSIAddonsNodeReconciler) Reconcile(ctx context.Context, req ctrl.Reques
nodeID := csiAddonsNode.Spec.Driver.NodeID
driverName := csiAddonsNode.Spec.Driver.Name

key := csiAddonsNode.Namespace + "/" + csiAddonsNode.Name
key := csiAddonsNode.Namespace + "/" + util.NormalizeLeaseName(csiAddonsNode.Name)
logger = logger.WithValues("NodeID", nodeID, "DriverName", driverName)

if !csiAddonsNode.DeletionTimestamp.IsZero() {
// if deletion timestamp is set, the CSIAddonsNode is getting deleted,
// delete connections and remove finalizer.
logger.Info("Deleting connection")
logger.Info("Deleting connection", "Key", key)
r.ConnPool.Delete(key)
err = r.removeFinalizer(ctx, &logger, csiAddonsNode)
return ctrl.Result{}, err
Expand Down Expand Up @@ -139,7 +139,7 @@ func (r *CSIAddonsNodeReconciler) Reconcile(ctx context.Context, req ctrl.Reques

logger.Info("Successfully connected to sidecar")
r.ConnPool.Put(key, newConn)
logger.Info("Added connection to connection pool")
logger.Info("Added connection to connection pool", "Key", key)

csiAddonsNode.Status.State = csiaddonsv1alpha1.CSIAddonsNodeStateConnected
csiAddonsNode.Status.Message = "Successfully established connection with sidecar"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ func getInfoReconcileInterval(parameters map[string]string, logger logr.Logger)
func (r *VolumeReplicationReconciler) getReplicationClient(ctx context.Context, driverName, dataSource string) (grpcClient.VolumeReplication, error) {
conn, err := r.Connpool.GetLeaderByDriver(ctx, r.Client, driverName)
if err != nil {
return nil, fmt.Errorf("no leader for the ControllerService of driver %q", driverName)
return nil, fmt.Errorf("no leader for the ControllerService of driver %q: %w", driverName, err)
}

for _, cap := range conn.Capabilities {
Expand Down
Loading