Skip to content

Latest commit

 

History

History
124 lines (91 loc) · 5.09 KB

File metadata and controls

124 lines (91 loc) · 5.09 KB

Manifest

The manifests.operator.kyma-project.io Custom Resource Definition (CRD) defines the structure and format used to configure the Manifest resource.

The Manifest custom resource (CR) represent resources that make up a module and are to be installed by Lifecycle Manager. The Manifest CR is a rendered module added to a particular cluster.

To get the latest CRD in the YAML format, run the following command:

kubectl get crd manifests.operator.kyma-project.io -o yaml

Patching

The Runner is responsible for creating and updating Manifest CRs using Server Side Apply (SSA). An update is only performed when one of the following conditions is met:

  1. The Manifest CR version differs from the Kyma CR's module status version.
  2. The Manifest CR channel differs from the Kyma CR's module status channel.
  3. The Manifest CR state differs from the Kyma CR's module status state.

Note

The module status is not present in the Kyma CR for mandatory modules, hence their Manifest CR is updated using SSA in every reconcile loop.

Configuration

.spec.remote

This parameter determines whether the given module should be installed in a remote cluster. If it should, then in the KCP cluster, it attempts to search for a Secret having the same operator.kyma-project.io/kyma-name label and value as in the Manifest CR.

Thus a Manifest CR like

apiVersion: operator.kyma-project.io/v1beta2
kind: Manifest
metadata:
  labels:
    operator.kyma-project.io/kyma-name: kyma-sample
  name: manifest-sample
  namespace: default
spec:
  remote: true

looks for a Secret with the same operator.kyma-project.io/kyma-name label and value kyma-sample.

.spec.config

The config reference uses an image layer reference that contains configuration data that can be used to further influence any potential rendering process while the resources are processed by the declarative library. It is resolved through a translation of the ModuleTemplate CR to the Manifest CR during the resolution of the modules in the Kyma CR control loop.

There can be at most one config layer, and it is referenced by the name config with type yaml as localOciBlob or OCIBlob:

spec:
  descriptor:
    component:
      componentReferences: []
      name: kyma-project.io/module/keda
      provider: internal
      repositoryContexts:
      - baseUrl: europe-docker.pkg.dev/kyma-project/prod/unsigned
        componentNameMapping: urlPath
        type: ociRegistry
      resources:
      - access:
          digest: sha256:f4a599c4310b0fe9133b67b72d9b15ee96b52a1872132528c83978239b5effef
          type: localOciBlob
        name: config
        relation: local
        type: yaml
        version: 0.0.1-6cd5086

.spec.install

The installation layer contains the relevant data required to determine the resources for the renderer during the manifest reconciliation.

It is mapped from an access type layer in the descriptor:

- access:
    digest: sha256:8f926a08ca246707beb9c902e6df7e8c3e89d2e75ff4732f8f00c424ba8456bf
    type: localOciBlob
  name: keda
  relation: local
  type: helm-chart
  version: 0.0.1-6cd5086

will be translated into a Manifest Layer:

install:
   name: keda
   source:
      name: kyma-project.io/module/keda
      ref: sha256:8f926a08ca246707beb9c902e6df7e8c3e89d2e75ff4732f8f00c424ba8456bf
      repo: europe-docker.pkg.dev/kyma-project/prod/unsigned/component-descriptors
      type: oci-ref

The internal spec resolver uses this layer to resolve the correct specification style and renderer type from the data layer.

.spec.resource

The resource is the default data that should be initialized for the module and is directly copied from .spec.data of the ModuleTemplate CR after normalizing it with the namespace for the synchronized module.

.status

The Manifest CR status is set based on the following logic, managed by the manifest reconciler:

  • If the module defined in the Manifest CR is successfully applied and the deployed module is up and running, the status of the Manifest CR is set to Ready.
  • While the manifest is being applied and the Deployment is still starting, the status of the Manifest CR is set to Processing.
  • If the Deployment cannot start (for example, due to an ImagePullBackOff error) or if the application of the manifest fails, the status of the Manifest CR is set to Error.
  • If the Manifest CR is marked for deletion, the status of the Manifest CR is set to Deleting.

This status provides a reliable way to track the state of the Manifest CR and the associated module. It offers insights into the deployment process and any potential issues while being decoupled from the module's business logic.

.metadata.labels

  • operator.kyma-project.io/skip-reconciliation: A label that can be used with the value true to disable reconciliation for a module. This will avoid all reconciliations for the Manifest CR.