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

[Restricted Markets] Support Docker image localization #1858

Open
2 tasks
ruanxin opened this issue Sep 11, 2024 · 1 comment
Open
2 tasks

[Restricted Markets] Support Docker image localization #1858

ruanxin opened this issue Sep 11, 2024 · 1 comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@ruanxin
Copy link
Contributor

ruanxin commented Sep 11, 2024

Description

kyma module in different landscape will use it's transfered container images, in order to support unified deployment, ocm community come up with so called localization concept, and implmented this concept using localization controller.

For Kyma image localization, since all image sources are managed by us internally, we will use a simplified version based on the decision mentioned in ADR

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.
All images must be published and signed in the central image registry: europe-docker.pkg.dev/kyma-project/prod

With those precondition, it allow us make localization possible using simple replace machanism.

  1. scan Deployment or StatefulSet yaml, replace all image with europe-docker.pkg.dev/kyma-project/prod/[name]:[tag] to it's related localized image [localized host]/[name]:[tag]
  2. Deploy this modified resource.

Example

New OCM format

- access:
imageReference: europe-docker.pkg.dev/kyma-project/prod/template-operator:1.0.0
type: ociArtifact
digest:
hashAlgorithm: SHA-256
normalisationAlgorithm: ociArtifactDigest/v1
value: 03a194e1dca2421755cec5ec1e946de744407e6e1ca3b671f715fee939e8d1fb
name: module-image
relation: external
type: ociArtifact
version: 1.0.0

In target landscape, this image resource will be replaced to:

resources:
  - access:
      imageReference: [target host]/template-operator:1.0.0
      type: ociArtifact
    digest:
      hashAlgorithm: SHA-256
      normalisationAlgorithm: ociArtifactDigest/v1
      value: 03a194e1dca2421755cec5ec1e946de744407e6e1ca3b671f715fee939e8d1fb
    name: module-image
    relation: external
    type: ociArtifact
    version: 1.0.0

Reasons

Support kyma module deployment in other landscapes.

Acceptance Criteria

  • KLM is able to deploy localized kyma module from ocm component
  • OCM ociArtifact resources may not only one, for certain modules, it may persists several images, KLM need to support the replacement for all images.

Feature Testing

Integration tests, End-to-End tests

Testing approach

No response

Attachments

related issue: #1867

@ruanxin ruanxin added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 11, 2024
@ruanxin ruanxin changed the title Support Docker image localization [OCM] Support Docker image localization Sep 11, 2024
@ruanxin ruanxin changed the title [OCM] Support Docker image localization [Restricted Market] Support Docker image localization Sep 16, 2024
@janmedrek
Copy link
Contributor

Epic: #1867

@janmedrek janmedrek changed the title [Restricted Market] Support Docker image localization [Restricted Markets] Support Docker image localization Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants