util

package
v0.0.41 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToEnvVarName

func ConvertToEnvVarName(text string) string

ConvertToEnvVarName converts the given text into a usable env var removing any special chars with '_' and transforming text to upper case

func GetSHAfromConfigmap added in v0.0.22

func GetSHAfromConfigmap(data map[string]string) string

func GetSHAfromSecret added in v0.0.22

func GetSHAfromSecret(data map[string][]byte) string

func InterfaceSlice

func InterfaceSlice(slice interface{}) []interface{}

InterfaceSlice converts an interface to an interface array

func ParseBool added in v0.0.22

func ParseBool(value interface{}) bool

ParseBool returns result in bool format after parsing

Types

type Config

type Config struct {
	Namespace    string
	ResourceName string
	Annotation   string
	SHAValue     string
	Type         string
}

Config contains rolling upgrade configuration parameters

func GetConfigmapConfig added in v0.0.22

func GetConfigmapConfig(configmap *v1.ConfigMap) Config

GetConfigmapConfig provides utility config for configmap

func GetSecretConfig added in v0.0.22

func GetSecretConfig(secret *v1.Secret) Config

GetSecretConfig provides utility config for secret

type List added in v0.0.35

type List []string

func (*List) Contains added in v0.0.35

func (l *List) Contains(s string) bool

type ObjectMeta

type ObjectMeta struct {
	metav1.ObjectMeta
}

func ToObjectMeta

func ToObjectMeta(kubernetesObject interface{}) ObjectMeta

Jump to

Keyboard shortcuts

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