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 2567a6d
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 6 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.

31 changes: 30 additions & 1 deletion openapi/generated_openapi/zz_generated.openapi.go

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

18 changes: 18 additions & 0 deletions openapi/openapi.json
Expand Up @@ -9375,6 +9375,20 @@
}
}
},
"com.github.openshift.api.config.v1.ProfileCustomizations": {
"description": "ProfileCustomizations contains various parameters for modifying the default behavior of certain profiles",
"type": "object",
"required": [
"experimentalDynamicResourceAllocation"
],
"properties": {
"experimentalDynamicResourceAllocation": {
"description": "experimentalDynamicResourceAllocation enables/disables dynamic resource allocation feature.",
"type": "string",
"default": ""
}
}
},
"com.github.openshift.api.config.v1.Project": {
"description": "Project holds cluster-wide information about Project. The canonical name is `cluster`\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).",
"type": "object",
Expand Down Expand Up @@ -9916,6 +9930,10 @@
"profile": {
"description": "profile sets which scheduling profile should be set in order to configure scheduling decisions for new pods.\n\nValid values are \"LowNodeUtilization\", \"HighNodeUtilization\", \"NoScoring\" Defaults to \"LowNodeUtilization\"",
"type": "string"
},
"profileCustomizations": {
"description": "ProfileCustomizations contains various parameters for modifying the default behavior of certain profiles",
"$ref": "#/definitions/com.github.openshift.api.config.v1.ProfileCustomizations"
}
}
},
Expand Down

0 comments on commit 2567a6d

Please sign in to comment.