utils

package module
v0.0.0-...-32179d0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticateInCluster

func AuthenticateInCluster() (*kubernetes.Clientset, dynamic.Interface, error)

func AuthenticateOutOfCluster

func AuthenticateOutOfCluster() (*kubernetes.Clientset, dynamic.Interface, error)

func GetDOClient

func GetDOClient() *godo.Client

func RecycleStuckNodes

func RecycleStuckNodes(client *godo.Client, stuckedNodes []NodeInfos)

func RecyleNode

func RecyleNode(params ...interface{}) interface{}

func RunWorkers

func RunWorkers(workerCount int, endMessage string, arrayParamIndex int, job Job, params ...interface{})

* CAREFUL : the arrayParamIndex should have the same value that the index of the element used in params

func WatchNodes

func WatchNodes(clientSet *kubernetes.Clientset, dynClient dynamic.Interface, DOclient *godo.Client, creationDelay time.Duration)

Types

type Job

type Job func(elems ...interface{}) interface{}

type NodeInfos

type NodeInfos struct {
	ClusterId string
	PoolId    string
	NodeId    string
}

func GetKubeStuckNodesInfos

func GetKubeStuckNodesInfos(clientSet *kubernetes.Clientset, minutesDelay time.Duration) []NodeInfos

Jump to

Keyboard shortcuts

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