# Vector VM-INGEST tier (Deployment) — VM front door. HTTP NDJSON in (behind the
# logs-ingest Gateway), publishes into JetStream. Stateless publisher.
# Pipeline: apps/base/logging/vector/vm-ingest.yaml (unit-tested in CI).
role: Stateless-Aggregator
fullnameOverride: vector-vm-ingest
replicas: 2

image:
  repository: docker.io/timberio/vector
  tag: 0.57.0-distroless-libc

workloadResourceAnnotations:
  configmap.reloader.stakater.com/auto: "true"

podLabels:
  vector.dev/exclude: "true"

dataDir: /vector-data-dir
existingConfigMaps:
  - vector-vm-ingest-config

env:
  # Vector 0.57 disables ${VAR} config interpolation by default; auth needs it.
  - name: VECTOR_DANGEROUSLY_ALLOW_ENV_VAR_INTERPOLATION
    value: "true"
  - name: NATS_PRODUCER_PASSWORD
    valueFrom:
      secretKeyRef:
        name: nats-auth
        key: producer_password

containerPorts:
  - name: http-ingest
    containerPort: 8080
    protocol: TCP
  - name: api
    containerPort: 8686
    protocol: TCP

service:
  enabled: true
  type: ClusterIP
  ports:
    - name: http-ingest
      port: 8080
      targetPort: 8080
      protocol: TCP
    - name: api
      port: 8686
      targetPort: 8686
      protocol: TCP

resources:
  requests:
    cpu: 100m
    memory: 256Mi
  limits:
    cpu: "1"
    memory: 1Gi
