client

package
v0.0.0-...-0d81e42 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeClient

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

KubeClient is a client structure containing ClientSet and control-runtime Client.

func NewKubeClient

func NewKubeClient(config *rest.Config) (kubeClient *KubeClient, err error)

NewKubeClient return a KubeClient instance.

func (*KubeClient) Apply

func (c *KubeClient) Apply(ctx context.Context, obj crclient.Object) (err error)

Apply creates when the object is not deployed, otherwise patches the object.

func (*KubeClient) Delete

func (c *KubeClient) Delete(ctx context.Context, obj crclient.Object) error

Delete deletes the object,

func (*KubeClient) Get

func (c *KubeClient) Get(ctx context.Context, obj crclient.Object) (err error)

Get gets the object.

func (*KubeClient) List

func (c *KubeClient) List(ctx context.Context, objList crclient.ObjectList, namespace string, labels, fields map[string]string) (err error)

List lists the kind in namespace with labels and fields.

Jump to

Keyboard shortcuts

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