# -- Enable deployment of vector
role: Agent
dataDir: /vector-data-dir
resources: {}
args:
  - -w
  - --config-dir
  - /etc/vector/
containerPorts:
  - name: prom-exporter
    containerPort: 9090
    protocol: TCP
service:
  enabled: false
customConfig:
  data_dir: /vector-data-dir
  api:
    enabled: false
    address: 0.0.0.0:8686
    playground: true
  sources:
    k8s:
      type: kubernetes_logs
    internal_metrics:
      type: internal_metrics
  transforms:
    parser:
      type: remap
      inputs: [k8s]
      source: |
        .log = parse_json(.message) ?? .message
        del(.message)
  sinks:
    exporter:
      type: prometheus_exporter
      address: 0.0.0.0:9090
      inputs: [internal_metrics]
    vlogs:
      type: elasticsearch
      inputs: [parser]
      endpoints: 
        - https://o12y.observability.think-ahead.cloud/insert/elasticsearch/
      auth:
        strategy: basic
        user: simple-user
        password: simple-password  
      mode: bulk
      api_version: v8
      compression: gzip
      healthcheck:
        enabled: false
      request:
        headers:
          VL-Time-Field: timestamp
          VL-Stream-Fields: stream,kubernetes.pod_name,kubernetes.container_name,kubernetes.pod_namespace
          VL-Msg-Field: message,msg,_msg,log.msg,log.message,log
          AccountID: "0"
          ProjectID: "0"