Skip to content

Commit bbf0de8

Browse files
committed
Skip VolumeAttachments of other drivers
During periodic re-sync in ReconcileVA, skip VolumeAttachments of unrelated CSI drivers. The VolumeAttachments will be skipped anyway in syncVA(). This only prevents log spam and saves some CPU.
1 parent a54838a commit bbf0de8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/controller/csi_handler.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ func (h *csiHandler) ReconcileVA(ctx context.Context) error {
142142
}
143143

144144
for _, va := range vas {
145+
if va.Spec.Attacher != h.attacherName {
146+
// skip VolumeAttachments of other CSI drivers
147+
continue
148+
}
149+
145150
nodeID, err := h.getNodeID(logger, h.attacherName, va.Spec.NodeName, va)
146151
if err != nil {
147152
logger.Error(err, "Failed to find node ID err")

0 commit comments

Comments
 (0)