Return early when node expansion is determined

k3s-v1.15.3
Ted Yu 2019-04-29 14:05:06 -07:00 committed by Ted Yu
parent c88b7cdd58
commit 565c88de14
1 changed files with 1 additions and 0 deletions

View File

@ -688,6 +688,7 @@ func (c *csiDriverClient) NodeSupportsNodeExpand(ctx context.Context) (bool, err
for _, capability := range capabilities { for _, capability := range capabilities {
if capability.GetRpc().GetType() == csipbv1.NodeServiceCapability_RPC_EXPAND_VOLUME { if capability.GetRpc().GetType() == csipbv1.NodeServiceCapability_RPC_EXPAND_VOLUME {
nodeExpandSet = true nodeExpandSet = true
return true, nil
} }
} }
return nodeExpandSet, nil return nodeExpandSet, nil