operand-deployment-lifecycle-manager
operand-deployment-lifecycle-manager copied to clipboard
abstract common functions in ODLM
/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,createOrUpdateanddeleteIfExits.
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.