Commit graph

25 commits

Author SHA1 Message Date
Hermes DevOps
e24e82107d feat: add solana-ingester deployment for real-time market data
- Create solana-ingester Deployment + Service in trading-platform/
  (uses same data-service image, runs WebSocket ingester mode)
- Add solana-ingester ConfigMap (HELIUS_RPC_ENDPOINT, JUPITER_API_URL,
  KAFKA_BROKER, KAFKA_TOPIC)
- Add helius-api-key and jupiter-api-key placeholders to trading-secrets.yaml
  (TODO: replace with real values and re-encrypt with SOPS)
- Update kustomization to include new resources
2026-05-27 04:05:41 +00:00
Hermes DevOps
c587a707a6 feat(redis): add persistent volume for trading-redis
Replace emptyDir with 10Gi PVC (ReadWriteOnce) so hot cache
survives pod restarts.
2026-05-27 04:05:41 +00:00
sirius0xdev
e78674a964 Fix data-service port mismatch: container runs on 8000, not 8001 2026-05-26 10:54:23 -09:00
sirius0xdev
c5e2ef16d2 Move Redis cluster to trading-platform and wire into kustomization 2026-05-26 09:52:16 -09:00
Hermes Agent
d012cac7f4 replace manual Kafka StatefulSet with Strimzi operator CR
Remove hand-rolled KRaft StatefulSet that kept failing (mount conflicts,
advertised.listeners issues). Replace with a single Strimzi Kafka CR.

Strimzi handles:
- KRaft setup, storage, scaling
- Broker config & advertised listeners (auto-resolved)
- Topic Operator for proper topic lifecycle
- Bootstrap service at trading-kafka-kafka-bootstrap.customer1.svc.cluster.local:9092

Requires Strimzi 1.0.0 operator installed in the cluster first:
  kubectl apply -f https://strimzi.io/install/latest?namespace=customer1 -n customer1
2026-05-26 00:38:57 +00:00
Hermes Agent
32a855c457 fix configmap Kafka env var keys to match app code
App code reads KAFKA_BOOTSTRAP_SERVERS (all services), but configmaps
had KAFKA_BROKER (data) and EXECUTE_KAFKA_BOOTSTRAP_SERVERS (execute).
Services silently fell through to hardcoded defaults — Kafka unreachable.

- data-service: KAFKA_BROKER -> KAFKA_BOOTSTRAP_SERVERS
- execute-service: EXECUTE_KAFKA_BOOTSTRAP_SERVERS -> KAFKA_BOOTSTRAP_SERVERS
2026-05-25 23:40:15 +00:00
Hermes Agent
9cbf21173f fix(data-service): probe /health/ready instead of /health 2026-05-25 21:17:10 +00:00
sirius0xdev
e28d6ccf10 fix(trading): update network policy egress to siriusdevops-pgdb
Migrate trading platform DB egress rule from hermes-pgdb to
siriusdevops-pgdb to complete the trading DB migration. The
configmaps already point to siriusdevops-pgdb-rw but the
network policy still allowed egress to the old cluster.
2026-05-25 20:08:07 +00:00
sirius0xdev
6ca9d9532f
Merge pull request #154 from sirius0xdev/feat/migrate-trading-to-siriusdevops-pgdb
feat: migrate all trading-platform services from hermes-pgdb to siriusdevops-pgdb
2026-05-25 14:03:20 -04:00
Hermes Agent
3f96800222 feat: migrate all trading-platform services from hermes-pgdb to siriusdevops-pgdb
- Add 'trading' managed role to siriusdevops-pgdb cluster
- Move trading-db-credentials from hermes-db to siriusdevops-db
- Create trading-data-db.yaml (Database kind) pointing to siriusdevops-pgdb
- Update DB_HOST in all 4 trading-platform configmaps to siriusdevops-pgdb-rw
- Remove trading-data-db.yaml and trading-db-credentials.yaml from hermes-db
- Update siriusdevops-db kustomization.yaml to include new resources
2026-05-25 07:55:15 +00:00
Hermes DevOps
7e8fd296c4 fix(platform): allow tailscale namespace in NetworkPolicy for proxy access
Tailscale proxy pods run in the tailscale namespace, so the existing
customer1-only namespaceSelector blocked proxy → dashboard traffic.
2026-05-25 07:15:59 +00:00
Hermes DevOps
113324abc1 fix(platform): add port 3000 to trading-platform NetworkPolicy ingress rules
Dashboard listens on port 3000 but NetworkPolicy only allowed 8000-8003.
This blocked all traffic including Tailscale proxy connections to trade:3000.
2026-05-25 07:05:45 +00:00
569a3d5de9 fix(dashboard): change tailscale hostname to "trade" for reliable resolution
Short hostname "trade" (matches /trade HTTPRoute) instead of "trading-dashboard".

This fixes the "Could not resolve host: trading-dashboard" error on tailnet devices while keeping the same annotation style as Grafana.
2026-05-25 06:32:24 +00:00
4be12802d0 fix(execute-service): add timeoutSeconds: 10 to startup/readiness probes
The /health/ready endpoint calls await initialize() on Hyperliquid and Solana executors. Without explicit timeout, the default 1s probe timeout caused repeated failures even though the app was running.

Added timeoutSeconds: 10 + reduced readiness failureThreshold.

This is the final piece for the "running but not ready" state.
2026-05-25 06:26:09 +00:00
605e15d55c fix(dashboard): add tmp volumeMount for readOnlyRootFilesystem
Next.js standalone mode needs a writable /tmp directory for cache, temp files, and logs.

With , the container was crashing after "Ready in 228ms" (EOF in log stream).

Added the standard emptyDir volumeMount used by other services.

This should make the dashboard stable and accessible on tailnet.
2026-05-25 06:17:28 +00:00
abecefe0e1 fix(execute-service): update startupProbe to /health/ready with 30 failureThreshold
The service was 'running but not ready' because:
- startupProbe used /health (always-ok) with only failureThreshold: 6 (~30s grace)
- Executor initialization (Hyperliquid SDK network calls + Solana client) takes longer

Now uses /health/ready (checks actual executor state) with failureThreshold: 30 (~5min grace), matching the pattern used for data-service and dashboard.

Also updated Helm template for consistency.
2026-05-25 06:09:20 +00:00
ceb832b169 fix(dashboard): add explicit tailscale.com/ports: "http:3000" annotation
Matches the exact annotation pattern used for other tailnet services (Grafana, trade-dashboard, hermes-webui, etc.).

This ensures the Tailscale operator correctly maps the exposed port after the 3000 change.
2026-05-25 06:05:51 +00:00
d002a7896b fix(dashboard): align port to 3000 and probes to root path
- containerPort: 3000 (matches Next.js default + Dockerfile ENV PORT=3000)
- All probes (startup/liveness/readiness): path  (Next.js serves root when ready)
- Service targetPort: 3000

Fixes 'not ready' and 'can't reach it' (previous mismatch with 8000 + /api/health which didn't exist).

Live manifests updated (source of truth).
2026-05-25 05:55:21 +00:00
a07259cd25 fix(trading-platform): increase startupProbe failureThreshold to 30 for data-service and dashboard
Gives ~5min grace period for heavy lifespan init (Redis, DB, executors, model loading).

Addresses 'up but not ready' state on data-service and dashboard (0/1 Ready).

Live manifests in apps/base/customer1/... updated (source of truth). Helm templates can be synced later.

See gke-hermes-infrastructure skill (trading-startup-probe-fix-2026-05-26.md).
2026-05-25 05:49:05 +00:00
9ca32408b1 Fix: readiness probe for execute-service uses /health/ready
Change readiness probe from /health (always ok) to /health/ready
(checks executor initialization state). Applied to both:
- apps/base K8s deployment
- Helm chart template

Pairs with app fix making executor init non-blocking.
2026-05-25 05:39:24 +00:00
Hermes Agent
605667df1d fix: wire JWT_SECRET_KEY in live kustomize path
Previous PR #139 added the secret to trading-platform/deploy/k8s/base/
but the live cluster uses apps/base/customer1/trading-platform/ kustomize.

- Create execute-service-jwt-secret.yaml (SOPS encrypted) in secrets/
- Add to secrets/ kustomization.yaml resources
- Wire JWT_SECRET_KEY env var in execute-service deployment
- Points to execute-service-jwt-secret via secretKeyRef
2026-05-25 01:53:19 +00:00
Hermes Agent
a2644b39c7 fix: rename K8s env vars to EXECUTE_ prefix for execute-service
- ConfigMap keys: DB_HOST -> EXECUTE_DB_HOST, DB_PORT -> EXECUTE_DB_PORT, etc.
- Deployment secrets: DB_USER -> EXECUTE_DB_USER, DB_PASSWORD -> EXECUTE_DB_PASSWORD
- Helm configmap: add EXECUTE_DB_* keys alongside legacy POSTGRES_* keys
- Base deployment: add EXECUTE_DB_USER/PASSWORD from secrets
2026-05-24 23:57:04 +00:00
Hermes Agent
1d2d016eda fix(data-service): inject REDIS_URL from ConfigMap
- Add REDIS_URL env var using variable expansion from the existing
  trading-data-service-config ConfigMap (REDIS_HOST + REDIS_PORT).
- This resolves the 'connecting to localhost:6379' crash on startup.
- Matches the actual infrastructure configuration in customer1.
2026-05-23 18:34:51 +00:00
sirius0xdev
75cea5abb7 fix secret issue 2026-05-22 02:11:22 +00:00
b0748538c0 feat: add trading-platform K8s manifests for customer1
- Scaffold trading-platform under apps/base/customer1/trading-platform/
- Add 4 microservice deployments: data-service, execute-service, news-service, dashboard
- Add ConfigMaps with DB/Kafka/Redis connection configs
- Add HTTPRoutes via Gateway API (external-http-gateway)
- Add NetworkPolicies for inter-service and DB/Kafka/Redis egress
- Add SOPS-encrypted secrets (age key)
- Add Kafka (KRaft) and Redis infrastructure to hermes-db/
- Update root and staging kustomizations

All containers: non-root, readOnlyRootFilesystem, resource limits, health probes
Images: ghcr.io/sirius0xdev/trading-{service}:latest
2026-05-21 04:17:05 +00:00