Documentation ¶
Index ¶
- Constants
- type FieldManager
- func NewDefaultCRDFieldManager(models openapiproto.Models, objectConverter runtime.ObjectConvertor, ...) (_ *FieldManager, err error)
- func NewDefaultFieldManager(models openapiproto.Models, objectConverter runtime.ObjectConvertor, ...) (*FieldManager, error)
- func NewFieldManager(f Manager) *FieldManager
- func (f *FieldManager) Apply(liveObj runtime.Object, patch []byte, manager string, force bool) (object runtime.Object, err error)
- func (f *FieldManager) Update(liveObj, newObj runtime.Object, manager string) (object runtime.Object, err error)
- func (f *FieldManager) UpdateNoErrors(liveObj, newObj runtime.Object, manager string) runtime.Object
- type Managed
- type Manager
- func NewBuildManagerInfoManager(f Manager, gv schema.GroupVersion) Manager
- func NewCRDStructuredMergeManager(models openapiproto.Models, objectConverter runtime.ObjectConvertor, ...) (_ Manager, err error)
- func NewCapManagersManager(fieldManager Manager, maxUpdateManagers int) Manager
- func NewSkipNonAppliedManager(fieldManager Manager, objectCreater runtime.ObjectCreater, ...) Manager
- func NewStripMetaManager(fieldManager Manager) Manager
- func NewStructuredMergeManager(models openapiproto.Models, objectConverter runtime.ObjectConvertor, ...) (Manager, error)
Constants ¶
const DefaultMaxUpdateManagers int = 10
DefaultMaxUpdateManagers defines the default maximum retained number of managedFields entries from updates if the number of update managers exceeds this, the oldest entries will be merged until the number is below the maximum. TODO(jennybuckley): Determine if this is really the best value. Ideally we wouldn't unnecessarily merge too many entries.
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 NewDefaultCRDFieldManager ¶
func NewDefaultCRDFieldManager(models openapiproto.Models, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, objectCreater runtime.ObjectCreater, kind schema.GroupVersionKind, hub schema.GroupVersion, preserveUnknownFields bool) (_ *FieldManager, err error)
NewDefaultCRDFieldManager 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 NewDefaultFieldManager ¶
func NewDefaultFieldManager(models openapiproto.Models, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, objectCreater runtime.ObjectCreater, kind schema.GroupVersionKind, hub schema.GroupVersion) (*FieldManager, error)
NewDefaultFieldManager creates a new FieldManager that merges apply requests and update managed fields for other types of requests.
func NewFieldManager ¶
func NewFieldManager(f Manager) *FieldManager
NewFieldManager creates a new FieldManager that decodes, manages, then re-encodes managedFields on update and apply requests.
func (*FieldManager) Apply ¶
func (f *FieldManager) Apply(liveObj runtime.Object, patch []byte, manager string, force bool) (object runtime.Object, err error)
Apply is used when server-side apply is called, as it merges the object and updates the managed fields.
type Managed ¶
type Managed interface { // Fields gets the fieldpath.ManagedFields. Fields() fieldpath.ManagedFields // Times gets the timestamps associated with each operation. Times() map[string]*metav1.Time }
Managed groups a fieldpath.ManagedFields together with the timestamps associated with each operation.
type Manager ¶
type Manager interface { // Update is used when the object has already been merged (non-apply // use-case), and simply updates the managed fields in the output // object. Update(liveObj, newObj runtime.Object, managed Managed, manager string) (runtime.Object, Managed, error) // Apply is used when server-side apply is called, as it merges the // object and updates the managed fields. Apply(liveObj runtime.Object, patch []byte, managed Managed, fieldManager string, force bool) (runtime.Object, Managed, error) }
Manager updates the managed fields and merges applied configurations.
func NewBuildManagerInfoManager ¶
func NewBuildManagerInfoManager(f Manager, gv schema.GroupVersion) Manager
NewBuildManagerInfoManager creates a new Manager that converts the manager name into a unique identifier combining operation and version for update requests, and just operation for apply requests.
func NewCRDStructuredMergeManager ¶
func NewCRDStructuredMergeManager(models openapiproto.Models, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, gv schema.GroupVersion, hub schema.GroupVersion, preserveUnknownFields bool) (_ Manager, err error)
NewCRDStructuredMergeManager creates a new Manager 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 NewCapManagersManager ¶
NewCapManagersManager creates a new wrapped FieldManager which ensures that the number of managers from updates does not exceed maxUpdateManagers, by merging some of the oldest entries on each update.
func NewSkipNonAppliedManager ¶
func NewSkipNonAppliedManager(fieldManager Manager, objectCreater runtime.ObjectCreater, gvk schema.GroupVersionKind) Manager
NewSkipNonAppliedManager creates a new wrapped FieldManager that only starts tracking managers after the first apply.
func NewStripMetaManager ¶
NewStripMetaManager creates a new Manager that strips metadata and typemeta fields from the manager's fieldset.
func NewStructuredMergeManager ¶
func NewStructuredMergeManager(models openapiproto.Models, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, gv schema.GroupVersion, hub schema.GroupVersion) (Manager, error)
NewStructuredMergeManager creates a new Manager that merges apply requests and update managed fields for other types of requests.