mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-29 21:29:24 +00:00
Merge pull request #22942 from jsafrane/devel/aws-more-devices
Allow up to 39 PVs attached to AWS node
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
"k8s.io/kubernetes/pkg/cloudprovider/providers/aws"
|
||||
"k8s.io/kubernetes/pkg/util/sets"
|
||||
"k8s.io/kubernetes/plugin/pkg/scheduler"
|
||||
"k8s.io/kubernetes/plugin/pkg/scheduler/algorithm"
|
||||
@@ -31,10 +32,6 @@ import (
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
// Amazon recommends having no more that 40 volumes attached to an instance,
|
||||
// and at least one of those is for the system root volume.
|
||||
const DefaultMaxEBSVolumes = 39
|
||||
|
||||
// GCE instances can have up to 16 PD volumes attached.
|
||||
const DefaultMaxGCEPDVolumes = 16
|
||||
|
||||
@@ -117,7 +114,7 @@ func defaultPredicates() sets.String {
|
||||
"MaxEBSVolumeCount",
|
||||
func(args factory.PluginFactoryArgs) algorithm.FitPredicate {
|
||||
// TODO: allow for generically parameterized scheduler predicates, because this is a bit ugly
|
||||
maxVols := getMaxVols(DefaultMaxEBSVolumes)
|
||||
maxVols := getMaxVols(aws.DefaultMaxEBSVolumes)
|
||||
return predicates.NewMaxPDVolumeCountPredicate(predicates.EBSVolumeFilter, maxVols, args.PVInfo, args.PVCInfo)
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user