Skip to content

Object has been modified while testing out a ClusterExtension #1414

@itroyano

Description

@itroyano
E1021 20:42:57.252397 1 controller.go:316] "Reconciler error" err="error updating status: Operation cannot be fulfilled on clusterextensions.olm.operatorframework.io \"metrics-server\": the object has been modified; please apply your changes to the latest version and try again" controller="clusterextension" controllerGroup="olm.operatorframework.io" controllerKind="ClusterExtension" ClusterExtension="metrics-server" namespace="" name="metrics-server" reconcileID="ef934a9a-f494-462e-9d24-1235a1435f9b"

Code ref: https://github.com/operator-framework/operator-controller/blob/main/internal/controllers/clusterextension_controller.go#L132

Suggested approaches:

  • Shorter term: return a re-queue or re-fetch the CE object here to make sure the resourceVersion is in sync [1]
  • Longer term: look into Server Side Apply [2] [3] to knock out such issues.

[1] https://kubernetes.io/docs/reference/using-api/api-concepts/#efficient-detection-of-changes
[2] https://kubernetes.io/docs/reference/using-api/server-side-apply/
[3] kubernetes-sigs/controller-runtime#347

Metadata

Metadata

Assignees

Labels

lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions