utils

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func BuildGVKGVRMap

func BuildGVKGVRMap(config *rest.Config) map[schema.GroupVersionKind]schema.GroupVersionResource

BuildGVKGVRMap builds or returns a cached GVK to GVR map

func ConvertLabel

func ConvertLabel(labelSelector *metav1.LabelSelector) (labels.Selector, error)

ConvertLabel converts a LabelSelector struct into a Selector interface

func GetAPIVersion

func GetAPIVersion(mapping *meta.RESTMapping) string

GetAPIVersion returns the APIVersion from a RESTMapping

func RebuildGVKGVRMap

func RebuildGVKGVRMap(config *rest.Config) map[schema.GroupVersionKind]schema.GroupVersionResource

RebuildGVKGVRMap builds a GVK to GVR map from scratch

func StripVersion

func StripVersion(gv string) string

StripVersion removes the version part of a GV

func TruncateString

func TruncateString(str string, num int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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