fieldmanager

package
v0.0.0-...-d88c8b5 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldManager

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

FieldManager updates the managed fields and merge applied configurations.

func NewCRDFieldManager

func NewCRDFieldManager(models openapiproto.Models, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, gv schema.GroupVersion, hub schema.GroupVersion, preserveUnknownFields bool) (_ *FieldManager, err error)

NewCRDFieldManager creates a new FieldManager specifically for CRDs. This allows for the possibility of fields which are not defined in models, as well as having no models defined at all.

func NewFieldManager

func NewFieldManager(models openapiproto.Models, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, gv schema.GroupVersion, hub schema.GroupVersion) (*FieldManager, error)

NewFieldManager creates a new FieldManager that merges apply requests and update managed fields for other types of requests.

func (*FieldManager) Apply

func (f *FieldManager) Apply(liveObj runtime.Object, patch []byte, fieldManager string, force bool) (runtime.Object, error)

Apply is used when server-side apply is called, as it merges the object and update the managed fields.

func (*FieldManager) Update

func (f *FieldManager) Update(liveObj, newObj runtime.Object, manager string) (runtime.Object, error)

Update is used when the object has already been merged (non-apply use-case), and simply updates the managed fields in the output object.

func (*FieldManager) UpdateNoErrors

func (f *FieldManager) UpdateNoErrors(liveObj, newObj runtime.Object, manager string) runtime.Object

UpdateNoErrors is the same as Update, but it will not return errors. If an error happens, the object is returned with managedFields cleared.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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