common

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

package common provides all the common functions used by the controller by handling cluster configuration, and formatting the output

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckForTaints

func CheckForTaints(node *corev1.Node) bool

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

func FormatPercentage(value float64) string

FormatPercentage reusable styling for printing percentages

func FormatValue

func FormatValue(resourceType string, quantity resource.Quantity) string

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.

Jump to

Keyboard shortcuts

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