Configuration Reference

December 15, 2025 ยท View on GitHub

The application is configured via environment variables, which are mapped to Helm values.

Environment Variables

Logging

VariableDescriptionDefault
LOG_LEVELLogging level (debug, info, warn, error)info
LOG_FORMATLogging format (json, console)production (json)

API Service

VariableDescriptionDefault
API_ADDRESSHTTP listen address0.0.0.0:8080
API_MAX_TIME_PERIOD_DAYSMaximum allowed time period in days for historical data queries730 (2 years)
DB_URIMongoDB connection stringmongodb://localhost:27017
DB_NAMEMongoDB database nameefn
PDP_ADDRESSCerbos policy engine addresshttp://localhost:3593
PDP_SKIP_POLICY_CHECKBypass authorization (DEV ONLY)false

Worker Service

VariableDescriptionDefault
DB_URIMongoDB connection stringmongodb://localhost:27017
DB_NAMEMongoDB database nameefn
K_SINKCloudEvents sink URL (set by Knative SinkBinding)-
CLIENT_TYPECloud Observability client type (configurable, dummy, or default)dummy
TRAFFIC_CLIENT_TYPETraffic Volume client type (configurable or dummy)dummy
CARBON_FACTOR_TCO2E_PER_KWHCO2 conversion factor (tCO2e per kWh)0.00035

Cloud Observability Configurable Client

VariableDescriptionDefault
CLOUDOBS_CONFIG_APP_VALUEDefault app energy consumption value (kWh)0.0020
CLOUDOBS_CONFIG_NE_VALUEDefault NE energy consumption value (kWh)0.0010
CLOUDOBS_CONFIG_SUCCESS_COUNTIf >0, always succeed for N requests0
CLOUDOBS_CONFIG_ERROR_COUNTIf >0 and success_count=0, always fail for N requests0
CLOUDOBS_CONFIG_ERROR_TYPEError type: throttling or permanentthrottling
CLOUDOBS_CONFIG_DELAY_MSRequest processing delay in milliseconds0

Cloud Observability Error Dummy (for DLQ testing)

VariableDescriptionDefault
CLOUDOBS_FAIL_THROTTLEIf true, simulate throttling errorsfalse
CLOUDOBS_FAIL_NEIf true, simulate network element errorsfalse

Traffic Volume Configurable Client

VariableDescriptionDefault
TRAFFIC_CONFIG_IP_VOLUMEDefault app instance IP traffic volume (Mbps)100.0
TRAFFIC_CONFIG_ALL_VOLUMEDefault total NE traffic volume (Mbps)1000.0
TRAFFIC_CONFIG_SUCCESS_COUNTIf >0, always succeed for N requests0
TRAFFIC_CONFIG_ERROR_COUNTIf >0 and success_count=0, always fail for N requests0
TRAFFIC_CONFIG_ERROR_TYPEError type: throttling or permanentthrottling
TRAFFIC_CONFIG_DELAY_MSRequest processing delay in milliseconds0

Notification Service

VariableDescriptionDefault
DB_URIMongoDB connection stringmongodb://localhost:27017
DB_NAMEMongoDB database nameefn
K_SINKCloudEvents sink URL (set by Knative SinkBinding)-
HTTP_INSECURE_SKIP_VERIFYSkip TLS verification for internal servicesfalse

Sink Receiver Service (Testing Only)

VariableDescriptionDefault
PORTHTTP listen port8090
EXPECTED_RESULT_VALUEExpected result value for validation0.0044

Helm Values (values.yaml)

This are all the configurable Helm values with their default settings:

image:
  repository: ghcr.io/your_repository/camara-efn-api
  tag: "0.0.3"
  pullPolicy: Always

imagePullSecrets: []

knative:
  broker:
    name: rabbitmq-broker
    class: RabbitMQBroker
    delivery:
      retry: 3
      backoffPolicy: exponential
      backoffDelay: PT1S
      deadLetterPath: /dlq
  namespace: demo
  triggers:
    gatherInfoRequested:
      parallelism: 100
    appConsumptionRequested:
      parallelism: 100
    networkElementEnergyRequested:
      parallelism: 100
    networkElementTrafficRequested:
      parallelism: 100
    calculationRequested:
      parallelism: 100
    notificationRequested:
      parallelism: 100
  services:
    api:
      minScale: 1
      maxScale: 3
      target: 1
      metric: concurrency
    worker:
      minScale: 1
      maxScale: 16
      target: 1
      metric: concurrency
      scaleDownDelay: 30s
    notification:
      minScale: 1
      maxScale: 3
      target: 1
      metric: concurrency
  rabbitmq:
    brokerConfig:
      name: rabbitmq-broker-config
      queueType: quorum
      cluster:
        name: my-rabbit
        namespace: ""

api:
  maxTimePeriodDays: 730

logger:
  level: debug
  format: development

pdp:
  address: "cerbos.demo.svc.cluster.local:3593"
  skip: false

database:
  name: efn
  uri: "mongodb://root:CHANGEME@mongo-mongodb.data.svc.cluster.local:27017"

http:
  insecureSkipVerify: false

cloudObservability:
  failThrottle: false
  failNE: false

calculator:
  carbonFactorTCO2ePerKWh: 0.00035

mock:
  enabled: false
  cloudObservability:
    appValue: "0.0020"
    neValue: "0.0010"
    successCount: "0"
    errorCount: "0"
    errorType: "throttling"
    delayMS: "0"
  trafficVolume:
    ipVolume: "100.0"
    allVolume: "1000.0"
    successCount: "0"
    errorCount: "0"
    errorType: "throttling"
    delayMS: "0"