Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kyma module as OCM component #1587

Closed
ruanxin opened this issue May 28, 2024 · 2 comments
Closed

Kyma module as OCM component #1587

ruanxin opened this issue May 28, 2024 · 2 comments
Labels
decision Architecture decision record

Comments

@ruanxin
Copy link
Contributor

ruanxin commented May 28, 2024

Created on 2024-05-28 by Xin Ruan (@ruanxin)

Decision log

Name Description
Title Kyma module as OCM component
Due date 2024-06-30
Status Proposed on 2024-05-28
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 Kyma module will be defined as an OCM component. This involves specifying several required and optional OCM resources for each module.

Naming convention

Prefix each module with kyma-project.io/module/ followed by the module'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 Kyma module:

Resource Name Type Definition
default-cr directory [Required] the module Default CR, provided by module team in github release as assets, e.g: in this keda-manager release, it's keda-default-cr.yaml
raw-manifest directory [Required] the module resources, provided by module team in github release as assets, e.g: in this keda-manager release, it's keda-manager.yaml
all module image name ociArtifact [required] All module images, including those managed by the module, each image is a dedicated ociArtifact resource
associated-resources plainText [optional] for those managed module which have managed resources, provided by module team in github release as assets, this content will be the source of truth for providing the associatedResources field in module configuration, check an example for keda module here
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

Kyma Module Deployment resources

To ensure the Kyma Lifecycle Manager (KLM) can replace localized module images during deployment, all required images must be listed in the Module Operator Deployment Kubernetes resource. Images are categorized into two groups:

  • module operator images: All the images listed in module Deployment as container images.
  • module managed images: Images deployed by certain module managers during runtime, for example, btp-manager will deploy sap-btp-service-operator, for this kind of usages, each image must be provided in module Deployment as a dedicated container env value.

All images must be published and signed in the central image registry: europe-docker.pkg.dev/kyma-project/prod

Consequences:

Adopting this approach will streamline the deployment process, enhance consistency across different environments, and provide a clear structure for managing module resources. It will also support localization needs and integration with KLM or existing OCM tools.

@ruanxin
Copy link
Contributor Author

ruanxin commented Jun 5, 2024

an example:

ocm get resource ghcr.io/ruanxin/kcp-source//kyma-project.io/module/template-operator -c 1.0.0 -owide
NAME         VERSION IDENTITY TYPE        RELATION ACCESSTYPE  ACCESSSPEC
default-cr   1.0.0            directory   local    localBlob   {"localReference":"sha256:7b747b3bbc6504c3198c52c764508f0217a39f44cb4ee52ed5f67b3b0fb6df9e","mediaType":"application/x-tar"}
module-image 1.0.0            ociArtifact external ociArtifact {"imageReference":"europe-docker.pkg.dev/kyma-project/prod/template-operator:1.0.0"}
raw-manifest 1.0.0            directory   local    localBlob   {"localReference":"sha256:ad76888e8aee1c337eed330443cae54b4f912824e9c17c0f876e48d12f8ad65d","mediaType":"application/x-tar"}

@pbochynski
Copy link
Contributor

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
decision Architecture decision record
Projects
None yet
Development

No branches or pull requests

3 participants