Documentation ¶
Index ¶
- type FieldManager
- func (f *FieldManager) Apply(liveObj runtime.Object, patch []byte, fieldManager string, force bool) (runtime.Object, error)
- func (f *FieldManager) Update(liveObj, newObj runtime.Object, manager string) (runtime.Object, error)
- func (f *FieldManager) UpdateNoErrors(liveObj, newObj runtime.Object, manager string) runtime.Object
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 ¶ added in v0.16.11
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.