This commit is contained in:
2020-03-12 07:25:45 +01:00
parent b08a76e8a5
commit f8898596f2
5 changed files with 720 additions and 337 deletions

View File

@@ -1,9 +1,11 @@
# 1 trigger binding wordt geconfigureerd, en dan worden meerdere trigger templates aangemaakt
# voor de verschillende service mesh types. Op deze manier moet ik niet elke keer een aparte pipeline aanmaken per service mesh type. Het nadeel hieraan is dat dan elke keer elke pipeline gerunned wordt, maar uiteindelijk maakt dit niet veel uit zolang de deploy.yaml files leeg zijn wanneer de commits door gaan
---
apiVersion: tekton.dev/v1alpha1
kind: TriggerBinding
metadata:
name: github-trigger-binding
namespace: tekton-pipeline-istio-project-1
namespace: stage-tekton-pipeline
spec:
params:
- name: gitrevision
@@ -21,7 +23,7 @@ apiVersion: tekton.dev/v1alpha1
kind: TriggerTemplate
metadata:
name: github-trigger-template
namespace: tekton-pipeline-istio-project-1
namespace: stage-tekton-pipeline
spec:
params:
- name: gitrevision
@@ -34,13 +36,13 @@ spec:
kind: PipelineRun
metadata:
name: application-pipeline-run
namespace: tekton-pipeline-istio-project-1
namespace: stage-tekton-pipeline
spec:
serviceAccountName: service-acc
pipelineRef:
name: application-pipeline
name: application-pipeline #gebruik dit om de pipeline aan te passen naar andere versies, zolang ze zich in dezelfde namespace bevinden kunnen we deze pipeline hergebruiken om deployments op de cluster uit te voeren. service-mesh agnostisch.
resources:
- name: git-master
- name: git-master
resourceRef:
name: git-master
- name: git-experimental
@@ -51,7 +53,7 @@ kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: tekton-trigger-role
namespace: tekton-pipeline-istio-project-1
namespace: stage-tekton-pipeline
rules:
# Permissions for every EventListener deployment to function
- apiGroups: ["tekton.dev"]
@@ -69,7 +71,7 @@ apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: tekton-trigger-role-binding
namespace: tekton-pipeline-istio-project-1
namespace: stage-tekton-pipeline
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
@@ -77,13 +79,13 @@ roleRef:
subjects:
- kind: ServiceAccount
name: service-acc
namespace: tekton-pipeline-istio-project-1
namespace: stage-tekton-pipeline
---
apiVersion: tekton.dev/v1alpha1
kind: EventListener
metadata:
name: github-event-listener
namespace: tekton-pipeline-istio-project-1
namespace: stage-tekton-pipeline
spec:
serviceAccountName: service-acc
triggers:
@@ -92,45 +94,3 @@ spec:
template:
name: github-trigger-template
---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: expose-event-listener
namespace: tekton-pipeline-istio-project-1
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 443
name: http
protocol: HTTP
hosts:
- "*"
- port:
number: 80
name: http2
protocol: HTTP
hosts:
- "*"
- port:
number: 8080
name: http3
protocol: HTTP
hosts:
- "*"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: link-gateway-listener
namespace: tekton-pipeline-istio-project-1
spec:
hosts:
- "*"
gateways:
- expose-event-listener
http:
- route:
- destination:
host: el-github-event-listener