utils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractInfoFromEnv

func ExtractInfoFromEnv(env []corev1.EnvVar, configmapMap MapType, ref GetRefEnv)

func ExtractInfoFromEnvFrom

func ExtractInfoFromEnvFrom(envs []corev1.EnvFromSource, themap MapType, ref GetRef)

func ExtractInfoFromVolume

func ExtractInfoFromVolume(volumes []corev1.Volume, themap MapType, ref GetRef)

func FilterByPodmanPrefix

func FilterByPodmanPrefix(keyValues map[string]string) map[string]string

FilterByPodmanPrefix does two things: first it filters the keys that start with prefix "podman/" And secondly, of those keys that have the "podman/" prefix, it uses the remaining part of the key as the new key in the returning map with the same value as in the original map e.g. 'podman/this-is-my-key:1' is stored in the returning map as 'this-is-my-key:1'

func HasFinalizer

func HasFinalizer(cr *metav1.ObjectMeta, name string) bool

HasFinalizer checks whether specific finalizer is set on a CR

func NormalizeLabel

func NormalizeLabel(name string) (string, error)

NormalizeLabel normalizes label string according to k8s format

Types

type GetRef

type GetRef func(interface{}) (bool, *bool, string)

type GetRefEnv

type GetRefEnv func(env corev1.EnvVar) (bool, *bool, string, string)

type MapType

type MapType = map[string]StringSet

type StringSet

type StringSet = map[string]interface{}

Jump to

Keyboard shortcuts

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