Skip to content

Commit fc06468

Browse files
Merge pull request #2590 from tkashem/fix-dra
Move ProfileCustomizations under a new GA gate
2 parents cb382c9 + d0a162a commit fc06468

File tree

25 files changed

+508
-24
lines changed

25 files changed

+508
-24
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
2+
name: "Scheduler"
3+
crdName: schedulers.config.openshift.io
4+
featureGates:
5+
- HyperShiftOnlyDynamicResourceAllocation
6+
tests:
7+
onCreate:
8+
- name: Should be able to create a minimal Scheduler
9+
initial: |
10+
apiVersion: config.openshift.io/v1
11+
kind: Scheduler
12+
spec: {} # No spec is required for a Scheduler
13+
expected: |
14+
apiVersion: config.openshift.io/v1
15+
kind: Scheduler
16+
spec: {}

config/v1/types_scheduling.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ type SchedulerSpec struct {
4848
// +optional
4949
Profile SchedulerProfile `json:"profile,omitempty"`
5050
// profileCustomizations contains configuration for modifying the default behavior of existing scheduler profiles.
51+
// Deprecated: no longer needed, since DRA is GA starting with 4.21, and
52+
// is enabled by' default in the cluster, this field will be removed in 4.24.
5153
// +openshift:enable:FeatureGate=DynamicResourceAllocation
54+
// +openshift:enable:FeatureGate=HyperShiftOnlyDynamicResourceAllocation
5255
// +optional
5356
ProfileCustomizations ProfileCustomizations `json:"profileCustomizations"`
5457
// defaultNodeSelector helps set the cluster-wide default node selector to
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
annotations:
5+
api-approved.openshift.io: https://github.com/openshift/api/pull/470
6+
api.openshift.io/merged-by-featuregates: "true"
7+
include.release.openshift.io/ibm-cloud-managed: "true"
8+
release.openshift.io/bootstrap-required: "true"
9+
name: schedulers.config.openshift.io
10+
spec:
11+
group: config.openshift.io
12+
names:
13+
kind: Scheduler
14+
listKind: SchedulerList
15+
plural: schedulers
16+
singular: scheduler
17+
scope: Cluster
18+
versions:
19+
- name: v1
20+
schema:
21+
openAPIV3Schema:
22+
description: |-
23+
Scheduler holds cluster-wide config information to run the Kubernetes Scheduler
24+
and influence its placement decisions. The canonical name for this config is `cluster`.
25+
26+
Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
27+
properties:
28+
apiVersion:
29+
description: |-
30+
APIVersion defines the versioned schema of this representation of an object.
31+
Servers should convert recognized schemas to the latest internal value, and
32+
may reject unrecognized values.
33+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
34+
type: string
35+
kind:
36+
description: |-
37+
Kind is a string value representing the REST resource this object represents.
38+
Servers may infer this from the endpoint the client submits requests to.
39+
Cannot be updated.
40+
In CamelCase.
41+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
42+
type: string
43+
metadata:
44+
type: object
45+
spec:
46+
description: spec holds user settable values for configuration
47+
properties:
48+
defaultNodeSelector:
49+
description: |-
50+
defaultNodeSelector helps set the cluster-wide default node selector to
51+
restrict pod placement to specific nodes. This is applied to the pods
52+
created in all namespaces and creates an intersection with any existing
53+
nodeSelectors already set on a pod, additionally constraining that pod's selector.
54+
For example,
55+
defaultNodeSelector: "type=user-node,region=east" would set nodeSelector
56+
field in pod spec to "type=user-node,region=east" to all pods created
57+
in all namespaces. Namespaces having project-wide node selectors won't be
58+
impacted even if this field is set. This adds an annotation section to
59+
the namespace.
60+
For example, if a new namespace is created with
61+
node-selector='type=user-node,region=east',
62+
the annotation openshift.io/node-selector: type=user-node,region=east
63+
gets added to the project. When the openshift.io/node-selector annotation
64+
is set on the project the value is used in preference to the value we are setting
65+
for defaultNodeSelector field.
66+
For instance,
67+
openshift.io/node-selector: "type=user-node,region=west" means
68+
that the default of "type=user-node,region=east" set in defaultNodeSelector
69+
would not be applied.
70+
type: string
71+
mastersSchedulable:
72+
description: |-
73+
mastersSchedulable allows masters nodes to be schedulable. When this flag is
74+
turned on, all the master nodes in the cluster will be made schedulable,
75+
so that workload pods can run on them. The default value for this field is false,
76+
meaning none of the master nodes are schedulable.
77+
Important Note: Once the workload pods start running on the master nodes,
78+
extreme care must be taken to ensure that cluster-critical control plane components
79+
are not impacted.
80+
Please turn on this field after doing due diligence.
81+
type: boolean
82+
policy:
83+
description: |-
84+
DEPRECATED: the scheduler Policy API has been deprecated and will be removed in a future release.
85+
policy is a reference to a ConfigMap containing scheduler policy which has
86+
user specified predicates and priorities. If this ConfigMap is not available
87+
scheduler will default to use DefaultAlgorithmProvider.
88+
The namespace for this configmap is openshift-config.
89+
properties:
90+
name:
91+
description: name is the metadata.name of the referenced config
92+
map
93+
type: string
94+
required:
95+
- name
96+
type: object
97+
profile:
98+
description: |-
99+
profile sets which scheduling profile should be set in order to configure scheduling
100+
decisions for new pods.
101+
102+
Valid values are "LowNodeUtilization", "HighNodeUtilization", "NoScoring"
103+
Defaults to "LowNodeUtilization"
104+
enum:
105+
- ""
106+
- LowNodeUtilization
107+
- HighNodeUtilization
108+
- NoScoring
109+
type: string
110+
profileCustomizations:
111+
description: |-
112+
profileCustomizations contains configuration for modifying the default behavior of existing scheduler profiles.
113+
Deprecated: no longer needed, since DRA is GA starting with 4.21, and
114+
is enabled by' default in the cluster, this field will be removed in 4.24.
115+
properties:
116+
dynamicResourceAllocation:
117+
description: |-
118+
dynamicResourceAllocation allows to enable or disable dynamic resource allocation within the scheduler.
119+
Dynamic resource allocation is an API for requesting and sharing resources between pods and containers inside a pod.
120+
Third-party resource drivers are responsible for tracking and allocating resources.
121+
Different kinds of resources support arbitrary parameters for defining requirements and initialization.
122+
Valid values are Enabled, Disabled and omitted.
123+
When omitted, this means no opinion and the platform is left to choose a reasonable default,
124+
which is subject to change over time.
125+
The current default is Disabled.
126+
enum:
127+
- ""
128+
- Enabled
129+
- Disabled
130+
type: string
131+
type: object
132+
type: object
133+
status:
134+
description: status holds observed values from the cluster. They may not
135+
be overridden.
136+
type: object
137+
required:
138+
- spec
139+
type: object
140+
served: true
141+
storage: true
142+
subresources:
143+
status: {}

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_schedulers-CustomNoUpgrade.crd.yaml renamed to config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_schedulers-SelfManagedHA-CustomNoUpgrade.crd.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ metadata:
44
annotations:
55
api-approved.openshift.io: https://github.com/openshift/api/pull/470
66
api.openshift.io/merged-by-featuregates: "true"
7-
include.release.openshift.io/ibm-cloud-managed: "true"
87
include.release.openshift.io/self-managed-high-availability: "true"
98
release.openshift.io/bootstrap-required: "true"
109
release.openshift.io/feature-set: CustomNoUpgrade
@@ -110,8 +109,10 @@ spec:
110109
- NoScoring
111110
type: string
112111
profileCustomizations:
113-
description: profileCustomizations contains configuration for modifying
114-
the default behavior of existing scheduler profiles.
112+
description: |-
113+
profileCustomizations contains configuration for modifying the default behavior of existing scheduler profiles.
114+
Deprecated: no longer needed, since DRA is GA starting with 4.21, and
115+
is enabled by' default in the cluster, this field will be removed in 4.24.
115116
properties:
116117
dynamicResourceAllocation:
117118
description: |-

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_schedulers-Default.crd.yaml renamed to config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_schedulers-SelfManagedHA-Default.crd.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ metadata:
44
annotations:
55
api-approved.openshift.io: https://github.com/openshift/api/pull/470
66
api.openshift.io/merged-by-featuregates: "true"
7-
include.release.openshift.io/ibm-cloud-managed: "true"
87
include.release.openshift.io/self-managed-high-availability: "true"
98
release.openshift.io/bootstrap-required: "true"
109
release.openshift.io/feature-set: Default

payload-manifests/crds/0000_10_config-operator_01_schedulers-DevPreviewNoUpgrade.crd.yaml renamed to config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_schedulers-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ metadata:
44
annotations:
55
api-approved.openshift.io: https://github.com/openshift/api/pull/470
66
api.openshift.io/merged-by-featuregates: "true"
7-
include.release.openshift.io/ibm-cloud-managed: "true"
87
include.release.openshift.io/self-managed-high-availability: "true"
98
release.openshift.io/bootstrap-required: "true"
109
release.openshift.io/feature-set: DevPreviewNoUpgrade
@@ -110,8 +109,10 @@ spec:
110109
- NoScoring
111110
type: string
112111
profileCustomizations:
113-
description: profileCustomizations contains configuration for modifying
114-
the default behavior of existing scheduler profiles.
112+
description: |-
113+
profileCustomizations contains configuration for modifying the default behavior of existing scheduler profiles.
114+
Deprecated: no longer needed, since DRA is GA starting with 4.21, and
115+
is enabled by' default in the cluster, this field will be removed in 4.24.
115116
properties:
116117
dynamicResourceAllocation:
117118
description: |-

payload-manifests/crds/0000_10_config-operator_01_schedulers-TechPreviewNoUpgrade.crd.yaml renamed to config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_schedulers-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ metadata:
44
annotations:
55
api-approved.openshift.io: https://github.com/openshift/api/pull/470
66
api.openshift.io/merged-by-featuregates: "true"
7-
include.release.openshift.io/ibm-cloud-managed: "true"
87
include.release.openshift.io/self-managed-high-availability: "true"
98
release.openshift.io/bootstrap-required: "true"
109
release.openshift.io/feature-set: TechPreviewNoUpgrade
@@ -110,8 +109,10 @@ spec:
110109
- NoScoring
111110
type: string
112111
profileCustomizations:
113-
description: profileCustomizations contains configuration for modifying
114-
the default behavior of existing scheduler profiles.
112+
description: |-
113+
profileCustomizations contains configuration for modifying the default behavior of existing scheduler profiles.
114+
Deprecated: no longer needed, since DRA is GA starting with 4.21, and
115+
is enabled by' default in the cluster, this field will be removed in 4.24.
115116
properties:
116117
dynamicResourceAllocation:
117118
description: |-

config/v1/zz_generated.featuregated-crd-manifests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ schedulers.config.openshift.io:
576576
Category: ""
577577
FeatureGates:
578578
- DynamicResourceAllocation
579+
- HyperShiftOnlyDynamicResourceAllocation
579580
FilenameOperatorName: config-operator
580581
FilenameOperatorOrdering: "01"
581582
FilenameRunLevel: "0000_10"

config/v1/zz_generated.featuregated-crd-manifests/schedulers.config.openshift.io/DynamicResourceAllocation.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,10 @@ spec:
110110
- NoScoring
111111
type: string
112112
profileCustomizations:
113-
description: profileCustomizations contains configuration for modifying
114-
the default behavior of existing scheduler profiles.
113+
description: |-
114+
profileCustomizations contains configuration for modifying the default behavior of existing scheduler profiles.
115+
Deprecated: no longer needed, since DRA is GA starting with 4.21, and
116+
is enabled by' default in the cluster, this field will be removed in 4.24.
115117
properties:
116118
dynamicResourceAllocation:
117119
description: |-

0 commit comments

Comments
 (0)