mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Set reason and message on Pod during nodecontroller eviction
Pods which are evicted by the nodecontroller due to network malfunction, or unresponsive kubelet should be differentiated from termination initiated by other sources. The reason/message are consumed by kubectl to provide a better summary using get/describe.
This commit is contained in:
@@ -31,6 +31,13 @@ import (
|
||||
"k8s.io/kubernetes/pkg/types"
|
||||
)
|
||||
|
||||
const (
|
||||
// The reason and message set on a pod when its state cannot be confirmed as kubelet is unresponsive
|
||||
// on the node it is (was) running.
|
||||
NodeUnreachablePodReason = "NodeLost"
|
||||
NodeUnreachablePodMessage = "Node %v which was running pod %v is unresponsive"
|
||||
)
|
||||
|
||||
func GetHostname(hostnameOverride string) string {
|
||||
var hostname string = hostnameOverride
|
||||
if hostname == "" {
|
||||
|
||||
Reference in New Issue
Block a user