client

package
v0.39.3 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReplaceOwningInventoryID

func ReplaceOwningInventoryID(obj *unstructured.Unstructured, oldID, newID string) (bool, error)

ReplaceOwningInventoryID updates the object owning inventory annotation to the new ID when the owning inventory annotation is either empty or the old ID. It returns true if the annotation is updated.

func UpdateLabelsAndAnnotations

func UpdateLabelsAndAnnotations(obj *unstructured.Unstructured, labels, annotations map[string]string) error

UpdateLabelsAndAnnotations updates .metadata.labels and .metadata.annotations fields of obj to use the passed in labels and annotations. It also updates the last-applied-configuration annotations.

Types

type Client

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

Client is the client to update object in the API server.

func NewClient

func NewClient(d dynamic.Interface, mapper meta.RESTMapper) *Client

NewClient returns a client to get and update an object.

func (*Client) Get

Get fetches the requested object into the input obj using dynamic client

func (*Client) Update

Update updates an object using dynamic client

Jump to

Keyboard shortcuts

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