This repository has been archived by the owner on Mar 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s-tekton-trigger-example.yaml
96 lines (93 loc) · 1.88 KB
/
k8s-tekton-trigger-example.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerTemplate
metadata:
name: github
spec:
resourcetemplates:
- apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: pipeline-run-
namespace: default
spec:
serviceAccountName: build
pipelineRef:
name: build
timeout: 1h0m0s
workspaces:
- name: shared-data
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 4Gi
---
apiVersion: v1
kind: Secret
metadata:
name: github-webhook
type: Opaque
stringData:
secretToken: "somethinggoeshere"
---
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: github
spec:
triggers:
- name: cron-trig
interceptors:
- cel:
filter: "header.match('cron', 'true')"
template:
ref: github
resources:
kubernetesResource:
spec:
template:
spec:
serviceAccountName: tektontriggersa
containers:
- resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "128Mi"
cpu: "500m"
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: build
secrets:
- name: ssh-key
# apiVersion: v1
# kind: Secret
# metadata:
# name: ssh-key-
# annotations:
# tekton.dev/git-0: github.com
# type: kubernetes.io/ssh-auth
# data:
# ssh-privatekey:
# known_hosts:
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: trigger-all
spec:
schedule: "0 9 * * 1"
jobTemplate:
spec:
template:
spec:
containers:
- name: trigger-all
image: tk-cron-worker
restartPolicy: Never