return"",fmt.Errorf("both zone and zones StorageClass parameters must not be used at the same time")
}
// pick zone from node if present
ifnode!=nil{
// DynamicProvisioningScheduling implicit since node is not nil
ifzoneParameterPresent||zonesParameterPresent{
return"",fmt.Errorf("zone[s] cannot be specified in StorageClass if VolumeBindingMode is set to WaitForFirstConsumer. Please specify allowedTopologies in StorageClass for constraining zones.")
}
// pick node's zone and ignore any allowedTopologies (since scheduler is assumed to have accounted for it already)
return"",fmt.Errorf("no matchLabelExpressions with %s key found in allowedTopologies. Please specify matchLabelExpressions with %s key",kubeletapis.LabelZoneFailureDomain,kubeletapis.LabelZoneFailureDomain)
}
ifallowedZones.Len()>0{
// DynamicProvisioningScheduling implicit since allowedZones present
ifzoneParameterPresent||zonesParameterPresent{
return"",fmt.Errorf("zone[s] cannot be specified in StorageClass if allowedTopologies specified")