Skip to main content

Check out Port for yourself ➜ 

Komodor

Loading version...

Port's Komodor integration allows you to model Komodor resources in your software catalog and ingest data into them.

Supported resources ServicesHealth Monitoring

Overview

This integration allows you to map, organize, and sync your desired Komodor resources and their metadata in Port.

Prerequisites

Generate a Komodor Api Key

  1. Log in to the Komodor platfrom.
  2. Access API Keys management page:
    • Click on your user profile in the top-right corner of the platform.
    • Select API Keys from the dropdown menu.
  3. Generate a new API key:
    • Click the Generate Key button.
    • Provide a descriptive name for the API key to help you identify its purpose later (e.g., "Port.io api key").
  4. Copy the token and save it in a secure location.

To read more, see the Komodor documentation.

API key permissions

Make sure the user who creates the API key has view permissions (ideally full access) for the resources you wish to ingest into Port, since the API key inherits the user's permissions.

Setup

Choose one of the following installation methods: Not sure which method is right for your use case? Check the available installation methods.

Configuration

Port integrations use a YAML mapping block to ingest data from Komodor's API into Port.

The mapping makes use of the JQ JSON processor to select, modify, concatenate, transform and perform other operations on existing fields and values from the integration API.

Default mapping configuration

This is the default mapping configuration you get after installing the Komodor integration.

Default mapping configuration (Click to expand)

deleteDependentEntities: true
createMissingRelatedEntities: false
enableMergeEntity: true
resources:
- kind: komodorService
selector:
query: 'true'
port:
entity:
mappings:
identifier: .kind + "-" + .cluster + "-" + .namespace + "-" + .service
title: .service
blueprint: '"komodorService"'
properties:
service_id: .uid
status: .status
cluster_name: .cluster
workload_kind: .kind
namespace_name: .namespace
service_name: .service
komodor_link: .link + "&utmSource=port"
labels: .labels
last_deploy_at: .lastDeploy.endTime | todate
last_deploy_status: .lastDeploy.status
- kind: komodorHealthMonitoring
selector:
query: 'true'
port:
entity:
mappings:
identifier: .id
title: .komodorUid | gsub("\\|"; "-") | sub("-+$"; "")
blueprint: '"komodorHealthMonitoring"'
properties:
status: .status
resource_identifier: .komodorUid | gsub("\\|"; "-") | sub("-+$"; "")
severity: .severity
supporting_data: .supportingData
komodor_link: .link + "&utmSource=port"
created_at: .createdAt | todate
last_evaluated_at: .lastEvaluatedAt | todate
check_type: .checkType
workload_type: .komodorUid | split("|") | .[0]
cluster_name: .komodorUid | split("|") | .[1]
namespace_name: .komodorUid | split("|") | .[2]
workload_name: .komodorUid | split("|") | .[3]
- kind: komodorHealthMonitoring
selector:
query: ( .komodorUid | split("|") as $parts | (length == 4 and all($parts[]; length > 0)) )
port:
entity:
mappings:
identifier: .id
title: .komodorUid | gsub("\\|"; "-") | sub("-+$"; "")
blueprint: '"komodorHealthMonitoring"'
properties: {}
relations:
service: .komodorUid | gsub("\\|"; "-")

Monitoring and sync status

To learn more about how to monitor and check the sync status of your integration, see the relevant documentation.

Mapping & examples per resource

Connect Komodor services to k8s workloads

Prerequisites

  • Install Komodor integration.
  • Install Port's k8s exporter integration on your cluster.
  • Install Komodor agent on your cluster.

Create the relation

  1. Navigate to the data model page of your portal.

  2. Click on the Komodor Service blueprint.

  3. Click on the ... button in the top right corner, choose Edit blueprint, then click on the Edit JSON button.

  4. Update the existing JSON by incorporating the following data in it.

    Mapping configuration (Click to expand)
    {
    "relations": {
    "workload": {
    "title": "Workload",
    "target": "workload",
    "required": false,
    "many": false
    }
    }
    }

Set up mapping configuration

  1. Navigate to the data sources page of your portal.

  2. Click on the Komodor integration, and scroll to the mapping section in the bottom-left corner.

  3. Copy the following configuration and paste it in the editor, then click Save & Resync.

    Mapping configuration (Click to expand)
      - kind: komodorService
    selector:
    query: 'true'
    port:
    entity:
    mappings:
    identifier: .kind + "-" + .cluster + "-" + .namespace + "-" + .service
    blueprint: '"komodorService"'
    properties: {}
    relations:
    workload: .service + "-" + .kind + "-" + .namespace + "-" + .cluster
Default values

This assumes that both your Komodor integration and Kubernetes exporter are using their default key and field values. If any mappings or blueprints have been modified in either integration, you may need to adjust these values accordingly.