utils

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnv

func GetEnv(env, defaults string) string

GetEnv Helper function for fetching envs with defaults

func GetKubeConfig

func GetKubeConfig() (*rest.Config, error)

GetKubeConfig is used to fetch the kubeConfig based on the KUBECONFIG env or '~/.kube/config' location

func InitConfig

func InitConfig()

InitConfig initiates a kubernetes clientset & other generic configs with the current context

func PrettyByteSize

func PrettyByteSize(b int64) string

PrettyByteSize converts the bytes to human-readable format

Types

type Config

type Config struct {
	Clientset *k8s.Clientset
}
var Cfg Config

Jump to

Keyboard shortcuts

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