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

[ModuleCatalog] Introduce ModuleReleaseMeta CRD #1848

Closed
4 tasks done
jeremyharisch opened this issue Sep 9, 2024 · 1 comment · Fixed by #1907
Closed
4 tasks done

[ModuleCatalog] Introduce ModuleReleaseMeta CRD #1848

jeremyharisch opened this issue Sep 9, 2024 · 1 comment · Fixed by #1907
Assignees
Labels
API Denotes that an issue is tied to the potential change of the API kind/feature Categorizes issue or PR as related to a new feature.

Comments

@jeremyharisch
Copy link
Contributor

jeremyharisch commented Sep 9, 2024

Description:

We need to create a new Custom Resource Definition (CRD) named ModuleReleaseMeta. However, the name can be challenged if a better alternative is found (e.g., ChannelAssignment or similar). For now we drop the feature of introducing specifying Module versions in this CR.

Detailed decision ticket: #1815

Requirements:

  • The spec should include:
    • moduleName: a non-optional string.
    • channels: a list where each item must include the mandatory fields channel and version.
  • The apiVersion for the CRD should be operator.kyma-project.io/v1beta2.

Example CRD YAML:

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: modulereleasemetas.operator.kyma-project.io
spec:
  group: operator.kyma-project.io
  versions:
    - name: v1beta2
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              properties:
                moduleName:
                  type: string
                  description: "The name of the module"
                  minLength: 1
                channels:
                  type: array
                  description: "List of channels and their corresponding versions"
                  items:
                    type: object
                    properties:
                      channel:
                        type: string
                        description: "The release channel"
                        minLength: 1
                      version:
                        type: string
                        description: "The version for the corresponding channel"
                        minLength: 1
                    required:
                    - channel
                    - version
              required:
                - moduleName
                - channels
  scope: Namespaced
  names:
    plural: modulereleasemetas
    singular: modulereleasemeta
    kind: ModuleReleaseMeta
    shortNames:
      - mrm

Example CR yaml

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

Acceptance Criteria:

  • CRD is created with the above structure (or a modified version if the name is challenged).
  • Documentation is added to explain the new CRD and its usage.
  • Ensure validation is present for the channels list (there should be no duplicates, channels only from specific list, same as in Kyma CR)
    // Modules specifies the list of modules to be installed
    // +listType=map
    // +listMapKey=name
    Modules []Module `json:"modules,omitempty"`
  • Ensure validation is present for versions (semver)
@c-pius c-pius changed the title Introduce ModuleReleaseMeta CRD [ModuleCatalog] Introduce ModuleReleaseMeta CRD Sep 10, 2024
@jeremyharisch jeremyharisch added kind/feature Categorizes issue or PR as related to a new feature. API Denotes that an issue is tied to the potential change of the API labels Sep 11, 2024
@c-pius
Copy link
Contributor

c-pius commented Sep 12, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Denotes that an issue is tied to the potential change of the API kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants