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 tkn to catalog. #155

Merged
merged 1 commit into from
Dec 4, 2019
Merged
Show file tree
Hide file tree
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
19 changes: 19 additions & 0 deletions tkn/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# tkn

This task performs operations on Tekton resources using
[`tkn`](https://github.com/tektoncd/cli).

## Install the Task

```
kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/master/tkn/tkn.yaml
```

## Inputs

### Parameters

name | description | default
Copy link
Member

Choose a reason for hiding this comment

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

Should we do the same for the rest ? (We need templates and a small script like ./create-task that would create the folder and put some skeleton in there)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes! See #7, which proposes generating READMEs from the underlying Task definition.

We actually have an outreachy intern who just started who will be looking into this. So stay tuned!

--------- | ------------------------------------------- | -------
tkn-image | `tkn` CLI container image to run this task. | gcr.io/tekton-releases/dogfooding/tkn
ARGS | The arguments to pass to the `tkn` CLI. | `["help"]`
19 changes: 19 additions & 0 deletions tkn/tkn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: tkn
spec:
inputs:
params:
- name: tkn-image
description: tkn CLI container image to run this task
default: gcr.io/tekton-releases/dogfooding/tkn
Copy link
Member

Choose a reason for hiding this comment

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

We should tag a stable release for the default.

Copy link
Member Author

Choose a reason for hiding this comment

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

AFAIK this is the best we have right now. Once tektoncd/cli#497 is resolved, we can update this URL.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, my apologies. I opened that issue after seeing this pr and became aware from it that we need an official image.

- name: ARGS
type: array
description: tkn CLI arguments to run
steps:
- name: tkn
image: "$(inputs.params.tkn-image)"
command: ["/usr/local/bin/tkn"]
args: ["$(inputs.params.ARGS)"]