util

package
v0.8.0-pre0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2020 License: Apache-2.0 Imports: 17 Imported by: 34

Documentation

Index

Constants

View Source
const (
	MetadataField = "metadata"
	LabelsField   = "labels"
)

Variables

This section is empty.

Functions

func BuildRestMapper

func BuildRestMapper(restConfig *rest.Config) (meta.RESTMapper, error)

func FindGroupVersionResource

func FindGroupVersionResource(from *unstructured.Unstructured, restMapper meta.RESTMapper) (*schema.GroupVersionResource, error)

func GetMetadata

func GetMetadata(from *unstructured.Unstructured) map[string]interface{}

func GetNestedField added in v0.6.0

func GetNestedField(obj *unstructured.Unstructured, fields ...string) interface{}

func GetSpec added in v0.6.0

func GetSpec(obj *unstructured.Unstructured) interface{}

func ToUnstructured

func ToUnstructured(from runtime.Object) (*unstructured.Unstructured, error)

Types

type MutateFn

type MutateFn func(existing *unstructured.Unstructured) (*unstructured.Unstructured, error)

type OperationResult

type OperationResult string
const (
	OperationResultNone    OperationResult = "unchanged"
	OperationResultCreated OperationResult = "created"
	OperationResultUpdated OperationResult = "updated"
)

Jump to

Keyboard shortcuts

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