Skip to content

Conversation

@PeterYurkovich
Copy link
Contributor

This PR looks to fix an issue which caused the prometheus /labels endpoint to always go through the non-tenancy API path. This change is needed to allow non-admin users to use the autocomplete functionality in the observe/metrics pages. The thanos-querier service (link) already provides support for this functionality, we are just looking to expose a way for the console users to access this existing endpoint.

      * Port 9092 provides access to the `/api/v1/query`, `/api/v1/query_range/`, `/api/v1/labels`, `/api/v1/label/*/values`, and `/api/v1/series` endpoints restricted to a given project. Granting access requires binding a user to the `view` cluster role in the project.

This PR is being made in conjunction with a second one in the console (openshift/console#15632) which exposes this proxy. This PR must merge AFTER the one in the console codebase

@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Oct 23, 2025
@openshift-ci-robot
Copy link

@PeterYurkovich: This pull request references Jira Issue OCPBUGS-63440, which is valid.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.20.z) matches configured target version for branch (4.20.z)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-63429 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-63429 targets the "4.21.0" version, which is one of the valid target versions: 4.21.0
  • bug has dependents

Requesting review from QA contact:
/cc @etmurasaki

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

This PR looks to fix an issue which caused the prometheus /labels endpoint to always go through the non-tenancy API path. This change is needed to allow non-admin users to use the autocomplete functionality in the observe/metrics pages. The thanos-querier service (link) already provides support for this functionality, we are just looking to expose a way for the console users to access this existing endpoint.

     * Port 9092 provides access to the `/api/v1/query`, `/api/v1/query_range/`, `/api/v1/labels`, `/api/v1/label/*/values`, and `/api/v1/series` endpoints restricted to a given project. Granting access requires binding a user to the `view` cluster role in the project.

This PR is being made in conjunction with a second one in the console (openshift/console#15632) which exposes this proxy. This PR must merge AFTER the one in the console codebase

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 23, 2025
@jgbernalp
Copy link
Contributor

/label ux-approved

@openshift-ci openshift-ci bot added the ux-approved Signifies that UX has signed off on this PR label Oct 24, 2025
@jgbernalp
Copy link
Contributor

/lgtm

@jgbernalp
Copy link
Contributor

/hold until openshift/console#15632 is merged

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 24, 2025
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 24, 2025
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 24, 2025
@etmurasaki
Copy link
Contributor

etmurasaki commented Oct 24, 2025

/label qe-approved
tested successfully with user1 as admin role for specific namespace and no error found on metrics page, similarly for kubeadmin user.

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Oct 24, 2025
@openshift-ci-robot openshift-ci-robot added jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. and removed jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Oct 24, 2025
@openshift-ci-robot
Copy link

@PeterYurkovich: This pull request references Jira Issue OCPBUGS-63440, which is invalid:

  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is Verified instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

This PR looks to fix an issue which caused the prometheus /labels endpoint to always go through the non-tenancy API path. This change is needed to allow non-admin users to use the autocomplete functionality in the observe/metrics pages. The thanos-querier service (link) already provides support for this functionality, we are just looking to expose a way for the console users to access this existing endpoint.

     * Port 9092 provides access to the `/api/v1/query`, `/api/v1/query_range/`, `/api/v1/labels`, `/api/v1/label/*/values`, and `/api/v1/series` endpoints restricted to a given project. Granting access requires binding a user to the `view` cluster role in the project.

This PR is being made in conjunction with a second one in the console (openshift/console#15632) which exposes this proxy. This PR must merge AFTER the one in the console codebase

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.

@etmurasaki
Copy link
Contributor

/verified by @etmurasaki

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Oct 24, 2025
@openshift-ci-robot
Copy link

@etmurasaki: This PR has been marked as verified by @etmurasaki.

In response to this:

/verified by @etmurasaki

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.

@etmurasaki
Copy link
Contributor

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Oct 24, 2025
@openshift-ci-robot
Copy link

@etmurasaki: This pull request references Jira Issue OCPBUGS-63440, which is valid.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.20.z) matches configured target version for branch (4.20.z)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-63429 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-63429 targets the "4.21.0" version, which is one of the valid target versions: 4.21.0
  • bug has dependents

Requesting review from QA contact:
/cc @etmurasaki

In response to this:

/jira refresh

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.

@etmurasaki
Copy link
Contributor

/remove label qe-approved

@etmurasaki
Copy link
Contributor

/remove-label qe-approved

@openshift-ci openshift-ci bot removed the qe-approved Signifies that QE has signed off on this PR label Oct 24, 2025
@etmurasaki
Copy link
Contributor

/label qe-approved

@PeterYurkovich
Copy link
Contributor Author

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 25, 2025
@jgbernalp
Copy link
Contributor

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 27, 2025

@PeterYurkovich: all tests passed!

Full PR test history. Your PR dashboard.

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.

@jgbernalp
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 27, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 27, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jgbernalp, PeterYurkovich

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [PeterYurkovich,jgbernalp]

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 c6a042a into openshift:release-4.20 Oct 27, 2025
8 checks passed
@openshift-ci-robot
Copy link

@PeterYurkovich: Jira Issue Verification Checks: Jira Issue OCPBUGS-63440
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-63440 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

In response to this:

This PR looks to fix an issue which caused the prometheus /labels endpoint to always go through the non-tenancy API path. This change is needed to allow non-admin users to use the autocomplete functionality in the observe/metrics pages. The thanos-querier service (link) already provides support for this functionality, we are just looking to expose a way for the console users to access this existing endpoint.

     * Port 9092 provides access to the `/api/v1/query`, `/api/v1/query_range/`, `/api/v1/labels`, `/api/v1/label/*/values`, and `/api/v1/series` endpoints restricted to a given project. Granting access requires binding a user to the `view` cluster role in the project.

This PR is being made in conjunction with a second one in the console (openshift/console#15632) which exposes this proxy. This PR must merge AFTER the one in the console codebase

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.

@PeterYurkovich
Copy link
Contributor Author

/cherry-pick release-4.19

@openshift-cherrypick-robot

@PeterYurkovich: #617 failed to apply on top of branch "release-4.19":

Applying: fix: use tenancy path for metrics labels selection
Using index info to reconstruct a base tree...
M	web/src/components/metrics/promql-expression-input.tsx
Falling back to patching base and 3-way merge...
Auto-merging web/src/components/metrics/promql-expression-input.tsx
CONFLICT (content): Merge conflict in web/src/components/metrics/promql-expression-input.tsx
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 fix: use tenancy path for metrics labels selection

In response to this:

/cherry-pick release-4.19

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR ux-approved Signifies that UX has signed off on this PR verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants