Skip to content

Commit

Permalink
Switch API group for triggers to triggers.tekton.dev
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Users will have to delete, and recreate
resources after updating its API group.

Fixes tektoncd#332

Signed-off-by: Dibyo Mukherjee <[email protected]>
  • Loading branch information
dibyom authored and tekton-robot committed Mar 27, 2020
1 parent a0fd950 commit ea6c193
Show file tree
Hide file tree
Showing 74 changed files with 204 additions and 204 deletions.
1 change: 0 additions & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions config/200-clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ rules:
- apiGroups: ["admissionregistration.k8s.io"]
resources: ["mutatingwebhookconfigurations", "validatingwebhookconfigurations"]
verbs: ["get", "list", "create", "update", "delete", "patch", "watch"]
- apiGroups: ["tekton.dev"]
- apiGroups: ["triggers.tekton.dev"]
resources: ["clustertriggerbindings", "eventlisteners", "triggerbindings", "triggertemplates", "eventlisteners/finalizers"]
verbs: ["get", "list", "create", "update", "delete", "patch", "watch"]
- apiGroups: ["tekton.dev"]
- apiGroups: ["triggers.tekton.dev"]
resources: ["clustertriggerbindings/status", "eventlisteners/status", "triggerbindings/status", "triggertemplates/status"]
verbs: ["get", "list", "create", "update", "delete", "patch", "watch"]
- apiGroups: ["policy"]
Expand Down
4 changes: 2 additions & 2 deletions config/300-clustertriggerbinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: clustertriggerbindings.tekton.dev
name: clustertriggerbindings.triggers.tekton.dev
spec:
group: tekton.dev
group: triggers.tekton.dev
scope: Cluster
versions:
- name: v1alpha1
Expand Down
4 changes: 2 additions & 2 deletions config/300-eventlistener.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: eventlisteners.tekton.dev
name: eventlisteners.triggers.tekton.dev
spec:
group: tekton.dev
group: triggers.tekton.dev
scope: Namespaced
versions:
- name: v1alpha1
Expand Down
4 changes: 2 additions & 2 deletions config/300-triggerbinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: triggerbindings.tekton.dev
name: triggerbindings.triggers.tekton.dev
spec:
group: tekton.dev
group: triggers.tekton.dev
scope: Namespaced
versions:
- name: v1alpha1
Expand Down
4 changes: 2 additions & 2 deletions config/300-triggertemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: triggertemplates.tekton.dev
name: triggertemplates.triggers.tekton.dev
spec:
group: tekton.dev
group: triggers.tekton.dev
scope: Namespaced
versions:
- name: v1alpha1
Expand Down
4 changes: 2 additions & 2 deletions docs/clustertriggerbindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ClusterTriggerBinding in any EventListener in any namespace.
<!-- FILE: examples/clustertriggerbindings/clustertriggerbinding.yaml -->

```YAML
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: ClusterTriggerBinding
metadata:
name: pipeline-clusterbinding
Expand All @@ -38,7 +38,7 @@ The default kind is TriggerBinding which represents a namespaced TriggerBinding.

```YAML
---
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: listener-clustertriggerbinding
Expand Down
2 changes: 1 addition & 1 deletion docs/create-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ spec:
serviceName: $(params.Service)
servicePort: $(params.ServicePort)
EOF
fi
fi
28 changes: 14 additions & 14 deletions docs/eventlisteners.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ the following fields:

- Required:
- [`apiVersion`][kubernetes-overview] - Specifies the API version, for example
`tekton.dev/v1alpha1`.
`triggers.tekton.dev/v1alpha1`.
- [`kind`][kubernetes-overview] - Specifies the `EventListener` resource
object.
- [`metadata`][kubernetes-overview] - Specifies data to uniquely identify the
Expand Down Expand Up @@ -86,11 +86,11 @@ metadata:
name: tekton-triggers-example-minimal
rules:
# Permissions for every EventListener deployment to function
- apiGroups: ["tekton.dev"]
- apiGroups: ["triggers.tekton.dev"]
resources: ["eventlisteners", "triggerbindings", "triggertemplates"]
verbs: ["get"]
- apiGroups: [""]
resources: ["configmaps", "secrets"] # secrets are only needed for Github/Gitlab interceptors
resources: ["configmaps", "secrets"] # secrets are only needed for Github/Gitlab interceptors
verbs: ["get", "list", "watch"]
# Permissions to create resources in associated TriggerTemplates
- apiGroups: ["tekton.dev"]
Expand Down Expand Up @@ -139,9 +139,9 @@ resources it creates:

| Name | Description |
| ------------------------ | ------------------------------------------------------ |
| tekton.dev/eventlistener | Name of the EventListener that generated the resource. |
| tekton.dev/trigger | Name of the Trigger that generated the resource. |
| tekton.dev/eventid | UID of the incoming event. |
| triggers.tekton.dev/eventlistener | Name of the EventListener that generated the resource. |
| triggers.tekton.dev/trigger | Name of the Trigger that generated the resource. |
| triggers.tekton.dev/eventid | UID of the incoming event. |

Since the EventListener name and Trigger name are used as label values, they
must adhere to the
Expand Down Expand Up @@ -209,7 +209,7 @@ resource binding/templating.

```YAML
---
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: listener-interceptor
Expand Down Expand Up @@ -261,7 +261,7 @@ response.

```YAML
---
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: github-listener-interceptor
Expand Down Expand Up @@ -304,7 +304,7 @@ The body/header of the incoming request will be preserved in this Interceptor's
response.

