# bp-valkey — Catalyst bootstrap-kit Blueprint, W2.K1 slot 17.
# Redis-compatible cache (Valkey is the BSD-licensed Redis fork). Used by
# Catalyst control-plane services for ephemeral session/state, and by
# downstream Apps that need a Redis wire-protocol cache.
#
# Per docs/BOOTSTRAP-KIT-EXPANSION-PLAN.md §2.3 (Tier 5 storage+DB
# foundation) — Valkey runs alongside CNPG so Apps can pick the right
# storage shape per workload (relational vs cache).
#
# Wrapper chart: platform/valkey/chart/
# Catalyst-curated values: platform/valkey/chart/values.yaml
# Reconciled by: Flux on the new Sovereign's k3s control plane.

---
apiVersion: v1
kind: Namespace
metadata:
  name: valkey
  labels:
    catalyst.openova.io/sovereign: SOVEREIGN_FQDN_PLACEHOLDER
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
  name: bp-valkey
  namespace: flux-system
spec:
  type: oci
  interval: 15m
  url: oci://ghcr.io/openova-io
  secretRef:
    name: ghcr-pull
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: bp-valkey
  namespace: flux-system
spec:
  interval: 15m
  releaseName: valkey
  targetNamespace: valkey
  # Valkey is a self-contained cache — only needs Flux Ready.
  dependsOn:
    - name: bp-flux
  chart:
    spec:
      chart: bp-valkey
      version: 1.0.0
      sourceRef:
        kind: HelmRepository
        name: bp-valkey
        namespace: flux-system
  # Event-driven install per docs/INVIOLABLE-PRINCIPLES.md #3.
  install:
    disableWait: true
    remediation:
      retries: 3
  upgrade:
    disableWait: true
    remediation:
      retries: 3
