Commit graph

592 commits

Author SHA1 Message Date
sirius0xdev
37cf8d1276 Merge branch 'master' of github.com:sirius0xdev/gcloud-lab
please wprl#
2026-05-27 02:19:52 +00:00
sirius0xdev
e78674a964 Fix data-service port mismatch: container runs on 8000, not 8001 2026-05-26 10:54:23 -09:00
sirius0xdev
789903c835 Merge branch 'master' of github.com:sirius0xdev/gcloud-lab 2026-05-26 19:02:01 +00:00
sirius0xdev
c5e2ef16d2 Move Redis cluster to trading-platform and wire into kustomization 2026-05-26 09:52:16 -09:00
sirius0xdev
9b949ed0bd move reddis 2026-05-26 18:28:52 +00:00
Hermes Agent
308d54cc0b fix(kafka): add fsGroup to pod securityContext for PVC write permissions
Kraft mode fails with AccessDeniedException on meta.properties
because PVC mounts with root ownership. Adding fsGroup: 1000
ensures the volume group matches the Kafka container user.
2026-05-26 03:33:43 +00:00
Hermes Agent
207733f4df bump Kafka version from 3.8.0 to 4.1.0 (supported by Strimzi 1.0.0) 2026-05-26 03:01:40 +00:00
Hermes Agent
f8b97537d7 fix trading-kafka: remove invalid template.pod.brokers, add controller role to KafkaNodePool
- Removed template.pod.brokers (not valid in Strimzi 1.0.0 Kafka schema)
- Moved broker resources to KafkaNodePool.spec.resources
- Added controller role to KafkaNodePool (KRaft requires both controller+broker)
2026-05-26 02:47:43 +00:00
Hermes Agent
c477e80790 bump trading-kafka to Strimzi 1.0.0 v1 API (KafkaNodePool) 2026-05-26 02:11:25 +00:00
Hermes Agent
8865b76154 Revert "bump trading-kafka API from v1beta2 to v1 for Strimzi 1.0.0"
This reverts commit cbdea178cf.
2026-05-26 02:05:15 +00:00
Hermes Agent
cbdea178cf bump trading-kafka API from v1beta2 to v1 for Strimzi 1.0.0 2026-05-26 02:02:35 +00:00
Hermes Agent
7e9b563257 vendor Strimzi 1.0.0 YAML locally instead of remote URL
strimzi.io/install/1.0.0 is not a valid git repo or kustomize remote URL.
Download the full install bundle (strimzi-1.0.0.yaml) and reference it
locally in the strimzi kustomization.
2026-05-26 01:53:06 +00:00
Hermes Agent
47aae85ed3 split Strimzi operator into separate kustomization for Flux dependsOn
Flux dry-run fails when CRDs are in the same kustomization as resources
that reference them - CRDs need to exist before validation.

Two kustomizations now:
  strimzi/        - Strimzi 1.0.0 CRDs + operator
  siriusdevops-db - DBs, Kafka CR (depends on strimzi CRDs)

Wire them in Flux:
  Kustomization 'siriusdevops-strimzi' -> path: strimzi/
  Kustomization 'siriusdevops-db'      -> path: siriusdevops-db/
    dependsOn: [{name: siriusdevops-strimzi}]
2026-05-26 01:32:57 +00:00
Hermes Agent
94f6b04c28 add Strimzi operator as kustomize remote URL (GitOps)
Reference Strimzi 1.0.0 install bundle directly from kustomization.
No separate install step needed — kubectl apply -k handles CRDs + operator
in one shot before the Kafka CR.

Pinned to 1.0.0 for reproducible deployments.
2026-05-26 01:32:57 +00:00
Hermes Agent
25850b5b04 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 01:32:57 +00:00
Hermes Agent
68033faf4e fix Kafka config mount: use /opt/kafka/config/ path instead of /etc/kafka
/etc/kafka doesn't exist in the apache/kafka image - subPath could not
create the parent directory. Switch to /opt/kafka/config/ which exists
in the image, avoiding both the directory conflict and the missing path.
2026-05-26 00:16:42 +00:00
Hermes Agent
5ab0098e34 fix Kafka config mount: use subPath to avoid /etc/kafka/secrets conflict
Container fails with 'read-only file system' when K8s tries to mount
a secret into /etc/kafka/secrets alongside the ConfigMap at /etc/kafka.
Switch to subPath mount of server.properties directly.
2026-05-25 23:53:55 +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
691d7c68e7 move Kafka broker from hermes-db to siriusdevops-db kustomization
Trading services depend on Kafka (trading-kafka.customer1.svc.cluster.local:9092)
but it was never deployed — lived under hermes-db kustomization which isn't
applied. Move to siriusdevops-db where trading infra belongs.

