---
name: log-cache

templates:
  bpm.yml.erb: config/bpm.yml
  ca.crt.erb: config/certs/ca.crt
  log_cache.crt.erb: config/certs/log_cache.crt
  log_cache.key.erb: config/certs/log_cache.key

packages:
- log-cache

provides:
- name: log-cache
  type: log-cache
  properties:
  - port
  - tls
  - disabled

consumes:
- name: log-cache
  type: log-cache

properties:
  port:
    description: "The port for the log-cache to listen on"
    default: 8080

  memory_limit_percent:
    description: "Percentage of system memory to use for the cache"
    default: 50

  max_per_source:
    description: "The maximum number of items stored in LogCache per source."
    default: 100000

  health_addr:
    description: "The address for LogCache to bind a health endpoint"
    default: localhost:6060

  promql.query_timeout:
    description: "The maximum allowed runtime for a single PromQL query. Smaller timeouts are recommended."
    default: "10s"

  tls.ca_cert:
    description: "The Certificate Authority for log cache mutual TLS."
  tls.cert:
    description: "The client cert for log cache mutual TLS."
  tls.key:
    description: "The client private key for log cache mutual TLS."

  disabled:
    default: false
    description: "Turns off log cache."
