From 08fb7f4e78b45b2efec761388c9ddd2212bd43e6 Mon Sep 17 00:00:00 2001 From: kubevirt-bot Date: Tue, 12 Mar 2024 22:17:17 +0100 Subject: [PATCH] Add `DownwardMetrics` feature gate (#2837) It adds the `DownwardMetrics` feature gate to HCO. It allows users to disable this feature in KubeVirt. Signed-off-by: Javier Cano Cano Co-authored-by: Javier Cano Cano --- api/v1beta1/hyperconverged_types.go | 4 + api/v1beta1/zz_generated.deepcopy.go | 5 ++ api/v1beta1/zz_generated.openapi.go | 7 ++ .../hco.kubevirt.io_hyperconvergeds.yaml | 4 + controllers/operands/kubevirt.go | 12 ++- controllers/operands/kubevirt_test.go | 75 +++++++++++++++---- deploy/crds/hco00.crd.yaml | 4 + .../1.11.1/manifests/hco00.crd.yaml | 4 + .../1.11.1/manifests/hco00.crd.yaml | 4 + docs/api.md | 1 + docs/cluster-configuration.md | 11 +++ .../api/v1beta1/hyperconverged_types.go | 4 + .../api/v1beta1/zz_generated.deepcopy.go | 5 ++ .../api/v1beta1/zz_generated.openapi.go | 7 ++ 14 files changed, 127 insertions(+), 20 deletions(-) diff --git a/api/v1beta1/hyperconverged_types.go b/api/v1beta1/hyperconverged_types.go index b94451db89..f56f6a0d8d 100644 --- a/api/v1beta1/hyperconverged_types.go +++ b/api/v1beta1/hyperconverged_types.go @@ -375,6 +375,10 @@ type VirtualMachineOptions struct { // by default yet. // +k8s:openapi-gen=true type HyperConvergedFeatureGates struct { + // Allow to expose a limited set of host metrics to guests. + // +optional + DownwardMetrics *bool `json:"downwardMetrics,omitempty"` + // Allow migrating a virtual machine with CPU host-passthrough mode. This should be // enabled only when the Cluster is homogeneous from CPU HW perspective doc here // +optional diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go index e9d95c2dae..2f83e8224c 100644 --- a/api/v1beta1/zz_generated.deepcopy.go +++ b/api/v1beta1/zz_generated.deepcopy.go @@ -237,6 +237,11 @@ func (in *HyperConvergedConfig) DeepCopy() *HyperConvergedConfig { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HyperConvergedFeatureGates) DeepCopyInto(out *HyperConvergedFeatureGates) { *out = *in + if in.DownwardMetrics != nil { + in, out := &in.DownwardMetrics, &out.DownwardMetrics + *out = new(bool) + **out = **in + } if in.WithHostPassthroughCPU != nil { in, out := &in.WithHostPassthroughCPU, &out.WithHostPassthroughCPU *out = new(bool) diff --git a/api/v1beta1/zz_generated.openapi.go b/api/v1beta1/zz_generated.openapi.go index bee2df3871..c9d8e285d8 100644 --- a/api/v1beta1/zz_generated.openapi.go +++ b/api/v1beta1/zz_generated.openapi.go @@ -231,6 +231,13 @@ func schema_kubevirt_hyperconverged_cluster_operator_api_v1beta1_HyperConvergedF Description: "HyperConvergedFeatureGates is a set of optional feature gates to enable or disable new features that are not enabled by default yet.", Type: []string{"object"}, Properties: map[string]spec.Schema{ + "downwardMetrics": { + SchemaProps: spec.SchemaProps{ + Description: "Allow to expose a limited set of host metrics to guests.", + Type: []string{"boolean"}, + Format: "", + }, + }, "withHostPassthroughCPU": { SchemaProps: spec.SchemaProps{ Description: "Allow migrating a virtual machine with CPU host-passthrough mode. This should be enabled only when the Cluster is homogeneous from CPU HW perspective doc here", diff --git a/config/crd/bases/hco.kubevirt.io_hyperconvergeds.yaml b/config/crd/bases/hco.kubevirt.io_hyperconvergeds.yaml index 8a037b4245..9fd98a8a34 100644 --- a/config/crd/bases/hco.kubevirt.io_hyperconvergeds.yaml +++ b/config/crd/bases/hco.kubevirt.io_hyperconvergeds.yaml @@ -1194,6 +1194,10 @@ spec: default: false description: Disable mediated devices handling on KubeVirt type: boolean + downwardMetrics: + description: Allow to expose a limited set of host metrics to + guests. + type: boolean enableApplicationAwareQuota: default: false description: EnableApplicationAwareQuota if true, enables the diff --git a/controllers/operands/kubevirt.go b/controllers/operands/kubevirt.go index 654244794c..a01f766638 100644 --- a/controllers/operands/kubevirt.go +++ b/controllers/operands/kubevirt.go @@ -85,9 +85,6 @@ const ( // Allow assigning host devices to virtual machines kvHostDevicesGate = "HostDevices" - // Add downwardMetrics volume to expose a limited set of host metrics to guests - kvDownwardMetricsGate = "DownwardMetrics" - // Expand disks to the largest size kvExpandDisksGate = "ExpandDisks" @@ -129,7 +126,6 @@ var ( kvExpandDisksGate, kvGPUGate, kvHostDevicesGate, - kvDownwardMetricsGate, kvNUMA, kvVMExportGate, kvDisableCustomSELinuxPolicyGate, @@ -162,6 +158,7 @@ var ( // KubeVirt feature gates that are exposed in HCO API const ( + kvDownwardMetrics = "DownwardMetrics" kvWithHostPassthroughCPU = "WithHostPassthroughCPU" kvRoot = "Root" kvDisableMDevConfig = "DisableMDEVConfiguration" @@ -751,6 +748,10 @@ func hcoConfig2KvConfig(hcoConfig hcov1beta1.HyperConvergedConfig, infrastructur func getFeatureGateChecks(featureGates *hcov1beta1.HyperConvergedFeatureGates) []string { fgs := make([]string, 0, 2) + if featureGates.DownwardMetrics == nil || *featureGates.DownwardMetrics { + fgs = append(fgs, kvDownwardMetrics) + } + if featureGates.WithHostPassthroughCPU != nil && *featureGates.WithHostPassthroughCPU { fgs = append(fgs, kvWithHostPassthroughCPU) } @@ -880,8 +881,11 @@ func getMandatoryKvFeatureGates(isKVMEmulation bool) []string { // get list of feature gates or KV FG list func getKvFeatureGateList(fgs *hcov1beta1.HyperConvergedFeatureGates) []string { checks := getFeatureGateChecks(fgs) + res := make([]string, 0, len(checks)+len(mandatoryKvFeatureGates)+1) + res = append(res, mandatoryKvFeatureGates...) + res = append(res, checks...) return res diff --git a/controllers/operands/kubevirt_test.go b/controllers/operands/kubevirt_test.go index a4514c1bbb..b043d5f1d8 100644 --- a/controllers/operands/kubevirt_test.go +++ b/controllers/operands/kubevirt_test.go @@ -28,6 +28,9 @@ import ( ) var _ = Describe("KubeVirt Operand", func() { + // DownwardMetrics FG is not listed on any of these lists, but it is enabled by default + const enabledByDefaultFeatureGates = 1 + var ( basicNumFgOnOpenshift = len(hardCodeKvFgs) + len(sspConditionKvFgs) ) @@ -217,7 +220,7 @@ Version: 1.2.3`) Expect(foundResource.Namespace).To(Equal(expectedResource.Namespace)) Expect(foundResource.Spec.Configuration.DeveloperConfiguration).ToNot(BeNil()) - Expect(foundResource.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(HaveLen(basicNumFgOnOpenshift + 1)) + Expect(foundResource.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(HaveLen(basicNumFgOnOpenshift + 1 + enabledByDefaultFeatureGates)) Expect(foundResource.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(ContainElements( hardCodeKvFgs, )) @@ -427,7 +430,7 @@ Version: 1.2.3`) foundResource), ).ToNot(HaveOccurred()) Expect(foundResource.Spec.Configuration.DeveloperConfiguration).ToNot(BeNil()) - Expect(foundResource.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(HaveLen(basicNumFgOnOpenshift + 1)) + Expect(foundResource.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(HaveLen(basicNumFgOnOpenshift + 1 + enabledByDefaultFeatureGates)) Expect(foundResource.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(ContainElements( hardCodeKvFgs, )) @@ -1797,10 +1800,49 @@ Version: 1.2.3`) Expect(existingResource.Spec.Configuration.DeveloperConfiguration).ToNot(BeNil()) fgList := getKvFeatureGateList(&hco.Spec.FeatureGates) - Expect(fgList).To(HaveLen(basicNumFgOnOpenshift)) + Expect(fgList).To(HaveLen(basicNumFgOnOpenshift + enabledByDefaultFeatureGates)) Expect(fgList).Should(ContainElements(hardCodeKvFgs)) Expect(fgList).Should(ContainElements(sspConditionKvFgs)) }) + + It("should add the DownwardMetrics if feature gate DownwardMetrics is true in HyperConverged CR", func() { + hco.Spec.FeatureGates = hcov1beta1.HyperConvergedFeatureGates{ + DownwardMetrics: ptr.To(true), + } + + existingResource, err := NewKubeVirt(hco) + Expect(err).ToNot(HaveOccurred()) + By("KV CR should contain the DownwardMetrics feature gate", func() { + Expect(existingResource.Spec.Configuration.DeveloperConfiguration).NotTo(BeNil()) + Expect(existingResource.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(ContainElement(kvDownwardMetrics)) + }) + }) + + It("should add the DownwardMetrics if feature gate DownwardMetrics is not in HyperConverged CR", func() { + hco.Spec.FeatureGates = hcov1beta1.HyperConvergedFeatureGates{ + DownwardMetrics: nil, + } + + existingResource, err := NewKubeVirt(hco) + Expect(err).ToNot(HaveOccurred()) + By("KV CR should contain the DownwardMetrics feature gate", func() { + Expect(existingResource.Spec.Configuration.DeveloperConfiguration).NotTo(BeNil()) + Expect(existingResource.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(ContainElement(kvDownwardMetrics)) + }) + }) + + It("should not add the DownwardMetrics if feature gate DownwardMetrics is set to false in HyperConverged CR", func() { + hco.Spec.FeatureGates = hcov1beta1.HyperConvergedFeatureGates{ + DownwardMetrics: ptr.To(false), + } + + existingResource, err := NewKubeVirt(hco) + Expect(err).ToNot(HaveOccurred()) + By("KV CR should not contain the DownwardMetrics feature gate", func() { + Expect(existingResource.Spec.Configuration.DeveloperConfiguration).NotTo(BeNil()) + Expect(existingResource.Spec.Configuration.DeveloperConfiguration.FeatureGates).ToNot(ContainElement(kvDownwardMetrics)) + }) + }) }) Context("test feature gates in KV handler", func() { @@ -1876,7 +1918,7 @@ Version: 1.2.3`) mandatoryKvFeatureGates = getMandatoryKvFeatureGates(false) Expect(foundResource.Spec.Configuration.DeveloperConfiguration).ToNot(BeNil()) fgList := getKvFeatureGateList(&hco.Spec.FeatureGates) - Expect(fgList).To(HaveLen(basicNumFgOnOpenshift)) + Expect(fgList).To(HaveLen(basicNumFgOnOpenshift + enabledByDefaultFeatureGates)) Expect(fgList).Should(ContainElements(hardCodeKvFgs)) Expect(fgList).Should(ContainElements(sspConditionKvFgs)) }) @@ -1907,7 +1949,7 @@ Version: 1.2.3`) mandatoryKvFeatureGates = getMandatoryKvFeatureGates(false) Expect(foundResource.Spec.Configuration.DeveloperConfiguration).ToNot(BeNil()) fgList := getKvFeatureGateList(&hco.Spec.FeatureGates) - Expect(fgList).To(HaveLen(basicNumFgOnOpenshift)) + Expect(fgList).To(HaveLen(len(getKvFeatureGateList(&hco.Spec.FeatureGates)))) Expect(fgList).Should(ContainElements(hardCodeKvFgs)) Expect(fgList).Should(ContainElements(sspConditionKvFgs)) }) @@ -1915,7 +1957,8 @@ Version: 1.2.3`) It("should keep FG if already exist", func() { mandatoryKvFeatureGates = getMandatoryKvFeatureGates(true) - fgs := append(hardCodeKvFgs, kvWithHostPassthroughCPU) + fgs := getKvFeatureGateList(&hco.Spec.FeatureGates) + fgs = append(fgs, kvWithHostPassthroughCPU) existingResource, err := NewKubeVirt(hco) Expect(err).ToNot(HaveOccurred()) existingResource.Spec.Configuration.DeveloperConfiguration.FeatureGates = fgs @@ -1985,7 +2028,7 @@ Version: 1.2.3`) ).ToNot(HaveOccurred()) Expect(foundResource.Spec.Configuration.DeveloperConfiguration).ToNot(BeNil()) - Expect(foundResource.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(HaveLen(basicNumFgOnOpenshift)) + Expect(foundResource.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(HaveLen(len(getKvFeatureGateList(&hco.Spec.FeatureGates)))) Expect(foundResource.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(ContainElements(hardCodeKvFgs)) Expect(foundResource.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(ContainElements(sspConditionKvFgs)) }) @@ -2022,7 +2065,7 @@ Version: 1.2.3`) ).ToNot(HaveOccurred()) Expect(foundResource.Spec.Configuration.DeveloperConfiguration).ToNot(BeNil()) - Expect(foundResource.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(HaveLen(basicNumFgOnOpenshift)) + Expect(foundResource.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(HaveLen(len(getKvFeatureGateList(&hco.Spec.FeatureGates)))) Expect(foundResource.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(ContainElements(hardCodeKvFgs)) Expect(foundResource.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(ContainElements(sspConditionKvFgs)) }) @@ -2059,7 +2102,7 @@ Version: 1.2.3`) ).ToNot(HaveOccurred()) Expect(foundResource.Spec.Configuration.DeveloperConfiguration).ToNot(BeNil()) - Expect(foundResource.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(HaveLen(len(hardCodeKvFgs))) + Expect(foundResource.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(HaveLen(len(hardCodeKvFgs) + enabledByDefaultFeatureGates)) Expect(foundResource.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(ContainElements(hardCodeKvFgs)) }) }) @@ -2090,37 +2133,37 @@ Version: 1.2.3`) Entry("When not using kvm-emulation and FG is empty", false, &hcov1beta1.HyperConvergedFeatureGates{}, - basicNumFgOnOpenshift, + basicNumFgOnOpenshift+enabledByDefaultFeatureGates, [][]string{hardCodeKvFgs, sspConditionKvFgs}, ), Entry("When using kvm-emulation and FG is empty", true, &hcov1beta1.HyperConvergedFeatureGates{}, - len(hardCodeKvFgs), + len(hardCodeKvFgs)+enabledByDefaultFeatureGates, [][]string{hardCodeKvFgs}, ), Entry("When not using kvm-emulation and all FGs are disabled", false, &hcov1beta1.HyperConvergedFeatureGates{WithHostPassthroughCPU: ptr.To(false)}, - basicNumFgOnOpenshift, + basicNumFgOnOpenshift+enabledByDefaultFeatureGates, [][]string{hardCodeKvFgs, sspConditionKvFgs}, ), Entry("When using kvm-emulation all FGs are disabled", true, &hcov1beta1.HyperConvergedFeatureGates{WithHostPassthroughCPU: ptr.To(false)}, - len(hardCodeKvFgs), + len(hardCodeKvFgs)+enabledByDefaultFeatureGates, [][]string{hardCodeKvFgs}, ), Entry("When not using kvm-emulation and all FGs are enabled", false, &hcov1beta1.HyperConvergedFeatureGates{WithHostPassthroughCPU: ptr.To(true)}, - basicNumFgOnOpenshift+1, + basicNumFgOnOpenshift+1+enabledByDefaultFeatureGates, [][]string{hardCodeKvFgs, sspConditionKvFgs, {kvWithHostPassthroughCPU}}, ), Entry("When using kvm-emulation all FGs are enabled", true, &hcov1beta1.HyperConvergedFeatureGates{WithHostPassthroughCPU: ptr.To(true)}, - len(hardCodeKvFgs)+1, + len(hardCodeKvFgs)+1+enabledByDefaultFeatureGates, [][]string{hardCodeKvFgs, {kvWithHostPassthroughCPU}}, )) }) @@ -3645,7 +3688,7 @@ Version: 1.2.3`) ).ToNot(HaveOccurred()) Expect(kv.Spec.Configuration.DeveloperConfiguration).ToNot(BeNil()) - Expect(kv.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(HaveLen(len(mandatoryKvFeatureGates))) + 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()) diff --git a/deploy/crds/hco00.crd.yaml b/deploy/crds/hco00.crd.yaml index 8a037b4245..9fd98a8a34 100644 --- a/deploy/crds/hco00.crd.yaml +++ b/deploy/crds/hco00.crd.yaml @@ -1194,6 +1194,10 @@ spec: default: false description: Disable mediated devices handling on KubeVirt type: boolean + downwardMetrics: + description: Allow to expose a limited set of host metrics to + guests. + type: boolean enableApplicationAwareQuota: default: false description: EnableApplicationAwareQuota if true, enables the diff --git a/deploy/index-image/community-kubevirt-hyperconverged/1.11.1/manifests/hco00.crd.yaml b/deploy/index-image/community-kubevirt-hyperconverged/1.11.1/manifests/hco00.crd.yaml index 8a037b4245..9fd98a8a34 100644 --- a/deploy/index-image/community-kubevirt-hyperconverged/1.11.1/manifests/hco00.crd.yaml +++ b/deploy/index-image/community-kubevirt-hyperconverged/1.11.1/manifests/hco00.crd.yaml @@ -1194,6 +1194,10 @@ spec: default: false description: Disable mediated devices handling on KubeVirt type: boolean + downwardMetrics: + description: Allow to expose a limited set of host metrics to + guests. + type: boolean enableApplicationAwareQuota: default: false description: EnableApplicationAwareQuota if true, enables the diff --git a/deploy/olm-catalog/community-kubevirt-hyperconverged/1.11.1/manifests/hco00.crd.yaml b/deploy/olm-catalog/community-kubevirt-hyperconverged/1.11.1/manifests/hco00.crd.yaml index 8a037b4245..9fd98a8a34 100644 --- a/deploy/olm-catalog/community-kubevirt-hyperconverged/1.11.1/manifests/hco00.crd.yaml +++ b/deploy/olm-catalog/community-kubevirt-hyperconverged/1.11.1/manifests/hco00.crd.yaml @@ -1194,6 +1194,10 @@ spec: default: false description: Disable mediated devices handling on KubeVirt type: boolean + downwardMetrics: + description: Allow to expose a limited set of host metrics to + guests. + type: boolean enableApplicationAwareQuota: default: false description: EnableApplicationAwareQuota if true, enables the diff --git a/docs/api.md b/docs/api.md index 0fdc83e143..0701dbb8d1 100644 --- a/docs/api.md +++ b/docs/api.md @@ -140,6 +140,7 @@ HyperConvergedFeatureGates is a set of optional feature gates to enable or disab | Field | Description | Scheme | Default | Required | | ----- | ----------- | ------ | -------- |-------- | +| downwardMetrics | Allow to expose a limited set of host metrics to guests. | *bool | | false | | withHostPassthroughCPU | Allow migrating a virtual machine with CPU host-passthrough mode. This should be enabled only when the Cluster is homogeneous from CPU HW perspective doc here | *bool | false | false | | enableCommonBootImageImport | Opt-in to automatic delivery/updates of the common data import cron templates. There are two sources for the data import cron templates: hard coded list of common templates, and custom templates that can be added to the dataImportCronTemplates field. This feature gates only control the common templates. It is possible to use custom templates by adding them to the dataImportCronTemplates field. | *bool | true | false | | deployTektonTaskResources | deploy resources (kubevirt tekton tasks and example pipelines) in SSP operator | *bool | false | false | diff --git a/docs/cluster-configuration.md b/docs/cluster-configuration.md index bf86694e30..39293388a9 100644 --- a/docs/cluster-configuration.md +++ b/docs/cluster-configuration.md @@ -130,6 +130,17 @@ or new features that are not enabled by default. To enable a feature, add its name to the `featureGates` list and set it to `true`. Missing or `false` feature gates disables the feature. +### downwardMetrics Feature Gate +Set the `downwardMetrics` feature gate in order to allow exposing a limited set of VM and host metrics to the guest. +The format is compatible with [vhostmd](https://github.com/vhostmd/vhostmd). +These metrics allow third-parties diagnosing issues. +DownwardMetrics may be exposed to the guest through a `volume` or a `virtio-serial port`. + +By default, if the `downwardMetrics` is not set to `false`, the metrics will be available to the guests. +This means that updates from previous versions will not require any special configuration. + +**Note**: In future versions, the feature gate will be disabled by default. + ### withHostPassthroughCPU Feature Gate Set the `withHostPassthroughCPU` feature gate in order to allow migrating a virtual machine with CPU host-passthrough mode. This can provide slightly better CPU performance, but should be enabled only when the Cluster is homogeneous from diff --git a/tests/vendor/github.com/kubevirt/hyperconverged-cluster-operator/api/v1beta1/hyperconverged_types.go b/tests/vendor/github.com/kubevirt/hyperconverged-cluster-operator/api/v1beta1/hyperconverged_types.go index b94451db89..f56f6a0d8d 100644 --- a/tests/vendor/github.com/kubevirt/hyperconverged-cluster-operator/api/v1beta1/hyperconverged_types.go +++ b/tests/vendor/github.com/kubevirt/hyperconverged-cluster-operator/api/v1beta1/hyperconverged_types.go @@ -375,6 +375,10 @@ type VirtualMachineOptions struct { // by default yet. // +k8s:openapi-gen=true type HyperConvergedFeatureGates struct { + // Allow to expose a limited set of host metrics to guests. + // +optional + DownwardMetrics *bool `json:"downwardMetrics,omitempty"` + // Allow migrating a virtual machine with CPU host-passthrough mode. This should be // enabled only when the Cluster is homogeneous from CPU HW perspective doc here // +optional diff --git a/tests/vendor/github.com/kubevirt/hyperconverged-cluster-operator/api/v1beta1/zz_generated.deepcopy.go b/tests/vendor/github.com/kubevirt/hyperconverged-cluster-operator/api/v1beta1/zz_generated.deepcopy.go index e9d95c2dae..2f83e8224c 100644 --- a/tests/vendor/github.com/kubevirt/hyperconverged-cluster-operator/api/v1beta1/zz_generated.deepcopy.go +++ b/tests/vendor/github.com/kubevirt/hyperconverged-cluster-operator/api/v1beta1/zz_generated.deepcopy.go @@ -237,6 +237,11 @@ func (in *HyperConvergedConfig) DeepCopy() *HyperConvergedConfig { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HyperConvergedFeatureGates) DeepCopyInto(out *HyperConvergedFeatureGates) { *out = *in + if in.DownwardMetrics != nil { + in, out := &in.DownwardMetrics, &out.DownwardMetrics + *out = new(bool) + **out = **in + } if in.WithHostPassthroughCPU != nil { in, out := &in.WithHostPassthroughCPU, &out.WithHostPassthroughCPU *out = new(bool) diff --git a/tests/vendor/github.com/kubevirt/hyperconverged-cluster-operator/api/v1beta1/zz_generated.openapi.go b/tests/vendor/github.com/kubevirt/hyperconverged-cluster-operator/api/v1beta1/zz_generated.openapi.go index bee2df3871..c9d8e285d8 100644 --- a/tests/vendor/github.com/kubevirt/hyperconverged-cluster-operator/api/v1beta1/zz_generated.openapi.go +++ b/tests/vendor/github.com/kubevirt/hyperconverged-cluster-operator/api/v1beta1/zz_generated.openapi.go @@ -231,6 +231,13 @@ func schema_kubevirt_hyperconverged_cluster_operator_api_v1beta1_HyperConvergedF Description: "HyperConvergedFeatureGates is a set of optional feature gates to enable or disable new features that are not enabled by default yet.", Type: []string{"object"}, Properties: map[string]spec.Schema{ + "downwardMetrics": { + SchemaProps: spec.SchemaProps{ + Description: "Allow to expose a limited set of host metrics to guests.", + Type: []string{"boolean"}, + Format: "", + }, + }, "withHostPassthroughCPU": { SchemaProps: spec.SchemaProps{ Description: "Allow migrating a virtual machine with CPU host-passthrough mode. This should be enabled only when the Cluster is homogeneous from CPU HW perspective doc here",