mirror of
https://github.com/bvanroll/cicdTest.git
synced 2025-08-29 03:52:44 +00:00
pre deprecation fix
This commit is contained in:
@@ -1,16 +1,16 @@
|
|||||||
---
|
# ---
|
||||||
apiVersion: v1
|
# apiVersion: v1
|
||||||
kind: Namespace
|
# kind: #namespace
|
||||||
metadata:
|
# metadata:
|
||||||
name: stage-tekton-pipeline
|
# name: stage-tekton-pipeline
|
||||||
labels:
|
# labels:
|
||||||
istio-injection: enabled #zorgt voor auto sidecar injection
|
# istio-injection: enabled #zorgt voor auto sidecar injection
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
name: service-acc
|
name: service-acc
|
||||||
namespace: stage-tekton-pipeline
|
#namespace: stage-tekton-pipeline
|
||||||
secrets:
|
secrets:
|
||||||
- name: regcred
|
- name: regcred
|
||||||
---
|
---
|
||||||
@@ -55,13 +55,13 @@ roleRef:
|
|||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: service-acc
|
name: service-acc
|
||||||
namespace: stage-tekton-pipeline
|
namespace: default
|
||||||
---
|
---
|
||||||
apiVersion: tekton.dev/v1alpha1
|
apiVersion: tekton.dev/v1alpha1
|
||||||
kind: PipelineResource
|
kind: PipelineResource
|
||||||
metadata:
|
metadata:
|
||||||
name: git-master
|
name: git-master
|
||||||
namespace: stage-tekton-pipeline
|
#namespace: stage-tekton-pipeline
|
||||||
spec:
|
spec:
|
||||||
type: git
|
type: git
|
||||||
params:
|
params:
|
||||||
@@ -74,7 +74,7 @@ apiVersion: tekton.dev/v1alpha1
|
|||||||
kind: PipelineResource
|
kind: PipelineResource
|
||||||
metadata:
|
metadata:
|
||||||
name: git-experimental
|
name: git-experimental
|
||||||
namespace: stage-tekton-pipeline
|
#namespace: stage-tekton-pipeline
|
||||||
spec:
|
spec:
|
||||||
type: git
|
type: git
|
||||||
params:
|
params:
|
||||||
@@ -83,11 +83,11 @@ spec:
|
|||||||
- name: url
|
- name: url
|
||||||
value: git://github.com/beppevanrolleghem/cicdTest
|
value: git://github.com/beppevanrolleghem/cicdTest
|
||||||
---
|
---
|
||||||
apiVersion: tekton.dev/v1alpha1
|
apiVersion: tekton.dev/v1beta1
|
||||||
kind: Task
|
kind: Task
|
||||||
metadata:
|
metadata:
|
||||||
name: build-and-push
|
name: build-and-push
|
||||||
namespace: stage-tekton-pipeline
|
#namespace: stage-tekton-pipeline
|
||||||
spec:
|
spec:
|
||||||
inputs:
|
inputs:
|
||||||
resources:
|
resources:
|
||||||
@@ -118,7 +118,7 @@ apiVersion: tekton.dev/v1alpha1
|
|||||||
kind: Task
|
kind: Task
|
||||||
metadata:
|
metadata:
|
||||||
name: destroy-application
|
name: destroy-application
|
||||||
namespace: stage-tekton-pipeline
|
#namespace: stage-tekton-pipeline
|
||||||
spec:
|
spec:
|
||||||
inputs:
|
inputs:
|
||||||
resources:
|
resources:
|
||||||
@@ -138,7 +138,7 @@ apiVersion: tekton.dev/v1alpha1
|
|||||||
kind: Task
|
kind: Task
|
||||||
metadata:
|
metadata:
|
||||||
name: deploy-application
|
name: deploy-application
|
||||||
namespace: stage-tekton-pipeline
|
#namespace: stage-tekton-pipeline
|
||||||
spec:
|
spec:
|
||||||
inputs:
|
inputs:
|
||||||
resources:
|
resources:
|
||||||
@@ -157,7 +157,7 @@ apiVersion: tekton.dev/v1alpha1
|
|||||||
kind: Pipeline
|
kind: Pipeline
|
||||||
metadata:
|
metadata:
|
||||||
name: application-pipeline
|
name: application-pipeline
|
||||||
namespace: stage-tekton-pipeline
|
#namespace: stage-tekton-pipeline
|
||||||
spec:
|
spec:
|
||||||
resources:
|
resources:
|
||||||
- name: git-master
|
- name: git-master
|
||||||
|
@@ -5,7 +5,7 @@ apiVersion: tekton.dev/v1alpha1
|
|||||||
kind: TriggerBinding
|
kind: TriggerBinding
|
||||||
metadata:
|
metadata:
|
||||||
name: github-trigger-binding
|
name: github-trigger-binding
|
||||||
namespace: stage-tekton-pipeline
|
#namespace: stage-tekton-pipeline
|
||||||
spec:
|
spec:
|
||||||
params:
|
params:
|
||||||
- name: gitrevision
|
- name: gitrevision
|
||||||
@@ -23,7 +23,7 @@ apiVersion: tekton.dev/v1alpha1
|
|||||||
kind: TriggerTemplate
|
kind: TriggerTemplate
|
||||||
metadata:
|
metadata:
|
||||||
name: github-trigger-template
|
name: github-trigger-template
|
||||||
namespace: stage-tekton-pipeline
|
#namespace: stage-tekton-pipeline
|
||||||
spec:
|
spec:
|
||||||
params:
|
params:
|
||||||
- name: gitrevision
|
- name: gitrevision
|
||||||
@@ -36,11 +36,11 @@ spec:
|
|||||||
kind: PipelineRun
|
kind: PipelineRun
|
||||||
metadata:
|
metadata:
|
||||||
name: application-pipeline-run
|
name: application-pipeline-run
|
||||||
namespace: stage-tekton-pipeline
|
#namespace: stage-tekton-pipeline
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: service-acc
|
serviceAccountName: service-acc
|
||||||
pipelineRef:
|
pipelineRef:
|
||||||
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.
|
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:
|
resources:
|
||||||
- name: git-master
|
- name: git-master
|
||||||
resourceRef:
|
resourceRef:
|
||||||
@@ -49,32 +49,37 @@ spec:
|
|||||||
resourceRef:
|
resourceRef:
|
||||||
name: git-experimental
|
name: git-experimental
|
||||||
---
|
---
|
||||||
kind: Role
|
kind: ClusterRole
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
metadata:
|
metadata:
|
||||||
name: tekton-trigger-role
|
name: tekton-trigger-role
|
||||||
namespace: stage-tekton-pipeline
|
|
||||||
rules:
|
rules:
|
||||||
# Permissions for every EventListener deployment to function
|
- apiGroups:
|
||||||
- apiGroups: ["tekton.dev"]
|
- "extensions"
|
||||||
resources: ["eventlisteners", "triggerbindings", "triggertemplates"]
|
- "tekton.dev"
|
||||||
verbs: ["get"]
|
- ""
|
||||||
- apiGroups: [""]
|
resources:
|
||||||
resources: ["configmaps", "secrets"] # secrets are only needed for Github/Gitlab interceptors
|
- ingresses
|
||||||
verbs: ["get", "list", "watch"]
|
- eventlisteners
|
||||||
# Permissions to create resources in associated TriggerTemplates
|
- triggerbindings
|
||||||
- apiGroups: ["tekton.dev"]
|
- triggertemplates
|
||||||
resources: ["pipelineruns", "pipelineresources", "taskruns"]
|
- configmaps
|
||||||
verbs: ["create"]
|
- secrets
|
||||||
- apiGroups: ["extensions"]
|
- pipelineruns
|
||||||
resources: ["ingresses"]
|
- pipelineresources
|
||||||
verbs: ["create", "get", "delete"]
|
- taskruns
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- delete
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
---
|
---
|
||||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
kind: ClusterRoleBinding
|
kind: ClusterRoleBinding
|
||||||
metadata:
|
metadata:
|
||||||
name: tekton-trigger-role-binding
|
name: tekton-trigger-role-binding
|
||||||
namespace: stage-tekton-pipeline
|
|
||||||
roleRef:
|
roleRef:
|
||||||
apiGroup: rbac.authorization.k8s.io
|
apiGroup: rbac.authorization.k8s.io
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
@@ -82,13 +87,13 @@ roleRef:
|
|||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: service-acc
|
name: service-acc
|
||||||
namespace: stage-tekton-pipeline
|
namespace: default
|
||||||
---
|
---
|
||||||
apiVersion: tekton.dev/v1alpha1
|
apiVersion: tekton.dev/v1alpha1
|
||||||
kind: EventListener
|
kind: EventListener
|
||||||
metadata:
|
metadata:
|
||||||
name: github-event-listener
|
name: github-event-listener
|
||||||
namespace: stage-tekton-pipeline
|
#namespace: stage-tekton-pipeline
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: service-acc
|
serviceAccountName: service-acc
|
||||||
triggers:
|
triggers:
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
# kind: Secret
|
# kind: Secret
|
||||||
# metadata:
|
# metadata:
|
||||||
# name: webhook-secret
|
# name: webhook-secret
|
||||||
# namespace: stage-tekton-pipeline
|
# #namespace: stage-tekton-pipeline
|
||||||
# stringData:
|
# stringData:
|
||||||
# token: GITHUBTOKEN
|
# token: GITHUBTOKEN
|
||||||
# secret: random-string-data
|
# secret: random-string-data
|
||||||
@@ -17,7 +17,7 @@ apiVersion: tekton.dev/v1alpha1
|
|||||||
kind: Task
|
kind: Task
|
||||||
metadata:
|
metadata:
|
||||||
name: create-webhook
|
name: create-webhook
|
||||||
namespace: stage-tekton-pipeline
|
#namespace: stage-tekton-pipeline
|
||||||
spec:
|
spec:
|
||||||
volumes:
|
volumes:
|
||||||
- name: github-secret
|
- name: github-secret
|
||||||
@@ -69,7 +69,7 @@ apiVersion: tekton.dev/v1alpha1
|
|||||||
kind: TaskRun
|
kind: TaskRun
|
||||||
metadata:
|
metadata:
|
||||||
name: create-repo-webhook
|
name: create-repo-webhook
|
||||||
namespace: stage-tekton-pipeline
|
#namespace: stage-tekton-pipeline
|
||||||
spec:
|
spec:
|
||||||
taskRef:
|
taskRef:
|
||||||
name: create-webhook
|
name: create-webhook
|
||||||
@@ -88,7 +88,7 @@ spec:
|
|||||||
- name: GitHubSecretStringKey
|
- name: GitHubSecretStringKey
|
||||||
value: secret
|
value: secret
|
||||||
- name: ExternalDomain
|
- name: ExternalDomain
|
||||||
value: 35.233.93.220
|
value: kube.llocal.host
|
||||||
timeout: 1000s
|
timeout: 1000s
|
||||||
serviceAccountName: service-acc
|
serviceAccountName: service-acc
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ apiVersion: tekton.dev/v1alpha1
|
|||||||
kind: Task
|
kind: Task
|
||||||
metadata:
|
metadata:
|
||||||
name: create-ingress
|
name: create-ingress
|
||||||
namespace: stage-tekton-pipeline
|
#namespace: stage-tekton-pipeline
|
||||||
spec:
|
spec:
|
||||||
volumes:
|
volumes:
|
||||||
- name: work
|
- name: work
|
||||||
@@ -176,6 +176,7 @@ spec:
|
|||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: $(inputs.params.Service)
|
name: $(inputs.params.Service)
|
||||||
|
#namespace: stage-tekton-pipeline
|
||||||
ownerReferences:
|
ownerReferences:
|
||||||
- name: $(inputs.params.Service)
|
- name: $(inputs.params.Service)
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
@@ -200,6 +201,7 @@ spec:
|
|||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: $(inputs.params.Service)
|
name: $(inputs.params.Service)
|
||||||
|
#namespace: stage-tekton-pipeline
|
||||||
spec:
|
spec:
|
||||||
tls:
|
tls:
|
||||||
- secretName: $(inputs.params.CertificateSecretName)
|
- secretName: $(inputs.params.CertificateSecretName)
|
||||||
@@ -219,7 +221,7 @@ apiVersion: tekton.dev/v1alpha1
|
|||||||
kind: TaskRun
|
kind: TaskRun
|
||||||
metadata:
|
metadata:
|
||||||
name: create-ingress-run
|
name: create-ingress-run
|
||||||
namespace: stage-tekton-pipeline
|
#namespace: stage-tekton-pipeline
|
||||||
spec:
|
spec:
|
||||||
taskRef:
|
taskRef:
|
||||||
name: create-ingress
|
name: create-ingress
|
||||||
@@ -232,7 +234,7 @@ spec:
|
|||||||
- name: CertificateSecretName
|
- name: CertificateSecretName
|
||||||
value: ingresssecret
|
value: ingresssecret
|
||||||
- name: ExternalDomain
|
- name: ExternalDomain
|
||||||
value: 35.233.93.220
|
value: kube.llocal.host
|
||||||
- name: Service
|
- name: Service
|
||||||
value: getting-started
|
value: getting-started
|
||||||
- name: ServicePort
|
- name: ServicePort
|
||||||
|
Reference in New Issue
Block a user