Also remove stale redis-cluster.yaml reference from hermes-db (file missing).
2026-05-25 23:36:14 +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
c357b69743
Merge pull request #156 from sirius0xdev/fix/pgvector-image-and-cluster
chore(news-bot): switch DB to siriusdevops-pgdb (main apps cluster)
2026-05-25 14:56:56 -04:00
Hermes Agent
22498cd97b chore(news-bot): switch to siriusdevops-pgdb as main apps cluster
- news-app-db.yaml: point Database CR to siriusdevops-pgdb
- All ConfigMaps: DB_HOST=siriusdevops-pgdb-rw, LLM_BASE_URL for vLLM
- hermes-pgdb now dedicated to pgvector/RAG for agents only
- Aligns with CNPG extension pattern and active kanban (devops startupProbes, backend exec-service)

PR to master per repo rules.
2026-05-25 18:56:08 +00:00
sirius0xdev
67410a8ac0
Merge pull request #155 from sirius0xdev/fix/pgvector-image-and-cluster
feat: add pgvector image build and update cluster imageName
2026-05-25 14:03:31 -04: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
2f15684895 feat: add pgvector image build workflow and update cluster imageName
- Add build-pgvector-image.yml GH Actions workflow for GCR
- Set imageName to gcr.io/devops-lab-cluster/postgres-pgvector:15.2-0.8.0
- Image change only (CNPG rule: no config changes in same update)
2026-05-25 08:15:12 +00: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
f17ab24ecc fix: update embedding-service image to GHCR
Point to ghcr.io/sirius0xdev/trading-embedding-service:latest
built automatically by hermes-projects CI on push to main
2026-05-25 01:35:28 +00:00
Hermes Agent
27b7334dfb fix: match pg-cluster manifest to live CNPG cluster state
- Remove imageName (was never applied, live cluster uses default CNPG image)
- Remove maintenance_work_mem (live cluster has no custom parameters)
- Set postgresql: {} to match live state
- Keep memory role superuser: true (the only needed change)

Fixes CNPG admission webhook: 'Can't change image name and configuration at the same time'
2026-05-25 01:11:27 +00:00
Hermes Agent
9f60ca894d fix: remove unsupported sql field from agent-memory-rag Database
CNPG version on cluster does not support .spec.sql on Database CR.
The rag-init-job.yaml already handles RAG schema initialization separately.

Unblocks Flux dry-run for agent-memory-rag.
2026-05-25 01:08:12 +00:00
Hermes Agent
9754c2aed2 fix: remove unsupported CNPG fields, keep memory superuser
- Remove sharedPreloadLibraries and allowedExtensions (not supported by installed CNPG version)
- Keep memory role superuser: true (from PR #135) — sufficient since custom pgvector image already bundles the extension
- Unblocks dry-run validation on hermes-pgdb cluster
2026-05-25 01:01:52 +00:00
sirius0xdev
ead9cff2d3
Merge pull request #134 from sirius0xdev/backend/t_6977ed0c-fix-execute-db-config
fix: align execute-service DB config with EXECUTE_ env prefix
2026-05-24 20:59:27 -04:00
sirius0xdev
9731719564
Merge pull request #135 from sirius0xdev/fix/t_3d94b392-cnpg-allowed-pgvector
fix: enable pgvector for mem0 plugin
2026-05-24 20:54:15 -04:00
sirius0xdev
8ccd21500e fix secrets 2026-05-25 00:49:20 +00:00
Hermes Agent
9ca7f7bd7a fix: enable pgvector for mem0 plugin
- Add allowedExtensions: ['*'] so roles can CREATE EXTENSION
- Grant superuser to 'memory' role (was createdb/createrole, insufficient)
- Needed for mem0 plugin pgvector backend on agent_memory DB

Unblocks kanban task t_3d94b392
2026-05-25 00:36:04 +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
c04823d416 Grant CREATEDB and CREATEROLE to memory role on hermes-pgdb
The memory user needs CREATEDB and CREATEROLE privileges to install
the pgvector extension on the agent_memory database.
2026-05-24 22:14:49 +00:00
sirius0xdev
8bc3738a3f
Merge pull request #127 from sirius0xdev/feat/add-trading-dashboard-db-to-siriusdevops-pgdb
Feat/add trading dashboard db to siriusdevops pgdb
2026-05-24 16:56:27 -04:00
sirius0xdev
9f9bdba2b7
Merge pull request #128 from sirius0xdev/backend/t_438b663e-pgvector-rag-kb
feat(customer1): add pgvector RAG knowledge base with embedding service
2026-05-24 16:56:06 -04:00