Our own, Mateusz Szostok has two sessions at KubeCon around K8s Service CatalogRead more

Mateusz Szostok, Piotr Kopczynski and Pawel Kosiec have several talks at San Diego Cloud Native MeetupRead more

Headless CMS

Overview

The Headless CMS is a new breed of traditional Content Management Systems (CMS) that provides a way of storing and managing raw content, and exposing it through an API. It allows you to pull the content into your own application and tailor it to your needs, delivering it in any format, on any device. Contrary to the traditional CMS, such as WordPress, the Headless CMS does not provide a display layer and ready-to-use templates. Instead, it only ensures a database backend. It gives flexibility on the choice of the frontend, thus cutting the default "head" off the traditional CMS solutions.

Headless CMS in Kyma

Kyma provides a Kubernetes-based solution that relies on the custom resource (CR) extensibility feature and the Asset Store as a backend mechanism. The Headless CMS in Kyma allows you to upload multiple and grouped data for a given documentation topic and store them as Asset CRs in MinIO buckets. All you need to do is to specify all topic details, such as documentation sources, in a DocsTopic CR or a ClusterDocsTopic CR and apply it to a given Namespace or a cluster. The CR supports various documentation formats, including images, Markdown documents, AsyncAPI, OData, and OpenAPI specification files. You can upload them as single (direct file URLs) and packed assets (ZIP or TAR).

Benefits

The Headless CMS brings a number of benefits:

  • It provides a unified way of uploading different document types to a Kyma cluster.
  • It fits into the Kyma modularity concept as you load onto a cluster only documentation for the installed components. This is possible as the DocsTopic CR and the code for a given component are located in the same place in the kyma repository.
  • It supports baked-in documentation. Apart from the default documentation, you can add your own and group it as you like, the same way you use micro frontends to personalize views in the Console UI. For example, you can add contextual help for a given Service Broker in the Service Catalog.

Architecture

Resources

The Headless CMS in Kyma consists of these components:

  • DocsTopic custom resource (CR) orchestrates the creation of multiple Asset CRs for a specific documentation topic in a given Namespace. It has a cluster-wide counterpart called ClusterDocsTopic CR.

  • DocsTopic Controller creates Asset custom resources (CRs) based on the DocsTopic CR definition. If the DocsTopic CR defines two sources of documentation topics, such as asyncapi and markdown, the DocsTopic Controller creates two Asset CRs. The DocsTopic Controller also monitors the status of the Asset CR and updates the status of the DocsTopic CR accordingly.

Headless CMS flow

See the diagram for an overview of the basic Headless CMS workflow.

NOTE: This flow also applies to the ClusterDocsTopic CR.

  1. The Kyma user creates a DocsTopic CR in a given Namespace.
  2. The DocsTopic Controller reads the DocsTopic CR definition.
  3. The DocsTopic Controller checks if the Bucket CR already exists in this Namespace. If it does not exist yet, the DocsTopic Controller creates a new Bucket CR with the cms-public-{suffix} name, where {suffix} is a randomly generated string.
  4. The DocsTopic Controller creates Asset CRs in the number corresponding to the number of sources specified in the DocsTopic CR. It adds cms.kyma-project.io/type and cms.kyma-project.io/docs-topic labels to every Asset CR definition. It also adds the bucket name under the bucketRef field to every Asset CR definition.
  5. The DocsTopic Controller verifies if the Asset CRs are in the Ready phase and updates the status of the DocsTopic CR accordingly.

Details

DocsTopic custom resource lifecycle

NOTE: This lifecycle also applies to the ClusterDocsTopic CR.

Asset CR manual changes

The DocsTopic custom resource (CR) coordinates Asset CR creation, deletion, and modifications. The DocsTopic Controller verifies DocsTopic definition on a regular basis and creates, deletes, or modifies Assets CRs accordingly.

The DocsTopic CR acts as the only source of truth for the Asset CRs it orchestrates. If you modify or remove any of them manually, DocsTopic Controller automatically overwrites such an Asset CR or updates it based on the DocsTopic CR definition.

