Skip to content

Commit 5b1d52f

Browse files
authored
fix: Revert "fix: default resource config (#1747)" (#1750)
1 parent 4ad18c0 commit 5b1d52f

28 files changed

+234
-614
lines changed

charts/team-ns/templates/tekton-tasks/buildpacks.yaml

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
{{- $v := .Values }}
2-
{{- range $v.resources }}
31
apiVersion: tekton.dev/v1
42
kind: Task
53
metadata:
@@ -87,7 +85,13 @@ spec:
8785
env:
8886
- name: CNB_PLATFORM_API
8987
value: "0.9"
90-
computeResources: {{- $v.resources.buildpacksTask | toYaml | nindent 6 }}
88+
computeResources:
89+
limits:
90+
cpu: "2"
91+
memory: 2Gi
92+
requests:
93+
cpu: 500m
94+
memory: 512Mi
9195
steps:
9296
- name: prepare
9397
computeResources: {}
@@ -197,5 +201,4 @@ spec:
197201
- name: empty-dir
198202
emptyDir: {}
199203
- name: layers-dir
200-
emptyDir: {}
201-
{{- end }}
204+
emptyDir: {}

charts/team-ns/templates/tekton-tasks/git-clone.yaml

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
{{- $v := .Values }}
2-
{{- range $v.resources }}
31
apiVersion: tekton.dev/v1
42
kind: Task
53
metadata:
@@ -14,7 +12,13 @@ metadata:
1412
tekton.dev/platforms: "linux/amd64,linux/s390x,linux/ppc64le,linux/arm64"
1513
spec:
1614
stepTemplate:
17-
computeResources: {{- $v.resources.gitcloneTask | toYaml | nindent 6 }}
15+
computeResources:
16+
limits:
17+
cpu: "2"
18+
memory: 2Gi
19+
requests:
20+
cpu: 500m
21+
memory: 512Mi
1822
description: >-
1923
These Tasks are Git tasks to work with repositories used by other tasks
2024
in your Pipeline.
@@ -255,5 +259,4 @@ spec:
255259
RESULT_COMMITTER_DATE="$(git log -1 --pretty=%ct)"
256260
printf "%s" "${RESULT_COMMITTER_DATE}" > "$(results.committer-date.path)"
257261
printf "%s" "${RESULT_SHA}" > "$(results.commit.path)"
258-
printf "%s" "${PARAM_URL}" > "$(results.url.path)"
259-
{{- end }}
262+
printf "%s" "${PARAM_URL}" > "$(results.url.path)"

charts/team-ns/templates/tekton-tasks/grype.yaml

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
{{- $v := .Values }}
2-
{{- range $v.resources }}
31
apiVersion: tekton.dev/v1
42
kind: Task
53
metadata:
@@ -14,7 +12,13 @@ metadata:
1412
tekton.dev/platforms: "linux/amd64,linux/arm64,linux/ppc64le,linux/390x"
1513
spec:
1614
stepTemplate:
17-
computeResources: {{- $v.resources.grypeTask | toYaml | nindent 6 }}
15+
computeResources:
16+
limits:
17+
cpu: "2"
18+
memory: 2Gi
19+
requests:
20+
cpu: 500m
21+
memory: 512Mi
1822
description: >-
1923
A vulnerability scanner for container images and filesystems.
2024
Works with Syft, the powerful SBOM (software bill of materials) tool for container images and filesystems.
@@ -43,4 +47,3 @@ spec:
4347
- "ALL"
4448
seccompProfile:
4549
type: RuntimeDefault
46-
{{- end }}

charts/team-ns/templates/tekton-tasks/kaniko.yaml

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
{{- $v := .Values }}
2-
{{- range $v.resources }}
31
apiVersion: tekton.dev/v1
42
kind: Task
53
metadata:
@@ -14,7 +12,13 @@ metadata:
1412
tekton.dev/platforms: "linux/amd64,linux/arm64,linux/ppc64le"
1513
spec:
1614
stepTemplate:
17-
computeResources: {{- $v.resources.kanikoTask | toYaml | nindent 6 }}
15+
computeResources:
16+
limits:
17+
cpu: "2"
18+
memory: 2Gi
19+
requests:
20+
cpu: 500m
21+
memory: 512Mi
1822
description: >-
1923
This Task builds a simple Dockerfile with kaniko and pushes to a registry.
2024
This Task stores the image name and digest as results, allowing Tekton Chains to pick up
@@ -76,4 +80,3 @@ spec:
7680
set -e
7781
image="$(params.IMAGE)"
7882
echo -n "${image}" | tee "$(results.IMAGE_URL.path)"
79-
{{- end }}

charts/tekton-pipelines/templates/deployment-tekton-events-controller.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,13 @@ spec:
6363
- name: tekton-events-controller
6464
image: {{ .Values.events.deployment.image }}
6565
args: []
66-
resources: {{- toYaml .Values.events.resources | nindent 12 }}
66+
resources:
67+
requests:
68+
cpu: 100m
69+
memory: 100Mi
70+
limits:
71+
cpu: 1000m
72+
memory: 1000Mi
6773
volumeMounts:
6874
- name: config-logging
6975
mountPath: /etc/config-logging

charts/tekton-pipelines/templates/deployment-tekton-pipelines-controller.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,13 @@ spec:
122122
runAsNonRoot: true
123123
seccompProfile:
124124
type: RuntimeDefault
125-
resources: {{- toYaml .Values.controller.resources | nindent 12 }}
125+
resources:
126+
requests:
127+
cpu: 100m
128+
memory: 100Mi
129+
limits:
130+
cpu: 1000m
131+
memory: 1000Mi
126132
ports:
127133
- name: metrics
128134
containerPort: 9090

charts/tekton-pipelines/templates/deployment-tekton-pipelines-remote-resolvers.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,13 @@ spec:
6464
containers:
6565
- name: controller
6666
image: {{ .Values.remoteresolver.deployment.image }}
67-
resources: {{- toYaml .Values.controller.resources | nindent 12 }}
67+
resources:
68+
requests:
69+
cpu: 100m
70+
memory: 100Mi
71+
limits:
72+
cpu: 1000m
73+
memory: 2Gi
6874
ports:
6975
- name: metrics
7076
containerPort: 9090

charts/tekton-pipelines/templates/deployment-tekton-pipelines-webhook.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,13 @@ spec:
7878
# and substituted here.
7979
image: {{ .Values.webhook.deployment.image }}
8080
# Resource request required for autoscaler to take any action for a metric
81-
resources: {{- toYaml .Values.events.resources | nindent 12 }}
81+
resources:
82+
requests:
83+
cpu: 100m
84+
memory: 100Mi
85+
limits:
86+
cpu: 500m
87+
memory: 500Mi
8288
env:
8389
- name: SYSTEM_NAMESPACE
8490
valueFrom:

charts/tekton-pipelines/values.yaml

+15-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@ controller:
2020
- windows
2121
tolerations: []
2222
nodeSelector: {}
23-
resources: {}
23+
resources:
24+
requests:
25+
cpu: 100m
26+
memory: 100Mi
27+
limits:
28+
cpu: 1000m
29+
memory: 1000Mi
2430
# Values for tekton-pipelines-webhook
2531
webhook:
2632
deployment:
@@ -42,17 +48,21 @@ webhook:
4248
- windows
4349
tolerations: []
4450
nodeSelector: {}
45-
resources: {}
4651
# Values to amend tekton-pipelines-remote-resolvers
4752
remoteresolver:
4853
deployment:
4954
image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/resolvers:v0.53.0@sha256:6445641a3ea1afa918f92ef51d18edf1bdb40c08878374db33e290221e3564e1
5055
affinity: {}
5156
tolerations: []
5257
nodeSelector: {}
53-
resources: {}
58+
resources:
59+
requests:
60+
cpu: 100m
61+
memory: 100Mi
62+
limits:
63+
cpu: 1000m
64+
memory: 1000Mi
5465

5566
events:
5667
deployment:
57-
image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/events:v0.53.0@sha256:340e1edd0783bdb86e396ef53499f068a42da1986a1d806ab652b448869637bd
58-
resources: {}
68+
image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/events:v0.53.0@sha256:340e1edd0783bdb86e396ef53499f068a42da1986a1d806ab652b448869637bd

core.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ k8s:
33
namespaces:
44
- name: argocd
55
app: argocd
6-
disableIstioInjection: true
76
- name: cert-manager
87
disableIstioInjection: true
98
- name: cnpg-system
@@ -110,7 +109,6 @@ k8s:
110109
- name: velero
111110
app: velero
112111
disablePolicyChecks: true
113-
disableIstioInjection: true
114112
- name: otomi-pipelines
115113
app: tekton
116114
disableIstioInjection: true

helmfile.d/helmfile-60.teams.yaml

-4
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ releases:
3939
pipeline: otomi-task-teams
4040
values:
4141
- ../values/tekton-dashboard/tekton-dashboard-teams.gotmpl
42-
- resources: {{- $team.resources.tektonDashboard | toYaml | nindent 10 }}
4342
- name: prometheus-{{ $teamId }}
4443
installed: {{ or ($team | get "managedMonitoring.grafana" false) ($team | get "managedMonitoring.alertmanager" false) }}
4544
namespace: team-{{ $teamId }}
@@ -58,7 +57,6 @@ releases:
5857
namespaceOverride: null
5958
alertmanagerSpec:
6059
externalUrl: "https://alertmanager-{{ $teamId }}.{{ $domain }}"
61-
resources: {{- $team.resources.alertmanager | toYaml | nindent 14 }}
6260
podMetadata:
6361
annotations:
6462
sidecar.istio.io/inject: "true"
@@ -79,14 +77,12 @@ releases:
7977
namespaceOverride: null # team-{{ $teamId }}
8078
nameOverride: {{ $teamId }}-po-grafana
8179
fullnameOverride: {{ $teamId }}-po-grafana
82-
resources: {{- $team.resources.grafana | toYaml | nindent 12 }}
8380
grafana.ini:
8481
"auth.generic_oauth":
8582
role_attribute_path: contains(groups[*], 'admin') && 'Admin' || contains(groups[*], 'team-admin') && 'Admin' || contains(groups[*], 'team-{{ $teamId }}') && 'Editor'{{ if not ($team | get "managedMonitoring.private" false) }} || 'Viewer'{{- end }}
8683
server:
8784
root_url: https://grafana-{{ $teamId }}.{{ $domain }}
8885
sidecar:
89-
resources: {{- $team.resources.grafanaSidecar | toYaml | nindent 14 }}
9086
datasources:
9187
defaultDatasourceEnabled: false
9288
dashboards:

0 commit comments

Comments
 (0)