```yaml
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: gitlab-listener-interceptor
Expand Down Expand Up @@ -343,7 +343,7 @@ with a truncated string coming from the hook body.
<!-- FILE: examples/eventlisteners/cel-eventlistener-interceptor.yaml -->

```YAML
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: cel-listener-interceptor
Expand Down Expand Up @@ -381,7 +381,7 @@ response.
<!-- FILE: examples/eventlisteners/cel-eventlistener-interceptor.yaml -->

```YAML
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: cel-listener-interceptor
Expand Down Expand Up @@ -418,7 +418,7 @@ applied to the incoming body.
<!-- FILE: examples/eventlisteners/cel-eventlistener-no-filter.yaml -->

```YAML
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: cel-eventlistener-no-filter
Expand All @@ -445,7 +445,7 @@ applied to the body before it's returned to the event-listener.
<!-- FILE: examples/eventlisteners/cel-eventlistener-multiple-overlays.yaml -->

```YAML
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: example-with-multiple-overlays
Expand Down Expand Up @@ -530,7 +530,7 @@ Anything that is applied as an overlay can be extracted using a binding e.g.
<!-- FILE: examples/triggerbindings/cel-example-trigger-binding.yaml -->

```YAML
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerBinding
metadata:
name: pipeline-binding-with-cel-extensions
Expand Down
3 changes: 1 addition & 2 deletions docs/getting-started/rbac/admin-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ metadata:
namespace: getting-started
rules:
- apiGroups:
- tekton.dev
- triggers.tekton.dev
resources:
- eventlisteners
- triggerbindings
- triggertemplates
- pipelineresources
verbs:
- get
- apiGroups:
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/rbac/webhook-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rules:
- update
- delete
- apiGroups:
- tekton.dev
- triggers.tekton.dev
resources:
- eventlisteners
verbs:
Expand Down
10 changes: 5 additions & 5 deletions docs/getting-started/triggers.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerTemplate
metadata:
name: getting-started-triggertemplate
Expand All @@ -13,7 +13,7 @@ spec:
- name: namespace
description: The namespace to create the resources
resourcetemplates:
- apiVersion: tekton.dev/v1alpha1
- apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
name: getting-started-pipeline-run-$(uid)
Expand All @@ -36,15 +36,15 @@ spec:
type: image
params:
- name: url
value: DOCKERREPO-REPLACEME # docker-repo-location.com/repo:getting-started
value: DOCKERREPO-REPLACEME # docker-repo-location.com/repo:getting-started
- name: event-to-sink
resourceSpec:
type: cloudEvent
params:
- name: targetURI
value: http://event-display.getting-started.svc.cluster.local
---
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerBinding
metadata:
name: getting-started-pipelinebinding
Expand All @@ -58,7 +58,7 @@ spec:
- name: gitrepositoryurl
value: "https://github.com/$(body.repository.full_name)"
---
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: getting-started-listener
Expand Down
10 changes: 5 additions & 5 deletions docs/triggerbindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ deliberate to encourage reuse between them.
<!-- FILE: examples/triggerbindings/triggerbinding.yaml -->

```YAML
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerBinding
metadata:
name: pipeline-binding
Expand Down Expand Up @@ -105,7 +105,7 @@ that extracts event information, and another binding that provides deploy
environment information:

```yaml
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerBinding
metadata:
name: event-binding
Expand All @@ -116,7 +116,7 @@ spec:
- name: gitrepositoryurl
value: $(body.repository.url)
---
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerBinding
metadata:
name: prod-env
Expand All @@ -125,7 +125,7 @@ spec:
- name: environment
value: prod
---
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerBinding
metadata:
name: staging-env
Expand All @@ -134,7 +134,7 @@ spec:
- name: environment
value: staging
---
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: listener
Expand Down
2 changes: 1 addition & 1 deletion docs/triggertemplates.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A `TriggerTemplate` is a resource that can template resources.
<!-- FILE: examples/triggertemplates/triggertemplate.yaml -->

```YAML
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerTemplate
metadata:
name: pipeline-template
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: ClusterTriggerBinding
metadata:
name: message-clusterbinding
Expand Down
2 changes: 1 addition & 1 deletion examples/clustertriggerbindings/clustertriggerbinding.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: ClusterTriggerBinding
metadata:
name: pipeline-clusterbinding
Expand Down
2 changes: 1 addition & 1 deletion examples/cron/eventlistener.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: cron-listener
Expand Down
2 changes: 1 addition & 1 deletion examples/cron/triggerbinding.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerBinding
metadata:
name: cron-binding
Expand Down
2 changes: 1 addition & 1 deletion examples/eventlisteners/cel-eventlistener-interceptor.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: cel-listener-interceptor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: example-with-multiple-overlays
Expand Down
2 changes: 1 addition & 1 deletion examples/eventlisteners/cel-eventlistener-no-filter.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: cel-eventlistener-no-filter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: listener-clustertriggerbinding
Expand Down
2 changes: 1 addition & 1 deletion examples/eventlisteners/eventlistener-interceptor.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: listener-interceptor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: listener-multiinterceptor
Expand Down
2 changes: 1 addition & 1 deletion examples/eventlisteners/eventlistener.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: listener
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: github-listener-interceptor
Expand Down
Loading

0 comments on commit ea6c193

Please sign in to comment.