Skip to content

Commit 79edc2a

Browse files
committed
move ProfileCustomizations to a new GA gate
- Add a new gate HyperShiftOnlyDynamicResourceAllocation - make it GA - move the field ProfileCustomizations to the new gate - deprecate the ProfileCustomizations field DRA is GA and is enabled by default, the scheduler enables the DRA plugin if the upstream feature gate is enabled, so the field ProfileCustomizations is defunct. This will remove the coupling between the DynamicResourceAllocation gate and the scheduler config to pave the way for removal of the DynamicResourceAllocation gate
1 parent 916c700 commit 79edc2a

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
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

features/features.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,4 +939,12 @@ var (
939939
enhancementPR("https://github.com/openshift/enhancements/pull/1752").
940940
enableIn(configv1.DevPreviewNoUpgrade).
941941
mustRegister()
942+
943+
FeatureGateHyperShiftOnlyDynamicResourceAllocation = newFeatureGate("HyperShiftOnlyDynamicResourceAllocation").
944+
reportProblemsToJiraComponent("hypershift").
945+
contactPerson("csrwng").
946+
productScope(ocpSpecific).
947+
enhancementPR("https://github.com/kubernetes/enhancements/issues/4381").
948+
enableForClusterProfile(Hypershift, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade, configv1.Default).
949+
mustRegister()
942950
)

0 commit comments

Comments
 (0)