kubernetes

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const FieldManagerName = "aeto"

Variables

This section is empty.

Functions

func ObjectKeyType

func ObjectKeyType(key client.ObjectKey, obj client.Object) objectKeyType

Types

type Client

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

Clients wraps Kubernetes clients with common behaviors.

func NewClient

func NewClient(client client.Client, dynamic dynamic.Interface, discovery *discovery.DiscoveryClient) Client

NewClient returns a new Client.

func (Client) Create

func (c Client) Create(ctx reconcile.Context, obj client.Object) error

Create saves the object obj in the Kubernetes cluster.

func (Client) Delete

func (c Client) Delete(ctx reconcile.Context, obj client.Object) error

Delete deletes the given obj from Kubernetes cluster.

func (Client) DynamicApply

func (c Client) DynamicApply(ctx reconcile.Context, namespacedName types.NamespacedName, manifest string) error

DynamicApply performs a patch in a similar manner to kubectl apply.

func (Client) DynamicDelete

func (c Client) DynamicDelete(ctx reconcile.Context, namespacedName types.NamespacedName, gvk schema.GroupVersionKind) error

DynamicDelete removes an object given a namespaced name and group, version, kind.

func (Client) DynamicGet

DynamicGet returns an unstructured object given a namespaced name and group, version, kind.

func (Client) Get

func (c Client) Get(ctx reconcile.Context, key client.ObjectKey, obj client.Object) error

Get retrieves an obj for the given object key from the Kubernetes Cluster. obj must be a struct pointer so that obj can be updated with the response returned by the Server.

func (Client) GetClient

func (c Client) GetClient() client.Client

GetClient returns the underlying client.Client

func (Client) List

func (c Client) List(ctx reconcile.Context, list client.ObjectList, opts ...client.ListOption) error

func (Client) Update

func (c Client) Update(ctx reconcile.Context, obj client.Object) error

Update updates the given obj in the Kubernetes cluster. obj must be a struct pointer so that obj can be updated with the content returned by the Server.

func (Client) UpdateStatus

func (c Client) UpdateStatus(ctx reconcile.Context, obj client.Object) error

Update updates the fields corresponding to the status subresource for the given obj. obj must be a struct pointer so that obj can be updated with the content returned by the Server.

Jump to

Keyboard shortcuts

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