Closed c-pius closed 2 months ago
Feedback in arch round today was to group by module. A full list may be to cumbersome to work with in the module repo.
Context It has been requested to decouple ModuleTemplates from channels. ModuleTemplates will define specific versions of a module, and these versions will be immutable after creation. The assignment of module versions to channels will be managed via a new CR.
Proposal
CR structure for module-channel assignments
ChannelAssignment
CR
ChannelAssignment
CR contains a list of version-channel pairs, where each item specifies a module version and its assigned channel.
apiVersion: operator.kyma-project.io/v1beta2
kind: ChannelAssignment
metadata:
name: Eventing
spec:
assignments:
- version: "1.0.0"
channel: "regular"
- version: "1.1.0"
channel: "fast"
- version: "1.2.0"
channel: "experimental"
ChannelAssignment
CR, giving them ownership over their module's version-channel assignments.ModuleTemplates
, since ModuleTemplate
will be immutable in future, this watch mechanism is obsolete.ChannelAssignment
CRs, making sure if a ChannelAssignment
CR gets updated (i.e. new version added, channel switched, etc.), all corresponding Kyma
CRs get queued for the Kyma reconcile loop.Syncing ChannelAssignments to SKRs
ModuleTemplates
to determine available modules, but with the removal of channel
from ModuleTemplate.spec
, the ChannelAssignments
will need to be synced as well to make sure the channels are shown as well.ChannelAssignments
to show which modules are available, but this would not cover user-installable modules. TBD: Discuss specific usecase, if it is still valid.ModuleTemplates
and ChannelAssignments
, ensuring Busola and the CLI have access to complete data (both managed and user-installed modules).ModuleTemplates
happens inside the Kyma Controller (check here). Adding ChannelAssignments
to this process could slow down the Kyma reconciliation loop.ChannelAssignment
CRs and ModuleTemplate
CRS to the SKRs, separate from the Kyma Controller. This improves:ModuleTemplates
or ChannelAssignments
, so syncing these resources via a separate controller improves performance.ModuleTemplates
and ChannelAssignments
, adding their condition to the Kyma CR while keeping the Kyma reconcile loop efficient. This could leed to raceconditions, when two reconcile loops try to update the same Kyma
CR, but this is somehow expected in a K8s application.ModuleTemplate installability
ModuleTemplate
is available, it is installable. However, some modules may need additional checks or conditions before they are installable by the end user.ChannelAssignment
CR to include all installable managed module versions (whether or not they are linked to a specific channel).
channel
field becomes optional for modules that are available but not tied to a specific channel. For example, earlier versions or special cases could be included here without channel assignments.ModuleVersion
, as it would contain both channel-assigned and unassigned versions.apiVersion: operator.kyma-project.io/v1beta2
kind: ChannelAssignment
metadata:
name: Eventing
spec:
assignments:
- version: "0.1.1"
- version: "0.1.2"
- version: "1.0.0"
channel: "regular"
- version: "1.1.0"
channel: "fast"
- version: "1.2.0"
channel: "experimental"
Open Points
Thanks for the write up. Only minor comments at this point in time
- CR structure for module-channel assignments
- ModuleTemplate installability
Summary from refinement 2024-09-09:
Proposal:
apiVersion: operator.kyma-project.io/v1beta2
kind: ModuleReleaseMeta
metadata:
name: eventing
spec:
moduleName: eventing
channels:
- channel: regular
version: 1.0.0
- channel: fast
version: 1.1.0
- channel: experimental
version: 2.0.0
## future
versions:
- version: 0.0.9
deprecationDate: 2024-09-09
deprecationMessage: v0.0.9 has been deprecated, use a newer version instead
- version: 1.0.0
- version: 1.1.0
Follow-Up Issues:
Context
Side quest from: https://github.com/kyma-project/lifecycle-manager/issues/1681
It has been requested to decouple ModuleTemplates from channels. ModuleTemplates will always define concrete versions of a module. Those version are created once and never changed. The assignment of these module versions to channels shall happen at a different place.
It is proposed that an additional CR will be introduced that maps a given module version to a channel.
Questions to be clarified:
Goals: align on above questions so we can feed this back to #1681
Decision
To be proposed
Consequences
To be proposed
Attachments
Given ModuleTemplates like
And Module Status in KymaCR like
And ModuleChannel CR like
We could change the watch for ModuleTemplates roughly as follows:
In addition, Kyma reconciliation could be changed so that instead of looking up module templates directly, it must first lookup the ModuleChannel CR, from there determine the module version currently assigned to the channel, and with that fetch the correct module template.