Documentation
¶
Index ¶
- func AddLastAppliedConfiguration(obj runtime.Object, annoAppliedConfig string, annoAppliedTime string) error
- func GetModifiedConfiguration(obj runtime.Object, updateAnnotation bool, annoAppliedConfig string) ([]byte, error)
- func GetOriginalConfiguration(obj runtime.Object, anno string) []byte
- func ThreeWayMergePatch(currentObj, modifiedObj runtime.Object, a *PatchAction) (client.Patch, error)
- type PatchAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddLastAppliedConfiguration ¶ added in v1.9.0
func AddLastAppliedConfiguration(obj runtime.Object, annoAppliedConfig string, annoAppliedTime string) error
AddLastAppliedConfiguration add last-applied-configuration and last-applied-time annotation
func GetModifiedConfiguration ¶ added in v1.9.0
func GetModifiedConfiguration(obj runtime.Object, updateAnnotation bool, annoAppliedConfig string) ([]byte, error)
GetModifiedConfiguration serializes the object into byte stream. If `updateAnnotation` is true, it embeds the result as an annotation in the modified configuration.
func GetOriginalConfiguration ¶ added in v1.9.0
GetOriginalConfiguration gets original configuration of the object form the annotation, or nil if no annotation found.
func ThreeWayMergePatch ¶
func ThreeWayMergePatch(currentObj, modifiedObj runtime.Object, a *PatchAction) (client.Patch, error)
ThreeWayMergePatch creates a patch by computing a three way diff based on its current state, modified state, and last-applied-state recorded in the annotation.
Types ¶
type PatchAction ¶
type PatchAction struct { // UpdateAnno update the annotation of last-applied-configuration on modifiedObj UpdateAnno bool // AnnoLastAppliedConfig the annotation key for last-applied-configuration AnnoLastAppliedConfig string // AnnoLastAppliedTime the annotation key for last-applied-time AnnoLastAppliedTime string }
PatchAction is the action for patch
Click to show internal directories.
Click to hide internal directories.