Documentation ¶
Index ¶
- Variables
- func DeleteNullInJson(jsonBytes []byte) ([]byte, map[string]interface{}, error)
- type Annotator
- func (a *Annotator) GetModifiedConfiguration(obj rtclient.Object, annotate bool) ([]byte, error)
- func (a *Annotator) GetOriginalConfiguration(obj rtclient.Object) ([]byte, error)
- func (a *Annotator) SetLastAppliedAnnotation(obj rtclient.Object) error
- func (a *Annotator) SetOriginalConfiguration(obj runtime.Object, original []byte) error
- type CalculateOption
- type PatchMaker
- type PatchResult
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultAnnotator = NewAnnotator(types.LastAppliedConfig)
View Source
var DefaultPatchMaker = NewPatchMaker(DefaultAnnotator)
Functions ¶
Types ¶
type Annotator ¶
type Annotator struct {
// contains filtered or unexported fields
}
func NewAnnotator ¶
func (*Annotator) GetModifiedConfiguration ¶
GetModifiedConfiguration retrieves the modified configuration of the object. If annotate if true, it embeds the result as an annotation in the modified configuration. If an object was read from the command input, it will use that version of the object. Otherwise, it will use the version from the server.
func (*Annotator) GetOriginalConfiguration ¶
func (*Annotator) SetLastAppliedAnnotation ¶
type CalculateOption ¶
func IgnoreDeployReplicasFields ¶
func IgnoreDeployReplicasFields() CalculateOption
func IgnoreStatefulSetReplicasFields ¶
func IgnoreStatefulSetReplicasFields() CalculateOption
func IgnoreStatusFields ¶
func IgnoreStatusFields() CalculateOption
func IgnoreVolumeClaimTemplateTypeMetaAndStatus ¶
func IgnoreVolumeClaimTemplateTypeMetaAndStatus() CalculateOption
type PatchMaker ¶
type PatchMaker struct {
// contains filtered or unexported fields
}
func NewPatchMaker ¶
func NewPatchMaker(annotator *Annotator) *PatchMaker
func (*PatchMaker) Calculate ¶
func (p *PatchMaker) Calculate(currentObj, modifiedObj rtclient.Object, opts ...CalculateOption) (*PatchResult, error)
type PatchResult ¶
func (*PatchResult) IsEmpty ¶
func (p *PatchResult) IsEmpty() bool
Click to show internal directories.
Click to hide internal directories.