-
Notifications
You must be signed in to change notification settings - Fork 265
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
Dashboard UI for Triggers #509
Comments
It might be helpful to define what a trigger is. Sounds like it's an "event." Can we list some examples of such events? What is a "trigger template?" Based on this description, it sounds like we will need a page with a table containing said triggers. What descriptive columns will be needed on the table? Based on that, we can figure out what this page would link to within the dasbhoard. Also, based on this description, it looks like a piece of this (triggers) might reside on the actual resource that was created as a result of said trigger. Whether it be PLR, or any other resource. Would also like to note that it was stated that these Pipeline or Trigger templates are really at the top of the whole process... before the PipleinRun. (keep me honest if I'm stating this incorrectly). Also that we'd like to have this implemented in the dashboard in the Oct-Nov. time frame |
The triggers here refer to the Triggers project: https://github.com/tektoncd/triggers. The work is still in-progress (and pre-alpha), so the Custom Resources (EventListener, TriggerBinding, and TriggerTemplate) are still changing as we develop them. When we prioritize this work item and someone picks it up, then I will be happy to help create the specifications for how the Dashboard should deal with Triggers resources 👍 Note: we might find it helpful to break this into separate issues for the EventListener, TriggerBinding, and TriggerTemplate |
Need to begin design work on this by the end of September. |
Here's an overview of the Triggers resources at the moment (the project is still in development, so it is subject to change). Much of this information is re-iterated from the Triggers README's. OverviewThe Triggers project enables users to set up Tekton PipelineRuns/TaskRuns that will execute (start running) when an event is received. A common example use-case for Triggers is automatically creating of a There are three custom resources in the Triggers project: tl;dr (this comment is long and throws a lot of information at you)Focus on the Important information to display in the details page sections for the important information to include in the details page for each resource. 1. TriggerTemplateThe Here's an example apiVersion: tekton.dev/v1alpha1
kind: TriggerTemplate
metadata:
name: pipeline-template
spec:
params:
- name: gitrevision
description: The git revision
default: master
- name: gitrepositoryurl
description: The git repository url
- name: message
description: The message to print
default: This is the default message
- name: contenttype
description: The Content-Type of the event
resourcetemplates:
- apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: git-source-$(uid)
spec:
type: git
params:
- name: revision
value: $(params.gitrevision)
- name: url
value: $(params.gitrepositoryurl)
- apiVersion: tekton.dev/v1alpha1
kind: PipelineRun
metadata:
generateName: simple-pipeline-run
spec:
pipelineRef:
name: simple-pipeline
params:
- name: message
value: $(params.message)
- name: contenttype
value: $(params.contenttype)
resources:
- name: git-source
resourceRef:
name: git-source-$(uid) In this example, the Important information to display in the details page:
2. TriggerBindingWhen an event is received, it will have a payload with important data. The Here's an example apiVersion: tekton.dev/v1alpha1
kind: TriggerBinding
metadata:
name: pipeline-binding
spec:
params:
- name: gitrevision
value: $(body.head_commit.id)
- name: gitrepositoryurl
value: $(body.repository.url)
- name: contenttype
value: $(header.Content-Type) Important information to display in the details page:
3. EventListenerThe The The Here's an example apiVersion: tekton.dev/v1alpha1
kind: EventListener
metadata:
name: listener-interceptor
spec:
serviceAccountName: tekton-triggers-example-sa
triggers:
- name: foo-trig
interceptor:
header:
- name: Foo-Trig-Header1
value: string-value
- name: Foo-Trig-Header2
value:
- array-val1
- array-val2
objectRef:
kind: Service
name: gh-validate
apiVersion: v1
namespace: default
binding:
name: pipeline-binding
template:
name: pipeline-template
params:
- name: message
value: Hello from the Triggers EventListener!
status:
address:
hostname: el-listener.default.svc.cluster.local
conditions:
- lastTransitionTime: "2019-10-18T19:28:16Z"
message: Deployment has minimum availability.
reason: MinimumReplicasAvailable
status: "True"
type: Available
- lastTransitionTime: "2019-10-18T19:28:14Z"
message: Deployment exists
status: "True"
type: Deployment
- lastTransitionTime: "2019-10-18T19:28:16Z"
message: ReplicaSet "el-listener-9cb97455d" has successfully progressed.
reason: NewReplicaSetAvailable
status: "True"
type: Progressing
- lastTransitionTime: "2019-10-18T19:28:14Z"
message: Service exists
status: "True"
type: Service
configuration:
generatedName: el-listener Important information to display in the details page:
|
Thanks for the updates @kimholmes! I think the updated TriggerTemplate page looks really good 👍 For the EventListeners list page, I like the addition of a Status column, but I'm not sure if we'll be able to use a checkmark icon as the value. Right now, the status just indicates that a pod is running, it does not indicate whether the latest build has been successful, or something like that (which is what the checkmark makes me think of). For the EventListener's details page, I think that the table is an improvement, but the structure is still not exactly accurate, because each trigger can have multiple parameters. Also, the structure just changed a little to this (so the Validate is now called Interceptor):
I think that it might be beneficial to have a separate table for each Thanks again for the updates! |
@ncskier I think you provided an idea for this design in your sketch. Thank you! |
PR created for the APIs that the panelling can leverage, this should open the flood gates 🎉 |
/assign |
Quick update on this, only the details pages to go now (I've got a PR in, @carlos-logro is working on another and then one more is up for grabs!) See
for implementation pieces. |
Closing this, remaining design updates tracked in #937 |
I think the trigger work solves a really critical problem -- mapping events to pipelineruns and resources. This issue is to look at what we might do to formally add it to the dashboard and also integrate it in with any pipelineruns and pipelineresources the trigger template creates in response to an event.
The text was updated successfully, but these errors were encountered: