Skip to content

Commit 3e5f416

Browse files
committed
Add new NRT config option called DiscardReservedNodes
Signed-off-by: pprokop <[email protected]>
1 parent ee309ae commit 3e5f416

File tree

7 files changed

+22
-0
lines changed

7 files changed

+22
-0
lines changed

apis/config/types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ type NodeResourceTopologyMatchArgs struct {
152152
ScoringStrategy ScoringStrategy
153153
// If > 0, enables the caching facilities of the reserve plugin - which must be enabled
154154
CacheResyncPeriodSeconds int64
155+
// if set to true, exclude node from scheduling if there are any reserved pods for given node
156+
// this option takes precedence over CacheResyncPeriodSeconds
157+
// if DiscardReservedNodes is enabled, CacheResyncPeriodSeconds option is noop
158+
DiscardReservedNodes bool
155159
}
156160

157161
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

apis/config/v1/types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ type NodeResourceTopologyMatchArgs struct {
149149
ScoringStrategy *ScoringStrategy `json:"scoringStrategy,omitempty"`
150150
// If > 0, enables the caching facilities of the reserve plugin - which must be enabled
151151
CacheResyncPeriodSeconds *int64 `json:"cacheResyncPeriodSeconds,omitempty"`
152+
// if set to true, exclude node from scheduling if there are any reserved pods for given node
153+
// this option takes precedence over CacheResyncPeriodSeconds
154+
// if DiscardReservedNodes is enabled, CacheResyncPeriodSeconds option is noop
155+
DiscardReservedNodes bool `json:"discardReservedNodes,omitempty"`
152156
}
153157

154158
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

apis/config/v1/zz_generated.conversion.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/config/v1beta2/types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ type NodeResourceTopologyMatchArgs struct {
148148
// implicitely enables the caching. If zero, disables the caching entirely.
149149
// If the cache is enabled, the Reserve plugin must be enabled.
150150
CacheResyncPeriodSeconds *int64 `json:"cacheResyncPeriodSeconds,omitempty"`
151+
// if set to true, exclude node from scheduling if there are any reserved pods for given node
152+
// this option takes precedence over CacheResyncPeriodSeconds
153+
// if DiscardReservedNodes is enabled, CacheResyncPeriodSeconds option is noop
154+
DiscardReservedNodes bool `json:"discardReservedNodes,omitempty"`
151155
}
152156

153157
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

apis/config/v1beta2/zz_generated.conversion.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/config/v1beta3/types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ type NodeResourceTopologyMatchArgs struct {
152152
// implicitely enables the caching. If zero, disables the caching entirely.
153153
// If the cache is enabled, the Reserve plugin must be enabled.
154154
CacheResyncPeriodSeconds *int64 `json:"cacheResyncPeriodSeconds,omitempty"`
155+
// if set to true, exclude node from scheduling if there are any reserved pods for given node
156+
// this option takes precedence over CacheResyncPeriodSeconds
157+
// if DiscardReservedNodes is enabled, CacheResyncPeriodSeconds option is noop
158+
DiscardReservedNodes bool `json:"discardReservedNodes,omitempty"`
155159
}
156160

157161
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

apis/config/v1beta3/zz_generated.conversion.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)