Documentation

Overview

Package unstructured contains utilities unstructured Kubernetes objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListWrapper

type ListWrapper interface {
	GetUnstructuredList() *unstructured.UnstructuredList
}

ListWrapper allows the *unstructured.UnstructuredList to be accessed.

type Wrapper

type Wrapper interface {
	GetUnstructured() *unstructured.Unstructured
}

Wrapper returns the underlying *unstructured.Unstructured.

type WrapperClient

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

A WrapperClient is a client.Client that will operate on the underlying *unstructured.Unstructured if the object satisfies the Wrapper or ListWrapper interfaces.

func NewClient

func NewClient(c client.Client) *WrapperClient

NewClient returns a client.Client that will operate on the underlying *unstructured.Unstructured if the object satisfies the Wrapper or ListWrapper interfaces. It relies on *unstructured.Unstructured instead of simpler map[string]interface{} to avoid unnecessary copying.

func (*WrapperClient) Create

func (c *WrapperClient) Create(ctx context.Context, obj runtime.Object, opts ...client.CreateOption) error

Create saves the object obj in the Kubernetes cluster.

func (*WrapperClient) Delete

func (c *WrapperClient) Delete(ctx context.Context, obj runtime.Object, opts ...client.DeleteOption) error

Delete deletes the given obj from Kubernetes cluster.

func (*WrapperClient) DeleteAllOf

func (c *WrapperClient) DeleteAllOf(ctx context.Context, obj runtime.Object, opts ...client.DeleteAllOfOption) error

DeleteAllOf deletes all objects of the given type matching the given options.

func (*WrapperClient) Get

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 (*WrapperClient) List

func (c *WrapperClient) List(ctx context.Context, list runtime.Object, opts ...client.ListOption) error

List retrieves list of objects for a given namespace and list options. On a successful call, Items field in the list will be populated with the result returned from the server.

func (*WrapperClient) Patch

func (c *WrapperClient) Patch(ctx context.Context, obj runtime.Object, patch client.Patch, opts ...client.PatchOption) error

Patch patches 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 (*WrapperClient) Status

func (c *WrapperClient) Status() client.StatusWriter

Status returns a client for the Status subresource.

func (*WrapperClient) Update

func (c *WrapperClient) Update(ctx context.Context, obj runtime.Object, opts ...client.UpdateOption) 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.

Source Files

Directories

Path Synopsis
claim Package claim contains an unstructured composite resource claim.
composed Package composed contains an unstructured composed resource.
composite Package composite contains an unstructured composite resource.