Skip to content

MON-4569: Add ResourceStateMetrics feature-gate#2841

Open
rexagod wants to merge 1 commit into
openshift:masterfrom
rexagod:MON-4569
Open

MON-4569: Add ResourceStateMetrics feature-gate#2841
rexagod wants to merge 1 commit into
openshift:masterfrom
rexagod:MON-4569

Conversation

@rexagod
Copy link
Copy Markdown
Member

@rexagod rexagod commented May 11, 2026

Enables Resource State Metrics in TP only. This feature-gate will be used in cluster-monitoring-operator to deploy this component in TP clusters as opposed to the current OpenShift State Metrics component.

Enables Resource State Metrics in TP only. This feature-gate will be
used in cluster-monitoring-operator to deploy this component in TP
clusters as opposed to the current OpenShift State Metrics component.

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 11, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 11, 2026

@rexagod: This pull request references MON-4569 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Enables Resource State Metrics in TP only. This feature-gate will be used in cluster-monitoring-operator to deploy this component in TP clusters as opposed to the current OpenShift State Metrics component.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 11, 2026

Hello @rexagod! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 64f4af40-09c2-47e7-b3c3-88c2ea435646

📥 Commits

Reviewing files that changed from the base of the PR and between 49ae21b and 4b19930.

📒 Files selected for processing (10)
  • features.md
  • features/features.go
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-Default.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-DevPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-OKD.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-TechPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-Default.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-DevPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-OKD.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-TechPreviewNoUpgrade.yaml

📝 Walkthrough

Walkthrough

This pull request introduces a new feature gate named ResourceStateMetrics across the codebase. The feature gate is defined in the Go feature registry with kubernetes scope and configured to be enabled via inTechPreviewNoUpgrade() and inDevPreviewNoUpgrade(). The documentation in features.md is updated to reflect this new gate. Multiple feature gate manifest files are updated to configure ResourceStateMetrics as disabled in default and OKD deployments, and enabled in DevPreviewNoUpgrade and TechPreviewNoUpgrade variants across both Hypershift and SelfManagedHA deployment types.

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately summarizes the main change: adding a new ResourceStateMetrics feature-gate to the codebase.
Description check ✅ Passed The description is directly related to the changeset, explaining the purpose and intended use of the ResourceStateMetrics feature-gate being added.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed No Ginkgo tests are added or modified in this PR. It only adds a feature gate and updates configuration YAML files.
Test Structure And Quality ✅ Passed This PR does not contain Ginkgo test code. It adds a feature-gate by modifying documentation, Go source code, and YAML manifests. The custom check for Ginkgo test structure is not applicable.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests added. PR only adds feature gate configuration in Go and YAML manifests. Check not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR adds a feature gate definition (ResourceStateMetrics) to the OpenShift API but does not introduce any new Ginkgo e2e tests. The check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR only adds a feature gate definition. No deployment manifests, operator code, controllers, or pod scheduling constraints are modified. Check not applicable.
Ote Binary Stdout Contract ✅ Passed PR contains only feature-gate declarations and configuration manifest updates. No changes to test binaries, main() functions, suite setup code, or any stdout-writing operations detected.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR does not add any new Ginkgo e2e tests. It only adds a new feature gate (ResourceStateMetrics) through Go code registration and YAML manifest configurations. The custom check is not applicable.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.1)

Error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented
The command is terminated due to an error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented


Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 11, 2026
@openshift-ci openshift-ci Bot requested review from JoelSpeed and everettraven May 11, 2026 14:13
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 11, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign joelspeed for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@rexagod
Copy link
Copy Markdown
Member Author

rexagod commented May 12, 2026

/test verify-client-go

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 12, 2026

@rexagod: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@JoelSpeed
Copy link
Copy Markdown
Contributor

@rexagod What is the upstream status of this feature gate?

How much downstream work is there for this?

Which upstream components change behaviour when this gate is enabled?

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

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants