mirror of https://github.com/k3s-io/k3s
Do not make Cinder Max volume predicate a default
parent
a88d1d3dcc
commit
727b3097f9
|
@ -568,6 +568,7 @@ var AzureDiskVolumeFilter = VolumeFilter{
|
||||||
}
|
}
|
||||||
|
|
||||||
// CinderVolumeFilter is a VolumeFilter for filtering Cinder Volumes
|
// CinderVolumeFilter is a VolumeFilter for filtering Cinder Volumes
|
||||||
|
// It will be deprecated once Openstack cloudprovider has been removed from in-tree.
|
||||||
var CinderVolumeFilter = VolumeFilter{
|
var CinderVolumeFilter = VolumeFilter{
|
||||||
FilterVolume: func(vol *v1.Volume) (string, bool) {
|
FilterVolume: func(vol *v1.Volume) (string, bool) {
|
||||||
if vol.Cinder != nil {
|
if vol.Cinder != nil {
|
||||||
|
|
|
@ -44,7 +44,6 @@ func defaultPredicates() sets.String {
|
||||||
predicates.MaxGCEPDVolumeCountPred,
|
predicates.MaxGCEPDVolumeCountPred,
|
||||||
predicates.MaxAzureDiskVolumeCountPred,
|
predicates.MaxAzureDiskVolumeCountPred,
|
||||||
predicates.MaxCSIVolumeCountPred,
|
predicates.MaxCSIVolumeCountPred,
|
||||||
predicates.MaxCinderVolumeCountPred,
|
|
||||||
predicates.MatchInterPodAffinityPred,
|
predicates.MatchInterPodAffinityPred,
|
||||||
predicates.NoDiskConflictPred,
|
predicates.NoDiskConflictPred,
|
||||||
predicates.GeneralPred,
|
predicates.GeneralPred,
|
||||||
|
|
|
@ -74,7 +74,6 @@ func TestDefaultPredicates(t *testing.T) {
|
||||||
predicates.MaxEBSVolumeCountPred,
|
predicates.MaxEBSVolumeCountPred,
|
||||||
predicates.MaxGCEPDVolumeCountPred,
|
predicates.MaxGCEPDVolumeCountPred,
|
||||||
predicates.MaxAzureDiskVolumeCountPred,
|
predicates.MaxAzureDiskVolumeCountPred,
|
||||||
predicates.MaxCinderVolumeCountPred,
|
|
||||||
predicates.MaxCSIVolumeCountPred,
|
predicates.MaxCSIVolumeCountPred,
|
||||||
predicates.MatchInterPodAffinityPred,
|
predicates.MatchInterPodAffinityPred,
|
||||||
predicates.NoDiskConflictPred,
|
predicates.NoDiskConflictPred,
|
||||||
|
|
|
@ -937,6 +937,130 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
|
||||||
}},
|
}},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
"1.14": {
|
||||||
|
JSON: `{
|
||||||
|
"kind": "Policy",
|
||||||
|
"apiVersion": "v1",
|
||||||
|
"predicates": [
|
||||||
|
{"name": "MatchNodeSelector"},
|
||||||
|
{"name": "PodFitsResources"},
|
||||||
|
{"name": "PodFitsHostPorts"},
|
||||||
|
{"name": "HostName"},
|
||||||
|
{"name": "NoDiskConflict"},
|
||||||
|
{"name": "NoVolumeZoneConflict"},
|
||||||
|
{"name": "PodToleratesNodeTaints"},
|
||||||
|
{"name": "CheckNodeMemoryPressure"},
|
||||||
|
{"name": "CheckNodeDiskPressure"},
|
||||||
|
{"name": "CheckNodePIDPressure"},
|
||||||
|
{"name": "CheckNodeCondition"},
|
||||||
|
{"name": "MaxEBSVolumeCount"},
|
||||||
|
{"name": "MaxGCEPDVolumeCount"},
|
||||||
|
{"name": "MaxAzureDiskVolumeCount"},
|
||||||
|
{"name": "MaxCSIVolumeCountPred"},
|
||||||
|
{"name": "MaxCinderVolumeCount"},
|
||||||
|
{"name": "MatchInterPodAffinity"},
|
||||||
|
{"name": "GeneralPredicates"},
|
||||||
|
{"name": "CheckVolumeBinding"},
|
||||||
|
{"name": "TestServiceAffinity", "argument": {"serviceAffinity" : {"labels" : ["region"]}}},
|
||||||
|
{"name": "TestLabelsPresence", "argument": {"labelsPresence" : {"labels" : ["foo"], "presence":true}}}
|
||||||
|
],"priorities": [
|
||||||
|
{"name": "EqualPriority", "weight": 2},
|
||||||
|
{"name": "ImageLocalityPriority", "weight": 2},
|
||||||
|
{"name": "LeastRequestedPriority", "weight": 2},
|
||||||
|
{"name": "BalancedResourceAllocation", "weight": 2},
|
||||||
|
{"name": "SelectorSpreadPriority", "weight": 2},
|
||||||
|
{"name": "NodePreferAvoidPodsPriority", "weight": 2},
|
||||||
|
{"name": "NodeAffinityPriority", "weight": 2},
|
||||||
|
{"name": "TaintTolerationPriority", "weight": 2},
|
||||||
|
{"name": "InterPodAffinityPriority", "weight": 2},
|
||||||
|
{"name": "MostRequestedPriority", "weight": 2},
|
||||||
|
{
|
||||||
|
"name": "RequestedToCapacityRatioPriority",
|
||||||
|
"weight": 2,
|
||||||
|
"argument": {
|
||||||
|
"requestedToCapacityRatioArguments": {
|
||||||
|
"shape": [
|
||||||
|
{"utilization": 0, "score": 0},
|
||||||
|
{"utilization": 50, "score": 7}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
],"extenders": [{
|
||||||
|
"urlPrefix": "/prefix",
|
||||||
|
"filterVerb": "filter",
|
||||||
|
"prioritizeVerb": "prioritize",
|
||||||
|
"weight": 1,
|
||||||
|
"bindVerb": "bind",
|
||||||
|
"enableHttps": true,
|
||||||
|
"tlsConfig": {"Insecure":true},
|
||||||
|
"httpTimeout": 1,
|
||||||
|
"nodeCacheCapable": true,
|
||||||
|
"managedResources": [{"name":"example.com/foo","ignoredByScheduler":true}],
|
||||||
|
"ignorable":true
|
||||||
|
}]
|
||||||
|
}`,
|
||||||
|
ExpectedPolicy: schedulerapi.Policy{
|
||||||
|
Predicates: []schedulerapi.PredicatePolicy{
|
||||||
|
{Name: "MatchNodeSelector"},
|
||||||
|
{Name: "PodFitsResources"},
|
||||||
|
{Name: "PodFitsHostPorts"},
|
||||||
|
{Name: "HostName"},
|
||||||
|
{Name: "NoDiskConflict"},
|
||||||
|
{Name: "NoVolumeZoneConflict"},
|
||||||
|
{Name: "PodToleratesNodeTaints"},
|
||||||
|
{Name: "CheckNodeMemoryPressure"},
|
||||||
|
{Name: "CheckNodeDiskPressure"},
|
||||||
|
{Name: "CheckNodePIDPressure"},
|
||||||
|
{Name: "CheckNodeCondition"},
|
||||||
|
{Name: "MaxEBSVolumeCount"},
|
||||||
|
{Name: "MaxGCEPDVolumeCount"},
|
||||||
|
{Name: "MaxAzureDiskVolumeCount"},
|
||||||
|
{Name: "MaxCSIVolumeCountPred"},
|
||||||
|
{Name: "MaxCinderVolumeCount"},
|
||||||
|
{Name: "MatchInterPodAffinity"},
|
||||||
|
{Name: "GeneralPredicates"},
|
||||||
|
{Name: "CheckVolumeBinding"},
|
||||||
|
{Name: "TestServiceAffinity", Argument: &schedulerapi.PredicateArgument{ServiceAffinity: &schedulerapi.ServiceAffinity{Labels: []string{"region"}}}},
|
||||||
|
{Name: "TestLabelsPresence", Argument: &schedulerapi.PredicateArgument{LabelsPresence: &schedulerapi.LabelsPresence{Labels: []string{"foo"}, Presence: true}}},
|
||||||
|
},
|
||||||
|
Priorities: []schedulerapi.PriorityPolicy{
|
||||||
|
{Name: "EqualPriority", Weight: 2},
|
||||||
|
{Name: "ImageLocalityPriority", Weight: 2},
|
||||||
|
{Name: "LeastRequestedPriority", Weight: 2},
|
||||||
|
{Name: "BalancedResourceAllocation", Weight: 2},
|
||||||
|
{Name: "SelectorSpreadPriority", Weight: 2},
|
||||||
|
{Name: "NodePreferAvoidPodsPriority", Weight: 2},
|
||||||
|
{Name: "NodeAffinityPriority", Weight: 2},
|
||||||
|
{Name: "TaintTolerationPriority", Weight: 2},
|
||||||
|
{Name: "InterPodAffinityPriority", Weight: 2},
|
||||||
|
{Name: "MostRequestedPriority", Weight: 2},
|
||||||
|
{
|
||||||
|
Name: "RequestedToCapacityRatioPriority",
|
||||||
|
Weight: 2,
|
||||||
|
Argument: &schedulerapi.PriorityArgument{
|
||||||
|
RequestedToCapacityRatioArguments: &schedulerapi.RequestedToCapacityRatioArguments{
|
||||||
|
UtilizationShape: []schedulerapi.UtilizationShapePoint{
|
||||||
|
{Utilization: 0, Score: 0},
|
||||||
|
{Utilization: 50, Score: 7},
|
||||||
|
}},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
ExtenderConfigs: []schedulerapi.ExtenderConfig{{
|
||||||
|
URLPrefix: "/prefix",
|
||||||
|
FilterVerb: "filter",
|
||||||
|
PrioritizeVerb: "prioritize",
|
||||||
|
Weight: 1,
|
||||||
|
BindVerb: "bind", // 1.11 restored case-sensitivity, but allowed either "BindVerb" or "bindVerb"
|
||||||
|
EnableHTTPS: true,
|
||||||
|
TLSConfig: &schedulerapi.ExtenderTLSConfig{Insecure: true},
|
||||||
|
HTTPTimeout: 1,
|
||||||
|
NodeCacheCapable: true,
|
||||||
|
ManagedResources: []schedulerapi.ExtenderManagedResource{{Name: v1.ResourceName("example.com/foo"), IgnoredByScheduler: true}},
|
||||||
|
Ignorable: true,
|
||||||
|
}},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
registeredPredicates := sets.NewString(factory.ListRegisteredFitPredicates()...)
|
registeredPredicates := sets.NewString(factory.ListRegisteredFitPredicates()...)
|
||||||
|
|
|
@ -40,8 +40,8 @@ const (
|
||||||
// GCEVolumeLimitKey stores resource name that will store volume limits for GCE node
|
// GCEVolumeLimitKey stores resource name that will store volume limits for GCE node
|
||||||
GCEVolumeLimitKey = "attachable-volumes-gce-pd"
|
GCEVolumeLimitKey = "attachable-volumes-gce-pd"
|
||||||
|
|
||||||
// Volume limit key for Cinder
|
// CinderVolumeLimitKey contains Volume limit key for Cinder
|
||||||
CinderVolumeLimitKey = "attachable-volumes-aws-ebs"
|
CinderVolumeLimitKey = "attachable-volumes-cinder"
|
||||||
// DefaultMaxCinderVolumes defines the maximum number of PD Volumes for Cinder
|
// DefaultMaxCinderVolumes defines the maximum number of PD Volumes for Cinder
|
||||||
// For Openstack we are keeping this to a high enough value so as depending on backend
|
// For Openstack we are keeping this to a high enough value so as depending on backend
|
||||||
// cluster admins can configure it.
|
// cluster admins can configure it.
|
||||||
|
|
Loading…
Reference in New Issue