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#15645) which exposes this proxy. This PR must merge AFTER the one in the console codebase

@PeterYurkovich PeterYurkovich changed the title fix: allow tenancy access to metrics tags OCPBUGS-63588: allow tenancy access to metrics tags Oct 28, 2025
@openshift-ci openshift-ci bot requested review from jgbernalp and kyoto October 28, 2025 16:31
@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. labels Oct 28, 2025
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 28, 2025
@openshift-ci-robot
Copy link

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

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.19.z) matches configured target version for branch (4.19.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-63440 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-63440 targets the "4.20.z" version, which is one of the valid target versions: 4.20.0, 4.20.z
  • 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#15645) 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-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Oct 28, 2025
@openshift-ci openshift-ci bot requested a review from etmurasaki October 28, 2025 16:31
@etmurasaki
Copy link
Contributor

/label qe-approved

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

image

@PeterYurkovich
Copy link
Contributor Author

/hold

@PeterYurkovich
Copy link
Contributor Author

/label ux-approved
No UX changes

@PeterYurkovich
Copy link
Contributor Author

Holding for console PR

@openshift-ci openshift-ci bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. ux-approved Signifies that UX has signed off on this PR labels Oct 28, 2025
@jgbernalp
Copy link
Contributor

@PeterYurkovich I believe the console fix was merged: openshift/console#15621 can this be merged now?

@jgbernalp
Copy link
Contributor

/test okd-scos-e2e-aws-ovn

1 similar comment
@jgbernalp
Copy link
Contributor

/test okd-scos-e2e-aws-ovn

@PeterYurkovich
Copy link
Contributor Author

This PR is the one targetted at 4.19, which still has a pending PR in the console (openshift/console#15645). I'll re-ping the console team members with backend review rights

@jgbernalp jgbernalp changed the title OCPBUGS-63588: allow tenancy access to metrics tags OCPBUGS-63588: [release-4.19] allow tenancy access to metrics tags Nov 4, 2025
@jgbernalp
Copy link
Contributor

/lgtm

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

openshift-ci bot commented Nov 6, 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

@PeterYurkovich
Copy link
Contributor Author

/cherry-pick release-4.18

@openshift-cherrypick-robot

@PeterYurkovich: once the present PR merges, I will cherry-pick it on top of release-4.18 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.18

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.

@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 Nov 6, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 6, 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.

@openshift-merge-bot openshift-merge-bot bot merged commit 4684341 into openshift:release-4.19 Nov 6, 2025
7 checks passed
@openshift-ci-robot
Copy link

@PeterYurkovich: Jira Issue OCPBUGS-63588: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-63588 has been moved to the MODIFIED state.

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#15645) 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-cherrypick-robot

@PeterYurkovich: #618 failed to apply on top of branch "release-4.18":

Applying: fix: allow tenancy access to metrics tags
Using index info to reconstruct a base tree...
M	web/src/components/console/graphs/helpers.ts
A	web/src/components/metrics/promql-expression-input.tsx
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): web/src/components/metrics/promql-expression-input.tsx deleted in HEAD and modified in fix: allow tenancy access to metrics tags. Version fix: allow tenancy access to metrics tags of web/src/components/metrics/promql-expression-input.tsx left in tree.
Auto-merging web/src/components/console/graphs/helpers.ts
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: allow tenancy access to metrics tags

In response to this:

/cherry-pick release-4.18

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants