Versions in this module Expand all Collapse all v1 v1.10.0 Jun 6, 2024 v1.9.0 Feb 8, 2023 Changes in this version + const LastAppliedConfig + var DefaultAnnotator = NewAnnotator(LastAppliedConfig) + var DefaultPatchMaker = NewPatchMaker(DefaultAnnotator, &K8sStrategicMergePatcher{}, &BaseJSONMergePatcher{}) + func DeleteNullInJson(jsonBytes []byte) ([]byte, map[string]interface{}, error) + type Annotator struct + func NewAnnotator(key string) *Annotator + func (a *Annotator) GetModifiedConfiguration(obj runtime.Object, annotate bool) ([]byte, error) + func (a *Annotator) GetOriginalConfiguration(obj runtime.Object) ([]byte, error) + func (a *Annotator) SetLastAppliedAnnotation(obj runtime.Object) error + func (a *Annotator) SetOriginalConfiguration(obj runtime.Object, original []byte) error + type BaseJSONMergePatcher struct + func (p *BaseJSONMergePatcher) CreateMergePatch(originalJSON, modifiedJSON []byte) ([]byte, error) + func (p *BaseJSONMergePatcher) CreateThreeWayJSONMergePatch(original, modified, current []byte) ([]byte, error) + func (p *BaseJSONMergePatcher) MergePatch(docData, patchData []byte) ([]byte, error) + type CalculateOption func([]byte, []byte) ([]byte, []byte, error) + func IgnoreField(field string) CalculateOption + func IgnorePDBSelector() CalculateOption + func IgnoreStatusFields() CalculateOption + func IgnoreVolumeClaimTemplateTypeMetaAndStatus() CalculateOption + type JSONMergePatcher interface + CreateMergePatch func(originalJSON, modifiedJSON []byte) ([]byte, error) + CreateThreeWayJSONMergePatch func(original, modified, current []byte) ([]byte, error) + MergePatch func(docData, patchData []byte) ([]byte, error) + type K8sStrategicMergePatcher struct + PreconditionFuncs []mergepatch.PreconditionFunc + func (p *K8sStrategicMergePatcher) CreateThreeWayMergePatch(original, modified, current []byte, dataStruct interface{}) ([]byte, error) + func (p *K8sStrategicMergePatcher) CreateTwoWayMergePatch(original, modified []byte, dataStruct interface{}) ([]byte, error) + func (p *K8sStrategicMergePatcher) StrategicMergePatch(original, patch []byte, dataStruct interface{}) ([]byte, error) + type Maker interface + Calculate func(currentObject, modifiedObject runtime.Object, opts ...CalculateOption) (*PatchResult, error) + func NewPatchMaker(annotator *Annotator, strategicMergePatcher StrategicMergePatcher, ...) Maker + type PatchMaker struct + func (p *PatchMaker) Calculate(currentObject, modifiedObject runtime.Object, opts ...CalculateOption) (*PatchResult, error) + type PatchResult struct + Current []byte + Modified []byte + Original []byte + Patch []byte + func (p *PatchResult) IsEmpty() bool + func (p *PatchResult) String() string + type StrategicMergePatcher interface + CreateThreeWayMergePatch func(original, modified, current []byte, dataStruct interface{}) ([]byte, error) + CreateTwoWayMergePatch func(original, modified []byte, dataStruct interface{}) ([]byte, error) + StrategicMergePatch func(original, patch []byte, dataStruct interface{}) ([]byte, error)