Open ruanxin opened 9 months ago
It makes sense IMHO to extract it from Kyma CR. Watching ModuleConfig with the module labell will be easier. I support the idea.
This is really interesting proposal, however you must remember about the costs of adjusting existing services that are relying on the contract of the current Kyma Resource schema. For example in Framefrog team in Compass-Manager
service we reconcile on change of Kyma resource and we process a list of installed modules. Removing that list from Kyma CR to and making dedicated CRs with that information will force us to change the way how the compass-manager
works. Is it possible to keep this list in spec for backward compatibility to minimize the impact?
We expect to be kept in the loop about this proposal and have constructive discussion about migration path from current solution to proposed one.
Please remember that any change in this area will have the impact on the timeline of the finishing of the modularisation project.
Created on 2023-12-03 by Xin Ruan (@ruanxin)
Decision log
Context
For certain SyncResource, relying on end-user configuration in Kyma runtime. However, the Module Manager, responsible for producing SyncResource, is deployed in KCP. To bridge this gap and provide Module Manager with the necessary configuration data, a strategy is needed to transfer it from Kyma runtime to KCP. Refer to the detailed SDD document here.
This ADR defines the concept of ModuleConfig CR mentioned in the document in KCP which is used to persist configuration data.
Decision
KCP ModuleConfig example:
KCP ModuleConfig explain:
operator.kyma-project.io/kyma-name
label enables the Module manager to identify the target Kyma runtime where this config coming from.operator.kyma-project.io/module-name
label provides the individal Module manager to filter the ModuleConfig which belongs to it.spec.kyma
(mandatory), specifies the target Kyma name where this module config coming from.spec.module
(mandatory), specifies which module this module config belongs to.spec.resource
(mandatory), contains the module CR YAML content as plain text, including the subresource (status) field.status.conditions
andstatus.lastOperation
indicate the synchronization status and provide information about the last operation performed by the lifecycle manager.status.state
reflects the current state of the synced ModuleConfig.