Skip to content

Commit c053278

Browse files
fix: Potential Denial of Service via unrestricted CPU/memory and root user execution (#5203)
* fix: hostPID set to false Signed-off-by: zyue110026 <[email protected]> * fix: hostPID set to false Signed-off-by: zyue110026 <[email protected]> * fix: Potential Denial of Service via unrestricted CPU/memory and root user execution Signed-off-by: zyue110026 <[email protected]> * fix: Potential Denial of Service via unrestricted CPU/memory and root user execution Signed-off-by: zyue110026 <[email protected]> * fix: Potential Denial of Service via unrestricted CPU/memory and root user execution Signed-off-by: zyue110026 <[email protected]> --------- Signed-off-by: zyue110026 <[email protected]> Co-authored-by: Pritesh Kiri <[email protected]>
1 parent fa55f03 commit c053278

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

monitoring/utils/grafana/deployment.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ spec:
1818
- image: grafana/grafana:latest
1919
imagePullPolicy: Always
2020
name: grafana
21+
resources:
22+
requests:
23+
memory: "256Mi"
24+
cpu: "250m"
25+
limits:
26+
memory: "512Mi"
27+
cpu: "500m"
28+
securityContext:
29+
runAsUser: 1000
30+
runAsNonRoot: true
31+
readOnlyRootFilesystem: true
2132
ports:
2233
- containerPort: 3000
2334
name: grafana

monitoring/utils/metrics-exporters-with-service-monitors/litmus-metrics/chaos-exporter/chaos-exporter.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,17 @@ spec:
2828
env:
2929
- name: TSDB_SCRAPE_INTERVAL
3030
value: '10'
31+
resources:
32+
requests:
33+
memory: "256Mi"
34+
cpu: "250m"
35+
limits:
36+
memory: "512Mi"
37+
cpu: "500m"
38+
securityContext:
39+
runAsUser: 1000
40+
runAsNonRoot: true
41+
readOnlyRootFilesystem: true
3142
# uncomment the following lines to use the litmuschaos exporter for monitoring the chaos events and chaosresults for a selected namespace
3243
# - name: WATCH_NAMESPACE
3344
# value: 'litmus'

monitoring/utils/metrics-exporters-with-service-monitors/mysqld-exporter/deployment.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@ spec:
3131
- '--collect.engine_innodb_status'
3232
- '--collect.slave_hosts'
3333
name: mysql-exporter
34+
resources:
35+
requests:
36+
memory: "256Mi"
37+
cpu: "250m"
38+
limits:
39+
memory: "512Mi"
40+
cpu: "500m"
41+
securityContext:
42+
runAsUser: 1000
43+
runAsNonRoot: true
44+
readOnlyRootFilesystem: true
3445
ports:
3546
- containerPort: 9104
3647
name: mysql-metrics

0 commit comments

Comments
 (0)