util

package
Version: v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const TrimTokens = "\n "
View Source
const YamlSeparator = "\n---"

Variables

This section is empty.

Functions

func DeleteEmpty

func DeleteEmpty(s []string) []string

func FindGVR

find the corresponding GVR (available in *meta.RESTMapping) for gvk

func IsNodeReady

func IsNodeReady(n corev1.Node) bool

func PathToOSFile

func PathToOSFile(relativePath string) (*os.File, error)

Types

type K8sUnstructuredResource added in v0.2.0

type K8sUnstructuredResource struct {
	GVR      *meta.RESTMapping
	Resource *unstructured.Unstructured
}

func GetMultipleResourcesFromYaml added in v0.2.0

func GetMultipleResourcesFromYaml(path string, dc discovery.DiscoveryInterface, args interface{}) ([]K8sUnstructuredResource, error)

func GetResourceFromString added in v0.2.0

func GetResourceFromString(resourceString string, dc discovery.DiscoveryInterface, args interface{}) (K8sUnstructuredResource, error)

func GetResourceFromYaml

func GetResourceFromYaml(path string, dc discovery.DiscoveryInterface, args interface{}) (K8sUnstructuredResource, error)

Source Files

Jump to

Keyboard shortcuts

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