Skip to content

feat: add feature status generator from metadata.yaml - #271

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift-virtualization:mainfrom
tiraboschi:feature_table
Aug 20, 2026
Merged

feat: add feature status generator from metadata.yaml#271
openshift-merge-bot[bot] merged 1 commit into
openshift-virtualization:mainfrom
tiraboschi:feature_table

Conversation

@tiraboschi

@tiraboschi tiraboschi commented Jul 27, 2026

Copy link
Copy Markdown
Member

Structured approach to the feature maturity table proposed in #251

Instead of a manually-maintained table, features are declared in metadata.yaml alongside assets. Shared derivation logic in pkg/assets builds the catalog for both the generator and the debug server:

  • docs/generated/feature-status.json: structured data for CI/tests
  • README.md: markdown table injected between sentinel comments
  • /debug/features: live feature catalog on the debug server

Key design decisions:

  • Coverage validation: every asset must be covered by a feature entry or explicitly listed in excluded_assets, preventing silent gaps.
  • Soft dependencies: features can declare a requires field listing operators that must be installed for the feature to activate.
  • Framework maturity: tracked separately (currently TP) and rendered as a note above the feature table; will be removed at GA.
  • Maturity auto-derivation: install:always assets without explicit maturity are classified as GA; opt-in features need dp or tp.
  • Opt-in reporting: only user-facing conditions (annotations, feature gates, HCO prerequisites) appear in generated output; internal gates such as topology, hardware detection, and image availability are omitted.

See: #142

@github-actions

Copy link
Copy Markdown
Contributor

Generated Files Verification Failed

One or more generated files in this PR are out of sync:

  • CRDs: Run make update-crds if CRD verification failed
  • RBAC: Run make generate-rbac if RBAC verification failed

Please regenerate the files locally and commit the changes.

@github-actions

Copy link
Copy Markdown
Contributor

Generated Files Verification Failed

One or more generated files in this PR are out of sync:

  • CRDs: Run make update-crds if CRD verification failed
  • RBAC: Run make generate-rbac if RBAC verification failed

Please regenerate the files locally and commit the changes.

# - fence-agents-operator (operators/fence-agents.yaml.tpl)
# - usb-passthrough (machine-config/05-usb-passthrough.yaml.tpl)

# Framework-level maturity. Remove opt_in once the autopilot graduates to GA.

@rlobillo rlobillo Jul 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment implies that when the framework graduates to GA, the opt_in annotation will be removed — but it's not clear what that means in practice for existing clusters. Two possible paths: (1) HCO adds the annotation automatically on upgrade, or (2) the autopilot stops requiring it altogether. Both would silently activate autopilot on existing clusters during an upgrade, potentially triggering MachineConfig rollouts without admin consent.

I'd suggest that platform.kubevirt.io/autopilot=true should be added by default only on new installations, not injected automatically on upgrades. Could you clarify the intended upgrade path when the framework reaches GA?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for raising this.

Intended GA behavior: at GA, we will drop the framework activation gate (path 2). The autopilot is on by default without platform.kubevirt.io/autopilot=true (honoring just platform.kubevirt.io/autopilot=false to completely disable it). HCO will not inject that annotation on upgrade nor the autopilot will touch the HCO CR. This matches the opt-out plan already in ARCHITECTURE.md.

fresh install only? That splits one product into two behaviors simply according to when you deployed it for the first time, doubles test/doc burden... on my opinion is an anti-pattern and we should try to avoid it if not really justified.

MachineConfig concern: only GA features become unconditional at framework GA; DP/TP features keep their own opt-ins. Admins can still opt out per resource (mode: unmanaged, disabled-resources, feature annotations). More than that, framework GA is tied to a minor (or major, e.g. 5.0) release, not a patch one. Admins already expect relevant change at that cadence (node configs refresh, virt-launcher rolls, etc). MachineConfig delivery on that boundary is consistent with that expectation, not a surprise patch-level side effect.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on avoiding fresh install differentiation
MC - I worry mostly about potential troubles when user defined their own conflicting MCs already. I agree we should try to push on it and deliver ours out of the box though...so don't know if we have anything better than a big fat warning in docs.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Machine Config Operator (MCO) is expected to merge all machine configs into a single rendered configuration before applying it. While unexpected conflicts can still occur, sticking to what we've previously documented in product docs or KB articles keeps the risk lower (though never zero). The MCO also uses a rolling update strategy, so it won't move to the next node if the first one fails to come back up.
Ultimately, the risk isn't substantially higher than asking customers to trust and apply a published snippet from our documentation.

