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-0079: Tekton Catalog Support Tiers [Catalog Annotations] #613

Merged
merged 1 commit into from
Feb 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 34 additions & 4 deletions teps/0079-tekton-catalog-support-tiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ authors:
- '@jerop'
- '@vdemeester'
- '@vinamra28'
- '@chmouel'
Copy link
Member Author

Choose a reason for hiding this comment

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

@chmouel added you as a co-author in this TEP - please let me know if you'd prefer not to be added 😀

Copy link
Member

Choose a reason for hiding this comment

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

SGTM :)

/lgtm

see-also:
- TEP-0003
- TEP-0060
Expand Down Expand Up @@ -351,21 +352,50 @@ it may be difficult to identify which Tekton Catalog it came from
because they won't have the labels added by the CLI.

To make it easy for users to identify the source Catalog, we propose
adding a `tekton.dev/catalog` annotation to the resource yaml file,
as such:
adding two annotations:
* `tekton.dev/catalog` with the three part domain unique identifier
* `tekton.dev/catalog-url` with the repository path of the Catalog

```yaml
# resource from the community catalog
annotations:
tekton.dev/pipelines.minVersion: "0.17.0"
tekton.dev/tags: golang-lint
tekton.dev/catalog: community
tekton.dev/catalog: dev.tekton.catalog-community
tekton.dev/catalog-url: https://github.com/tektoncd/catalog

# resource from the official catalog
annotations:
tekton.dev/pipelines.minVersion: "0.30.0"
tekton.dev/tags: golang-fuzz
tekton.dev/catalog: official
tekton.dev/catalog: dev.tekton.catalog-official
tekton.dev/catalog-url: https://github.com/tektoncd/catalog-official
```

The rationale for adding the three dot domain is:
* URL can change and resource can be moved elsewhere - if we want to know the
provenance of a Catalog resource, the URL is not something we can rely on.
* Domain identifier allow us to easily know which provider is providing a given
Catalog. A company may want to introduce their own Catalogs for their users and
having a domain id make sure there would be no conflicts with official resources.
* Tools can always rely on the domain id to remain the same.

Example usage of the annotations in Catalogs belonging to organizations:

```yaml
# resource from the openshift catalog
annotations:
tekton.dev/pipelines.minVersion: "0.17.0"
tekton.dev/tags: openshift-build
tekton.dev/catalog: com.redhat.openshift
tekton.dev/catalog-url: https://github.com/openshift/catalog

# resource from the gke catalog
annotations:
tekton.dev/pipelines.minVersion: "0.30.0"
tekton.dev/tags: gke-build
tekton.dev/catalog: com.google.gke
tekton.dev/catalog-url: https://github.com/gke/catalog
```

#### Community and Official Catalogs in Tekton Bundles
Expand Down