DocsTopic CR and Asset CR dependencies

Asset CRs and DocsTopic CRs are also interdependent in terms of names, definitions, and statuses.

Names

The name of every Asset CR created by the DocsTopic Controller consists of these three elements:

  • The name of the DocsTopic CR, such as service-catalog.
  • The source type of the given asset in the DocsTopic CR, such as asyncapi.
  • A randomly generated string, such as 1b38grj5vcu1l.

The full name of such an Asset CR that follows the {docsTopic-name}-{asset-source}-{suffix} pattern is service-catalog-asyncapi-1b38grj5vcu1l.

Labels

There are two labels in every Asset CR created from DocsTopic CRs. Both of them are based on DocsTopic CRs definitions:

  • cms.kyma-project.io/type equals a given type parameter from the DocsTopic CR, such as asyncapi.

  • cms.kyma-project.io/docs-topic equals the name metadata from the DocsTopic CR, such as service-catalog.

Statuses

The status of the DocsTopic CR depends heavily on the status phase of all Asset CRs it creates. It is:

  • Ready when all related Asset CRs are already in the Ready phase.
  • Pending when it awaits the confirmation that all related Asset CRs are in the Ready phase. If any Asset CR is in the Failed phase, the status of the DocsTopic CR remains Pending.
  • Failed when processing of the DocsTopic CR fails. For example, the DocsTopic CR can fail if you provide incorrect or duplicated data in its specification.

CMS AsyncAPI Service

CMS AsyncAPI Service is an HTTP server enabled by default in Kyma to process AsyncAPI specifications. It only accepts multipart/form-data forms and contains two endpoints:

  • /validate that validates the AsyncAPI specification against the AsyncAPI schema in version 2.0.0. CMS AsyncAPI Service uses the AsyncAPI Parser for this purpose.

  • /convert that converts the version and format of the AsyncAPI files. The service uses the AsyncAPI Converter to change the AsyncAPI specifications from older versions to version 2.0.0, and convert any yaml input files to the json format that is required to render the specifications in the Console UI.

See this file for the full OpenAPI specification of the service.

NOTE: To learn how you can configure the service with an override, see this document.

Configuration

CMS Controller Manager sub-chart

To configure the Content Management System (CMS) Controller Manager sub-chart, override the default values of its values.yaml file. This document describes parameters that you can configure.

TIP: To learn more about how to use overrides in Kyma, see the following documents:

Configurable parameters

This table lists the configurable parameters, their descriptions, and default values:

ParameterDescriptionDefault value
resources.limits.cpuDefines limits for CPU resources.100m
resources.limits.memoryDefines limits for memory resources.30Mi
resources.requests.cpuDefines requests for CPU resources.100m
resources.requests.memoryDefines requests for memory resources.20Mi
clusterDocsTopic.relistIntervalDetermines time intervals in which the Controller Manager verifies the ClusterDocsTopic for changes.5m
docsTopic.relistIntervalDetermines time intervals in which the Controller Manager verifies the DocsTopic for changes.5m
clusterBucket.regionSpecifies the regional location of the ClusterBucket in a given cloud storage. Use one of these regions.us-east-1
bucket.regionSpecifies the regional location of the Bucket in a given cloud storage. Use one of these regions.us-east-1

CMS AsyncAPI Service sub-chart

To configure the Content Management System (CMS) AsyncAPI Service sub-chart, override the default values of its values.yaml file. This document describes parameters that you can configure.

TIP: To learn more about how to use overrides in Kyma, see the following documents:

Configurable parameters

This table lists the configurable parameters, their descriptions, and default values:

ParameterDescriptionDefault value
service.verboseIf set to true, you enable the extended logging mode that records more information on CMS AsyncAPI Service activities than the usual logging mode which registers only errors and warnings.true

Custom Resource

DocsTopic