Comment thread assets/active/metadata.yaml Outdated
Comment thread assets/active/metadata.yaml
Comment thread assets/active/metadata.yaml
@tiraboschi

Copy link
Copy Markdown
Member Author

waiting for a broader agreement
/hold

@fabiand

fabiand commented Aug 14, 2026

Copy link
Copy Markdown

this is dope.

this is a pattern which ... we need in other places as well.

@tiraboschi

Copy link
Copy Markdown
Member Author

/unhold

value: "true"
- type: hardware-detection
detector: pciDevicesPresent
- type: annotation

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was it missing? does it belong to this PR?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was not gated although not ready to be named GA, and this PR made it visible which is exactly its goal. So let's also gate it.

# - fence-agents-operator (operators/fence-agents.yaml.tpl)
# - usb-passthrough (machine-config/05-usb-passthrough.yaml.tpl)

# Framework-level maturity. Remove opt_in once the autopilot graduates to GA.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on avoiding fresh install differentiation
MC - I worry mostly about potential troubles when user defined their own conflicting MCs already. I agree we should try to push on it and deliver ours out of the box though...so don't know if we have anything better than a big fat warning in docs.

Comment thread assets/active/metadata.yaml Outdated
requires:
- Cluster Observability Operator

- name: Metrics Exporter

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

separately - I was wondering if we shoulndt' rename to kubevirt-metrics-exporter to be aligned with the project name and also with the "KME" we used in the metrics' names

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, let's keep it for a follow-up PR

Comment thread assets/active/metadata.yaml Outdated
Comment thread assets/active/metadata.yaml Outdated
@github-actions

Copy link
Copy Markdown
Contributor

Generated Files Verification Failed

One or more generated files in this PR are out of sync:

  • CRDs: Run make update-crds if CRD verification failed
  • RBAC: Run make generate-rbac if RBAC verification failed

Please regenerate the files locally and commit the changes.

@tiraboschi
tiraboschi force-pushed the feature_table branch 2 times, most recently from aa6956c to aeb527a Compare August 19, 2026 16:53
Structured approach to the feature maturity table proposed in
openshift-virtualization#251

Instead of a manually-maintained table, features are declared in
metadata.yaml alongside assets. Shared derivation logic in pkg/assets
builds the catalog for both the generator and the debug server:

- docs/generated/feature-status.json: structured data for CI/tests
- README.md: markdown table injected between sentinel comments
- /debug/features: live feature catalog on the debug server

Key design decisions:
- Coverage validation: every asset must be covered by a feature entry
  or explicitly listed in excluded_assets, preventing silent gaps.
- Soft dependencies: features can declare a requires field listing
  operators that must be installed for the feature to activate.
- Framework maturity: tracked separately (currently TP) and rendered
  as a note above the feature table; will be removed at GA.
- Maturity auto-derivation: install:always assets without explicit
  maturity are classified as GA; opt-in features need dp or tp.
- Opt-in reporting: only user-facing conditions (annotations, feature
  gates, HCO prerequisites) appear in generated output; internal gates
  such as topology, hardware detection, and image availability are
  omitted.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
@michalskrivanek

Copy link
Copy Markdown
Contributor

/lgtm

@tiraboschi

Copy link
Copy Markdown
Member Author

/approve

@openshift-ci

openshift-ci Bot commented Aug 20, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tiraboschi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot
openshift-merge-bot Bot merged commit 91abec0 into openshift-virtualization:main Aug 20, 2026
7 of 8 checks passed
@tiraboschi
tiraboschi deleted the feature_table branch August 20, 2026 08:40
@tiraboschi

Copy link
Copy Markdown
Member Author

/cherry-pick release-4.22

@openshift-cherrypick-robot

Copy link
Copy Markdown

@tiraboschi: new pull request created: #325

Details

In response to this:

/cherry-pick release-4.22

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants