util

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureReloaderFlags added in v1.4.6

func ConfigureReloaderFlags(cmd *cobra.Command)

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 GetNamespaceLabelSelector added in v1.4.6

func GetNamespaceLabelSelector() (string, error)

func GetResourceLabelSelector added in v1.4.6

func GetResourceLabelSelector() (string, error)

func GetSHAfromConfigmap added in v0.0.22

func GetSHAfromConfigmap(configmap *v1.ConfigMap) 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
	ResourceAnnotations map[string]string
	Annotation          string
	TypedAutoAnnotation 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 GetIgnoredResourcesList added in v1.4.6

func GetIgnoredResourcesList() (List, error)

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

type ReloadSource added in v0.0.103

type ReloadSource struct {
	Type          string   `json:"type"`
	Name          string   `json:"name"`
	Namespace     string   `json:"namespace"`
	Hash          string   `json:"hash"`
	ContainerRefs []string `json:"containerRefs"`
	ObservedAt    int64    `json:"observedAt"`
}

func NewReloadSource added in v0.0.103

func NewReloadSource(
	resourceName string,
	resourceNamespace string,
	resourceType string,
	resourceHash string,
	containerRefs []string,
) ReloadSource

func NewReloadSourceFromConfig added in v0.0.103

func NewReloadSourceFromConfig(config Config, containerRefs []string) ReloadSource

Jump to

Keyboard shortcuts

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