mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Merge pull request #77229 from tedyu/csi-node-expansion
Return early when node expansion is determined
This commit is contained in:
commit
9466118e8f
@ -681,16 +681,15 @@ func (c *csiDriverClient) NodeSupportsNodeExpand(ctx context.Context) (bool, err
|
||||
|
||||
capabilities := resp.GetCapabilities()
|
||||
|
||||
nodeExpandSet := false
|
||||
if capabilities == nil {
|
||||
return false, nil
|
||||
}
|
||||
for _, capability := range capabilities {
|
||||
if capability.GetRpc().GetType() == csipbv1.NodeServiceCapability_RPC_EXPAND_VOLUME {
|
||||
nodeExpandSet = true
|
||||
return true, nil
|
||||
}
|
||||
}
|
||||
return nodeExpandSet, nil
|
||||
return false, nil
|
||||
} else if c.nodeV0ClientCreator != nil {
|
||||
return false, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user