Skip to content

Commit 191c7cd

Browse files
committed
add tekton chart
Signed-off-by: Da Yin <[email protected]>
1 parent b4f098b commit 191c7cd

33 files changed

+801
-0
lines changed

submitted/tekton/.helmignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*~
18+
# Various IDEs
19+
.project
20+
.idea/
21+
*.tmproj

submitted/tekton/Chart.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: v1
2+
name: tekton
3+
icon: https://avatars2.githubusercontent.com/u/47602533
4+
description: A Kubernetes-native pipeline resource
5+
6+
# A chart can be either an 'application' or a 'library' chart.
7+
#
8+
# Application charts are a collection of templates that can be packaged into versioned archives
9+
# to be deployed.
10+
#
11+
# Library charts provide useful utilities or functions for the chart developer. They're included as
12+
# a dependency of application charts to inject those utilities and functions into the rendering
13+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
14+
type: application
15+
16+
# This is the chart version. This version number should be incremented each time you make changes
17+
# to the chart and its templates, including the app version.
18+
version: 0.1.0
19+
20+
# This is the version number of the application being deployed. This version number should be
21+
# incremented each time you make changes to the application.
22+
appVersion: v0.5.2

submitted/tekton/README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Tekton
2+
3+
## 功能介绍
4+
5+
在Kubernetes集群中安装Tekton使用环境。其中默认启用Tekton Dashboard,可以提供Pipeline的可视化界面。
6+
7+
8+
9+
## 安装使用
10+
11+
```shell
12+
helm install tektoncd tekton
13+
```
14+
15+
运行后看到输出:
16+
17+
```shell
18+
NAME: tekton
19+
LAST DEPLOYED: 2019-08-04 15:06:00.839105318 +0800 CST m=+0.085271389
20+
NAMESPACE: default
21+
STATUS: deployed
22+
23+
NOTES:
24+
This is a 3rd-party Chart integrate tekton pipeline and dashboard with image synced to aliyun for easy access in China.
25+
If dashboard is enabled, to use it, run
26+
27+
kubectl --namespace tekton-pipelines port-forward svc/tekton-dashboard 9097:9097
28+
29+
Then you can access it through localhost:9097.
30+
The uninstall process will delete the whole namespace `tekton-pipelines` which may take a while to finish.
31+
The original project locates at https://github.com/tektoncd/pipeline and https://github.com/tektoncd/dashboard. Lots of features are comming in the future.
32+
NOTE: Jenkins-x-charts also has a chart for tekton locates at https://github.com/jenkins-x-charts/tekton/tree/master/tekton which does not include tekton dashboard.
33+
```
34+
35+
按照NOTES提示,可以在运行`kubectl port-forward`后访问`localhost:9097`访问tekton dashboard。
36+
37+
## 使用参数
38+
39+
```shell
40+
helm install tektoncd tekton --set dashboard.port=8080,dashboard.type=NodePort
41+
```
42+
43+
可以通过改变values中dashboard的参数来设置访问dashboard的方式。

