kyma-project / lifecycle-manager

Controller that manages the lifecycle of Kyma Modules in your cluster.
http://kyma-project.io
Apache License 2.0
10 stars 30 forks source link

Monitoring associated resources #1707

Open ruanxin opened 1 month ago

ruanxin commented 1 month ago

Created on 2024-07-23 by Xin Ruan (@ruanxin)

Decision log

Name Description
Title Monitoring associated resources
Due date 2024-07-30
Status Proposed on 2024-07-23
Decision type Choice
Affected decisions -

Context

In the community modules, we introduced associated resources (a list of CRDs), an example here, with feature requests that Module manager should not be undeployed before any managed resource (including module configuration) still exists.

However it's not clear which component should take care monitoring those associated resources.

Decision:

Choice 1: KLM as a central manager to take care of monitoring associated resources during module disabling.

Prons

Choice 2: Each individual Module Manager takes care of monitoring associated resources.

With this approach, certain contracts should be established between Module Manager and KLM.

  1. Module Manager implements it's own monitoring logic in the reconciliation loop.
  2. Module Manager takes care of configuring a finalizer into it's Default CR when any associated resources exists.
  3. During module disabling, KLM make sure not delete the Module Manager related resources when Default CR still exists, which is an existing feature of KLM.

Prons

ruanxin commented 1 month ago

Decision: We go for Choice 2, each individual Module Manager takes care of monitoring associated resources.

Based on this decision, closed following issue: https://github.com/kyma-project/lifecycle-manager/issues/1651 https://github.com/kyma-project/lifecycle-manager/issues/1568