Skip to content

Commit

Permalink
update from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
nvanthao committed Sep 25, 2024
1 parent ebfe34c commit 6ab57c9
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions pkg/preflights/host-preflight.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ spec:
fileSize: 22Mi
operationSize: 2300
datasync: true
runTime: '0' # let it run to completion
runTime: "0" # let it run to completion
- dns:
collectorName: 'wildcard-check'
hostnames:
Expand Down Expand Up @@ -273,49 +273,49 @@ spec:
regex: 'proc'
outcomes:
- pass:
when: 'true'
when: "true"
message: /proc filesystem is mounted
- fail:
when: 'false'
when: "false"
message: /proc filesystem must be mounted, but it currently is not
- textAnalyze:
checkName: "'modprobe' Command"
fileName: host-collectors/run-host/check-modprobe.txt
regex: 'modprobe'
outcomes:
- pass:
when: 'true'
when: "true"
message: "'modprobe' command exists in PATH"
- fail:
when: 'false'
when: "false"
message: "'modprobe' command must exist in PATH"
- textAnalyze:
checkName: "'mount' Command"
fileName: host-collectors/run-host/check-mount.txt
regex: 'mount'
outcomes:
- pass:
when: 'true'
when: "true"
message: "'mount' command exists in PATH"
- fail:
when: 'false'
when: "false"
message: "'mount' command must exist in PATH"
- textAnalyze:
checkName: "'umount' Command"
fileName: host-collectors/run-host/check-umount.txt
regex: 'umount'
outcomes:
- pass:
when: 'true'
when: "true"
message: "'umount' command exists in PATH"
- fail:
when: 'false'
when: "false"
message: "'umount' command must exist in PATH"
- hostOS:
checkName: Kernel Version
outcomes:
- pass:
when: 'kernelVersion >= 3.10'
when: "kernelVersion >= 3.10"
message: Kernel version is at least 3.10
- fail:
message: Kernel version must be at least 3.10
Expand Down Expand Up @@ -371,17 +371,17 @@ spec:
regex: 'nameserver\s*(localhost|127\.0\.0\.1)'
outcomes:
- fail:
when: 'true'
message: "Neither 'nameserver localhost' nor 'nameserver 127.0.0.1' can be present in resolv.conf. Remove them to continue."
when: "true"
message: "Local DNS resolver detected. Remove the localhost and/or 127.0.0.1 nameserver entries from resolv.conf."
- pass:
when: 'false'
when: "false"
message: "Neither 'nameserver localhost' nor 'nameserver 127.0.01' is present in resolv.conf"
- filesystemPerformance:
checkName: Filesystem Write Latency
collectorName: filesystem-write-latency-etcd
outcomes:
- pass:
when: 'p99 < 10ms'
when: "p99 < 10ms"
message: 'P99 write latency for the disk at /var/lib/k0s/etcd is {{ "{{" }} .P99 {{ "}}" }}, which is better than the 10 ms requirement.'
- fail:
message: 'P99 write latency for the disk at /var/lib/k0s/etcd is {{ "{{" }} .P99 {{ "}}" }}, but it must be less than 10 ms. A higher-performance disk is required.'
Expand All @@ -394,7 +394,8 @@ spec:
outcomes:
- fail:
when: 'false'
message: 'Possible wildcard DNS entry detected at: {{ "{{" }} .resolvedFromSearch {{ "}}" }} . Remove the search domain OR remove the wildcard DNS entry.'
message: 'Wildcard DNS entry {{ "{{" }} .resolvedFromSearch {{ "}}" }} detected. Remove the wildcard DNS entry or the {{ "{{" }} .resolvedFromSearch {{ "}}" }} search domain from resolv.conf.'
- pass:
when: 'true'
message: No wildcard DNS entry detected.

0 comments on commit 6ab57c9

Please sign in to comment.