-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add HostPreflight v1beta2 * Work on TCP Load Balancer * Host disk usage collector and analyzer * Host memory analyzer * TCP port status * TCP load balancer * Review changes Co-authored-by: Marc Campbell <marc.e.campbell@gmail.com>
- Loading branch information
1 parent
df68f74
commit 10a34c2
Showing
38 changed files
with
3,274 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: troubleshoot.sh/v1beta2 | ||
kind: HostPreflight | ||
metadata: | ||
name: cpu | ||
spec: | ||
collectors: | ||
- cpu: {} | ||
analyzers: | ||
- cpu: | ||
outcomes: | ||
- fail: | ||
when: "physical < 4" | ||
message: At least 4 physical CPU cores are required | ||
- fail: | ||
when: "logical < 8" | ||
message: At least 8 CPU cores are required | ||
- warn: | ||
when: "count < 16" | ||
message: At least 16 CPU cores preferred | ||
- pass: | ||
message: This server has sufficient CPU cores | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
apiVersion: troubleshoot.sh/v1beta2 | ||
kind: HostPreflight | ||
metadata: | ||
name: diskUsage | ||
spec: | ||
collectors: | ||
- diskUsage: | ||
collectorName: ephemeral | ||
path: /var/lib/kubelet | ||
analyzers: | ||
- diskUsage: | ||
collectorName: ephemeral | ||
outcomes: | ||
- fail: | ||
when: "total < 20Gi" | ||
message: /var/lib/kubelet has less than 20Gi of total space | ||
- fail: | ||
when: "available < 10Gi" | ||
message: /var/lib/kubelet has less than 10Gi of disk space available | ||
- fail: | ||
when: "used/total > 70%" | ||
message: /var/lib/kubelet is more than 70% full | ||
- warn: | ||
when: "total < 40Gi" | ||
message: /var/lib/kubelet has less than 40Gi of total space | ||
- warn: | ||
when: "used/total > 60%" | ||
message: /var/lib/kubelet is more than 60% full | ||
- pass: | ||
when: "available/total >= 90%" | ||
message: /var/lib/kubelet has more than 90% available | ||
- pass: | ||
message: /var/lib/kubelet has sufficient disk space available |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: troubleshoot.sh/v1beta2 | ||
kind: HostPreflight | ||
metadata: | ||
name: memory | ||
spec: | ||
collectors: | ||
- memory: | ||
collectorName: memory | ||
analyzers: | ||
- memory: | ||
outcomes: | ||
- fail: | ||
when: "< 8Gi" | ||
message: At least 8Gi of memory is required | ||
- warn: | ||
when: "< 32Gi" | ||
message: At least 32Gi of memory is recommended | ||
- pass: | ||
message: The system has as sufficient memory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
apiVersion: troubleshoot.sh/v1beta2 | ||
kind: HostPreflight | ||
metadata: | ||
name: port | ||
spec: | ||
collectors: | ||
- tcpPortStatus: | ||
collectorName: k8s | ||
port: 7443 | ||
analyzers: | ||
- tcpPortStatus: | ||
collectorName: k8s | ||
outcomes: | ||
- fail: | ||
when: "connection-refused" | ||
message: Connection to port 7443 was refused. | ||
- fail: | ||
when: "address-in-use" | ||
message: Another process was already listening on port 7443. | ||
- fail: | ||
when: "connection-timeout" | ||
message: Timed out connecting to port 7443. Check your firewall. | ||
- fail: | ||
when: "error" | ||
message: Unexpected port status | ||
- pass: | ||
when: "connected" | ||
message: Port 7443 is open | ||
- warn: | ||
message: Unexpected port status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
apiVersion: troubleshoot.sh/v1beta2 | ||
kind: HostPreflight | ||
metadata: | ||
name: loadbalancer | ||
spec: | ||
collectors: | ||
- tcpLoadBalancer: | ||
collectorName: loadbalancer | ||
port: 7443 | ||
address: 10.128.0.29:7444 | ||
analyzers: | ||
- tcpLoadBalancer: | ||
collectorName: loadbalancer | ||
outcomes: | ||
- fail: | ||
when: "connection-refused" | ||
message: Connection to port 7443 via load balancer was refused. | ||
- fail: | ||
when: "address-in-use" | ||
message: Another process was already listening on port 7443. | ||
- fail: | ||
when: "connection-timeout" | ||
message: Timed out connecting to port 7443 via load balancer. Check your firewall. | ||
- fail: | ||
when: "error" | ||
message: Unexpected port status | ||
- pass: | ||
when: "connected" | ||
message: Successfully connected to port 7443 via load balancer | ||
- warn: | ||
message: Unexpected port status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
apiVersion: troubleshoot.sh/v1beta2 | ||
kind: HostPreflight | ||
metadata: | ||
name: example | ||
spec: | ||
collectors: | ||
- tcpLoadBalancer: | ||
collectorName: LB1 | ||
address: 10.1.1.1 | ||
port: 6443 | ||
timeout: 5000ms | ||
- diskUsage: | ||
collectorName: ephemeral | ||
path: /var/lib/kubelet | ||
analyzers: | ||
- cpu: | ||
outcomes: | ||
- fail: | ||
when: "< 4" | ||
message: This server has less than 4 CPU cores, and we require 8, but recommend 16 | ||
- warn: | ||
when: "< 16" | ||
message: This server has at least 4 CPU cores, but we recommend 16 or more | ||
- pass: | ||
message: This server has sufficient CPU cores | ||
- tcpLoadBalancer: | ||
collectorName: LB1 | ||
outcomes: | ||
- fail: | ||
when: "connection-timeout" | ||
message: The TCP Load Balancer is not forwarding traffic to this server. | ||
- fail: | ||
when: "address-in-use" | ||
message: The local port is not available to validate the Load Balancer configuration. | ||
- pass: | ||
when: "connected" | ||
message: The specified TCP Load Balancer appears to be properly forwarding traffic to this server. | ||
- diskUsage: | ||
collectorName: ephemeral | ||
outcomes: | ||
- fail: | ||
when: "total < 20Gi" | ||
message: /var/lib/kubelet has less than 20Gi of total space | ||
- fail: | ||
when: "available < 10Gi" | ||
message: /var/lib/kubelet has less than 10Gi of disk space available | ||
- fail: | ||
when: "used/total > 70%" | ||
message: /var/lib/kubelet is more than 70% full | ||
- pass: | ||
message: /var/lib/kubelet has sufficient disk space available |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.