kubeutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllWatchableGroupVersionKinds added in v0.1.0

func AllWatchableGroupVersionKinds(ctx context.Context, conf *rest.Config) (gvks []schema.GroupVersionKind, err error)

func Annotate added in v0.1.0

func Annotate(o AnnotationsAccessor, key string, value string)

func ApplyNamespace

func ApplyNamespace(ctx context.Context, c *rest.Config, namespace string) (*corev1.Namespace, error)

func GetAnnotate added in v0.1.0

func GetAnnotate(o AnnotationsAccessor, key string) string

func GetConfig

func GetConfig(kubeConfigPath string) (*rest.Config, error)

func GetLabel added in v0.1.0

func GetLabel(o LabelsAccessor, key string) string

func KubeConfigFromClient

func KubeConfigFromClient(c client.Client) *rest.Config

func Label added in v0.1.0

func Label(o LabelsAccessor, key string, value string)

func NewClient

func NewClient(kubeConfigPath string) (client.Client, error)

Types

type AnnotationsAccessor added in v0.1.0

type AnnotationsAccessor interface {
	GetAnnotations() map[string]string
	SetAnnotations(annotations map[string]string)
}

type CustomResourceDefinition

type CustomResourceDefinition struct {
	GroupVersion schema.GroupVersion
	KindType     runtime.Object
	ListKindType runtime.Object
	Plural       string
	ShortNames   []string
}

type LabelsAccessor added in v0.1.0

type LabelsAccessor interface {
	GetLabels() map[string]string
	SetLabels(labels map[string]string)
}

type Object

type Object = client.Object

func NewForGroupVersionKind

func NewForGroupVersionKind(gvk schema.GroupVersionKind) (Object, error)

func ObjectFromRuntimeObject

func ObjectFromRuntimeObject(ro runtime.Object) (Object, error)

type ObjectList

type ObjectList = client.ObjectList

func ObjectListFromRuntimeObject

func ObjectListFromRuntimeObject(ro runtime.Object) (ObjectList, error)

Jump to

Keyboard shortcuts

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