utils

package
v0.0.0-...-5e97683 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: 7 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 RenderOperatingSystem

func RenderOperatingSystem(rel string, maj string, min string) (string, string, string, error)

Given 3 labels from NFD returns the node OS version in 3 formats: <name><major>, <name><major>.<minor>, and <major.minor> For example rhel8, rhel8.2, 8.2 If the "rel" is rhcos it returns the rhel version that this rhcos version is based off of. This function will later be replaced as NFD will have separate labels for this information.

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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