apiVersion: v1
kind: ConfigMap
metadata:
  name: ml-api-adapter-service-sidecar
data:
  default.json: |
    {
      "PORT": 4001,
      "EVENT_LOGGER_GRPC_HOST": "localhost",
      "EVENT_LOGGER_GRPC_PORT": 50051,
      "INSTRUMENTATION": {
        "METRICS": {
          "DISABLED": false,
          "labels": {
            "eventId": "*"
          },
          "config": {
            "timeout": 5000,
            "prefix": "moja_",
            "defaultLabels": {
              "serviceName": "ml-api-adapter-service-event-sidecar"
            }
          }
        }
      },
      "KAFKA": {
        "TOPIC_TEMPLATES": {
          "GENERAL_TOPIC_TEMPLATE": {
            "TEMPLATE": "topic-{{functionality}}",
            "REGEX": "topic-(.*)"
          }
        },
        "PRODUCER": {
          "EVENT": {
            "config": {
              "options": {
                "messageCharset": "utf8"
              },
              "rdkafkaConf": {
                "metadata.broker.list": "kafka:9092",
                "client.id": "es-prod-event",
                "event_cb": true,
                "dr_cb": true,
                "socket.keepalive.enable": true,
                "queue.buffering.max.messages": 10000000
              },
              "topicConf": {
                "request.required.acks": "all",
                "partitioner": "murmur2_random"
              }
            }
          }
        }
      }
    }
