Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add proxy to Tekton Results API server #3002

Closed
wants to merge 1 commit into from

Conversation

xinnjie
Copy link

@xinnjie xinnjie commented Jul 22, 2023

Changes

Add proxy to Tekton Results API server. Make a move on tektoncd/results#82
/kind feature

Test case

get('http://localhost:8000/apis/results.tekton.dev/v1alpha2/parents/default/results') return a results list.

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Docs included if any changes are user facing
  • Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (new features, significant UI changes, API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Add proxy to Tekton Results API server

@tekton-robot tekton-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 22, 2023
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 22, 2023
@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign lyndseybu after the PR has been reviewed.
You can assign the PR to them by writing /assign @lyndseybu in a comment when ready.

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

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

@tekton-robot tekton-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 22, 2023
@tekton-robot
Copy link
Contributor

Hi @xinnjie. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

@AlanGreene
Copy link
Member

AlanGreene commented Jul 24, 2023

Hi @xinnjie, thanks for the PR. However, I think we need a plan / design for how this is going to be used before we start making code changes, otherwise it's not clear if this is the best approach.

Also FYI, the APIs exposed by the Dashboard already support proxying requests to other services in the cluster if needed using the Kube API server proxy.

i.e. using /api/v1/namespaces/tekton-pipelines/services/tekton-results-api-service:http/proxy/

For example, to access the /v1/properties API provided by the Dashboard itself using this mechanism I would make a request to GET /api/v1/namespaces/tekton-pipelines/services/tekton-dashboard:http/proxy/v1/properties

We would just need to configure the correct RBAC to allow these requests, creating a role granting the appropriate verbs for services/proxy, restricting it just to Tekton Results in this case (I assume it would only need access to tekton-results-api-service).

@AlanGreene
Copy link
Member

Closing for now, we can reopen if needed after there's a plan in place.

@AlanGreene AlanGreene closed this Jul 24, 2023
@xinnjie
Copy link
Author

xinnjie commented Jul 24, 2023

@AlanGreene
Thanks for your explanation. The proxy mechanism is great! I should know it earlier.

I'd like to propose a TEP about Results Virtualization in Dashboard. General idea is at tektoncd/results#82 (comment). Shall we have some discussion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants