Skip to content

SSA triggers update events on apply to resource when it is no-op #100024

@Danil-Grigorev

Description

@Danil-Grigorev

What happened:

Using SSA patch to create and manage a couple of resources (specifically those, the list may change in the future) resulted in endless hot loop, as each apply increases resourceVersion of the resource even if this is a no-op.

What you expected to happen:

Apply resources once to establish ownership on the fields and forget. Operator should not be triggered by constant resourceVersion changes if does not change any object spec or metadata by a new patch.

How to reproduce it (as minimally and precisely as possible):

Take a sample Deployment or other resource and forcefully apply it multiple times using controller-runtime client.

hot-loop-ssa

Anything else we need to know?:

This issue appeared using controller-runtime client implementation, but could be present in other clients. kubectl is not affected.

Environment:

  • Kubernetes version (use kubectl version): v1.20.0+aa519d9 and before
  • Cloud provider or hardware configuration: aws/openstck, does not matter
  • OS (e.g: cat /etc/os-release): ~
  • Kernel (e.g. uname -a): ~
  • Install tools: ~
  • Network plugin and version (if this is a network-related bug): ~
  • Others: ~

/sig api-machinery
/wg api-expression

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.sig/api-machineryCategorizes an issue or PR as relevant to SIG API Machinery.triage/acceptedIndicates an issue or PR is ready to be actively worked on.wg/api-expressionCategorizes an issue or PR as relevant to WG API Expression.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions