diff --git a/manifests/full-pipeline.yaml b/manifests/full-pipeline.yaml index ebbcbd6..4f792a6 100644 --- a/manifests/full-pipeline.yaml +++ b/manifests/full-pipeline.yaml @@ -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 diff --git a/manifests/github-event-listener.yaml b/manifests/github-event-listener.yaml index 07549c2..5673400 100644 --- a/manifests/github-event-listener.yaml +++ b/manifests/github-event-listener.yaml @@ -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: diff --git a/manifests/github-webhook-setup.yaml b/manifests/github-webhook-setup.yaml index 1e6ade3..cd02001 100644 --- a/manifests/github-webhook-setup.yaml +++ b/manifests/github-webhook-setup.yaml @@ -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