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 #332

Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
  • Loading branch information
dibyom committed Mar 26, 2020
1 parent 28e6565 commit ab48a92
Show file tree
Hide file tree
Showing 75 changed files with 208 additions and 207 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 @@ -8,7 +8,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 @@ -32,7 +32,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 @@ -117,4 +117,4 @@ spec:
serviceName: $(inputs.params.Service)
servicePort: $(inputs.params.ServicePort)
EOF
fi
fi
18 changes: 9 additions & 9 deletions docs/eventlisteners.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,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 @@ -203,7 +203,7 @@ resource binding/templating.

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

```YAML
---
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: github-listener-interceptor
Expand Down Expand Up @@ -337,7 +337,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 @@ -375,7 +375,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 @@ -412,7 +412,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 @@ -439,7 +439,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 @@ -524,7 +524,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
26 changes: 13 additions & 13 deletions docs/getting-started/ingress-run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ metadata:
spec:
taskRef:
name: create-ingress
params:
- name: CreateCertificate
value: "true"
- name: CertificateKeyPassphrase
value: asecretphrase
- name: CertificateSecretName
value: ingresssecret
- name: ExternalDomain
value: getting-started.iancoffey.com
- name: Service
value: getting-started
- name: ServicePort
value: "8080"
params:
- name: CreateCertificate
value: "true"
- name: CertificateKeyPassphrase
value: asecretphrase
- name: CertificateSecretName
value: ingresssecret
- name: ExternalDomain
value: getting-started.iancoffey.com
- name: Service
value: getting-started
- name: ServicePort
value: "8080"
timeout: 1000s
serviceAccountName: tekton-triggers-createwebhook
4 changes: 2 additions & 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 All @@ -20,6 +19,7 @@ rules:
- pipelineruns
- pipelineresources
verbs:
- get
- create
- 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
8 changes: 4 additions & 4 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 Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion docs/triggerbindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,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
2 changes: 1 addition & 1 deletion docs/triggertemplates.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,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
8 changes: 4 additions & 4 deletions examples/gitlab/gitlab-push-listener.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: gitlab-echo-template
Expand Down Expand Up @@ -33,7 +33,7 @@ spec:
- name: url
value: $(params.gitrepositoryurl)
---
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerBinding
metadata:
name: gitlab-push-binding
Expand All @@ -52,7 +52,7 @@ type: Opaque
stringData:
gitlabToken: abcde
---
apiVersion: tekton.dev/v1alpha1
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: gitlab-listener
Expand All @@ -67,7 +67,7 @@ spec:
secretName: gitlab-secret
secretKey: gitlabToken
eventTypes:
- Push Hook # Only push events
- Push Hook # Only push events
bindings:
- name: gitlab-push-binding
template:
Expand Down
Loading

0 comments on commit ab48a92

Please sign in to comment.