Skip to content

Improve handling of updating resources together with statuses #251

@goldmann

Description

@goldmann

In case the workflow you implement requires to update the resource itself and the status sub-resource at the same time it cannot be handled in a single pass of the createOrUpdateResource() method.

To be able to handle it currently you need to:

  1. Disable generationAwareEventProcessing:

    @Controller(crdName = "some.awesome.crd.com", generationAwareEventProcessing = false)
  2. Handle update to the resource and finish with return UpdateControl.updateCustomResource(res). A new event will be published and another pass of the createOrUpdateResource() will be triggered.

  3. Handle update to the status sub-resource and finish with return UpdateControl.updateStatusSubResource(res)

Ideally, we should just update the resource itself and the status sub-resource in a single UpdateControl.updateCustomResource(res) call. In other words - if there are status updates, these should be applied as well on the updated resource automatically.

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