Skip to content

Commit

Permalink
Enable DownwardMetrics FeatureGate (#1503)
Browse files Browse the repository at this point in the history
github.com/kubevirt/kubevirt/pull/5502
introduced a new Kubevirt feature named
downwardMetrics to expose host metrics
to guests.
The feature is controlled by a feature
gate named "DownwardMetrics".
Enable it in the list of HCO
opinionated feature gates.

Fixes: https://bugzilla.redhat.com/1991691

Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>

Co-authored-by: Simone Tiraboschi <stirabos@redhat.com>
  • Loading branch information
kubevirt-bot and tiraboschi committed Aug 27, 2021
1 parent 7617a6e commit 9eecc40
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ var _ = Describe("HyperconvergedController", func() {
Expect(kvList.Items).Should(HaveLen(1))
kv := kvList.Items[0]
Expect(kv.Spec.Configuration.DeveloperConfiguration).ToNot(BeNil())
Expect(kv.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(HaveLen(12))
Expect(kv.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(HaveLen(13))

Expect(kv.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(ContainElements(
"DataVolumes",
Expand All @@ -185,7 +185,9 @@ var _ = Describe("HyperconvergedController", func() {
"GPU",
"HostDevices",
"WithHostModelCPU",
"HypervStrictCheck"),
"HypervStrictCheck",
"DownwardMetrics",
),
)
Expect(kv.Spec.Configuration.DeveloperConfiguration.FeatureGates).To(ContainElement("WithHostPassthroughCPU"))
})
Expand Down
4 changes: 4 additions & 0 deletions pkg/controller/operands/kubevirt.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ 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"
)

var (
Expand All @@ -95,6 +98,7 @@ var (
kvHotplugVolumesGate,
kvGPUGate,
kvHostDevicesGate,
kvDownwardMetricsGate,
}

// holds a list of mandatory KubeVirt feature gates. Some of them are the hard coded feature gates and some of
Expand Down

0 comments on commit 9eecc40

Please sign in to comment.