Documentation
¶
Index ¶
- func Apply(ctx context.Context, c client.Client, obj client.Object, force bool) error
- func CreateApplyAnnotation(obj runtime.Object, codec runtime.Encoder) error
- func CreateOrUpdateAnnotation(createAnnotation bool, obj runtime.Object, codec runtime.Encoder) error
- func GVKFrom(obj runtime.Object, scheme *runtime.Scheme) (schema.GroupVersionKind, error)
- func GetModifiedConfiguration(obj runtime.Object, annotate bool, codec runtime.Encoder) ([]byte, error)
- func GetOriginalConfiguration(obj runtime.Object) ([]byte, error)
- func NewObjectFromExisting(newObj client.Object, scheme *runtime.Scheme) (client.Object, error)
- type Patcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateApplyAnnotation ¶
CreateApplyAnnotation gets the modified configuration of the object, without embedding it again, and then sets it on the object as the annotation.
func CreateOrUpdateAnnotation ¶
func CreateOrUpdateAnnotation(createAnnotation bool, obj runtime.Object, codec runtime.Encoder) error
CreateOrUpdateAnnotation creates the annotation used by kubectl apply only when createAnnotation is true Otherwise, only update the annotation when it already exists
func GetModifiedConfiguration ¶
func GetModifiedConfiguration(obj runtime.Object, annotate bool, codec runtime.Encoder) ([]byte, error)
GetModifiedConfiguration retrieves the modified configuration of the object. If annotate is 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 GetOriginalConfiguration ¶
GetOriginalConfiguration retrieves the original configuration of the object from the annotation, or nil if no annotation was found.