util

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeYamlToUnstructured

func DecodeYamlToUnstructured(data []byte) (*unstructured.Unstructured, error)

func ErrorListToError

func ErrorListToError(errorList field.ErrorList) error

func EvaluateTemplate

func EvaluateTemplate(t *template.Template, data interface{}) string

func GenerateRandom

func GenerateRandom(n int) string

GenerateRandom generates random string.

func GetBytes

func GetBytes(key interface{}) ([]byte, error)

func Hash

func Hash(data []byte) string

func HashFNV

func HashFNV(s string) string

func ImagePullPolicyByTag

func ImagePullPolicyByTag(image string) corev1.PullPolicy

func ParseImageName

func ParseImageName(image string) (string, string, string, error)

ParseImageName parses a docker image string into three parts: repo, tag and digest. If both tag and digest are empty, a default image tag will be returned.

func RegisterExitHandlers

func RegisterExitHandlers(shutdownFuncs ...func()) (stop chan struct{})

func RegisterOSExitHandlers

func RegisterOSExitHandlers(shutdownFuncs ...func()) (stop chan struct{})

func SecretNamespaceAndName added in v0.1.3

func SecretNamespaceAndName(secretName string, ing *networkingv1.Ingress) (string, string, error)

func SimpleHash

func SimpleHash(obj interface{}) string

func StringsEqual

func StringsEqual(left, right []string) bool

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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