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