Skip to content

Commit

Permalink
config.openshift.io/v1/scheduler: allow profile customizations for DRA
Browse files Browse the repository at this point in the history
  • Loading branch information
ingvagabund committed Jan 24, 2024
1 parent 2054c69 commit 2e10503
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 5 deletions.
8 changes: 8 additions & 0 deletions config/v1/0000_10_config-operator_01_scheduler.crd.yaml
Expand Up @@ -59,6 +59,14 @@ spec:
- LowNodeUtilization
- HighNodeUtilization
- NoScoring
profileCustomizations:
description: ProfileCustomizations contains various parameters for modifying the default behavior of certain profiles
type: object
properties:
experimentalDynamicResourceAllocation:
description: experimentalDynamicResourceAllocation enables/disables dynamic resource allocation feature.
type: string
default: Disabled
status:
description: status holds observed values from the cluster. They may not be overridden.
type: object
Expand Down
18 changes: 18 additions & 0 deletions config/v1/types_scheduling.go
Expand Up @@ -42,6 +42,8 @@ type SchedulerSpec struct {
// Defaults to "LowNodeUtilization"
// +optional
Profile SchedulerProfile `json:"profile,omitempty"`
// ProfileCustomizations contains various parameters for modifying the default behavior of certain profiles
ProfileCustomizations *ProfileCustomizations `json:"profileCustomizations,omitempty"`
// defaultNodeSelector helps set the cluster-wide default node selector to
// restrict pod placement to specific nodes. This is applied to the pods
// created in all namespaces and creates an intersection with any existing
Expand Down Expand Up @@ -93,6 +95,22 @@ var (
NoScoring SchedulerProfile = "NoScoring"
)

// ProfileCustomizations contains various parameters for modifying the default behavior of certain profiles
type ProfileCustomizations struct {
// experimentalDynamicResourceAllocation enables/disables dynamic resource allocation feature.
// +kubebuilder:default=Disabled
ExperimentalDynamicResourceAllocation DRAEnablement `json:"experimentalDynamicResourceAllocation"`
}

type DRAEnablement string

var (
// DRAEnablementEnabled enables dynamic resource allocation feature
DRAEnablementEnabled DRAEnablement = "Enabled"
// DRAEnablementDisabled disables dynamic resource allocation feature
DRAEnablementDisabled DRAEnablement = "Disabled"
)

type SchedulerStatus struct {
}

Expand Down
23 changes: 22 additions & 1 deletion config/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 14 additions & 4 deletions config/v1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2e10503

Please sign in to comment.