Documentation ¶
Index ¶
- Constants
- func CreateMachineHealthCheck(name string, labels map[string]string) error
- func CreateUnhealthyConditionsConfigMap(unhealthyConditions *conditions.UnhealthyConditions) error
- func DeleteKubeletKillerPods() error
- func DeleteMachineHealthCheck(healthcheckName string) error
- func DeleteUnhealthyConditionsConfigMap() error
- func FilterReadyNodes(nodes []corev1.Node) []corev1.Node
- func GetMachine(c client.Client, machineName string) (*mapiv1.Machine, error)
- func GetMachineFromNode(c client.Client, node *corev1.Node) (*mapiv1.Machine, error)
- func GetMachinesSetByMachine(machine *mapiv1.Machine) (*mapiv1.MachineSet, error)
- func GetWorkerNodes(c client.Client) ([]corev1.Node, error)
- func Init()
- func IsNodeReady(node *corev1.Node) bool
- func LoadClient() (client.Client, error)
- func LoadConfig() (*rest.Config, error)
- func NewMachineDisruptionBudget(name string, machineLabels map[string]string, minAvailable *int32, ...) *mrv1.MachineDisruptionBudget
- func StopKubelet(nodeName string) error
Constants ¶
const ( // KubeletKillerPodName contains the name of the pod that stops kubelet process KubeletKillerPodName = "kubelet-killer" // MachineAnnotationKey contains machine annotation key MachineAnnotationKey = "machine.openshift.io/machine" // MachineHealthCheckName contains the name of the machinehealthcheck used for tests MachineHealthCheckName = "workers-check" // NamespaceOpenShiftMachineAPI contains the openshift-machine-api namespace name NamespaceOpenShiftMachineAPI = "openshift-machine-api" // WorkerNodeRoleLabel contains the label of worker node WorkerNodeRoleLabel = "node-role.kubernetes.io/worker" )
const ( // WaitLong contains number of minutes to wait before long timeout WaitLong = 10 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
func CreateMachineHealthCheck ¶
CreateMachineHealthCheck will create MachineHealthCheck CR with the relevant selector
func CreateUnhealthyConditionsConfigMap ¶
func CreateUnhealthyConditionsConfigMap(unhealthyConditions *conditions.UnhealthyConditions) error
CreateUnhealthyConditionsConfigMap creates node-unhealthy-conditions configmap with relevant conditions
func DeleteKubeletKillerPods ¶
func DeleteKubeletKillerPods() error
DeleteKubeletKillerPods deletes kubelet killer pod
func DeleteMachineHealthCheck ¶
DeleteMachineHealthCheck deletes machine health check by name
func DeleteUnhealthyConditionsConfigMap ¶
func DeleteUnhealthyConditionsConfigMap() error
DeleteUnhealthyConditionsConfigMap deletes node-unhealthy-conditions configmap
func FilterReadyNodes ¶
FilterReadyNodes fileter the list of nodes and returns the list with ready nodes
func GetMachine ¶
GetMachine get a machine by its name from the default machine API namespace.
func GetMachineFromNode ¶
GetMachineFromNode returns the machine referenced by the "controllernode.MachineAnnotationKey" annotation in the given node
func GetMachinesSetByMachine ¶
func GetMachinesSetByMachine(machine *mapiv1.Machine) (*mapiv1.MachineSet, error)
GetMachinesSetByMachine retruns machine owner machine set
func GetWorkerNodes ¶
GetWorkerNodes returns all nodes with the nodeWorkerRoleLabel label
func IsNodeReady ¶
IsNodeReady returns true once node is ready
func LoadClient ¶
LoadClient builds controller runtime client that accepts any registered type
func LoadConfig ¶
LoadConfig builds config from kubernetes config
func NewMachineDisruptionBudget ¶
func NewMachineDisruptionBudget(name string, machineLabels map[string]string, minAvailable *int32, maxUnavailable *int32) *mrv1.MachineDisruptionBudget
NewMachineDisruptionBudget returns new MachineDisruptionObject with specified parameters
func StopKubelet ¶
StopKubelet creates pod in the node PID namespace that stops kubelet process
Types ¶
This section is empty.