Skip to content

Commit

Permalink
Remove some hard coded KV FGs (#2940)
Browse files Browse the repository at this point in the history
Removed the following feature gates:
* The `DataVolumes` and `SRIOV` feature gates are no longer supported in KV.
* The `CPUNodeDiscovery` feature gate is already GA.

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
  • Loading branch information
nunnatsa authored May 6, 2024
1 parent ea532a1 commit 174357a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 20 deletions.
3 changes: 0 additions & 3 deletions controllers/hyperconverged/hyperconverged_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,7 @@ var _ = Describe("HyperconvergedController", func() {
verifySystemHealthStatusError(foundResource)

expectedFeatureGates := []string{
"DataVolumes",
"SRIOV",
"CPUManager",
"CPUNodeDiscovery",
"Snapshot",
"HotplugVolumes",
"GPU",
Expand Down
16 changes: 0 additions & 16 deletions controllers/operands/kubevirt.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,10 @@ func init() {
// KubeVirt hard coded FeatureGates
// These feature gates are set by HCO in the KubeVirt CR and can't be modified by the end user.
const (
// indicates that we support turning on DataVolume workflows. This means using DataVolumes in the VM and VMI
// definitions. There was a period of time where this was in alpha and needed to be explicility enabled.
// It also means that someone is using KubeVirt with CDI. So by not enabling this feature gate, someone can safely
// use kubevirt without CDI and know that users of kubevirt will not be able to post VM/VMIs that use CDI workflows
// that aren't available to them
kvDataVolumesGate = "DataVolumes"

// Enable Single-root input/output virtualization
kvSRIOVGate = "SRIOV"

// Enables the CPUManager feature gate to label the nodes which have the Kubernetes CPUManager running. VMIs that
// require dedicated CPU resources will automatically be scheduled on the labeled nodes
kvCPUManagerGate = "CPUManager"

// Enables schedule VMIs according to their CPU model
kvCPUNodeDiscoveryGate = "CPUNodeDiscovery"

// Enables the alpha offline snapshot functionality
kvSnapshotGate = "Snapshot"

Expand Down Expand Up @@ -125,10 +112,7 @@ const (

var (
hardCodeKvFgs = []string{
kvDataVolumesGate,
kvSRIOVGate,
kvCPUManagerGate,
kvCPUNodeDiscoveryGate,
kvSnapshotGate,
kvHotplugVolumesGate,
kvExpandDisksGate,
Expand Down
1 change: 0 additions & 1 deletion controllers/operands/kubevirt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3711,7 +3711,6 @@ Version: 1.2.3`)
Expect(kv.Spec.Configuration.DeveloperConfiguration).ToNot(BeNil())
Expect(kv.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(HaveLen(len(getKvFeatureGateList(&hco.Spec.FeatureGates))))
Expect(kv.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(ContainElements(hardCodeKvFgs))
Expect(kv.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(ContainElement(kvSRIOVGate))
Expect(kv.Spec.Configuration.CPURequest).To(BeNil())

})
Expand Down

0 comments on commit 174357a

Please sign in to comment.