kyma-project / lifecycle-manager

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

KCP component as OCM component #1605

Open ruanxin opened 3 weeks ago

ruanxin commented 3 weeks ago

Created on 2024-06-03 by Xin Ruan (@ruanxin)

Decision log

Name Description
Title KCP component as OCM component
Due date 2024-06-30
Status Proposed on 2024-06-03
Decision type Binary
Affected decisions -

Context

To ensure efficient deployment of all Kyma Control Plane (KCP) components and Kyma modules across multiple KCP landscapes, we will adopt the Open Component Model (OCM) as the standard for describing these components. This standardization will facilitate consistent delivery and management of software bills of delivery (SBOD) for KCP components.

Decision:

Each KCP component will be defined as an OCM component. This involves specifying several required and optional OCM resources for each component.

What is KCP component

The software provisioned in KCP cluster, such as lifecycle-manager, kyma-environment-broker, as well as certain Kyma module such as telemetry-manager.

For Kyma module as KCP component, it should also publish this OCM component dedicately, for telemetry-manager as an example, it should be offered with two OCM components: kyma-project.io/kcp/telemetry-manager and kyma-project.io/module/telemetry-manager, and the resources should follow the specification respectively.

Naming convention

Prefix each kcp component with kyma-project.io/kcp/ followed by the component's short name to comply with the OCM component naming pattern.

OCM Resources Definition

The following table describes the required and optional resources for each KCP component: Resource Name Type Definition
raw-manifest Directory [Required] the raw KCP component kubernete resources, it can be persisted as kustomize or helm chart, provided by team in github release as assets
all KCP component image name ociArtifact [required] All images belongs to this kcp component, each image is a dedicated ociArtifact resource
localization PlainText [optional] to be compatible with ocm-controller, we provided this additional localization ConfigData resource for localization purposes, for the detailed usage, check the ocm-controller document
ruanxin commented 3 weeks ago

klm as an example:


ocm get resource ghcr.io/ruanxin/kcp-source//kyma-project.io/kcp/klm -c 0.1.3 -owide
NAME         VERSION IDENTITY TYPE        RELATION ACCESSTYPE  ACCESSSPEC
klm-image    0.1.2            ociArtifact external ociArtifact {"imageReference":"europe-docker.pkg.dev/kyma-project/prod/lifecycle-manager:0.1.2"}
raw-manifest 0.1.3            Directory   local    localBlob   {"localReference":"sha256:05e1da031301e08f5601fae03c738726c31530ee258a668530e3497fc95837bf","mediaType":"application/x-tar"}