Documentation
¶
Index ¶
- Constants
- Variables
- func DeleteTaint(taints []v1.Taint, taintToDelete *v1.Taint) ([]v1.Taint, bool)
- func GetDeploymentNamespace() (string, error)
- func GetLinuxUptime() (time.Duration, error)
- func GetNextBatchSize(totalNrOfNodes, remainingNrOfNodes int) int
- func GetNrOfBatches(totalNrOfNodes int) int
- func GetSelfNodeRemediationAgentPod(nodeName string, r client.Reader) (*v1.Pod, error)
- func GetWatchdogTimeout(node *v1.Node) (time.Duration, error)
- func InitOutOfServiceTaintFlagsWithRetry(ctx context.Context, config *rest.Config) error
- func IsSoftwareRebootEnabled() (bool, error)
- func TaintExists(taints []v1.Taint, taintToFind *v1.Taint) bool
- func UpdateNodeAnnotations(watchdogInitiated bool, watchdogTimeout time.Duration, nodeName string, ...) error
Constants ¶
const ( // IsRebootCapableAnnotation value is the key name for the node's annotation that will determine if node is reboot capable IsRebootCapableAnnotation = "is-reboot-capable.self-node-remediation.medik8s.io" // WatchdogTimeoutSecondsAnnotation value is the key name for the node's annotation that will hold the watchdog timeout in seconds WatchdogTimeoutSecondsAnnotation = "self-node-remediation.medik8s.io/watchdog-timeout" IsSoftwareRebootEnabledEnvVar = "IS_SOFTWARE_REBOOT_ENABLED" )
const ( MinNrOfNodesInBatch = 3 MaxNrOfBatchesAfterFirst = 10 )
Variables ¶
var ( //IsOutOfServiceTaintSupported will be set to true in case OutOfServiceTaint is supported (k8s 1.26 or higher) IsOutOfServiceTaintSupported bool //IsOutOfServiceTaintGA will be set to true in case OutOfServiceTaint is GA (k8s 1.28 or higher) IsOutOfServiceTaintGA bool )
Functions ¶
func DeleteTaint ¶
DeleteTaint removes all the taints that have the same key and effect to given taintToDelete.
func GetDeploymentNamespace ¶
GetDeploymentNamespace returns the Namespace this operator is deployed on.
func GetLinuxUptime ¶
GetLinuxUptime returns the uptime of a linux host
func GetNextBatchSize ¶ added in v0.9.0
GetNextBatchSize returns the number of nodes to ask in the next batch
func GetNrOfBatches ¶ added in v0.9.0
GetNrOfBatches returns the number of batches we need for the given total number of nodes
func GetWatchdogTimeout ¶ added in v0.9.0
func InitOutOfServiceTaintFlagsWithRetry ¶ added in v0.10.0
InitOutOfServiceTaintFlagsWithRetry tries to initialize the OutOfService flags based on k8s version, in case it fails (potentially due to network issues) it will retry for a limited number of times
func IsSoftwareRebootEnabled ¶
func TaintExists ¶
TaintExists checks if the given taint exists in list of taints. Returns true if exists false otherwise.
Types ¶
This section is empty.