Skip to content

Commit 9be4086

Browse files
fix(sizing): create cpu template and adjust some memory sizing (#560)
- Add cpu templates - Refactor to harmonize cpu and memory templates - Adjust some servers sizing (increase size): geo-data, report, single-line-diagram, network-store and network-map - Increase Xmx for xl and xl-forking templates from 1086m to 1214m (and adjust limits in consequence) Signed-off-by: Joris Mancini <[email protected]>
1 parent f777afb commit 9be4086

File tree

57 files changed

+285
-72
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+285
-72
lines changed

k8s/components/gridsuite-smaller-network/kustomization.yaml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ patches:
66
- target:
77
kind: Deployment
88
labelSelector: app.kubernetes.io/component=gridsuite-springboot
9-
annotationSelector: gridsuite.org/size=springboot-xxs
9+
annotationSelector: gridsuite.org/memory=memory-xxs
1010
patch: |-
1111
apiVersion: apps/v1
1212
kind: Deployment
@@ -25,7 +25,7 @@ patches:
2525
metadata:
2626
name: not-important
2727
annotations:
28-
gridsuite.org/size: springboot-xs
28+
gridsuite.org/memory: memory-xs
2929
3030
# reset xxs to their original size
3131
- target:
@@ -36,5 +36,21 @@ patches:
3636
- op: remove
3737
path: /metadata/annotations/gridsuite.org~1smallnetwork-tmptag
3838
- op: replace
39-
path: /metadata/annotations/gridsuite.org~1size
40-
value: springboot-xxs
39+
path: /metadata/annotations/gridsuite.org~1memory
40+
value: memory-xxs
41+
42+
# remove cpu requests/limits annotations (except security-analysis-server which has hardcoded resources)
43+
- target:
44+
kind: Deployment
45+
labelSelector: app.kubernetes.io/component=gridsuite-springboot,name!=security-analysis-server
46+
patch: |-
47+
- op: remove
48+
path: /metadata/annotations/gridsuite.org~1cpu
49+
50+
# remove hardcoded cpu and memory requests/limits for security-analysis-server
51+
- target:
52+
kind: Deployment
53+
labelSelector: name=security-analysis-server
54+
patch: |-
55+
- op: remove
56+
path: /spec/template/spec/containers/0/resources

k8s/components/gridsuite/kustomization.yaml

Lines changed: 59 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -44,66 +44,101 @@ patches:
4444
target:
4545
kind: CronJob
4646
labelSelector: gridsuite.org/cronjob-with-database=true
47-
- path: patches/deployments-springboot-size-xxs.yaml
47+
- path: patches/cpu/deployments-springboot-cpu-xxs.yaml
4848
target:
4949
kind: Deployment
5050
labelSelector: app.kubernetes.io/component=gridsuite-springboot
51-
annotationSelector: gridsuite.org/size=springboot-xxs
52-
- path: patches/deployments-springboot-size-xs.yaml
51+
annotationSelector: gridsuite.org/cpu=cpu-xxs
52+
- path: patches/cpu/deployments-springboot-cpu-xs.yaml
5353
target:
5454
kind: Deployment
5555
labelSelector: app.kubernetes.io/component=gridsuite-springboot
56-
annotationSelector: gridsuite.org/size=springboot-xs
57-
- path: patches/deployments-springboot-size-s.yaml
56+
annotationSelector: gridsuite.org/cpu=cpu-xs
57+
- path: patches/cpu/deployments-springboot-cpu-s.yaml
5858
target:
5959
kind: Deployment
6060
labelSelector: app.kubernetes.io/component=gridsuite-springboot
61-
annotationSelector: gridsuite.org/size=springboot-s
62-
- path: patches/deployments-springboot-size-m.yaml
61+
annotationSelector: gridsuite.org/cpu=cpu-s
62+
- path: patches/cpu/deployments-springboot-cpu-m.yaml
6363
target:
6464
kind: Deployment
6565
labelSelector: app.kubernetes.io/component=gridsuite-springboot
66-
annotationSelector: gridsuite.org/size=springboot-m
67-
- path: patches/deployments-springboot-size-l.yaml
66+
annotationSelector: gridsuite.org/cpu=cpu-m
67+
- path: patches/cpu/deployments-springboot-cpu-l.yaml
6868
target:
6969
kind: Deployment
7070
labelSelector: app.kubernetes.io/component=gridsuite-springboot
71-
annotationSelector: gridsuite.org/size=springboot-l
72-
- path: patches/deployments-springboot-size-l-forking.yaml
71+
annotationSelector: gridsuite.org/cpu=cpu-l
72+
- path: patches/cpu/deployments-springboot-cpu-xl.yaml
7373
target:
7474
kind: Deployment
7575
labelSelector: app.kubernetes.io/component=gridsuite-springboot
76-
annotationSelector: gridsuite.org/size=springboot-l-forking
77-
- path: patches/deployments-springboot-size-xl.yaml
76+
annotationSelector: gridsuite.org/cpu=cpu-xl
77+
- path: patches/cpu/deployments-springboot-cpu-xxl.yaml
7878
target:
7979
kind: Deployment
8080
labelSelector: app.kubernetes.io/component=gridsuite-springboot
81-
annotationSelector: gridsuite.org/size=springboot-xl
82-
- path: patches/deployments-springboot-size-xl-forking.yaml
81+
annotationSelector: gridsuite.org/cpu=cpu-xxl
82+
- path: patches/memory/deployments-springboot-memory-springnative-xs.yaml
8383
target:
8484
kind: Deployment
8585
labelSelector: app.kubernetes.io/component=gridsuite-springboot
86-
annotationSelector: gridsuite.org/size=springboot-xl-forking
87-
- path: patches/deployments-springboot-size-xxl.yaml
86+
annotationSelector: gridsuite.org/memory=memory-springnative-xs
87+
- path: patches/memory/deployments-springboot-memory-xxs.yaml
8888
target:
8989
kind: Deployment
9090
labelSelector: app.kubernetes.io/component=gridsuite-springboot
91-
annotationSelector: gridsuite.org/size=springboot-xxl
92-
- path: patches/deployments-springboot-size-xxl-forking.yaml
91+
annotationSelector: gridsuite.org/memory=memory-xxs
92+
- path: patches/memory/deployments-springboot-memory-xs.yaml
9393
target:
9494
kind: Deployment
9595
labelSelector: app.kubernetes.io/component=gridsuite-springboot
96-
annotationSelector: gridsuite.org/size=springboot-xxl-forking
97-
- path: patches/deployments-springboot-size-security-analysis.yaml
96+
annotationSelector: gridsuite.org/memory=memory-xs
97+
- path: patches/memory/deployments-springboot-memory-s.yaml
9898
target:
9999
kind: Deployment
100100
labelSelector: app.kubernetes.io/component=gridsuite-springboot
101-
annotationSelector: gridsuite.org/size=springboot-security-analysis
102-
- path: patches/deployments-springnative-size-xs.yaml
101+
annotationSelector: gridsuite.org/memory=memory-s
102+
- path: patches/memory/deployments-springboot-memory-m.yaml
103103
target:
104104
kind: Deployment
105105
labelSelector: app.kubernetes.io/component=gridsuite-springboot
106-
annotationSelector: gridsuite.org/size=springnative-xs
106+
annotationSelector: gridsuite.org/memory=memory-m
107+
- path: patches/memory/deployments-springboot-memory-l.yaml
108+
target:
109+
kind: Deployment
110+
labelSelector: app.kubernetes.io/component=gridsuite-springboot
111+
annotationSelector: gridsuite.org/memory=memory-l
112+
- path: patches/memory/deployments-springboot-memory-xl.yaml
113+
target:
114+
kind: Deployment
115+
labelSelector: app.kubernetes.io/component=gridsuite-springboot
116+
annotationSelector: gridsuite.org/memory=memory-xl
117+
- path: patches/memory/deployments-springboot-memory-xxl.yaml
118+
target:
119+
kind: Deployment
120+
labelSelector: app.kubernetes.io/component=gridsuite-springboot
121+
annotationSelector: gridsuite.org/memory=memory-xxl
122+
- path: patches/memory/deployments-springboot-memory-xxxl.yaml
123+
target:
124+
kind: Deployment
125+
labelSelector: app.kubernetes.io/component=gridsuite-springboot
126+
annotationSelector: gridsuite.org/memory=memory-xxxl
127+
- path: patches/memory/deployments-springboot-memory-l-forking.yaml
128+
target:
129+
kind: Deployment
130+
labelSelector: app.kubernetes.io/component=gridsuite-springboot
131+
annotationSelector: gridsuite.org/memory=memory-l-forking
132+
- path: patches/memory/deployments-springboot-memory-xl-forking.yaml
133+
target:
134+
kind: Deployment
135+
labelSelector: app.kubernetes.io/component=gridsuite-springboot
136+
annotationSelector: gridsuite.org/memory=memory-xl-forking
137+
- path: patches/memory/deployments-springboot-memory-xxl-forking.yaml
138+
target:
139+
kind: Deployment
140+
labelSelector: app.kubernetes.io/component=gridsuite-springboot
141+
annotationSelector: gridsuite.org/memory=memory-xxl-forking
107142
- path: patches/deployments-springboot-elasticsearch-config.yaml
108143
target:
109144
kind: Deployment
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: not-important
5+
annotations:
6+
gridsuite.org/cpu: cpu-l
7+
spec:
8+
template:
9+
spec:
10+
containers:
11+
- name: main
12+
resources:
13+
requests:
14+
cpu: "2000m"
15+
limits:
16+
cpu: "4000m"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: not-important
5+
annotations:
6+
gridsuite.org/cpu: cpu-m
7+
spec:
8+
template:
9+
spec:
10+
containers:
11+
- name: main
12+
resources:
13+
requests:
14+
cpu: "1500m"
15+
limits:
16+
cpu: "3000m"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: not-important
5+
annotations:
6+
gridsuite.org/cpu: cpu-s
7+
spec:
8+
template:
9+
spec:
10+
containers:
11+
- name: main
12+
resources:
13+
requests:
14+
cpu: "1000m"
15+
limits:
16+
cpu: "2000m"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: not-important
5+
annotations:
6+
gridsuite.org/cpu: cpu-xl
7+
spec:
8+
template:
9+
spec:
10+
containers:
11+
- name: main
12+
resources:
13+
requests:
14+
cpu: "2500m"
15+
limits:
16+
cpu: "5000m"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: not-important
5+
annotations:
6+
gridsuite.org/cpu: cpu-xs
7+
spec:
8+
template:
9+
spec:
10+
containers:
11+
- name: main
12+
resources:
13+
requests:
14+
cpu: "500m"
15+
limits:
16+
cpu: "1000m"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: not-important
5+
annotations:
6+
gridsuite.org/cpu: cpu-xxl
7+
spec:
8+
template:
9+
spec:
10+
containers:
11+
- name: main
12+
resources:
13+
requests:
14+
cpu: "3500m"
15+
limits:
16+
cpu: "7000m"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: not-important
5+
annotations:
6+
gridsuite.org/cpu: cpu-xxs
7+
spec:
8+
template:
9+
spec:
10+
containers:
11+
- name: main
12+
resources:
13+
requests:
14+
cpu: "100m"
15+
limits:
16+
cpu: "500m"

k8s/components/gridsuite/patches/deployments-apache-gridapp.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ metadata:
55
spec:
66
template:
77
spec:
8+
containers:
9+
- name: main
10+
resources:
11+
requests:
12+
cpu: "500m"
13+
limits:
14+
cpu: "1000m"
815
volumes:
916
- name: gridapps-env-configmap-volume
1017
configMap:

0 commit comments

Comments
 (0)