Skip to content

Commit e313251

Browse files
committed
Add support for multiple resource limits
1 parent 5ddb228 commit e313251

File tree

15 files changed

+666
-574
lines changed

15 files changed

+666
-574
lines changed

cluster-autoscaler/cloudprovider/resource_limiter.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ type ResourceLimiter struct {
3131
maxLimits map[string]int64
3232
}
3333

34+
// ID returns the identifier of the limiter.
3435
func (r *ResourceLimiter) ID() string {
3536
return "cluster-wide"
3637
}
@@ -95,14 +96,17 @@ func (r *ResourceLimiter) String() string {
9596
return strings.Join(resourceDetails, ", ")
9697
}
9798

99+
// AppliesTo checks if the limiter applies to node.
100+
//
101+
// As this is a compatibility layer for cluster-wide limits, it always returns true.
98102
func (r *ResourceLimiter) AppliesTo(node *apiv1.Node) bool {
99103
return true
100104
}
101105

102-
func (r *ResourceLimiter) MaxLimits() map[string]int64 {
106+
// Limits returns max limits of the limiter.
107+
//
108+
// New resource quotas system supports only max limits, therefore only max limits
109+
// are returned here.
110+
func (r *ResourceLimiter) Limits() map[string]int64 {
103111
return r.maxLimits
104112
}
105-
106-
func (r *ResourceLimiter) MinLimits() map[string]int64 {
107-
return r.minLimits
108-
}

cluster-autoscaler/resourcelimits/factory.go

Lines changed: 0 additions & 104 deletions
This file was deleted.

cluster-autoscaler/resourcelimits/provider.go

Lines changed: 0 additions & 26 deletions
This file was deleted.

cluster-autoscaler/resourcelimits/provider_test.go

Lines changed: 0 additions & 34 deletions
This file was deleted.

cluster-autoscaler/resourcelimits/tracker.go

Lines changed: 0 additions & 166 deletions
This file was deleted.

0 commit comments

Comments
 (0)