Skip to content

Commit de55529

Browse files
feat: Use filesystem specific checks for host preflights (#746)
* Use filesystem specific checks for host preflights sc-107808 * fail not warn * Update pkg/preflights/host-preflight.yaml Co-authored-by: Alex Parker <[email protected]> * Update pkg/preflights/host-preflight.yaml Co-authored-by: Alex Parker <[email protected]> * remove used/total conditions * fail if /var/lib/k0s is more than 80% full --------- Co-authored-by: Alex Parker <[email protected]>
1 parent 8517e8c commit de55529

File tree

1 file changed

+43
-7
lines changed

1 file changed

+43
-7
lines changed

pkg/preflights/host-preflight.yaml

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ spec:
77
- diskUsage:
88
collectorName: root-disk-usage
99
path: /
10+
- diskUsage:
11+
collectorName: embedded-cluster-path-usage
12+
path: /var/lib/embedded-cluster
13+
- diskUsage:
14+
collectorName: k0s-path-usage
15+
path: /var/lib/k0s
16+
- diskUsage:
17+
collectorName: openebs-path-usage
18+
path: /opt/openebs
19+
- diskUsage:
20+
collectorName: tmp-path-usage
21+
path: /tmp
1022
- memory: {}
1123
- cpu: {}
1224
- time: {}
@@ -22,20 +34,44 @@ spec:
2234
- pass:
2335
message: This node has at least 2 CPU cores
2436
- diskUsage:
25-
checkName: Root disk usage
26-
collectorName: root-disk-usage
37+
checkName: embedded-cluster path usage
38+
collectorName: embedded-cluster-path-usage
39+
outcomes:
40+
- fail:
41+
when: 'total < 40Gi'
42+
message: The filesystem at the path /var/lib/embedded-cluster has less than 40Gi of total space
43+
- pass:
44+
message: The filesystem at the path /var/lib/embedded-cluster has sufficient space
45+
- diskUsage:
46+
checkName: k0s path usage
47+
collectorName: k0s-path-usage
2748
outcomes:
2849
- fail:
2950
when: 'total < 40Gi'
30-
message: The disk containing directory / has less than 40Gi of total space
51+
message: The filesystem at the path /var/lib/k0s has less than 40Gi of total space
3152
- fail:
3253
when: 'used/total > 80%'
33-
message: The disk containing directory / is more than 80% full
54+
message: The filesystem at the path /var/lib/k0s is more than 80% full
55+
- pass:
56+
message: The filesystem at the path /var/lib/k0s has sufficient space
57+
- diskUsage:
58+
checkName: openebs path usage
59+
collectorName: openebs-path-usage
60+
outcomes:
61+
- fail:
62+
when: 'total < 5Gi'
63+
message: The filesystem at the path /opt/openebs has less than 5Gi of total space
64+
- pass:
65+
message: The filesystem at the path /opt/openebs has sufficient space
66+
- diskUsage:
67+
checkName: tmp path usage
68+
collectorName: tmp-path-usage
69+
outcomes:
3470
- fail:
35-
when: 'available < 10Gi'
36-
message: The disk containing directory / has less than 10Gi of disk space available
71+
when: 'total < 5Gi'
72+
message: The filesystem at the path /tmp has less than 5Gi of total space
3773
- pass:
38-
message: The disk containing directory / has sufficient space
74+
message: The filesystem at the path /tmp has sufficient space
3975
- memory:
4076
checkName: Amount of memory on the system
4177
outcomes:

0 commit comments

Comments
 (0)