Skip to content

Commit 37d3682

Browse files
committed
fixup: split the tekton-operator chart into two
1 parent 2f28d4b commit 37d3682

22 files changed

+950
-11
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v2
2+
name: tekton-config
3+
description: A Helm chart to configure the Tekton Operator and its CRDs
4+
type: application
5+
version: 0.1.0
6+
appVersion: "v0.1.0"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Tekton Operator Helm Chart
2+
3+
This Helm chart installs the [Tekton Operator](https://tekton.dev/docs/operator/) into your Kubernetes (v1.16+) or Openshift cluster (v4.3+).
4+
Once this chart is published it can be installed directly, until then [helm-git](https://github.com/aslafy-z/helm-git) can be used.

helmfile.d/charts/tekton/tekton-operator/templates/tekton-pipeline-config.yaml helmfile.d/charts/tekton/tekton-config/templates/tektonpipeline.yaml

+14-2
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,44 @@ spec:
1515
containers:
1616
- name: tekton-pipelines-controller
1717
resources: {{- toYaml .Values.pipelines.controller.resources | nindent 20 }}
18+
securityContext: {{- toYaml .Values.securityContext | nindent 20 }}
1819
tekton-pipelines-remote-resolvers:
1920
spec:
2021
template:
2122
spec:
2223
containers:
2324
- name: controller
2425
resources: {{- toYaml .Values.pipelines.remoteResolvers.resources | nindent 20 }}
26+
securityContext: {{- toYaml .Values.securityContext | nindent 20 }}
2527
tekton-pipelines-webhook:
2628
spec:
2729
template:
2830
spec:
2931
containers:
3032
- name: webhook
3133
resources: {{- toYaml .Values.pipelines.webhook.resources | nindent 20 }}
32-
# These below are not actually part of tekton-pipelines but there was no other way of configuring resource requests/limits for them through the operator chart.
34+
securityContext: {{- toYaml .Values.securityContext | nindent 20 }}
3335
tekton-events-controller:
3436
spec:
3537
template:
3638
spec:
3739
containers:
3840
- name: tekton-events-controller
3941
resources: {{- toYaml .Values.eventsController.resources | nindent 20 }}
42+
securityContext: {{- toYaml .Values.securityContext | nindent 20 }}
43+
tekton-operator-webhook:
44+
spec:
45+
template:
46+
spec:
47+
containers:
48+
- name: tekton-operator-webhook
49+
resources: {{- toYaml .Values.operator.webhook.resources | nindent 20 }}
50+
securityContext: {{- toYaml .Values.securityContext | nindent 20 }}
4051
tekton-operator-proxy-webhook:
4152
spec:
4253
template:
4354
spec:
4455
containers:
4556
- name: proxy
46-
resources: {{- toYaml .Values.webhookProxy.resources | nindent 20 }}
57+
resources: {{- toYaml .Values.operator.webhookProxy.resources | nindent 20 }}
58+
securityContext: {{- toYaml .Values.securityContext | nindent 20 }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
operator:
2+
webhook:
3+
resources:
4+
limits:
5+
cpu: 20m
6+
memory: 64Mi
7+
requests:
8+
cpu: 10m
9+
memory: 32Mi
10+
11+
webhookProxy:
12+
resources:
13+
limits:
14+
cpu: 20m
15+
memory: 64Mi
16+
requests:
17+
cpu: 10m
18+
memory: 32Mi
19+
20+
pipelines:
21+
controller:
22+
resources:
23+
limits:
24+
cpu: 50m
25+
memory: 128Mi
26+
requests:
27+
cpu: 25m
28+
memory: 64Mi
29+
30+
remoteResolvers:
31+
resources:
32+
limits:
33+
cpu: 20m
34+
memory: 64Mi
35+
requests:
36+
cpu: 10m
37+
memory: 32Mi
38+
39+
webhook:
40+
resources:
41+
limits:
42+
cpu: 20m
43+
memory: 128Mi
44+
requests:
45+
cpu: 10m
46+
memory: 64Mi
47+
48+
eventsController:
49+
resources:
50+
limits:
51+
cpu: 20m
52+
memory: 64Mi
53+
requests:
54+
cpu: 10m
55+
memory: 32Mi
56+
57+
securityContext:
58+
capabilities:
59+
drop:
60+
- ALL
61+
readOnlyRootFilesystem: true
62+
runAsNonRoot: true
63+
runAsUser: 1000
64+
allowPrivilegeEscalation: false
65+
seccompProfile:
66+
type: RuntimeDefault

helmfile.d/stacks/tekton.yaml

+16-1
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,23 @@ templates:
3131
inherit:
3232
- template: tekton
3333
name: tekton-operator
34-
chart: charts/tekton/tekton-operator
34+
chart: upstream/tekton-operator
3535
installed: {{ .Values | get "tekton.enabled" false }}
3636
version: 0.68.0
3737
values:
3838
- values/tekton/tekton-sc.gotmpl
39+
40+
tekton-config:
41+
labels:
42+
app: tekton
43+
condition: ck8sManagementCluster.enabled
44+
namespace: tekton-pipelines
45+
needs:
46+
- kube-system/admin-namespaces
47+
- tekton-pipelines/tekton-operator
48+
name: tekton-config
49+
chart: charts/tekton/tekton-config
50+
installed: {{ .Values | get "tekton.enabled" false }}
51+
version: 0.1.0
52+
values:
53+
- values/tekton/tekton-sc.gotmpl

helmfile.d/state.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,4 @@ releases:
157157

158158
- inherit: [ template: tekton-rbac ]
159159
- inherit: [ template: tekton-operator ]
160+
- inherit: [ template: tekton-config ]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

helmfile.d/charts/tekton/tekton-operator/README.md helmfile.d/upstream/tekton-operator/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ helm repo remove tektoncd
6969
**Important:** if you installed the CRDs with the Helm chart (by setting `installCRDs=true`), the CRDs will be removed as well: this means any remaining Tekton resources (e.g. Tekton Pipelines) in the cluster will be deleted!
7070

7171
If you installed the CRDs manually, you can use the following command to remove them (*this will remove all Tekton resources from your cluster*):
72-
7372
```
7473
kubectl delete crd TektonConfig TektonPipeline TektonDashboard TektonInstallerSet TektonResults TektonTrigger TektonAddon --ignore-not-found
7574
```

helmfile.d/upstream/tekton-operator/templates/NOTES.txt

Whitespace-only changes.

helmfile.d/charts/tekton/tekton-operator/templates/deployment.yaml helmfile.d/upstream/tekton-operator/templates/deployment.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ spec:
6868
value: {{ include "tekton-operator.fullname" . }}-observability
6969
args:
7070
- "-controllers"
71-
- {{ .Values.controllers | quote }}
71+
- {{ .Values.controllers | default "tektonconfig,tektonpipeline,tektontrigger,tektonhub,tektonchain,tektonresult,tektondashboard" | quote }}
7272
- "-unique-process-name"
7373
- "tekton-operator-lifecycle"
7474
image: {{ include "tekton-operator.operator-image" . }}

helmfile.d/charts/tekton/tekton-operator/templates/kubernetes-rbac.yaml helmfile.d/upstream/tekton-operator/templates/kubernetes-rbac.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -475,4 +475,4 @@ subjects:
475475
- kind: ServiceAccount
476476
name: {{ include "tekton-operator.fullname" . }}
477477
namespace: {{ .Release.Namespace }}
478-
{{- end -}}
478+
{{- end -}}

0 commit comments

Comments
 (0)