clientutil

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAnnotation added in v0.13.0

func AddAnnotation(o client.Object, key, value string)

AddAnnotation adds an annotation to the given object. If the annotation already exists, it overwrites its value.

func DeleteYaml

func DeleteYaml(ctx context.Context, c client.Client, yaml []byte) error

func ObjectsToClientObjects added in v0.12.0

func ObjectsToClientObjects[T client.Object](objs []T) []client.Object

func YamlToClientObjects

func YamlToClientObjects(yamlObjects []byte) ([]client.Object, error)

Types

type KubeClient

type KubeClient struct {
	// contains filtered or unexported fields
}

Kubeclient implements kubernetes.Client interface using a client.Client as the underlying implementation.

func NewKubeClient

func NewKubeClient(client client.Client) *KubeClient

func (*KubeClient) Get

func (c *KubeClient) Get(ctx context.Context, name, namespace string, obj kubernetes.Object) error

Get retrieves an obj for the given name and namespace from the Kubernetes Cluster.

Jump to

Keyboard shortcuts

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