Skip to content

controllerutil.CreateOrPatch doesn't update not empty Status fields if Spec fields are specified #1392

Closed
@dmvolod

Description

@dmvolod

If we would like to patch custom resource with some Spec fields and Status which are not empty, the controllerutil.CreateOrPatch patches Spec only fields, but any Status keep unchanged,
result returns OperationResultUpdatedStatus which means that both Spec and Status where updated
The reason why this happens is that the original Status of the object is returned when the" Patch "procedure is exited and, as a result, no Status fields are updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions