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

[Deletion Modes] Make KLM support application/x-tar as access mediaType for raw-manifest and default-cr resource #1650

Closed
5 of 6 tasks
ruanxin opened this issue Jul 1, 2024 · 0 comments
Assignees

Comments

@ruanxin
Copy link
Contributor

ruanxin commented Jul 1, 2024

In order to make Kyma Module as OCM component compatible with ocm-controller, the default-cr and raw-manifest resources in Kyma Module should be defined as application/x-tar mediaType (as Directory).

Currently KLM is possible to parsing raw-manifest as application/octet-stream mediaType (as file), however it is not possible to deploy by ocm-controller.

resources:
- access:
globalAccess:
digest: sha256:b4e9c3717a84a3256b32d915752c0f034195e11d3a35fc468ed3036b6a91df5f
mediaType: application/octet-stream
ref: europe-west3-docker.pkg.dev/sap-kyma-jellyfish-dev/template-operator/component-descriptors/kyma-project.io/module/template-operator
size: 15217
type: ociBlob
localReference: sha256:b4e9c3717a84a3256b32d915752c0f034195e11d3a35fc468ed3036b6a91df5f
mediaType: application/octet-stream
type: localBlob
name: raw-manifest
relation: local
type: yaml
version: 2.4.2-e2e-test

new kyma module ocm component looks like below:

resources:
  - 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
  - access:
      localReference: sha256:ad76888e8aee1c337eed330443cae54b4f912824e9c17c0f876e48d12f8ad65d
      mediaType: application/x-tar
      type: localBlob
    digest:
      hashAlgorithm: SHA-256
      normalisationAlgorithm: genericBlobDigest/v1
      value: ad76888e8aee1c337eed330443cae54b4f912824e9c17c0f876e48d12f8ad65d
    name: raw-manifest
    relation: local
    type: directory
    version: 1.0.0
  - access:
      localReference: sha256:7b747b3bbc6504c3198c52c764508f0217a39f44cb4ee52ed5f67b3b0fb6df9e
      mediaType: application/x-tar
      type: localBlob
    digest:
      hashAlgorithm: SHA-256
      normalisationAlgorithm: genericBlobDigest/v1
      value: 7b747b3bbc6504c3198c52c764508f0217a39f44cb4ee52ed5f67b3b0fb6df9e
    name: default-cr
    relation: local
    type: directory
    version: 1.0.0
  sources: []
  version: 1.0.0

AC

  • Manifest Controller: KLM is able to deploy raw-manifest resource from access mediaType application/x-tar and application/octet-stream (for backward compatibility)
  • (❌ ) Kyma Controller: Add that KLM is able to deploy default-cr resource from access mediaType application/x-tar and moduletemplate.spec.data (for backward compatibility) during Manifest CR creation
  • Cover with integration test
  • Adapt existing E2E test if necessary

AC updated:

  • Default CR keep in ModuleTemplate moduletemplate.spec.data, so that KLM is able to deploy it directly, but not read from default-cr layer.
@ruanxin ruanxin changed the title Make KLM support Directory for raw-manifest and default-cr resource Make KLM support application/x-tar as access mediaType for raw-manifest and default-cr resource Jul 1, 2024
@jeremyharisch jeremyharisch changed the title Make KLM support application/x-tar as access mediaType for raw-manifest and default-cr resource [Deletion Modes] Make KLM support application/x-tar as access mediaType for raw-manifest and default-cr resource Jul 4, 2024
@LeelaChacha LeelaChacha self-assigned this Jul 8, 2024
@LeelaChacha LeelaChacha removed their assignment Aug 6, 2024
@ruanxin ruanxin assigned LeelaChacha and unassigned ruanxin Aug 6, 2024
@LeelaChacha LeelaChacha assigned ruanxin and unassigned LeelaChacha Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants