Skip to content

Commit 5a81817

Browse files
authored
K8SPSMDB-1148 add resources example for pmm section (#2081)
* K8SPSMDB-1148 add resources example for pmm section * increase resources * fix tests
1 parent 0bff7e5 commit 5a81817

File tree

11 files changed

+88
-80
lines changed

11 files changed

+88
-80
lines changed

deploy/cr.yaml

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ spec:
6666
# customClusterName: mongo-cluster
6767
# mongodParams: --environment=ENVIRONMENT
6868
# mongosParams: --environment=ENVIRONMENT
69+
# resources:
70+
# requests:
71+
# memory: 150M
72+
# cpu: 300m
73+
# limits:
74+
# memory: 256M
75+
# cpu: 400m
76+
6977
replsets:
7078
- name: rs0
7179
size: 3
@@ -237,11 +245,11 @@ spec:
237245
# externalTrafficPolicy: Local
238246
resources:
239247
limits:
240-
cpu: "300m"
241-
memory: "0.5G"
248+
cpu: "600m"
249+
memory: "1Gi"
242250
requests:
243251
cpu: "300m"
244-
memory: "0.5G"
252+
memory: "1Gi"
245253
volumeSpec:
246254
# emptyDir: {}
247255
# hostPath:
@@ -298,11 +306,11 @@ spec:
298306
# minAvailable: 0
299307
resources:
300308
limits:
301-
cpu: "300m"
302-
memory: "0.5G"
309+
cpu: "600m"
310+
memory: "1Gi"
303311
requests:
304312
cpu: "300m"
305-
memory: "0.5G"
313+
memory: "1Gi"
306314
volumeSpec:
307315
# emptyDir: {}
308316
# hostPath:
@@ -359,11 +367,11 @@ spec:
359367
# minAvailable: 0
360368
resources:
361369
limits:
362-
cpu: "300m"
363-
memory: "0.5G"
370+
cpu: "600m"
371+
memory: "1Gi"
364372
requests:
365373
cpu: "300m"
366-
memory: "0.5G"
374+
memory: "1Gi"
367375
volumeSpec:
368376
# emptyDir: {}
369377
# hostPath:
@@ -409,11 +417,11 @@ spec:
409417
# schedulerName: "default"
410418
resources:
411419
limits:
412-
cpu: "300m"
413-
memory: "0.5G"
420+
cpu: "600m"
421+
memory: "1Gi"
414422
requests:
415423
cpu: "300m"
416-
memory: "0.5G"
424+
memory: "1Gi"
417425
# hostAliases:
418426
# - ip: "10.10.0.2"
419427
# hostnames:
@@ -512,11 +520,11 @@ spec:
512520
# externalTrafficPolicy: Local
513521
resources:
514522
limits:
515-
cpu: "300m"
516-
memory: "0.5G"
523+
cpu: "600m"
524+
memory: "1Gi"
517525
requests:
518526
cpu: "300m"
519-
memory: "0.5G"
527+
memory: "1Gi"
520528
volumeSpec:
521529
# emptyDir: {}
522530
# hostPath:
@@ -605,11 +613,11 @@ spec:
605613
maxUnavailable: 1
606614
resources:
607615
limits:
608-
cpu: "300m"
609-
memory: "0.5G"
616+
cpu: "600m"
617+
memory: "1Gi"
610618
requests:
611619
cpu: "300m"
612-
memory: "0.5G"
620+
memory: "1Gi"
613621
expose:
614622
type: ClusterIP
615623
# servicePerPod: true
@@ -691,10 +699,10 @@ spec:
691699
# resources:
692700
# limits:
693701
# cpu: "300m"
694-
# memory: "1.2G"
702+
# memory: "1.2Gi"
695703
# requests:
696704
# cpu: "300m"
697-
# memory: "1G"
705+
# memory: "1Gi"
698706
# containerSecurityContext:
699707
# privileged: false
700708
# storages:

e2e-tests/default-cr/compare/statefulset_my-cluster-name-cfg.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ spec:
112112
timeoutSeconds: 2
113113
resources:
114114
limits:
115-
cpu: 300m
116-
memory: 500M
115+
cpu: 600m
116+
memory: 1Gi
117117
requests:
118118
cpu: 300m
119-
memory: 500M
119+
memory: 1Gi
120120
securityContext:
121121
runAsNonRoot: true
122122
runAsUser: 1001
@@ -267,11 +267,11 @@ spec:
267267
name: mongo-init
268268
resources:
269269
limits:
270-
cpu: 300m
271-
memory: 500M
270+
cpu: 600m
271+
memory: 1Gi
272272
requests:
273273
cpu: 300m
274-
memory: 500M
274+
memory: 1Gi
275275
terminationMessagePath: /dev/termination-log
276276
terminationMessagePolicy: File
277277
volumeMounts:

e2e-tests/default-cr/compare/statefulset_my-cluster-name-rs0.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ spec:
112112
timeoutSeconds: 2
113113
resources:
114114
limits:
115-
cpu: 300m
116-
memory: 500M
115+
cpu: 600m
116+
memory: 1Gi
117117
requests:
118118
cpu: 300m
119-
memory: 500M
119+
memory: 1Gi
120120
securityContext:
121121
runAsNonRoot: true
122122
runAsUser: 1001
@@ -267,11 +267,11 @@ spec:
267267
name: mongo-init
268268
resources:
269269
limits:
270-
cpu: 300m
271-
memory: 500M
270+
cpu: 600m
271+
memory: 1Gi
272272
requests:
273273
cpu: 300m
274-
memory: 500M
274+
memory: 1Gi
275275
terminationMessagePath: /dev/termination-log
276276
terminationMessagePolicy: File
277277
volumeMounts:

pkg/controller/perconaservermongodb/testdata/reconcile-statefulset/cfg-arbiter.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ spec:
126126
timeoutSeconds: 2
127127
resources:
128128
limits:
129-
cpu: 300m
130-
memory: 500M
129+
cpu: 600m
130+
memory: 1Gi
131131
requests:
132132
cpu: 300m
133-
memory: 500M
133+
memory: 1Gi
134134
securityContext:
135135
runAsNonRoot: true
136136
runAsUser: 1001
@@ -269,11 +269,11 @@ spec:
269269
name: mongo-init
270270
resources:
271271
limits:
272-
cpu: 300m
273-
memory: 500M
272+
cpu: 600m
273+
memory: 1Gi
274274
requests:
275275
cpu: 300m
276-
memory: 500M
276+
memory: 1Gi
277277
volumeMounts:
278278
- mountPath: /data/db
279279
name: mongod-data

pkg/controller/perconaservermongodb/testdata/reconcile-statefulset/cfg-hidden.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ spec:
126126
timeoutSeconds: 2
127127
resources:
128128
limits:
129-
cpu: 300m
130-
memory: 500M
129+
cpu: 600m
130+
memory: 1Gi
131131
requests:
132132
cpu: 300m
133-
memory: 500M
133+
memory: 1Gi
134134
securityContext:
135135
runAsNonRoot: true
136136
runAsUser: 1001
@@ -269,11 +269,11 @@ spec:
269269
name: mongo-init
270270
resources:
271271
limits:
272-
cpu: 300m
273-
memory: 500M
272+
cpu: 600m
273+
memory: 1Gi
274274
requests:
275275
cpu: 300m
276-
memory: 500M
276+
memory: 1Gi
277277
volumeMounts:
278278
- mountPath: /data/db
279279
name: mongod-data

pkg/controller/perconaservermongodb/testdata/reconcile-statefulset/cfg-mongod.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ spec:
126126
timeoutSeconds: 2
127127
resources:
128128
limits:
129-
cpu: 300m
130-
memory: 500M
129+
cpu: 600m
130+
memory: 1Gi
131131
requests:
132132
cpu: 300m
133-
memory: 500M
133+
memory: 1Gi
134134
securityContext:
135135
runAsNonRoot: true
136136
runAsUser: 1001
@@ -269,11 +269,11 @@ spec:
269269
name: mongo-init
270270
resources:
271271
limits:
272-
cpu: 300m
273-
memory: 500M
272+
cpu: 600m
273+
memory: 1Gi
274274
requests:
275275
cpu: 300m
276-
memory: 500M
276+
memory: 1Gi
277277
volumeMounts:
278278
- mountPath: /data/db
279279
name: mongod-data

pkg/controller/perconaservermongodb/testdata/reconcile-statefulset/cfg-nv.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ spec:
126126
timeoutSeconds: 2
127127
resources:
128128
limits:
129-
cpu: 300m
130-
memory: 500M
129+
cpu: 600m
130+
memory: 1Gi
131131
requests:
132132
cpu: 300m
133-
memory: 500M
133+
memory: 1Gi
134134
securityContext:
135135
runAsNonRoot: true
136136
runAsUser: 1001
@@ -269,11 +269,11 @@ spec:
269269
name: mongo-init
270270
resources:
271271
limits:
272-
cpu: 300m
273-
memory: 500M
272+
cpu: 600m
273+
memory: 1Gi
274274
requests:
275275
cpu: 300m
276-
memory: 500M
276+
memory: 1Gi
277277
volumeMounts:
278278
- mountPath: /data/db
279279
name: mongod-data

pkg/controller/perconaservermongodb/testdata/reconcile-statefulset/rs0-arbiter.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ spec:
126126
timeoutSeconds: 2
127127
resources:
128128
limits:
129-
cpu: 300m
130-
memory: 500M
129+
cpu: 600m
130+
memory: 1Gi
131131
requests:
132132
cpu: 300m
133-
memory: 500M
133+
memory: 1Gi
134134
securityContext:
135135
runAsNonRoot: true
136136
runAsUser: 1001
@@ -163,11 +163,11 @@ spec:
163163
name: mongo-init
164164
resources:
165165
limits:
166-
cpu: 300m
167-
memory: 500M
166+
cpu: 600m
167+
memory: 1Gi
168168
requests:
169169
cpu: 300m
170-
memory: 500M
170+
memory: 1Gi
171171
volumeMounts:
172172
- mountPath: /data/db
173173
name: mongod-data

pkg/controller/perconaservermongodb/testdata/reconcile-statefulset/rs0-hidden.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,11 @@ spec:
125125
timeoutSeconds: 2
126126
resources:
127127
limits:
128-
cpu: 300m
129-
memory: 500M
128+
cpu: 600m
129+
memory: 1Gi
130130
requests:
131131
cpu: 300m
132-
memory: 500M
132+
memory: 1Gi
133133
securityContext:
134134
runAsNonRoot: true
135135
runAsUser: 1001
@@ -268,11 +268,11 @@ spec:
268268
name: mongo-init
269269
resources:
270270
limits:
271-
cpu: 300m
272-
memory: 500M
271+
cpu: 600m
272+
memory: 1Gi
273273
requests:
274274
cpu: 300m
275-
memory: 500M
275+
memory: 1Gi
276276
volumeMounts:
277277
- mountPath: /data/db
278278
name: mongod-data

pkg/controller/perconaservermongodb/testdata/reconcile-statefulset/rs0-mongod.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ spec:
126126
timeoutSeconds: 2
127127
resources:
128128
limits:
129-
cpu: 300m
130-
memory: 500M
129+
cpu: 600m
130+
memory: 1Gi
131131
requests:
132132
cpu: 300m
133-
memory: 500M
133+
memory: 1Gi
134134
securityContext:
135135
runAsNonRoot: true
136136
runAsUser: 1001
@@ -269,11 +269,11 @@ spec:
269269
name: mongo-init
270270
resources:
271271
limits:
272-
cpu: 300m
273-
memory: 500M
272+
cpu: 600m
273+
memory: 1Gi
274274
requests:
275275
cpu: 300m
276-
memory: 500M
276+
memory: 1Gi
277277
volumeMounts:
278278
- mountPath: /data/db
279279
name: mongod-data

0 commit comments

Comments
 (0)