Merge pull request #77229 from tedyu/csi-node-expansion

Return early when node expansion is determined
This commit is contained in:
Kubernetes Prow Robot 2019-04-30 17:31:25 -07:00 committed by GitHub
commit 9466118e8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}