From 831fdfb020ab90a9561d141a76254abd3595ca0f Mon Sep 17 00:00:00 2001 From: dsionov Date: Thu, 4 Jun 2026 19:27:34 +0300 Subject: [PATCH] Remove VideoConfig feature gate The VideoConfig feature gate was enabled by default in HCO [1] as the feature was beta in KubeVirt 1.8 and GA in KubeVirt 1.9 [2]. Now that the feature has reached GA and the feature gate protection has been removed upstream in KubeVirt, there is no point to set it anymore. This PR modifies HCO to stop adding the VideoConfig feature gate to the KubeVirt CR and marks the v1beta1 API field as discontinued. [1] https://github.com/kubevirt/hyperconverged-cluster-operator/pull/4180 [2] https://github.com/kubevirt/kubevirt/pull/16599 Assisted-By: Claude opus 4.6 Signed-off-by: Daniel Sionov --- api/v1/featuregates/feature_gates_test.go | 4 -- api/v1/hyperconverged_types.go | 6 --- api/v1/zz_generated.openapi.go | 2 +- api/v1beta1/conversion_test.go | 6 +-- api/v1beta1/hyperconverged_types.go | 12 ++--- api/v1beta1/zz_generated.defaults.go | 4 -- .../zz_generated.featuregates_conversion.go | 5 -- api/v1beta1/zz_generated.openapi.go | 3 +- .../hco.kubevirt.io_hyperconvergeds.yaml | 14 +----- controllers/handlers/kubevirt.go | 5 -- controllers/handlers/kubevirt_test.go | 46 +------------------ .../hyperconverged_controller_test.go | 2 - deploy/crds/hco00.crd.yaml | 14 +----- .../1.19.0/manifests/hco00.crd.yaml | 14 +----- .../1.19.0/manifests/hco00.crd.yaml | 14 +----- docs/api-v1.md | 1 - docs/api.md | 6 +-- pkg/featuregatedetails/feature-gates.json | 5 -- .../kvfeaturegates/kv-beta-feature-gates.json | 4 -- tests/func-tests/defaults_test.go | 1 - tools/csv-merger/generated-crd.yaml | 14 +----- tools/manifest-templator/generated-crd.yaml | 14 +----- 22 files changed, 18 insertions(+), 178 deletions(-) diff --git a/api/v1/featuregates/feature_gates_test.go b/api/v1/featuregates/feature_gates_test.go index 792c88a81a..4fa4a37e29 100644 --- a/api/v1/featuregates/feature_gates_test.go +++ b/api/v1/featuregates/feature_gates_test.go @@ -188,10 +188,6 @@ var _ = Describe("Feature Gates", func() { Entry("known alpha FG; in list; disabled", featuregates.HyperConvergedFeatureGates{{Name: "downwardMetrics", State: ptr.To(featuregates.Disabled)}}, "downwardMetrics", BeFalse()), Entry("known alpha FG; not in list; disabled", featuregates.HyperConvergedFeatureGates{{Name: "deployKubeSecondaryDNS", State: ptr.To(featuregates.Enabled)}}, "downwardMetrics", BeFalse()), - Entry("known beta FG; in list; enabled", featuregates.HyperConvergedFeatureGates{{Name: "videoConfig", State: ptr.To(featuregates.Enabled)}}, "videoConfig", BeTrue()), - Entry("known beta FG; in list; disabled", featuregates.HyperConvergedFeatureGates{{Name: "videoConfig", State: ptr.To(featuregates.Disabled)}}, "videoConfig", BeFalse()), - Entry("known beta FG; not in list; disabled", featuregates.HyperConvergedFeatureGates{{Name: "deployKubeSecondaryDNS", State: ptr.To(featuregates.Enabled)}}, "videoConfig", BeTrue()), - Entry("known deprecated FG; in list; enabled", featuregates.HyperConvergedFeatureGates{{Name: "withHostPassthroughCPU", State: ptr.To(featuregates.Enabled)}}, "withHostPassthroughCPU", BeFalse()), Entry("known deprecated FG; in list; disabled", featuregates.HyperConvergedFeatureGates{{Name: "withHostPassthroughCPU", State: ptr.To(featuregates.Disabled)}}, "withHostPassthroughCPU", BeFalse()), Entry("known deprecated FG; not in list; disabled", featuregates.HyperConvergedFeatureGates{{Name: "deployKubeSecondaryDNS", State: ptr.To(featuregates.Enabled)}}, "withHostPassthroughCPU", BeFalse()), diff --git a/api/v1/hyperconverged_types.go b/api/v1/hyperconverged_types.go index 2577632ea9..cea331682e 100644 --- a/api/v1/hyperconverged_types.go +++ b/api/v1/hyperconverged_types.go @@ -67,12 +67,6 @@ type HyperConvergedSpec struct { // Developer Preview. // Phase: beta // - // * videoConfig: - // VideoConfig allows users to configure video device types for their virtual - // machines. This can be useful for workloads that require specific video - // capabilities or architectures. Note: This feature is in Tech Preview. - // Phase: beta - // // * alignCPUs: // Enable KubeVirt to request up to two additional dedicated CPUs in order to // complete the total CPU count to an even parity when using emulator thread diff --git a/api/v1/zz_generated.openapi.go b/api/v1/zz_generated.openapi.go index b819ebe2f1..8d720de465 100644 --- a/api/v1/zz_generated.openapi.go +++ b/api/v1/zz_generated.openapi.go @@ -239,7 +239,7 @@ func schema_kubevirt_hyperconverged_cluster_operator_api_v1_HyperConvergedSpec(r Properties: map[string]spec.Schema{ "featureGates": { SchemaProps: spec.SchemaProps{ - Description: "FeatureGates is a set of optional feature gates to enable or disable new features that are not generally available yet. Add a new FeatureGate Object to this set, to enable a feature that is disabled by default, or to disable a feature that is enabled by default.\n\nA feature gate may be in the following phases: * alpha: the feature is in dev-preview. It is disabled by default, but can\n be enabled.\n* beta: the feature gate is in tech-preview. It is enabled by default, but\n can be disabled.\n* GA: the feature is graduated and is always enabled. There is no way to\n disable it.\n* deprecated: the feature is deprecated. The feature gate will be removed in a future release.\n\nFeature-Gate list: * decentralizedLiveMigration:\n DecentralizedLiveMigration enables the decentralized live migration\n (cross-cluster migration) feature. This feature allows live migration of\n VirtualMachineInstances between different clusters. This feature is in\n Developer Preview.\n Phase: beta\n\n* videoConfig:\n VideoConfig allows users to configure video device types for their virtual\n machines. This can be useful for workloads that require specific video\n capabilities or architectures. Note: This feature is in Tech Preview.\n Phase: beta\n\n* alignCPUs:\n Enable KubeVirt to request up to two additional dedicated CPUs in order to\n complete the total CPU count to an even parity when using emulator thread\n isolation. Note: this feature is in Developer Preview.\n Phase: alpha\n\n* containerPathVolumes:\n ContainerPathVolumes enables the use of container paths as volumes in\n KubeVirt. This allows VMs to access files and directories from the\n virt-launcher pod's filesystem via virtiofs.\n Phase: alpha\n\n* declarativeHotplugVolumes:\n DeclarativeHotplugVolumes enables the use of the declarative volume\n hotplug feature in KubeVirt. When set to true, the\n \"DeclarativeHotplugVolumes\" feature gate is enabled instead of\n \"HotplugVolumes\". When set to false or nil, the \"HotplugVolumes\" feature\n gate is enabled (default behavior). This feature is in Developer Preview.\n Phase: alpha\n\n* deployKubeSecondaryDNS:\n Deploy KubeSecondaryDNS by CNAO\n Phase: alpha\n\n* downwardMetrics:\n Allow to expose a limited set of host metrics to guests.\n Phase: alpha\n\n* enableMultiArchBootImageImport:\n EnableMultiArchBootImageImport allows the HCO to run on heterogeneous\n clusters with different CPU architectures. Setting this field to true will\n allow the HCO to create Golden Images for different CPU architectures.\n This feature is in Developer Preview.\n Phase: alpha\n\n* incrementalBackup:\n IncrementalBackup enables changed block tracking backups and incremental\n backups using QEMU capabilities in KubeVirt. When enabled, this also\n enables the UtilityVolumes feature gate in the KubeVirt CR. Note: This\n feature is in Tech Preview.\n Phase: alpha\n\n* objectGraph:\n ObjectGraph enables the ObjectGraph VM and VMI subresource in KubeVirt.\n This subresource returns a structured list of k8s objects that are related\n to the specified VM or VMI, enabling better dependency tracking. Note:\n This feature is in Developer Preview.\n Phase: alpha\n\n* persistentReservation:\n Enable persistent reservation of a LUN through the SCSI Persistent Reserve\n commands on Kubevirt. In order to issue privileged SCSI ioctls, the VM\n requires activation of the persistent reservation flag. Once this feature\n gate is enabled, then the additional container with the qemu-pr-helper is\n deployed inside the virt-handler pod. Enabling (or removing) the feature\n gate causes the redeployment of the virt-handler pod.\n Phase: alpha\n\n* disableMDevConfiguration:\n Deprecated: use spec.virtualization.mediatedDevicesConfiguration.enabled\n instead. This feature gate is deprecated and will be removed in a future\n release.\n Phase: deprecated", + Description: "FeatureGates is a set of optional feature gates to enable or disable new features that are not generally available yet. Add a new FeatureGate Object to this set, to enable a feature that is disabled by default, or to disable a feature that is enabled by default.\n\nA feature gate may be in the following phases: * alpha: the feature is in dev-preview. It is disabled by default, but can\n be enabled.\n* beta: the feature gate is in tech-preview. It is enabled by default, but\n can be disabled.\n* GA: the feature is graduated and is always enabled. There is no way to\n disable it.\n* deprecated: the feature is deprecated. The feature gate will be removed in a future release.\n\nFeature-Gate list: * decentralizedLiveMigration:\n DecentralizedLiveMigration enables the decentralized live migration\n (cross-cluster migration) feature. This feature allows live migration of\n VirtualMachineInstances between different clusters. This feature is in\n Developer Preview.\n Phase: beta\n\n* alignCPUs:\n Enable KubeVirt to request up to two additional dedicated CPUs in order to\n complete the total CPU count to an even parity when using emulator thread\n isolation. Note: this feature is in Developer Preview.\n Phase: alpha\n\n* containerPathVolumes:\n ContainerPathVolumes enables the use of container paths as volumes in\n KubeVirt. This allows VMs to access files and directories from the\n virt-launcher pod's filesystem via virtiofs.\n Phase: alpha\n\n* declarativeHotplugVolumes:\n DeclarativeHotplugVolumes enables the use of the declarative volume\n hotplug feature in KubeVirt. When set to true, the\n \"DeclarativeHotplugVolumes\" feature gate is enabled instead of\n \"HotplugVolumes\". When set to false or nil, the \"HotplugVolumes\" feature\n gate is enabled (default behavior). This feature is in Developer Preview.\n Phase: alpha\n\n* deployKubeSecondaryDNS:\n Deploy KubeSecondaryDNS by CNAO\n Phase: alpha\n\n* downwardMetrics:\n Allow to expose a limited set of host metrics to guests.\n Phase: alpha\n\n* enableMultiArchBootImageImport:\n EnableMultiArchBootImageImport allows the HCO to run on heterogeneous\n clusters with different CPU architectures. Setting this field to true will\n allow the HCO to create Golden Images for different CPU architectures.\n This feature is in Developer Preview.\n Phase: alpha\n\n* incrementalBackup:\n IncrementalBackup enables changed block tracking backups and incremental\n backups using QEMU capabilities in KubeVirt. When enabled, this also\n enables the UtilityVolumes feature gate in the KubeVirt CR. Note: This\n feature is in Tech Preview.\n Phase: alpha\n\n* objectGraph:\n ObjectGraph enables the ObjectGraph VM and VMI subresource in KubeVirt.\n This subresource returns a structured list of k8s objects that are related\n to the specified VM or VMI, enabling better dependency tracking. Note:\n This feature is in Developer Preview.\n Phase: alpha\n\n* persistentReservation:\n Enable persistent reservation of a LUN through the SCSI Persistent Reserve\n commands on Kubevirt. In order to issue privileged SCSI ioctls, the VM\n requires activation of the persistent reservation flag. Once this feature\n gate is enabled, then the additional container with the qemu-pr-helper is\n deployed inside the virt-handler pod. Enabling (or removing) the feature\n gate causes the redeployment of the virt-handler pod.\n Phase: alpha\n\n* disableMDevConfiguration:\n Deprecated: use spec.virtualization.mediatedDevicesConfiguration.enabled\n instead. This feature gate is deprecated and will be removed in a future\n release.\n Phase: deprecated", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ diff --git a/api/v1beta1/conversion_test.go b/api/v1beta1/conversion_test.go index 1dc34f2f6c..d68fc628c6 100644 --- a/api/v1beta1/conversion_test.go +++ b/api/v1beta1/conversion_test.go @@ -403,14 +403,13 @@ var _ = Describe("api/v1beta1", func() { DownwardMetrics: ptr.To(true), AlignCPUs: ptr.To(true), DecentralizedLiveMigration: ptr.To(false), - VideoConfig: ptr.To(false), ObjectGraph: ptr.To(false), // alpha default, should not appear } out := &hcofg.HyperConvergedFeatureGates{} convert_v1beta1_FeatureGates_To_v1(in, out) - Expect(*out).To(HaveLen(4)) + Expect(*out).To(HaveLen(3)) }) }) @@ -490,7 +489,6 @@ var _ = Describe("api/v1beta1", func() { It("should preserve beta feature gate disabled through round-trip", func() { original := &HyperConvergedFeatureGates{ DecentralizedLiveMigration: ptr.To(false), - VideoConfig: ptr.To(false), } v1fgs := &hcofg.HyperConvergedFeatureGates{} @@ -500,7 +498,6 @@ var _ = Describe("api/v1beta1", func() { convert_v1_FeatureGates_To_v1beta1(*v1fgs, result) Expect(*result.DecentralizedLiveMigration).To(BeFalse()) - Expect(*result.VideoConfig).To(BeFalse()) }) It("should preserve defaults through round-trip", func() { @@ -517,7 +514,6 @@ var _ = Describe("api/v1beta1", func() { Expect(*result.AlignCPUs).To(BeFalse()) // beta defaults stay true Expect(*result.DecentralizedLiveMigration).To(BeTrue()) - Expect(*result.VideoConfig).To(BeTrue()) }) }) }) diff --git a/api/v1beta1/hyperconverged_types.go b/api/v1beta1/hyperconverged_types.go index bc3f3d6240..d4ac96501b 100644 --- a/api/v1beta1/hyperconverged_types.go +++ b/api/v1beta1/hyperconverged_types.go @@ -67,7 +67,7 @@ type HyperConvergedSpec struct { // featureGates is a map of feature gate flags. Setting a flag to `true` will enable // the feature. Setting `false` or removing the feature gate, disables the feature. - // +kubebuilder:default={"downwardMetrics": false, "deployKubeSecondaryDNS": false, "persistentReservation": false, "enableMultiArchBootImageImport": false, "decentralizedLiveMigration": true, "declarativeHotplugVolumes": false, "videoConfig": true, "objectGraph": false, "incrementalBackup": false, "containerPathVolumes": false} + // +kubebuilder:default={"downwardMetrics": false, "deployKubeSecondaryDNS": false, "persistentReservation": false, "enableMultiArchBootImageImport": false, "decentralizedLiveMigration": true, "declarativeHotplugVolumes": false, "objectGraph": false, "incrementalBackup": false, "containerPathVolumes": false} // +optional // +k8s:conversion-gen=false FeatureGates HyperConvergedFeatureGates `json:"featureGates,omitempty"` @@ -485,12 +485,8 @@ type HyperConvergedFeatureGates struct { // +default=false DeclarativeHotplugVolumes *bool `json:"declarativeHotplugVolumes,omitempty"` - // VideoConfig allows users to configure video device types for their virtual machines. - // This can be useful for workloads that require specific video capabilities or architectures. - // Note: This feature is in Tech Preview. - // +optional - // +kubebuilder:default=true - // +default=true + // Deprecated: This feature gate is ignored. + // +hco:fgphase:discontinued VideoConfig *bool `json:"videoConfig,omitempty"` // ObjectGraph enables the ObjectGraph VM and VMI subresource in KubeVirt. @@ -634,7 +630,7 @@ type HyperConverged struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:default={"certConfig": {"ca": {"duration": "48h0m0s", "renewBefore": "24h0m0s"}, "server": {"duration": "24h0m0s", "renewBefore": "12h0m0s"}},"featureGates": {"downwardMetrics": false, "deployKubeSecondaryDNS": false, "persistentReservation": false, "enableMultiArchBootImageImport": false, "decentralizedLiveMigration": true, "declarativeHotplugVolumes": false, "videoConfig": true, "objectGraph": false, "incrementalBackup": false, "containerPathVolumes": false}, "liveMigrationConfig": {"completionTimeoutPerGiB": 150, "parallelMigrationsPerCluster": 5, "parallelOutboundMigrationsPerNode": 2, "progressTimeout": 150, "allowAutoConverge": false, "allowPostCopy": false}, "resourceRequirements": {"vmiCPUAllocationRatio": 10}, "uninstallStrategy": "BlockUninstallIfWorkloadsExist", "virtualMachineOptions": {"disableFreePageReporting": false, "disableSerialConsoleLog": false}, "enableApplicationAwareQuota": false, "enableCommonBootImageImport": true, "deployVmConsoleProxy": false} + // +kubebuilder:default={"certConfig": {"ca": {"duration": "48h0m0s", "renewBefore": "24h0m0s"}, "server": {"duration": "24h0m0s", "renewBefore": "12h0m0s"}},"featureGates": {"downwardMetrics": false, "deployKubeSecondaryDNS": false, "persistentReservation": false, "enableMultiArchBootImageImport": false, "decentralizedLiveMigration": true, "declarativeHotplugVolumes": false, "objectGraph": false, "incrementalBackup": false, "containerPathVolumes": false}, "liveMigrationConfig": {"completionTimeoutPerGiB": 150, "parallelMigrationsPerCluster": 5, "parallelOutboundMigrationsPerNode": 2, "progressTimeout": 150, "allowAutoConverge": false, "allowPostCopy": false}, "resourceRequirements": {"vmiCPUAllocationRatio": 10}, "uninstallStrategy": "BlockUninstallIfWorkloadsExist", "virtualMachineOptions": {"disableFreePageReporting": false, "disableSerialConsoleLog": false}, "enableApplicationAwareQuota": false, "enableCommonBootImageImport": true, "deployVmConsoleProxy": false} // +optional Spec HyperConvergedSpec `json:"spec,omitempty"` Status hcov1.HyperConvergedStatus `json:"status,omitempty"` diff --git a/api/v1beta1/zz_generated.defaults.go b/api/v1beta1/zz_generated.defaults.go index 7d9b735ccd..dafa731537 100644 --- a/api/v1beta1/zz_generated.defaults.go +++ b/api/v1beta1/zz_generated.defaults.go @@ -68,10 +68,6 @@ func SetObjectDefaults_HyperConverged(in *HyperConverged) { var ptrVar1 bool = false in.Spec.FeatureGates.DeclarativeHotplugVolumes = &ptrVar1 } - if in.Spec.FeatureGates.VideoConfig == nil { - var ptrVar1 bool = true - in.Spec.FeatureGates.VideoConfig = &ptrVar1 - } if in.Spec.FeatureGates.ObjectGraph == nil { var ptrVar1 bool = false in.Spec.FeatureGates.ObjectGraph = &ptrVar1 diff --git a/api/v1beta1/zz_generated.featuregates_conversion.go b/api/v1beta1/zz_generated.featuregates_conversion.go index ed03593888..b88d0a324e 100644 --- a/api/v1beta1/zz_generated.featuregates_conversion.go +++ b/api/v1beta1/zz_generated.featuregates_conversion.go @@ -40,10 +40,6 @@ func convert_v1beta1_FeatureGates_To_v1(in *HyperConvergedFeatureGates, out *hco out.Enable("declarativeHotplugVolumes") } - if !ptr.Deref(in.VideoConfig, true) { - out.Disable("videoConfig") - } - if ptr.Deref(in.ObjectGraph, false) { out.Enable("objectGraph") } @@ -65,7 +61,6 @@ func convert_v1_FeatureGates_To_v1beta1(in hcofg.HyperConvergedFeatureGates, out out.EnableMultiArchBootImageImport = ptr.To(in.IsEnabled("enableMultiArchBootImageImport")) out.DecentralizedLiveMigration = ptr.To(in.IsEnabled("decentralizedLiveMigration")) out.DeclarativeHotplugVolumes = ptr.To(in.IsEnabled("declarativeHotplugVolumes")) - out.VideoConfig = ptr.To(in.IsEnabled("videoConfig")) out.ObjectGraph = ptr.To(in.IsEnabled("objectGraph")) out.IncrementalBackup = ptr.To(in.IsEnabled("incrementalBackup")) out.ContainerPathVolumes = ptr.To(in.IsEnabled("containerPathVolumes")) diff --git a/api/v1beta1/zz_generated.openapi.go b/api/v1beta1/zz_generated.openapi.go index 7df86b30af..516519ed10 100644 --- a/api/v1beta1/zz_generated.openapi.go +++ b/api/v1beta1/zz_generated.openapi.go @@ -266,8 +266,7 @@ func schema_kubevirt_hyperconverged_cluster_operator_api_v1beta1_HyperConvergedF }, "videoConfig": { SchemaProps: spec.SchemaProps{ - Description: "VideoConfig allows users to configure video device types for their virtual machines. This can be useful for workloads that require specific video capabilities or architectures. Note: This feature is in Tech Preview.", - Default: true, + Description: "Deprecated: This feature gate is ignored.", Type: []string{"boolean"}, Format: "", }, diff --git a/config/crd/bases/hco.kubevirt.io_hyperconvergeds.yaml b/config/crd/bases/hco.kubevirt.io_hyperconvergeds.yaml index 5f61ade348..81c3af0461 100644 --- a/config/crd/bases/hco.kubevirt.io_hyperconvergeds.yaml +++ b/config/crd/bases/hco.kubevirt.io_hyperconvergeds.yaml @@ -2232,12 +2232,6 @@ spec: Developer Preview. Phase: beta - * videoConfig: - VideoConfig allows users to configure video device types for their virtual - machines. This can be useful for workloads that require specific video - capabilities or architectures. Note: This feature is in Tech Preview. - Phase: beta - * alignCPUs: Enable KubeVirt to request up to two additional dedicated CPUs in order to complete the total CPU count to an even parity when using emulator thread @@ -5396,7 +5390,6 @@ spec: incrementalBackup: false objectGraph: false persistentReservation: false - videoConfig: true liveMigrationConfig: allowAutoConverge: false allowPostCopy: false @@ -6535,7 +6528,6 @@ spec: incrementalBackup: false objectGraph: false persistentReservation: false - videoConfig: true description: |- featureGates is a map of feature gate flags. Setting a flag to `true` will enable the feature. Setting `false` or removing the feature gate, disables the feature. @@ -6645,11 +6637,7 @@ spec: description: 'Deprecated: this feature gate is ignored.' type: boolean videoConfig: - default: true - description: |- - VideoConfig allows users to configure video device types for their virtual machines. - This can be useful for workloads that require specific video capabilities or architectures. - Note: This feature is in Tech Preview. + description: 'Deprecated: This feature gate is ignored.' type: boolean withHostPassthroughCPU: description: 'Deprecated: This feature gate is ignored' diff --git a/controllers/handlers/kubevirt.go b/controllers/handlers/kubevirt.go index 075362d37b..eb6931cee9 100644 --- a/controllers/handlers/kubevirt.go +++ b/controllers/handlers/kubevirt.go @@ -136,7 +136,6 @@ const ( kvPersistentReservation = "PersistentReservation" kvAlignCPUs = "AlignCPUs" kvDecentralizedLiveMigration = "DecentralizedLiveMigration" - kvVideoConfig = "VideoConfig" kvObjectGraph = "ObjectGraph" kvUtilityVolumes = "UtilityVolumes" kvIncrementalBackup = "IncrementalBackup" @@ -925,10 +924,6 @@ func getFeatureGateChecks(hc *hcov1.HyperConverged) []string { if featureGates.IsEnabled("alignCPUs") { fgs = append(fgs, kvAlignCPUs) } - if featureGates.IsEnabled("videoConfig") { - fgs = append(fgs, kvVideoConfig) - } - if featureGates.IsEnabled("objectGraph") { fgs = append(fgs, kvObjectGraph) } diff --git a/controllers/handlers/kubevirt_test.go b/controllers/handlers/kubevirt_test.go index 19f848616b..bf1d4146a9 100644 --- a/controllers/handlers/kubevirt_test.go +++ b/controllers/handlers/kubevirt_test.go @@ -38,8 +38,8 @@ import ( var _ = Describe("KubeVirt Operand", func() { const ( - // Number of conditional featuregates always added by getFeatureGateChecks (volume hotplug, VideoConfig, DecentralizedLiveMigration defaults) - conditionalFeatureGatesCount = 3 + // Number of conditional featuregates always added by getFeatureGateChecks (volume hotplug and decentralizedLiveMigration) + conditionalFeatureGatesCount = 2 ) var ( @@ -1993,11 +1993,9 @@ Version: 1.2.3`) Not(ContainElement(kvObjectGraph)), And(Not(ContainElement(kvIncrementalBackup)), Not(ContainElement(kvUtilityVolumes))), Not(ContainElement(kvContainerPathVolumes)), - ContainElement(kvVideoConfig), ), func(kv *kubevirtcorev1.KubeVirt) { Expect(kv.Annotations).ToNot(HaveKey(kubevirtcorev1.EmulatorThreadCompleteToEvenParity)) - Expect(kv.Spec.Configuration.DeveloperConfiguration.DisabledFeatureGates).ToNot(ContainElement(kvVideoConfig)) }, ), // PersistentReservation @@ -2177,28 +2175,6 @@ Version: 1.2.3`) }, Not(ContainElement(kvContainerPathVolumes)), ), - Entry("should add the VideoConfig if feature gate VideoConfig is true in HyperConverged CR", - func(hc *hcov1.HyperConverged) { - hc.Spec.FeatureGates = featuregates.HyperConvergedFeatureGates{ - {Name: "videoConfig", State: ptr.To(featuregates.Enabled)}, - } - }, - ContainElement(kvVideoConfig), - func(kv *kubevirtcorev1.KubeVirt) { - Expect(kv.Spec.Configuration.DeveloperConfiguration.DisabledFeatureGates).NotTo(ContainElement(kvVideoConfig)) - }, - ), - Entry("should not add the VideoConfig if feature gate VideoConfig is set to false in HyperConverged CR", - func(hc *hcov1.HyperConverged) { - hc.Spec.FeatureGates = featuregates.HyperConvergedFeatureGates{ - {Name: "videoConfig", State: ptr.To(featuregates.Disabled)}, - } - }, - Not(ContainElement(kvVideoConfig)), - func(kv *kubevirtcorev1.KubeVirt) { - Expect(kv.Spec.Configuration.DeveloperConfiguration.DisabledFeatureGates).To(ContainElement(kvVideoConfig)) - }, - ), ) }) @@ -2517,24 +2493,6 @@ Version: 1.2.3`) Expect(disabled).NotTo(ContainElement(kvKubevirtSeccompProfile)) }) - It("should not include VideoConfig when it is enabled by default", func() { - hco.Spec.FeatureGates = featuregates.HyperConvergedFeatureGates{} - mandatoryKvFeatureGates = getMandatoryKvFeatureGates(false) - fgs := getKvFeatureGateList(hco) - disabled := getKvDisabledFeatureGateList(fgs) - Expect(disabled).NotTo(ContainElement(kvVideoConfig)) - }) - - It("should include VideoConfig when it is explicitly disabled", func() { - hco.Spec.FeatureGates = featuregates.HyperConvergedFeatureGates{ - {Name: "videoConfig", State: ptr.To(featuregates.Disabled)}, - } - mandatoryKvFeatureGates = getMandatoryKvFeatureGates(false) - fgs := getKvFeatureGateList(hco) - disabled := getKvDisabledFeatureGateList(fgs) - Expect(disabled).To(ContainElement(kvVideoConfig)) - }) - It("should not include PasstBinding when passt annotation is true", func() { hco.Annotations = map[string]string{deployPasstNetworkBindingAnn: "true"} mandatoryKvFeatureGates = getMandatoryKvFeatureGates(false) diff --git a/controllers/hyperconverged/hyperconverged_controller_test.go b/controllers/hyperconverged/hyperconverged_controller_test.go index f062e20053..d127112dc0 100644 --- a/controllers/hyperconverged/hyperconverged_controller_test.go +++ b/controllers/hyperconverged/hyperconverged_controller_test.go @@ -146,7 +146,6 @@ var _ = Describe("HyperconvergedController", func() { hco := commontestutils.NewHco() hco.Spec.FeatureGates = featuregates.HyperConvergedFeatureGates{ {Name: "downwardMetrics"}, - {Name: "videoConfig"}, } ci := hcoutil.GetClusterInfo() @@ -212,7 +211,6 @@ var _ = Describe("HyperconvergedController", func() { "HypervStrictCheck", "DownwardMetrics", "KubevirtSeccompProfile", - "VideoConfig", "DecentralizedLiveMigration", } // Get the KV diff --git a/deploy/crds/hco00.crd.yaml b/deploy/crds/hco00.crd.yaml index 5f61ade348..81c3af0461 100644 --- a/deploy/crds/hco00.crd.yaml +++ b/deploy/crds/hco00.crd.yaml @@ -2232,12 +2232,6 @@ spec: Developer Preview. Phase: beta - * videoConfig: - VideoConfig allows users to configure video device types for their virtual - machines. This can be useful for workloads that require specific video - capabilities or architectures. Note: This feature is in Tech Preview. - Phase: beta - * alignCPUs: Enable KubeVirt to request up to two additional dedicated CPUs in order to complete the total CPU count to an even parity when using emulator thread @@ -5396,7 +5390,6 @@ spec: incrementalBackup: false objectGraph: false persistentReservation: false - videoConfig: true liveMigrationConfig: allowAutoConverge: false allowPostCopy: false @@ -6535,7 +6528,6 @@ spec: incrementalBackup: false objectGraph: false persistentReservation: false - videoConfig: true description: |- featureGates is a map of feature gate flags. Setting a flag to `true` will enable the feature. Setting `false` or removing the feature gate, disables the feature. @@ -6645,11 +6637,7 @@ spec: description: 'Deprecated: this feature gate is ignored.' type: boolean videoConfig: - default: true - description: |- - VideoConfig allows users to configure video device types for their virtual machines. - This can be useful for workloads that require specific video capabilities or architectures. - Note: This feature is in Tech Preview. + description: 'Deprecated: This feature gate is ignored.' type: boolean withHostPassthroughCPU: description: 'Deprecated: This feature gate is ignored' diff --git a/deploy/index-image/community-kubevirt-hyperconverged/1.19.0/manifests/hco00.crd.yaml b/deploy/index-image/community-kubevirt-hyperconverged/1.19.0/manifests/hco00.crd.yaml index 5f61ade348..81c3af0461 100644 --- a/deploy/index-image/community-kubevirt-hyperconverged/1.19.0/manifests/hco00.crd.yaml +++ b/deploy/index-image/community-kubevirt-hyperconverged/1.19.0/manifests/hco00.crd.yaml @@ -2232,12 +2232,6 @@ spec: Developer Preview. Phase: beta - * videoConfig: - VideoConfig allows users to configure video device types for their virtual - machines. This can be useful for workloads that require specific video - capabilities or architectures. Note: This feature is in Tech Preview. - Phase: beta - * alignCPUs: Enable KubeVirt to request up to two additional dedicated CPUs in order to complete the total CPU count to an even parity when using emulator thread @@ -5396,7 +5390,6 @@ spec: incrementalBackup: false objectGraph: false persistentReservation: false - videoConfig: true liveMigrationConfig: allowAutoConverge: false allowPostCopy: false @@ -6535,7 +6528,6 @@ spec: incrementalBackup: false objectGraph: false persistentReservation: false - videoConfig: true description: |- featureGates is a map of feature gate flags. Setting a flag to `true` will enable the feature. Setting `false` or removing the feature gate, disables the feature. @@ -6645,11 +6637,7 @@ spec: description: 'Deprecated: this feature gate is ignored.' type: boolean videoConfig: - default: true - description: |- - VideoConfig allows users to configure video device types for their virtual machines. - This can be useful for workloads that require specific video capabilities or architectures. - Note: This feature is in Tech Preview. + description: 'Deprecated: This feature gate is ignored.' type: boolean withHostPassthroughCPU: description: 'Deprecated: This feature gate is ignored' diff --git a/deploy/olm-catalog/community-kubevirt-hyperconverged/1.19.0/manifests/hco00.crd.yaml b/deploy/olm-catalog/community-kubevirt-hyperconverged/1.19.0/manifests/hco00.crd.yaml index 5f61ade348..81c3af0461 100644 --- a/deploy/olm-catalog/community-kubevirt-hyperconverged/1.19.0/manifests/hco00.crd.yaml +++ b/deploy/olm-catalog/community-kubevirt-hyperconverged/1.19.0/manifests/hco00.crd.yaml @@ -2232,12 +2232,6 @@ spec: Developer Preview. Phase: beta - * videoConfig: - VideoConfig allows users to configure video device types for their virtual - machines. This can be useful for workloads that require specific video - capabilities or architectures. Note: This feature is in Tech Preview. - Phase: beta - * alignCPUs: Enable KubeVirt to request up to two additional dedicated CPUs in order to complete the total CPU count to an even parity when using emulator thread @@ -5396,7 +5390,6 @@ spec: incrementalBackup: false objectGraph: false persistentReservation: false - videoConfig: true liveMigrationConfig: allowAutoConverge: false allowPostCopy: false @@ -6535,7 +6528,6 @@ spec: incrementalBackup: false objectGraph: false persistentReservation: false - videoConfig: true description: |- featureGates is a map of feature gate flags. Setting a flag to `true` will enable the feature. Setting `false` or removing the feature gate, disables the feature. @@ -6645,11 +6637,7 @@ spec: description: 'Deprecated: this feature gate is ignored.' type: boolean videoConfig: - default: true - description: |- - VideoConfig allows users to configure video device types for their virtual machines. - This can be useful for workloads that require specific video capabilities or architectures. - Note: This feature is in Tech Preview. + description: 'Deprecated: This feature gate is ignored.' type: boolean withHostPassthroughCPU: description: 'Deprecated: This feature gate is ignored' diff --git a/docs/api-v1.md b/docs/api-v1.md index 74fbc037da..63f8b7416c 100644 --- a/docs/api-v1.md +++ b/docs/api-v1.md @@ -492,7 +492,6 @@ A feature gate may be in the following phases: | Name | Description | Phase | | ---- | ----------- | ----- | | decentralizedLiveMigration | DecentralizedLiveMigration enables the decentralized live migration (cross-cluster migration) feature. This feature allows live migration of VirtualMachineInstances between different clusters. This feature is in Developer Preview. | beta | -| videoConfig | VideoConfig allows users to configure video device types for their virtual machines. This can be useful for workloads that require specific video capabilities or architectures. Note: This feature is in Tech Preview. | beta | | alignCPUs | Enable KubeVirt to request up to two additional dedicated CPUs in order to complete the total CPU count to an even parity when using emulator thread isolation. Note: this feature is in Developer Preview. | alpha | | containerPathVolumes | ContainerPathVolumes enables the use of container paths as volumes in KubeVirt. This allows VMs to access files and directories from the virt-launcher pod's filesystem via virtiofs. | alpha | | declarativeHotplugVolumes | DeclarativeHotplugVolumes enables the use of the declarative volume hotplug feature in KubeVirt. When set to true, the "DeclarativeHotplugVolumes" feature gate is enabled instead of "HotplugVolumes". When set to false or nil, the "HotplugVolumes" feature gate is enabled (default behavior). This feature is in Developer Preview. | alpha | diff --git a/docs/api.md b/docs/api.md index e94885b4ad..9905fcf1df 100644 --- a/docs/api.md +++ b/docs/api.md @@ -37,7 +37,7 @@ HyperConverged is the Schema for the hyperconvergeds API | Field | Description | Scheme | Default | Required | | ----- | ----------- | ------ | ------- | -------- | | metadata | | [metav1.ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.36/#objectmeta-v1-meta) | | false | -| spec | | [HyperConvergedSpec](#hyperconvergedspec) | {"certConfig": {"ca": {"duration": "48h0m0s", "renewBefore": "24h0m0s"}, "server": {"duration": "24h0m0s", "renewBefore": "12h0m0s"}},"featureGates": {"downwardMetrics": false, "deployKubeSecondaryDNS": false, "persistentReservation": false, "enableMultiArchBootImageImport": false, "decentralizedLiveMigration": true, "declarativeHotplugVolumes": false, "videoConfig": true, "objectGraph": false, "incrementalBackup": false, "containerPathVolumes": false}, "liveMigrationConfig": {"completionTimeoutPerGiB": 150, "parallelMigrationsPerCluster": 5, "parallelOutboundMigrationsPerNode": 2, "progressTimeout": 150, "allowAutoConverge": false, "allowPostCopy": false}, "resourceRequirements": {"vmiCPUAllocationRatio": 10}, "uninstallStrategy": "BlockUninstallIfWorkloadsExist", "virtualMachineOptions": {"disableFreePageReporting": false, "disableSerialConsoleLog": false}, "enableApplicationAwareQuota": false, "enableCommonBootImageImport": true, "deployVmConsoleProxy": false} | false | +| spec | | [HyperConvergedSpec](#hyperconvergedspec) | {"certConfig": {"ca": {"duration": "48h0m0s", "renewBefore": "24h0m0s"}, "server": {"duration": "24h0m0s", "renewBefore": "12h0m0s"}},"featureGates": {"downwardMetrics": false, "deployKubeSecondaryDNS": false, "persistentReservation": false, "enableMultiArchBootImageImport": false, "decentralizedLiveMigration": true, "declarativeHotplugVolumes": false, "objectGraph": false, "incrementalBackup": false, "containerPathVolumes": false}, "liveMigrationConfig": {"completionTimeoutPerGiB": 150, "parallelMigrationsPerCluster": 5, "parallelOutboundMigrationsPerNode": 2, "progressTimeout": 150, "allowAutoConverge": false, "allowPostCopy": false}, "resourceRequirements": {"vmiCPUAllocationRatio": 10}, "uninstallStrategy": "BlockUninstallIfWorkloadsExist", "virtualMachineOptions": {"disableFreePageReporting": false, "disableSerialConsoleLog": false}, "enableApplicationAwareQuota": false, "enableCommonBootImageImport": true, "deployVmConsoleProxy": false} | false | | status | | hcov1.HyperConvergedStatus | | false | [Back to TOC](#table-of-contents) @@ -76,7 +76,7 @@ HyperConvergedFeatureGates is a set of optional feature gates to enable or disab | enableMultiArchBootImageImport | EnableMultiArchBootImageImport allows the HCO to run on heterogeneous clusters with different CPU architectures. Setting this field to true will allow the HCO to create Golden Images for different CPU architectures.\n\nThis feature is in Developer Preview. | *bool | false | false | | decentralizedLiveMigration | DecentralizedLiveMigration enables the decentralized live migration (cross-cluster migration) feature. This feature allows live migration of VirtualMachineInstances between different clusters. This feature is in Developer Preview. | *bool | true | false | | declarativeHotplugVolumes | DeclarativeHotplugVolumes enables the use of the declarative volume hotplug feature in KubeVirt. When set to true, the \"DeclarativeHotplugVolumes\" feature gate is enabled instead of \"HotplugVolumes\". When set to false or nil, the \"HotplugVolumes\" feature gate is enabled (default behavior). This feature is in Developer Preview. | *bool | false | false | -| videoConfig | VideoConfig allows users to configure video device types for their virtual machines. This can be useful for workloads that require specific video capabilities or architectures. Note: This feature is in Tech Preview. | *bool | true | false | +| videoConfig | Deprecated: This feature gate is ignored. | *bool | | false | | objectGraph | ObjectGraph enables the ObjectGraph VM and VMI subresource in KubeVirt. This subresource returns a structured list of k8s objects that are related to the specified VM or VMI, enabling better dependency tracking. Note: This feature is in Developer Preview. | *bool | false | false | | incrementalBackup | IncrementalBackup enables changed block tracking backups and incremental backups using QEMU capabilities in KubeVirt. When enabled, this also enables the UtilityVolumes feature gate in the KubeVirt CR. Note: This feature is in Tech Preview. | *bool | false | false | | containerPathVolumes | ContainerPathVolumes enables the use of container paths as volumes in KubeVirt. This allows VMs to access files and directories from the virt-launcher pod's filesystem via virtiofs. | *bool | false | false | @@ -115,7 +115,7 @@ HyperConvergedSpec defines the desired state of HyperConverged | tuningPolicy | TuningPolicy allows to configure the mode in which the RateLimits of kubevirt are set. If TuningPolicy is not present the default kubevirt values are used. It can be set to `annotation` for fine-tuning the kubevirt queryPerSeconds (qps) and burst values. Qps and burst values are taken from the annotation hco.kubevirt.io/tuningPolicy | hcov1.HyperConvergedTuningPolicy | | false | | infra | infra HyperConvergedConfig influences the pod configuration (currently only placement) for all the infra components needed on the virtualization enabled cluster but not necessarily directly on each node running VMs/VMIs. | [HyperConvergedConfig](#hyperconvergedconfig) | | false | | workloads | workloads HyperConvergedConfig influences the pod configuration (currently only placement) of components which need to be running on a node where virtualization workloads should be able to run. Changes to Workloads HyperConvergedConfig can be applied only without existing workload. | [HyperConvergedConfig](#hyperconvergedconfig) | | false | -| featureGates | featureGates is a map of feature gate flags. Setting a flag to `true` will enable the feature. Setting `false` or removing the feature gate, disables the feature. | [HyperConvergedFeatureGates](#hyperconvergedfeaturegates) | {"downwardMetrics": false, "deployKubeSecondaryDNS": false, "persistentReservation": false, "enableMultiArchBootImageImport": false, "decentralizedLiveMigration": true, "declarativeHotplugVolumes": false, "videoConfig": true, "objectGraph": false, "incrementalBackup": false, "containerPathVolumes": false} | false | +| featureGates | featureGates is a map of feature gate flags. Setting a flag to `true` will enable the feature. Setting `false` or removing the feature gate, disables the feature. | [HyperConvergedFeatureGates](#hyperconvergedfeaturegates) | {"downwardMetrics": false, "deployKubeSecondaryDNS": false, "persistentReservation": false, "enableMultiArchBootImageImport": false, "decentralizedLiveMigration": true, "declarativeHotplugVolumes": false, "objectGraph": false, "incrementalBackup": false, "containerPathVolumes": false} | false | | liveMigrationConfig | Live migration limits and timeouts are applied so that migration processes do not overwhelm the cluster. | hcov1.LiveMigrationConfigurations | {"completionTimeoutPerGiB": 150, "parallelMigrationsPerCluster": 5, "parallelOutboundMigrationsPerNode": 2, "progressTimeout": 150, "allowAutoConverge": false, "allowPostCopy": false} | false | | permittedHostDevices | PermittedHostDevices holds information about devices allowed for passthrough | *hcov1.PermittedHostDevices | | false | | mediatedDevicesConfiguration | MediatedDevicesConfiguration holds information about MDEV types to be defined on nodes, if available | *[MediatedDevicesConfiguration](#mediateddevicesconfiguration) | | false | diff --git a/pkg/featuregatedetails/feature-gates.json b/pkg/featuregatedetails/feature-gates.json index 3a8df98338..8deb940b70 100644 --- a/pkg/featuregatedetails/feature-gates.json +++ b/pkg/featuregatedetails/feature-gates.json @@ -4,11 +4,6 @@ "phase": "beta", "description": "DecentralizedLiveMigration enables the decentralized live migration (cross-cluster migration) feature. This feature allows live migration of VirtualMachineInstances between different clusters. This feature is in Developer Preview." }, - { - "name": "videoConfig", - "phase": "beta", - "description": "VideoConfig allows users to configure video device types for their virtual machines. This can be useful for workloads that require specific video capabilities or architectures. Note: This feature is in Tech Preview." - }, { "name": "alignCPUs", "phase": "alpha", diff --git a/pkg/internal/kvfeaturegates/kv-beta-feature-gates.json b/pkg/internal/kvfeaturegates/kv-beta-feature-gates.json index e1bddc1452..2c14a0099f 100644 --- a/pkg/internal/kvfeaturegates/kv-beta-feature-gates.json +++ b/pkg/internal/kvfeaturegates/kv-beta-feature-gates.json @@ -163,10 +163,6 @@ "name": "Snapshot", "state": "Beta" }, - { - "name": "VideoConfig", - "state": "Beta" - }, { "name": "DisableMDEVConfiguration", "state": "Deprecated" diff --git a/tests/func-tests/defaults_test.go b/tests/func-tests/defaults_test.go index bc9526f2bf..88eb88f807 100644 --- a/tests/func-tests/defaults_test.go +++ b/tests/func-tests/defaults_test.go @@ -74,7 +74,6 @@ var _ = Describe("Check Default values", Label("defaults"), Serial, func() { "enableMultiArchBootImageImport": BeFalseBecause("the enableMultiArchBootImageImport feature gate should be disabled by default"), "decentralizedLiveMigration": BeTrueBecause("the decentralizedLiveMigration feature gate should be enabled by default"), "declarativeHotplugVolumes": BeFalseBecause("the declarativeHotplugVolumes feature gate should be disabled by default"), - "videoConfig": BeTrueBecause("the videoConfig feature gate should be enabled by default"), "objectGraph": BeFalseBecause("the objectGraph feature gate should be disabled by default"), "incrementalBackup": BeFalseBecause("the incrementalBackup feature gate should be disabled by default"), "containerPathVolumes": BeFalseBecause("the containerPathVolumes feature gate should be disabled by default"), diff --git a/tools/csv-merger/generated-crd.yaml b/tools/csv-merger/generated-crd.yaml index 5f61ade348..81c3af0461 100644 --- a/tools/csv-merger/generated-crd.yaml +++ b/tools/csv-merger/generated-crd.yaml @@ -2232,12 +2232,6 @@ spec: Developer Preview. Phase: beta - * videoConfig: - VideoConfig allows users to configure video device types for their virtual - machines. This can be useful for workloads that require specific video - capabilities or architectures. Note: This feature is in Tech Preview. - Phase: beta - * alignCPUs: Enable KubeVirt to request up to two additional dedicated CPUs in order to complete the total CPU count to an even parity when using emulator thread @@ -5396,7 +5390,6 @@ spec: incrementalBackup: false objectGraph: false persistentReservation: false - videoConfig: true liveMigrationConfig: allowAutoConverge: false allowPostCopy: false @@ -6535,7 +6528,6 @@ spec: incrementalBackup: false objectGraph: false persistentReservation: false - videoConfig: true description: |- featureGates is a map of feature gate flags. Setting a flag to `true` will enable the feature. Setting `false` or removing the feature gate, disables the feature. @@ -6645,11 +6637,7 @@ spec: description: 'Deprecated: this feature gate is ignored.' type: boolean videoConfig: - default: true - description: |- - VideoConfig allows users to configure video device types for their virtual machines. - This can be useful for workloads that require specific video capabilities or architectures. - Note: This feature is in Tech Preview. + description: 'Deprecated: This feature gate is ignored.' type: boolean withHostPassthroughCPU: description: 'Deprecated: This feature gate is ignored' diff --git a/tools/manifest-templator/generated-crd.yaml b/tools/manifest-templator/generated-crd.yaml index 5f61ade348..81c3af0461 100644 --- a/tools/manifest-templator/generated-crd.yaml +++ b/tools/manifest-templator/generated-crd.yaml @@ -2232,12 +2232,6 @@ spec: Developer Preview. Phase: beta - * videoConfig: - VideoConfig allows users to configure video device types for their virtual - machines. This can be useful for workloads that require specific video - capabilities or architectures. Note: This feature is in Tech Preview. - Phase: beta - * alignCPUs: Enable KubeVirt to request up to two additional dedicated CPUs in order to complete the total CPU count to an even parity when using emulator thread @@ -5396,7 +5390,6 @@ spec: incrementalBackup: false objectGraph: false persistentReservation: false - videoConfig: true liveMigrationConfig: allowAutoConverge: false allowPostCopy: false @@ -6535,7 +6528,6 @@ spec: incrementalBackup: false objectGraph: false persistentReservation: false - videoConfig: true description: |- featureGates is a map of feature gate flags. Setting a flag to `true` will enable the feature. Setting `false` or removing the feature gate, disables the feature. @@ -6645,11 +6637,7 @@ spec: description: 'Deprecated: this feature gate is ignored.' type: boolean videoConfig: - default: true - description: |- - VideoConfig allows users to configure video device types for their virtual machines. - This can be useful for workloads that require specific video capabilities or architectures. - Note: This feature is in Tech Preview. + description: 'Deprecated: This feature gate is ignored.' type: boolean withHostPassthroughCPU: description: 'Deprecated: This feature gate is ignored'