Documentation ¶
Overview ¶
package common provides all the common functions used by the controller by handling cluster configuration, and formatting the output
Index ¶
- func CheckForTaints(node *corev1.Node) bool
- func CreateSignalHandler() (stopCh <-chan struct{})
- func FormatPercentage(value float64) string
- func FormatValue(resourceType string, quantity resource.Quantity) string
- func GetClient() (kubernetes.Interface, error)
- func GetClientOutOfCluster() (kubernetes.Interface, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckForTaints ¶
CheckForTaints returns whether the node is tainted or not
func CreateSignalHandler ¶
func CreateSignalHandler() (stopCh <-chan struct{})
CreateSignalHandler picks any signal for closing the controller
func FormatPercentage ¶
FormatPercentage reusable styling for printing percentages
func FormatValue ¶
FormatValue to prepare the quantities for logging
func GetClient ¶
func GetClient() (kubernetes.Interface, error)
GetClient returns a k8s clientset to the request from inside of cluster
func GetClientOutOfCluster ¶
func GetClientOutOfCluster() (kubernetes.Interface, error)
GetClientOutOfCluster returns a k8s clientset to the request from outside of cluster
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.