The docstopics.cms.kyma-project.io CustomResourceDefinition (CRD) is a detailed description of the kind of data and the format used to define an orchestrator that creates Asset CRs for a specific asset type. To get the up-to-date CRD and show the output in the yaml format, run this command:

Click to copy
kubectl get crd docstopics.cms.kyma-project.io -o yaml

Sample custom resource

This is a sample DocsTopic custom resource (CR) that provides details of the Asset CRs for the markdown, asyncapi, and openapi source types.

Click to copy
apiVersion: cms.kyma-project.io/v1alpha1
kind: DocsTopic
metadata:
name: slack
labels:
cms.kyma-project.io/view-context: service-catalog
spec:
displayName: Slack
description: "Slack documentation"
sources:
- type: markdown
name: markdown-slack
mode: single
parameters:
disableRelativeLinks: "true"
url: https://raw.githubusercontent.com/slackapi/slack-api-specs/master/README.md
- type: asyncapi
name: asyncapi-slack
mode: single
url: https://raw.githubusercontent.com/slackapi/slack-api-specs/master/events-api/slack_events_api_async_v1.json
- type: openapi
name: openapi-slack
mode: single
url: https://raw.githubusercontent.com/slackapi/slack-api-specs/master/web-api/slack_web_openapi_v2.json
status:
lastHeartbeatTime: "2019-03-18T13:42:55Z"
message: Assets are ready to use
phase: Ready
reason: AssetsReady

Custom resource parameters

This table lists all possible parameters of a given resource together with their descriptions:

ParameterRequiredDescription
metadata.nameYesSpecifies the name of the CR. It also defines the cms.kyma-project.io/docs-topic label added to the Asset CR that the DocsTopic CR defines. Because of label name limitations, DocsTopic CR names can have a maximum length of 63 characters.
metadata.labelsNoSpecifies how to filter and group Asset CRs that the DocsTopic CR defines. See this document for more details.
spec.displaynameYesSpecifies a human-readable name of the DocsTopic CR.
spec.descriptionYesProvides more details on the purpose of the DocsTopic CR.
spec.sourcesYesDefines the type of the asset and the cms.kyma-project.io/type label added to the Asset CR.
spec.sources.typeYesSpecifies the type of assets included in the DocsTopic CR.
spec.sources.nameYesDefines an identifier of a given asset. It must be unique if there is more than one asset of a given type in a DocsTopic CR.
spec.sources.modeYesSpecifies if the asset consists of one file or a set of compressed files in the ZIP or TAR format. Use single for one file and package for a set of files.
spec.sources.parametersNoSpecifies a set of parameters for the asset. For example, use it to define what to render, disable, or modify in the UI. Define it in a valid YAML or JSON format.
spec.sources.urlYesSpecifies the location of a single file or a package.
spec.sources.filterNoSpecifies a set of assets from the package to upload. The regex used in the filter must be RE2-compliant.
status.lastheartbeattimeNot applicableProvides the last time when the DocsTopic Controller processed the DocsTopic CR.
status.messageNot applicableDescribes a human-readable message on the CR processing progress, success, or failure.
status.phaseNot applicableThe DocsTopic Controller adds it to the DocsTopic CR. It describes the status of processing the DocsTopic CR by the DocsTopic Controller. It can be Ready, Pending, or Failed.
status.reasonNot applicableProvides the reason why the DocsTopic CR processing succeeded, is pending, or failed. See the Reasons section for the full list of possible status reasons and their descriptions.

NOTE: The DocsTopic Controller automatically adds all parameters marked as Not applicable to the DocsTopic CR.

Status reasons

Processing of a DocsTopic CR can succeed, continue, or fail for one of these reasons:

ReasonPhaseDescription
AssetCreatedPendingThe DocsTopic Controller created the specified asset.
AssetCreationFailedFailedThe DocsTopic Controller couldn't create the specified asset due to the provided error.
AssetsCreationFailedFailedThe DocsTopic Controller couldn't create assets due to the provided error.
AssetsListingFailedFailedThe DocsTopic Controller couldn't list assets due to the provided error.
AssetDeletedPendingThe DocsTopic Controller deleted specified assets.
AssetDeletionFailedFailedThe DocsTopic Controller couldn't delete the specified asset due to the provided error.
AssetsDeletionFailedFailedThe DocsTopic Controller couldn't delete assets due to the provided error.
AssetUpdatedPendingThe DocsTopic Controller updated the specified asset.
AssetUpdateFailedFailedThe DocsTopic Controller couldn't upload the specified asset due to the provided error.
AssetsUpdateFailedFailedThe DocsTopic Controller couldn't update assets due to the provided error.
AssetsReadyReadyAssets are ready to use.
WaitingForAssetsPendingWaiting for assets to be in the Ready status phase.
BucketErrorFailedBucket verification failed due to the provided error.
AssetsWebhookGetFailedFailedThe DocsTopic Controller failed to obtain proper webhook configuration.
AssetsSpecValidationFailedFailedAsset specification is invalid due to the provided error.

These are the resources related to this CR:

Custom resourceDescription
AssetThe DocsTopic CR orchestrates the creation of the Asset CR and defines its content.

These components use this CR:

ComponentDescription
Asset StoreManages Asset CRs created based on the definition in the DocsTopic CR.

ClusterDocsTopic

The clusterdocstopics.cms.kyma-project.io CustomResourceDefinition (CRD) is a detailed description of the kind of data and the format used to define an orchestrator that creates ClusterAsset CRs for a specific asset type. To get the up-to-date CRD and show the output in the yaml format, run this command:

Click to copy
kubectl get crd clusterdocstopics.cms.kyma-project.io -o yaml

Sample custom resource

This is a sample ClusterDocsTopic custom resource (CR) that provides details of the ClusterAsset CR for the markdown source type.

Click to copy
apiVersion: cms.kyma-project.io/v1alpha1
kind: ClusterDocsTopic
metadata:
name: service-mesh
labels:
cms.kyma-project.io/view-context: docs-ui
cms.kyma-project.io/group-name: components
cms.kyma-project.io/order: "6"
spec:
displayName: "Service Mesh"
description: "Overall documentation for Service Mesh"
sources:
- type: markdown
name: docs
mode: package
parameters:
disableRelativeLinks: "true"
url: https://github.com/kyma-project/kyma/archive/master.zip
filter: /docs/service-mesh/docs/
status:
lastHeartbeatTime: "2019-03-18T13:42:55Z"
message: Assets are ready to use
phase: Ready
reason: AssetsReady

Custom resource parameters

This table lists all possible parameters of a given resource together with their descriptions:

ParameterRequiredDescription
metadata.nameYesSpecifies the name of the CR. It also defines the cms.kyma-project.io/docs-topic label added to the ClusterAsset CR that the ClusterDocsTopic CR defines. Because of label name limitations, ClusterDocsTopic CR names can have a maximum length of 63 characters.
metadata.labelsNoSpecifies how to filter and group ClusterAsset CRs that the ClusterDocsTopic CR defines. See this document for more details.
spec.displaynameYesSpecifies a human-readable name of the ClusterDocsTopic CR.
spec.descriptionYesProvides more details on the purpose of the ClusterDocsTopic CR.
spec.sourcesYesDefines the type of the asset and the cms.kyma-project.io/type label added to the ClusterAsset CR.
spec.sources.typeYesSpecifies the type of assets included in the ClusterDocsTopic CR.
spec.sources.nameYesDefines a unique identifier of a given asset. It must be unique if there is more than one asset of a given type in a ClusterDocsTopic CR.
spec.sources.modeYesSpecifies if the asset consists of one file or a set of compressed files in the ZIP or TAR format. Use single for one file and package for a set of files.
spec.sources.parametersNoSpecifies a set of parameters for the ClusterAsset. For example, use it to define what to render, disable, or modify in the UI. Define it in a valid YAML or JSON format.
spec.sources.urlYesSpecifies the location of a single file or a package.
spec.sources.filterNoSpecifies a set of assets from the package to upload. The regex used in the filter must be RE2-compliant.
status.lastheartbeattimeNot applicableProvides the last time when the DocsTopic Controller processed the ClusterDocsTopic CR.
status.messageNot applicableDescribes a human-readable message on the CR processing progress, success, or failure.
status.phaseNot applicableThe DocsTopic Controller adds it to the ClusterDocsTopic CR. It describes the status of processing the ClusterDocsTopic CR by the DocsTopic Controller. It can be Ready, Pending, or Failed.
status.reasonNot applicableProvides the reason why the ClusterDocsTopic CR processing succeeded, is pending, or failed. See the Reasons section for the full list of possible status reasons and their descriptions.

NOTE: The DocsTopic Controller automatically adds all parameters marked as Not applicable to the ClusterDocsTopic CR.

Status reasons

Processing of a ClusterDocsTopic CR can succeed, continue, or fail for one of these reasons:

ReasonPhaseDescription
AssetCreatedPendingThe DocsTopic Controller created the specified asset.
AssetCreationFailedFailedThe DocsTopic Controller couldn't create the specified asset due to the provided error.
AssetsCreationFailedFailedThe DocsTopic Controller couldn't create assets due to the provided error.
AssetsListingFailedFailedThe DocsTopic Controller couldn't list assets due to the provided error.
AssetDeletedPendingThe DocsTopic Controller deleted specified assets.
AssetDeletionFailedFailedThe DocsTopic Controller couldn't delete the specified asset due to the provided error.
AssetsDeletionFailedFailedThe DocsTopic Controller couldn't delete assets due to the provided error.
AssetUpdatedPendingThe DocsTopic Controller updated the specified asset.
AssetUpdateFailedFailedThe DocsTopic Controller couldn't upload the specified asset due to the provided error.
AssetsUpdateFailedFailedThe DocsTopic Controller couldn't update assets due to the provided error.
AssetsReadyReadyAssets are ready to use.
WaitingForAssetsPendingWaiting for assets to be in the Ready status phase.
BucketErrorFailedBucket verification failed due to the provided error.
AssetsWebhookGetFailedFailedThe DocsTopic Controller failed to obtain proper webhook configuration.
AssetsSpecValidationFailedFailedAsset specification is invalid due to the provided error.

These are the resources related to this CR:

Custom resourceDescription
ClusterAssetThe ClusterDocsTopic CR orchestrates the creation of the ClusterAsset CR and defines its content.

These components use this CR:

ComponentDescription
Asset StoreManages ClusterAsset CRs created based on the definition in the ClusterDocsTopic CR.

Tutorial

Add new documents to the Documentation view in the Console UI

This tutorial shows how you can customize the Documentation view that is available in the Console UI under the question mark icon on the top navigation panel. The purpose of this tutorial is to create a new Prometheus documentation section that contains Concepts and Guides documentation topics with a set of Markdown subdocuments. The Markdown sources used in this tutorial point to specific topics in the official Prometheus documentation.

NOTE: The Documentation view only displays documents uploaded through ClusterDocsTopics. Make sure they have valid definitions and that the Markdown documents they render have correct metadata and structure.

Prerequisites

Steps

  1. Open the terminal and create these ClusterDocsTopic custom resources:

    Click to copy
    cat <<EOF | kubectl apply -f -
    apiVersion: cms.kyma-project.io/v1alpha1
    kind: ClusterDocsTopic
    metadata:
    labels:
    cms.kyma-project.io/view-context: docs-ui # This label specifies that you want to render documents in the Documentation view.
    cms.kyma-project.io/group-name: prometheus # This label defines the group under which you want to render the given asset in the Documentation view. The value cannot include spaces.
    cms.kyma-project.io/order: "1" # This label specifies the position of the ClusterDocsTopic in relation to other ClusterDocsTopics in the Prometheus section.
    name: prometheus-concepts
    spec:
    displayName: "Concepts" # The name of the topic that shows in the Documentation view under the main Prometheus section.
    description: "Some docs about Prometheus concepts"
    sources:
    - type: markdown # This type indicates that the Asset Metadata Service must extract Front Matter metadata from the source Prometheus documents and add them to a ClusterDocsTopic as a status.
    name: docs
    mode: package # This mode indicates that the source file is compressed and the Asset Controller must unpack it first to process it.
    url: https://github.com/prometheus/docs/archive/master.zip # The source location of Prometheus documents.
    filter: content/docs/concepts # The exact location of the documents that you want to extract.
    ---
    apiVersion: cms.kyma-project.io/v1alpha1
    kind: ClusterDocsTopic
    metadata:
    labels:
    cms.kyma-project.io/view-context: docs-ui
    cms.kyma-project.io/group-name: prometheus
    cms.kyma-project.io/order: "2"
    name: prometheus-guides
    spec:
    displayName: "Guides"
    description: "Some docs about Prometheus guides"
    sources:
    - type: markdown
    name: docs
    mode: package
    url: https://github.com/prometheus/docs/archive/master.zip
    filter: content/docs/guides
    EOF

    NOTE: For a detailed explanation of all parameters, see the ClusterDocsTopics custom resource.

  2. Check the status of custom resources:

    Click to copy
    kubectl get clusterdocstopics

    The custom resources should be in the Ready phase:

    Click to copy
    NAME PHASE AGE
    prometheus-concepts Ready 59s
    prometheus-guides Ready 59s

    If a given custom resource is in the Ready phase and you want to get details of the created ClusterAssets, such as document names and the location of MinIO buckets, run this command:

    Click to copy
    kubectl get clusterasset -o yaml -l cms.kyma-project.io/docs-topic=prometheus-concepts

    The command lists details of the ClusterAsset created by the prometheus-concepts custom resource:

    Click to copy
    apiVersion: v1
    items:
    - apiVersion: assetstore.kyma-project.io/v1alpha2
    kind: ClusterAsset
    metadata:
    annotations:
    cms.kyma-project.io/asset-short-name: docs
    creationTimestamp: "2019-05-15T13:27:11Z"
    finalizers:
    - deleteclusterasset.finalizers.assetstore.kyma-project.io
    generation: 1
    labels:
    cms.kyma-project.io/docs-topic: prometheus-concepts
    cms.kyma-project.io/type: markdown
    name: prometheus-concepts-docs-markdown-1b7mu6bmkmse4
    ownerReferences:
    - apiVersion: cms.kyma-project.io/v1alpha1
    blockOwnerDeletion: true
    controller: true
    kind: ClusterDocsTopic
    name: prometheus-concepts
    uid: 253c311b-7715-11e9-b241-1e5325edb3d6
    resourceVersion: "6785"
    selfLink: /apis/assetstore.kyma-project.io/v1alpha2/clusterassets/prometheus-concepts-docs-markdown-1b7mu6bmkmse4
    uid: 253eee7d-7715-11e9-b241-1e5325edb3d6
    spec:
    bucketRef:
    name: cms-public-1b7mtf1de5ost
    source:
    filter: content/docs/concepts
    metadataWebhookService:
    - endpoint: /v1/extract
    filter: \.md$
    name: assetstore-asset-metadata-service
    namespace: kyma-system
    mode: package
    url: https://github.com/prometheus/docs/archive/master.zip
    status:
    assetRef:
    baseUrl: https://minio.kyma.local/cms-public-1b7mtf1de5ost-1b7mtf1h187r7/prometheus-concepts-docs-markdown-1b7mu6bmkmse4
    files:
    - metadata:
    sort_rank: 1
    title: Data model
    name: docs-master/content/docs/concepts/data_model.md
    - metadata:
    nav_icon: flask
    sort_rank: 2
    title: Concepts
    name: docs-master/content/docs/concepts/index.md
    - metadata:
    sort_rank: 3
    title: Jobs and instances
    name: docs-master/content/docs/concepts/jobs_instances.md
    - metadata:
    sort_rank: 2
    title: Metric types
    name: docs-master/content/docs/concepts/metric_types.md
    lastHeartbeatTime: "2019-05-15T13:27:24Z"
    message: Asset content has been uploaded
    observedGeneration: 1
    phase: Ready
    reason: Uploaded
    kind: List
    metadata:
    resourceVersion: ""
    selfLink: ""

    In the status section of the ClusterAsset, you can see details of all documents and baseUrl with their location in MinIO:

    Click to copy
    status:
    assetRef:
    baseUrl: https://minio.kyma.local/cms-public-1b7mtf1de5ost-1b7mtf1h187r7/prometheus-concepts-docs-markdown-1b7mu6bmkmse4
    files:
    - metadata:
    sort_rank: 1
    title: Data model
    name: docs-master/content/docs/concepts/data_model.md
  3. Open the Console UI and navigate to the Documentation view. The new Prometheus section with Concepts and Guides topic groups and alphabetically ordered Markdown documents appear at the bottom of the documentation panel:

    NOTE: Since the source Markdown documents are prepared for different UIs and can contain custom tags, there can be issues with rendering their full content. If you prepare your own input, use our content guidelines to make sure the documents render properly in the Console UI.

Troubleshooting

If you apply the ClusterDocsTopic custom resource but its status stays Pending or shows Failed, check the status details.

This command lists details of the prometheus-concepts ClusterDocsTopic:

Click to copy
kubectl get clusterasset -o yaml -l cms.kyma-project.io/docs-topic=prometheus-concepts

See the status details sample:

Click to copy
status:
phase: Failed
reason: ValidationFailed
message: "The file is not valid against the provided json schema"

You can also analyze logs of the Asset Store Controller Manager:

Click to copy
kubectl -n kyma-system logs -l 'app=asset-store-controller-manager'

Metrics

CMS Controller Manager

Metrics for the CMS Controller Manager include:

To see a complete list of metrics, run this command:

Click to copy
kubectl -n kyma-system port-forward svc/cms-cms-controller-manager 8080

To check the metrics, open a new terminal window and run:

Click to copy
curl http://localhost:8080/metrics

TIP: To use these commands, you must have a running Kyma cluster and kubectl installed. If you cannot access port 8080, redirect the metrics to another one. For example, run kubectl -n kyma-system port-forward svc/cms-cms-controller-manager 3000:8080 and update the port in the localhost address.

See the Monitoring documentation to learn more about monitoring and metrics in Kyma.

CMS AsyncAPI Service

This table shows the CMS AsyncAPI Service custom metrics, their types, and descriptions.

NameTypeDescription
cms_services_http_request_and_mutation_duration_secondshistogramSpecifies a number of assets that the service received for processing and mutated within a given time series.
cms_services_http_request_and_validation_duration_secondshistogramSpecifies a number of assets that the service received for processing and validated within a given time series.
cms_services_handle_mutation_status_codecounterSpecifies a number of different HTTP response status codes in a given time series.
cms_services_handle_mutation_status_codecounterSpecifies a number of different HTTP response status codes in a given time series.

Apart from the custom metrics, the CMS AsyncAPI Service also exposes default Prometheus metrics for Go applications.

To see a complete list of metrics, run this command:

Click to copy
kubectl -n kyma-system port-forward svc/cms-cms-asyncapi-service 80

To check the metrics, open a new terminal window and run:

Click to copy
curl http://localhost:80/metrics

TIP: To use these commands, you must have a running Kyma cluster and kubectl installed. If you cannot access port 80, redirect the metrics to another one. For example, run kubectl -n kyma-system port-forward svc/cms-cms-asyncapi-service 8080:80 and update the port in the localhost address.

See the Monitoring documentation to learn more about monitoring and metrics in Kyma.