# Catalyst Blueprint umbrella metadata — the upstream chart is now resolved
# as a Helm subchart via Chart.yaml `dependencies:`. This values.yaml carries
# both:
#   1. The catalystBlueprint metadata block (provenance + version) so
#      observability/audit pipelines can inspect the artifact and report
#      which upstream chart + version is bundled.
#   2. The upstream subchart values overlay under the `nats:` key
#      (umbrella-chart convention — the dependency name from Chart.yaml is
#      the values namespace).

global:
  # When set, ALL image pulls in this chart route through this registry.
  # Used post-handover when the Sovereign's own Harbor takes over the
  # proxy_cache role from contabo's central Harbor. Empty = no rewrite
  # (image references use upstream defaults). The upstream nats subchart
  # exposes `nats.container.image.repository` for registry override.
  # Per-Sovereign overlays wire that alongside this value. Tracked under #560.
  imageRegistry: ""

catalystBlueprint:
  upstream: { chart: nats, version: "1.2.0", repo: "https://nats-io.github.io/k8s/helm/charts" }

# ─── Upstream chart values (subchart key: nats) ───────────────────────────
# Generated by docs/PROVISIONING-PLAN.md tickets [F] chart Pass 105+.
nats:
  config:
    cluster:
      enabled: true
      replicas: 3
    jetstream:
      enabled: true
      fileStore:
        pvc:
          size: 10Gi
  container:
    resources:
      requests: { cpu: 100m, memory: 256Mi }
      limits: { memory: 1Gi }
  # Prometheus exporter + PodMonitor — DEFAULT OFF.
  #
  # Per docs/INVIOLABLE-PRINCIPLES.md #4 and docs/BLUEPRINT-AUTHORING.md
  # §11.2 (Observability toggles must default false). The upstream nats
  # chart's `promExporter.podMonitor.enabled` renders a
  # monitoring.coreos.com/v1 PodMonitor which the apiserver rejects on a
  # fresh Sovereign before bp-kube-prometheus-stack ships the CRD.
  # Upstream already defaults both to false — set explicitly so a
  # future upstream bump cannot regress this. Operator opts in via
  # per-cluster overlay (issue #182).
  promExporter:
    enabled: false
    podMonitor:
      enabled: false

# ─── Catalyst-curated JetStream Streams + KV buckets ─────────────────────
#
# Reconciled by NACK (nats-io/nack) when it's installed in the same
# cluster. NACK is NOT a current dependency of this chart — install it
# as a sibling Blueprint, then flip `enabled: true` here.
#
# Per docs/EPICS-1-6-unified-design.md §3.9 row 7 + ADR-0001 §6,
# Catalyst's own events flow on these streams:
#   catalyst.audit  / catalyst.events / catalyst.billing  → Stream CRs
#   idempotency / dr-leases / policy-rollup               → KeyValue CRs
#
# Per-Org and per-Application streams are created at runtime by
# organization-controller (slice C1) and application-controller (slice
# C4), not statically here.
#
# Per docs/INVIOLABLE-PRINCIPLES.md #4 (never hardcode), every retention
# value is a variable and operator-overrideable.
catalystStreams:
  enabled: false
  # JetStream replication factor. R=3 is the bank-tier default for
  # in-region quorum; the DR Mirror to a second region is a separate
  # follow-up wired by Continuum (#1101).
  replicas: 3
  # Override the upstream nats Service URL — defaults to
  # nats://<release>-nats.<release-namespace>.svc.cluster.local:4222
  servers: ""
  audit:
    # 90 days. Audit-log retention horizon.
    maxAge: "2160h"
    maxBytes: -1
    duplicateWindow: "5m"
    placement: {}
  events:
    # 24 hours. Cross-replica fan-out + cold-start replay window.
    maxAge: "24h"
    maxBytes: -1
  billing:
    # 1 year. Billing reconciliation horizon.
    maxAge: "8760h"
    maxBytes: -1
  idempotency:
    ttl: "24h"
    # 256 MiB upper bound on the bucket.
    maxBytes: 268435456
  drLeases:
    # 60 seconds — matches Continuum.spec.leaseClient.config.ttlSeconds
    # default. DR-quorum lease path; Cloudflare-KV path bypasses this.
    ttl: "60s"
  policyRollup:
    # 7 days. Replayable window for the compliance scorer.
    ttl: "168h"
    # 1 GiB upper bound.
    maxBytes: 1073741824
