utils

package
v0.0.0-...-c9e8fde Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Annotate

func Annotate(obj *unstructured.Unstructured) error

func AnnotationEqual

func AnnotationEqual(new *unstructured.Unstructured, old *unstructured.Unstructured) (bool, error)

func CreateNodesList

func CreateNodesList(numNodes int, labels map[string]string) *corev1.NodeList

func FNV64a

func FNV64a(s string) (string, error)

FNV64a return 64bit hash

func FindCRFile

func FindCRFile(a []*chart.File, x string) int

func ParseOSInfo

func ParseOSInfo(osImagePretty string) (string, string, string, error)

ParseOSInfo takes a pretty format string for the OS version (e.g. Red Hat Enterprise Linux CoreOS 49.84.202201102104-0 (Ootpa)) and returns the cluster version, OS version in \d\.\d format, plus major version for the OS.

func SetTaint

func SetTaint(node *corev1.Node, taintKey, taintValue string, taintEffect corev1.TaintEffect)

func StringSliceContains

func StringSliceContains(a []string, x string) bool

Contains tells whether a contains x.

func StringSliceFind

func StringSliceFind(a []string, x string) int

Find returns the smallest index i at which x == a[i], or len(a) if there is no such index.

func StringSliceInsert

func StringSliceInsert(a []string, index int, value string) []string

func WarnString

func WarnString(str string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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