openova/clusters/_template/bootstrap-kit/23-mimir.yaml
e3mrah b8a75962a8
feat(openova-flow-adapter-flux): synthetic phase/region nodes + contains edges (Agent #6) (#1400)
OpenovaFlow's FlowNode is deliberately domain-agnostic — Phase 0/1/2/3
+ multi-region structure are conveyed via synthetic group nodes,
contains relationships, and adapter-supplied meta.layout hints (same
primitives a Temporal/Argo/Airflow adapter would use for their own
concepts). Catalyst-specific knowledge stays in the adapter.

What this PR ships
==================

products/openova-flow/adapter-flux:
  - mapper.go: phase-suffix constants, BuildPhaseNodes, BuildPhaseEdges,
    derivePhase (slot-label / component-label driven, no hardcoded
    HR-name → phase table). BuildFromHR now returns two `contains` rels
    per leaf (region row + phase column). BuildRegionNode carries
    meta.layout=lane-vertical + isGroup.
  - rollup.go (new): StatusTracker + RollupStatus (worst-of:
    failed > running > pending > succeeded). Mirrors the same worst-of
    rollup the catalyst-api status-projection uses for the Sovereign
    Console progress widget.
  - hr_informer.go: bootstrap emits region + 4 phase nodes + 3 FS edges
    per region; HR upserts/deletes update the StatusTracker and re-emit
    affected synthetic parents with fresh rolled-up status.
  - test/mapper_synthetic_test.go (new): 9 cases — phase nodes,
    phase edges, slot/component/name-fallback derivation, 43-mock-HR
    acceptance, region-scoped IDs, default region fallback.
  - test/rollup_test.go (new): 9 cases — rollup palette, tracker
    lifecycle, per-group isolation.
  - test/mapper_test.go: updated existing assertions for the new
    contains-edge count (2 per HR, was 1).

clusters/_template/bootstrap-kit/*.yaml (45 HRs):
  - Added catalyst.openova.io/slot=<NN> label per HR (chart-level slot
    surface so the adapter doesn't hardcode HR-name → phase). Mirrors
    the existing catalyst.openova.io/component label pattern in
    platform/external-secrets-stores/chart/templates/*.yaml +
    platform/openclaw/chart/templates/*.yaml.
  - 06a-bp-self-sovereign-cutover.yaml + 13-bp-catalyst-platform.yaml
    also get catalyst.openova.io/component={cutover,catalyst-platform}
    so their phase derivation is explicit, not name-fallback.

Canonical patterns cited
========================
1. catalyst.openova.io/component label on platform/* charts
   (platform/external-secrets-stores, platform/openclaw) — same label
   vocabulary, extended with slot.
2. worst-of-children rollup matches the existing catalyst-api
   status-projection pattern (Sovereign Console progress widget).

Tests
=====
  go test ./test/... → 31 PASS, 0 FAIL.
  go vet ./... → clean.

Definition of Done (after Build & Deploy + emitter reconcile)
=============================================================
GET /sovereign/api/v1/flows/<deploymentId>/snapshot returns:
  - N region root nodes (1 per adapter sidecar)
  - 4 phase nodes per region (8 total for 2-region prov)
  - N HR nodes per region with TWO `contains` edges each
  - 3 phase-FS edges per region

Co-authored-by: hatiyildiz <269457768+hatiyildiz@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 17:00:26 +04:00

73 lines
1.9 KiB
YAML

# bp-mimir — Catalyst Blueprint #23 (W2.K2 Observability batch).
# Grafana Mimir — metrics storage tier of the LGTM stack. SeaweedFS-backed
# blocks-storage; Prometheus-compatible remote-write endpoint.
#
# Wrapper chart: platform/mimir/chart/
# Reconciled by: Flux on the new Sovereign's k3s control plane, AFTER
# bp-seaweedfs is Ready (Mimir blocks live on S3).
#
# dependsOn:
# - bp-seaweedfs (slot 18) — Mimir blocks-storage uses SeaweedFS S3.
# Without SeaweedFS Ready, Mimir compactor/ingester StatefulSets
# cannot persist metric blocks.
#
# disableWait: Mimir is a multi-component distributed system (distributor,
# ingester, querier, store-gateway, compactor, alertmanager, ruler).
# Helm `--wait` would block on every StatefulSet rollout, which can
# legitimately take >5min during a cold-start. The HelmRelease reports
# Ready when manifests apply; runtime convergence is observed via
# kubectl rollout status.
---
apiVersion: v1
kind: Namespace
metadata:
name: mimir
labels:
catalyst.openova.io/sovereign: ${SOVEREIGN_FQDN}
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: bp-mimir
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-mimir
namespace: flux-system
labels:
catalyst.openova.io/slot: "23"
spec:
interval: 15m
timeout: 15m
releaseName: mimir
targetNamespace: mimir
dependsOn:
- name: bp-seaweedfs
chart:
spec:
chart: bp-mimir
version: 1.0.2
sourceRef:
kind: HelmRepository
name: bp-mimir
namespace: flux-system
install:
timeout: 15m
disableWait: true
remediation:
retries: 3
upgrade:
timeout: 15m
disableWait: true
remediation:
retries: 3