Skip to content

Commit 6783cbb

Browse files
authored
fix: resource defaults (#1732)
1 parent f416c63 commit 6783cbb

File tree

5 files changed

+69
-58
lines changed

5 files changed

+69
-58
lines changed

.cspell.json

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"trivy",
1111
"grype",
1212
"KUBECFG",
13+
"cainjector",
1314
"CNAME",
1415
"SBOM",
1516
"Venafi",

helmfile.d/snippets/defaults.yaml

+53-31
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,34 @@ environments:
8787
cert-manager:
8888
issuer: custom-ca
8989
resources:
90-
requests:
91-
cpu: 50m
92-
memory: 64Mi
93-
limits:
94-
cpu: "1"
95-
memory: 512Mi
90+
certManager:
91+
requests:
92+
cpu: 50m
93+
memory: 128Mi
94+
limits:
95+
cpu: "1"
96+
memory: 512Mi
97+
startupapicheck:
98+
requests:
99+
cpu: 50m
100+
memory: 64Mi
101+
limits:
102+
cpu: 200m
103+
memory: 384Mi
104+
cainjector:
105+
requests:
106+
cpu: 50m
107+
memory: 384Mi
108+
limits:
109+
cpu: 200m
110+
memory: 1Gi
111+
webhook:
112+
requests:
113+
cpu: 50m
114+
memory: 64Mi
115+
limits:
116+
cpu: 100m
117+
memory: 256Mi
96118
_rawValues: {}
97119
cnpg:
98120
resources:
@@ -236,18 +258,18 @@ environments:
236258
resources:
237259
falco:
238260
requests:
239-
cpu: 100m
261+
cpu: 300m
240262
memory: 512Mi
241263
limits:
242264
cpu: "1"
243265
memory: 1Gi
244266
falcoCtlFollow:
245267
requests:
246-
cpu: 100m
247-
memory: 16Mi
268+
cpu: 300m
269+
memory: 128Mi
248270
limits:
249271
cpu: 500m
250-
memory: 32Mi
272+
memory: 256Mi
251273
falcoCtlInstall:
252274
requests:
253275
cpu: 100m
@@ -265,10 +287,10 @@ environments:
265287
falcoExporter:
266288
requests:
267289
cpu: 100m
268-
memory: 16Mi
290+
memory: 128Mi
269291
limits:
270292
cpu: 500m
271-
memory: 32Mi
293+
memory: 512Mi
272294
gitea:
273295
adminUsername: otomi-admin
274296
_rawValues: {}
@@ -488,7 +510,7 @@ environments:
488510
memory: 128Mi
489511
requests:
490512
cpu: 100m
491-
memory: 32Mi
513+
memory: 128Mi
492514
agent:
493515
limits:
494516
cpu: 100m
@@ -513,10 +535,10 @@ environments:
513535
jaeger:
514536
limits:
515537
cpu: "1"
516-
memory: 512Mi
538+
memory: 2Gi
517539
requests:
518-
cpu: 100m
519-
memory: 128Mi
540+
cpu: 200m
541+
memory: 384Mi
520542
_rawValues: {}
521543
keycloak:
522544
adminUsername: otomi-admin
@@ -742,11 +764,11 @@ environments:
742764
memory: 256Mi
743765
tools:
744766
limits:
745-
cpu: 600m
746-
memory: 512Mi
767+
cpu: "1"
768+
memory: 1Gi
747769
requests:
748-
cpu: 100m
749-
memory: 128Mi
770+
cpu: 300m
771+
memory: 256Mi
750772
otomi-console:
751773
_rawValues: {}
752774
resources:
@@ -906,24 +928,24 @@ environments:
906928
compactor:
907929
requests:
908930
cpu: 100m
909-
memory: 256Mi
931+
memory: 384Mi
910932
limits:
911933
cpu: 500m
912934
memory: 1Gi
913935
ingester:
914936
requests:
915937
cpu: 100m
916-
memory: 256Mi
938+
memory: 768Mi
917939
limits:
918940
cpu: 500m
919-
memory: 1Gi
941+
memory: 2Gi
920942
memcached:
921943
requests:
922944
cpu: 50m
923-
memory: 64Mi
945+
memory: 128Mi
924946
limits:
925947
cpu: 200m
926-
memory: 256Mi
948+
memory: 512Mi
927949
querier:
928950
requests:
929951
cpu: 50m
@@ -934,24 +956,24 @@ environments:
934956
metricsGenerator:
935957
requests:
936958
cpu: 50m
937-
memory: 64Mi
959+
memory: 256Mi
938960
limits:
939961
cpu: 200m
940-
memory: 256Mi
962+
memory: 1Gi
941963
distributor:
942964
requests:
943965
cpu: 50m
944-
memory: 64Mi
966+
memory: 384Mi
945967
limits:
946968
cpu: 200m
947-
memory: 256Mi
969+
memory: 1Gi
948970
queryFrontend:
949971
requests:
950972
cpu: 50m
951-
memory: 64Mi
973+
memory: 128Mi
952974
limits:
953975
cpu: 200m
954-
memory: 256Mi
976+
memory: 1Gi
955977
persistence:
956978
ingester:
957979
size: 10Gi

values-changes.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -296,5 +296,6 @@ changes:
296296
relocations:
297297
- 'apps.harbor.resources.registry-controller': 'apps.harbor.resources.registryController'
298298
- 'apps.ingress-nginx.resources': 'apps.ingress-nginx.resources.controller'
299+
- 'apps.cert-manager.resources': 'apps.cert-manager.resources.certManager'
299300
deletions:
300301
- 'teamConfig.{team}.managedMonitoring.prometheus'

values-schema.yaml

+8-1
Original file line numberDiff line numberDiff line change
@@ -1542,7 +1542,14 @@ properties:
15421542
_rawValues:
15431543
$ref: '#/definitions/rawValues'
15441544
resources:
1545-
$ref: '#/definitions/resources'
1545+
certManager:
1546+
$ref: '#/definitions/resources'
1547+
startupapicheck:
1548+
$ref: '#/definitions/resources'
1549+
cainjector:
1550+
$ref: '#/definitions/resources'
1551+
webhook:
1552+
$ref: '#/definitions/resources'
15461553
byoWildcardCert:
15471554
description: 'Bring your own trusted wildcard certificate. Only applicable for byo-wildcard-cert issuer'
15481555
type: string

values/cert-manager/cert-manager.gotmpl

+6-26
Original file line numberDiff line numberDiff line change
@@ -16,42 +16,22 @@ prometheus:
1616
podAnnotations:
1717
sidecar.istio.io/inject: "false"
1818
policy.otomi.io/ignore: psp-allowed-users,psp-privileged,psp-host-security
19+
installCRDs: true
20+
resources: {{- toYaml $cm.resources.certManager | nindent 2 }}
1921

2022
startupapicheck:
2123
jobAnnotations:
2224
sidecar.istio.io/inject: "false"
2325
policy.otomi.io/ignore: containerlimits
24-
resources:
25-
requests:
26-
cpu: 50m
27-
memory: 64Mi
28-
limits:
29-
cpu: 200m
30-
memory: 384Mi
31-
32-
33-
installCRDs: true
34-
35-
resources: {{- toYaml $cm.resources | nindent 2 }}
26+
resources: {{- toYaml $cm.resources.startupapicheck | nindent 4 }}
3627

3728
cainjector:
38-
resources:
39-
requests:
40-
cpu: 50m
41-
memory: 64Mi
42-
limits:
43-
cpu: 200m
44-
memory: 384Mi
29+
resources: {{- toYaml $cm.resources.cainjector | nindent 6 }}
4530
podAnnotations:
4631
policy.otomi.io/ignore: psp-allowed-users,psp-privileged,psp-host-security
4732
webhook:
4833
podAnnotations:
4934
policy.otomi.io/ignore: psp-allowed-users
50-
resources:
51-
requests:
52-
cpu: 50m
53-
memory: 64Mi
54-
limits:
55-
cpu: 100m
56-
memory: 256Mi
35+
resources: {{- toYaml $cm.resources.webhook | nindent 6 }}
36+
5737

0 commit comments

Comments
 (0)