submitted/tekton/templates/NOTES.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
This is a 3rd-party Chart integrate tekton pipeline and dashboard with image synced to aliyun for easy access in China.
2+
If dashboard is enabled, to use it, run
3+
4+
kubectl --namespace {{ .Values.pipelines.namespace }} port-forward svc/tekton-dashboard 9097:{{ .Values.dashboard.port }}
5+
6+
Then you can access it through localhost:9097.
7+
The uninstall process will delete the whole namespace `{{ .Values.pipelines.namespace }}` which may take a while to finish.
8+
The original project locates at https://github.com/tektoncd/pipeline and https://github.com/tektoncd/dashboard. Lots of features are comming in the future.
9+
NOTE: Jenkins-x-charts also has a chart for tekton locates at https://github.com/jenkins-x-charts/tekton/tree/master/tekton which does not include tekton dashboard.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{{/* vim: set filetype=mustache: */}}
2+
{{/*
3+
Expand the name of the chart.
4+
*/}}
5+
{{- define "tekton.name" -}}
6+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7+
{{- end -}}
8+
9+
{{/*
10+
Create a default fully qualified app name.
11+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12+
If release name contains chart name it will be used as a full name.
13+
*/}}
14+
{{- define "tekton.fullname" -}}
15+
{{- if .Values.fullnameOverride -}}
16+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
17+
{{- else -}}
18+
{{- $name := default .Chart.Name .Values.nameOverride -}}
19+
{{- if contains $name .Release.Name -}}
20+
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
21+
{{- else -}}
22+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
23+
{{- end -}}
24+
{{- end -}}
25+
{{- end -}}
26+
27+
{{/*
28+
Create chart name and version as used by the chart label.
29+
*/}}
30+
{{- define "tekton.chart" -}}
31+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
32+
{{- end -}}
33+
34+
{{/*
35+
Common labels
36+
*/}}
37+
{{- define "tekton.labels" -}}
38+
app.kubernetes.io/name: {{ include "tekton.name" . }}
39+
helm.sh/chart: {{ include "tekton.chart" . }}
40+
app.kubernetes.io/instance: {{ .Release.Name }}
41+
{{- if .Chart.AppVersion }}
42+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
43+
{{- end }}
44+
app.kubernetes.io/managed-by: {{ .Release.Service }}
45+
{{- end -}}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRole
3+
metadata:
4+
labels:
5+
rbac.authorization.k8s.io/aggregate-to-admin: "true"
6+
rbac.authorization.k8s.io/aggregate-to-edit: "true"
7+
name: tekton-aggregate-edit
8+
rules:
9+
- apiGroups:
10+
- tekton.dev
11+
resources:
12+
- tasks
13+
- taskruns
14+
- pipelines
15+
- pipelineruns
16+
- pipelineresources
17+
verbs:
18+
- create
19+
- delete
20+
- deletecollection
21+
- get
22+
- list
23+
- patch
24+
- update
25+
- watch
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRole
3+
metadata:
4+
labels:
5+
rbac.authorization.k8s.io/aggregate-to-view: "true"
6+
name: tekton-aggregate-view
7+
rules:
8+
- apiGroups:
9+
- tekton.dev
10+
resources:
11+
- tasks
12+
- taskruns
13+
- pipelines
14+
- pipelineruns
15+
- pipelineresources
16+
verbs:
17+
- get
18+
- list
19+
- watch
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{{- if .Values.dashboard.enabled -}}
2+
kind: ClusterRole
3+
apiVersion: rbac.authorization.k8s.io/v1
4+
metadata:
5+
name: tekton-dashboard-minimal
6+
namespace: {{ .Values.pipelines.namespace }}
7+
rules:
8+
- apiGroups: [""]
9+
resources: ["serviceaccounts"]
10+
verbs: ["get", "list", "update", "patch"]
11+
- apiGroups: [""]
12+
resources: ["pods", "services"]
13+
verbs: ["get", "list", "create", "update", "delete", "patch", "watch"]
14+
- apiGroups: [""]
15+
resources: ["pods/log", "namespaces", "events"]
16+
verbs: ["get", "list", "watch"]
17+
- apiGroups: [""]
18+
resources: ["secrets", "configmaps"]
19+
verbs: ["get", "list", "create", "update", "watch", "delete"]
20+
- apiGroups: ["extensions", "apps"]
21+
resources: ["deployments"]
22+
verbs: ["get", "list", "create", "update", "delete", "patch", "watch"]
23+
- apiGroups: ["tekton.dev"]
24+
resources: ["tasks", "clustertasks", "taskruns", "pipelines", "pipelineruns", "pipelineresources"]
25+
verbs: ["get", "list", "create", "update", "delete", "patch", "watch"]
26+
- apiGroups: ["tekton.dev"]
27+
resources: ["taskruns/finalizers", "pipelineruns/finalizers"]
28+
verbs: ["get", "list", "create", "update", "delete", "patch", "watch"]
29+
- apiGroups: ["tekton.dev"]
30+
resources: ["tasks/status", "clustertasks/status", "taskruns/status", "pipelines/status", "pipelineruns/status"]
31+
verbs: ["get", "list", "create", "update", "delete", "patch", "watch"]
32+
{{- end }}
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRole
3+
metadata:
4+
name: tekton-pipelines-admin
5+
rules:
6+
- apiGroups:
7+
- ""
8+
resources:
9+
- pods
10+
- pods/log
11+
- namespaces
12+
- secrets
13+
- events
14+
- serviceaccounts
15+
- configmaps
16+
- persistentvolumeclaims
17+
verbs:
18+
- get
19+
- list
20+
- create
21+
- update
22+
- delete
23+
- patch
24+
- watch
25+
- apiGroups:
26+
- apps
27+
resources:
28+
- deployments
29+
verbs:
30+
- get
31+
- list
32+
- create
33+
- update
34+
- delete
35+
- patch
36+
- watch
37+
- apiGroups:
38+
- apps
39+
resources:
40+
- deployments/finalizers
41+
verbs:
42+
- get
43+
- list
44+
- create
45+
- update
46+
- delete
47+
- patch
48+
- watch
49+
- apiGroups:
50+
- admissionregistration.k8s.io
51+
resources:
52+
- mutatingwebhookconfigurations
53+
verbs:
54+
- get
55+
- list
56+
- create
57+
- update
58+
- delete
59+
- patch
60+
- watch
61+
- apiGroups:
62+
- tekton.dev
63+
resources:
64+
- tasks
65+
- clustertasks
66+
- taskruns
67+
- pipelines
68+
- pipelineruns
69+
- pipelineresources
70+
verbs:
71+
- get
72+
- list
73+
- create
74+
- update
75+
- delete
76+
- patch
77+
- watch
78+
- apiGroups:
79+
- tekton.dev
80+
resources:
81+
- taskruns/finalizers
82+
- pipelineruns/finalizers
83+
verbs:
84+
- get
85+
- list
86+
- create
87+
- update
88+
- delete
89+
- patch
90+
- watch
91+
- apiGroups:
92+
- tekton.dev
93+
resources:
94+
- tasks/status
95+
- clustertasks/status
96+
- taskruns/status
97+
- pipelines/status
98+
- pipelineruns/status
99+
- pipelineresources/status
100+
verbs:
101+
- get
102+
- list
103+
- create
104+
- update
105+
- delete
106+
- patch
107+
- watch
108+
- apiGroups:
109+
- policy
110+
resourceNames:
111+
- tekton-pipelines
112+
resources:
113+
- podsecuritypolicies
114+
verbs:
115+
- use
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{{- if .Values.dashboard.enabled -}}
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRoleBinding
4+
metadata:
5+
name: tekton-dashboard-minimal
6+
subjects:
7+
- kind: ServiceAccount
8+
name: tekton-dashboard
9+
namespace: {{ .Values.pipelines.namespace }}
10+
roleRef:
11+
apiGroup: rbac.authorization.k8s.io
12+
kind: ClusterRole
13+
name: tekton-dashboard-minimal
14+
{{- end }}

0 commit comments

Comments
 (0)