IBM / operand-deployment-lifecycle-manager

Managing the lifecycle for a group of operands

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

abstract common functions in ODLM

horis233 opened this issue · 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 #517 and using provided API from controller-runtime https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.7.0/pkg/controller/controllerutil for createIfNotExists, createOrUpdate and deleteIfExits.