utils

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IsRebootCapableAnnotation value is the key name for the node's annotation that will determine if node is reboot capable
	IsRebootCapableAnnotation = "is-reboot-capable.poison-pill.medik8s.io"
)

Variables

This section is empty.

Functions

func DeleteTaint

func DeleteTaint(taints []v1.Taint, taintToDelete *v1.Taint) ([]v1.Taint, bool)

DeleteTaint removes all the taints that have the same key and effect to given taintToDelete.

func GetLinuxUptime added in v0.3.1

func GetLinuxUptime() (time.Duration, error)

GetLinuxUptime returns the uptime of a linux host

func GetPoisonPillAgentPod added in v0.3.1

func GetPoisonPillAgentPod(nodeName string, r client.Reader) (*v1.Pod, error)

func TaintExists

func TaintExists(taints []v1.Taint, taintToFind *v1.Taint) bool

TaintExists checks if the given taint exists in list of taints. Returns true if exists false otherwise.

func UpdateNodeWithIsRebootCapableAnnotation added in v0.3.1

func UpdateNodeWithIsRebootCapableAnnotation(watchdogInitiated bool, nodeName string, mgr manager.Manager) error

UpdateNodeWithIsRebootCapableAnnotation updates the is-reboot-capable node annotation to be true if any kind of reboot is enabled and false if there isn't watchdog and software reboot is disabled

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL