Configuration

The CEX loads configuration data from a file (typically backed by a Kubernetes config map). If the service is unable to retrieve the configuration data, it will not start. Refer to the configuration for details.

Service configuration structure

The recommended configuration format is YAML. The below sections describe the officially supported configuration options that influence various aspects of the service functionality. The service may support options other than the ones listed below, but those are not a part of the public API and may be changed or deleted at any time.

General service configuration

CEX uses a standard Spring Boot server.port property to configure the port to expose the REST API at.

The service-specific configuration properties are located under kaa.cex.

server:
  port: <unsigned short integer>  # Server port used to expose the REST API at

kaa:
  cex:
    commands:
      ttl-seconds: <timeout>      # Time to live of the scheduled command

Kaa applications

Many Kaa services can be configured for different behavior depending on the application version of the endpoint the processed data relates to. This is called appversion-specific behavior and is handled in service configurations under kaa.applications. Despite CEX currently does not support any appversion-specific configurations, it uses the application and appversion names to validate the API calls and protocols data.

kaa:
  applications:
    <application 1 name>:                 # Kaa application name
      versions:
        <application 1 version 1 name>:   # Kaa application version name

Communication service interface

kaa:
  cex:
    communication-service:
      service-instance:
        name: <string>      # Name of the communication service to use

Redis

CEX uses Redis for the command store. The implementation is based on Spring Data Redis. Refer to the corresponding documentation for the list of supported configuration options.

NATS

The below parameters configure CEX’s connection to NATS.

NOTE For security, reasons NATS username and password are sourced from the environment variables.

nats:
  urls: <comma separated list of URL>  # NATS connection URLs

Management

CEX monitoring and management implementation is based on the Spring Boot Actuator. Refer to the corresponding documentation for the list of supported configuration options.

Logging

By default, CEX uses Spring Boot logging configuration with logback for logging. Refer to the corresponding documentation for the list of supported configuration options.

Built-in configuration profiles

For your convenience, CEX comes with a default built-in configuration profile.

Built-in profiles are optimized for a Kubernetes-based production deployment. They do not define any Kaa applications—you have to configure them for a specific Kaa-based solution.

Default

server:
  port: 80

kaa:
  cex:
    communication-service:
      service-instance:
        name: kpc
    commands:
      ttl-seconds: 3600

nats:
  urls: nats://nats:4222

management:
  port: 8080
  security:
    enabled: false

spring:
  redis:
    host: redis
    port: 6379

endpoints:
  enabled: false
  health:
    enabled: true
    mapping.UNKNOWN: SERVICE_UNAVAILABLE
  info.enabled: true
  metrics.enabled: true