operand-deployment-lifecycle-manager icon indicating copy to clipboard operation
operand-deployment-lifecycle-manager copied to clipboard

abstract common functions in ODLM

Open horis233 opened this issue 4 years ago • 0 comments

/kind feature

Describe the solution you'd like [A clear and concise description of what you want to happen.]

In the ODLM, there are some duplicate codes for similar functions. For example:

  • finalizer management
  • status initialization
  • code structuration like createIfNotExists, createOrUpdate and deleteIfExits.

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

We can abstract an ODLM controller for managing common functions like finalizer management https://github.com/IBM/operand-deployment-lifecycle-manager/pull/517 and using provided API from controller-runtime https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/controller/controllerutil for createIfNotExists, createOrUpdate and deleteIfExits.

horis233 avatar Jan 03 '21 23:01 horis233