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

[TEP-0110] Add an Endpoint for Fetching a Raw Tekton Resource YAML File #539

Merged
merged 1 commit into from
Jun 29, 2022

Conversation

austinzhao-go
Copy link
Contributor

@austinzhao-go austinzhao-go commented Jun 14, 2022

Changes

/kind feature

The related TEP:
TEP-0110: Decouple Catalog Organization and Resource Reference

Add an Endpoint for Fetching a Tekton Resource YAML File as:
domain/v1/resource{catalog}/{kind}/{name}/{version}/raw

This change will support a user to directly apply the served yaml file to a cluster, like:
kubectl apply -f https://hub.tekton.dev/tekton/task/buildpacks/0.4/raw

TODO

  • Update endpoint as (from WG discussion) to fetch the yaml file:
    domain/v1/resource/tekton/task/git-clone/0.5/raw

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

@tekton-robot tekton-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jun 14, 2022
@austinzhao-go
Copy link
Contributor Author

/assign @jerop

@tekton-robot tekton-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 14, 2022
@jerop
Copy link
Member

jerop commented Jun 14, 2022

cc @vinamra28

@austinzhao-go
Copy link
Contributor Author

austinzhao-go commented Jun 14, 2022

/assign @vinamra28

Hi Vinamra, several points in mind.. just correct me:

located the endpoint under the service resource as the required func is mainly about fetching a resource as a yaml type/file

  • concerns could be a similar endpoint under service resource as /v1/resource/{catalog}/{kind}/{name}/{version} - will bring more clarity by using a meaningful name for the added new endpoint, like GetYamlByCatalogKindNameVersion
  • think should no need for a total new service to hold this single endpoint, so locate under resources service

original TEP didn't mention /v1 for the endpoint, but think we still will add it under /v1 right?
https://github.com/tektoncd/community/blob/main/teps/0110-decouple-catalog-organization-and-reference.md?plain=1#L97

a yaml file will be required for the return vals. use a String as return type at this moment, thinking perhaps this wouldn't work and some formatting logic I need to add right? like converting the string (or []bytes) in to a formatted yaml file
https://github.com/tektoncd/hub/pull/539/files#diff-c4d0b062b173e10b3db33cda7b6ce769629171670e7cbaf86bb5265693abe0e2R303

@austinzhao-go
Copy link
Contributor Author

/retest

@austinzhao-go austinzhao-go changed the title Add an Endpoint for Fetching a Tekton Resource YAML File [TEP-0110] Add an Endpoint for Fetching a Tekton Resource YAML File Jun 16, 2022
@vinamra28
Copy link
Member

/unassign

@austinzhao-go
Copy link
Contributor Author

cc @ywluogg

@tekton-robot tekton-robot requested review from jerop, piyush-garg and a team June 16, 2022 18:04
@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 23, 2022
api/v1/design/resource.go Outdated Show resolved Hide resolved
api/v1/service/resource/resource.go Show resolved Hide resolved
api/v1/service/resource/resource.go Outdated Show resolved Hide resolved
@austinzhao-go austinzhao-go changed the title [TEP-0110] Add an Endpoint for Fetching a Tekton Resource YAML File [TEP-0110] Add an Endpoint for Fetching a Raw Tekton Resource YAML File Jun 23, 2022
As for decoupling the catalog organization and tekton resource references, a new endpoint
is added to offer a resource request url only related to {catalog}, {kind}, {resourceName},
{resourceVersion} which can be directly applied with kubectl apply -f domain/v1/{catalog}/{kind}
/{name}/{version}/raw.
Copy link
Member

@vinamra28 vinamra28 left a comment

Choose a reason for hiding this comment

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

PR looks good. Thanks @austinzhao-go 🙂
/cc @PuneetPunamiya @piyush-garg
/meow

@tekton-robot
Copy link

@vinamra28: cat image

In response to this:

PR looks good. Thanks @austinzhao-go 🙂
/cc @PuneetPunamiya @piyush-garg
/meow

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.

@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester, vinamra28

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 [vdemeester,vinamra28]

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

Copy link
Member

@jerop jerop left a comment

Choose a reason for hiding this comment

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

thank you @austinzhao-go!

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 29, 2022
@tekton-robot tekton-robot merged commit 6c2bde2 into tektoncd:main Jun 29, 2022
@jerop jerop changed the title [TEP-0110] Add an Endpoint for Fetching a Raw Tekton Resource YAML File TEP-0110: Add an Endpoint for Fetching a Raw Tekton Resource YAML File Jun 29, 2022
@austinzhao-go austinzhao-go changed the title TEP-0110: Add an Endpoint for Fetching a Raw Tekton Resource YAML File [TEP-0110] Add an Endpoint for Fetching a Raw Tekton Resource YAML File Jul 8, 2022
QuanZhang-William added a commit to QuanZhang-William/catalog that referenced this pull request Jul 15, 2022
…on Catalog

Prior to this change, the installation instructions directly uses the resource urls in the Catalog repo, which results in tight coupling between the organization and how users fetch resources (as described in TEP-0110). This commit updates the installation guide to install Tekton Catalog resources via Tekton Hub by leverage the new Hub Api[tektoncd/hub#539].

This change decouples the Tekton Catalog organization from resouces resolution, which enables Tekton Catalog reorganization.
QuanZhang-William added a commit to QuanZhang-William/catalog that referenced this pull request Jul 15, 2022
Prior to this change, the installation instructions directly use the resource urls in the Catalog repo, which results in tight coupling between the organization and how users fetch resources (as described in TEP-0110). This commit updates the installation guide to install Tekton Catalog resources via Tekton Hub Api: tektoncd/hub#539

This change decouples the Tekton Catalog organization from resouces resolution, which enables Tekton Catalog reorganization.
QuanZhang-William added a commit to QuanZhang-William/catalog that referenced this pull request Jul 15, 2022
Prior to this change, the installation instructions directly use the resource urls in the Catalog repo, which results in tight coupling between the organization and how users fetch resources (as described in TEP-0110). This commit updates the installation guide to install Tekton Catalog resources via Tekton Hub Api: tektoncd/hub#539

This change decouples the Tekton Catalog organization from resouces resolution, which enables Tekton Catalog reorganization.
QuanZhang-William added a commit to QuanZhang-William/catalog that referenced this pull request Jul 15, 2022
Prior to this change, the installation instructions directly use the resource urls in the Catalog repo, which results in tight coupling between the organization and how users fetch resources (as described in TEP-0110). This commit updates the installation guide to install Tekton Catalog resources via Tekton Hub Api: tektoncd/hub#539

This change decouples the Tekton Catalog organization from resouces resolution, which enables Tekton Catalog reorganization.
QuanZhang-William added a commit to QuanZhang-William/catalog that referenced this pull request Jul 15, 2022
Prior to this change, the installation instructions directly use the resource urls in the Catalog repo, which results in tight coupling between the organization and how users fetch resources (as described in TEP-0110). This commit updates the installation guide to install Tekton Catalog resources via Tekton Hub Api: tektoncd/hub#539

This change decouples the Tekton Catalog organization from resouces resolution, which enables Tekton Catalog reorganization.
QuanZhang-William added a commit to QuanZhang-William/catalog that referenced this pull request Aug 16, 2022
Prior to this change, the installation instructions directly use the resource urls in the Catalog repo, which results in tight coupling between the organization and how users fetch resources (as described in TEP-0110). This commit updates the installation guide to install Tekton Catalog resources via Tekton Hub Api: tektoncd/hub#539

This change decouples the Tekton Catalog organization from resouces resolution, which enables Tekton Catalog reorganization.
tekton-robot pushed a commit to tektoncd/catalog that referenced this pull request Aug 16, 2022
Prior to this change, the installation instructions directly use the resource urls in the Catalog repo, which results in tight coupling between the organization and how users fetch resources (as described in TEP-0110). This commit updates the installation guide to install Tekton Catalog resources via Tekton Hub Api: tektoncd/hub#539

This change decouples the Tekton Catalog organization from resouces resolution, which enables Tekton Catalog reorganization.
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants