utils

package
v0.0.0-...-21cfbab Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: Apache-2.0, Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetermineNodeName

func DetermineNodeName() string

DetermineNodeName is called to determine the node name to use for this instance of calico/node.

func GetExitFunction

func GetExitFunction() func(int)

GetExitFunction return current exit function.

func IsIPv4

func IsIPv4(netIP net.IP) bool

IsIPv4 returns if netIP is IPv4.

func IsIPv4String

func IsIPv4String(ip string) bool

IsIPv4String returns if ip is IPv4.

func IsIPv6

func IsIPv6(netIP net.IP) bool

IsIPv6 returns if netIP is IPv6.

func IsIPv6String

func IsIPv6String(ip string) bool

IsIPv6String returns if ip is IPv6.

func NodenameFromFile

func NodenameFromFile() string

NodenameFromFile reads the nodename file if it exists and returns the nodename within.

func RemoveShutdownTimestampFile

func RemoveShutdownTimestampFile() error

RemoveShutdownTimestampFile removes shutdown timestamp file.

func SaveShutdownTimestamp

func SaveShutdownTimestamp() error

SaveShutdownTimestamp saves timestamp to shutdown timestamp file.

func SetExitFunction

func SetExitFunction(exitFunc func(int))

SetExitFunction set exitFunction to be called.

func SetNodeNetworkUnavailableCondition

func SetNodeNetworkUnavailableCondition(clientset kubernetes.Clientset,
	nodeName string,
	value bool,
	timeout time.Duration) error

Set Kubernetes NodeNetworkUnavailable to false when starting https://kubernetes.io/docs/concepts/architecture/nodes/#condition

func Terminate

func Terminate()

Terminate prints a terminate message and exists with status 1.

func WriteNodeConfig

func WriteNodeConfig(nodeName string)

writeNodeConfig writes out the this node's configuration to disk for use by other components. Specifically, it creates: - nodenameFileName() - used to persist the determined node name to disk for future use.

Types

This section is empty.

Jump to

Keyboard shortcuts

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