feat: pipeline on/off toggle with per-stage Helm control
- Added pipelineEnabled flag to Helm values (default: true) - Worker services (scheduler, ingestion, parser, extractor, aggregation, recommendation, broker-adapter, lake-publisher) scale to 0 when disabled - API services always run regardless of toggle - Redis-based runtime toggle: POST /api/ops/pipeline/toggle - Scheduler checks the flag before each cycle - Frontend: green/red Pipeline ON/OFF button on the pipeline page - Beta defaults to pipelineEnabled: false - Base values.yaml: blanked external URLs (Ollama, Polygon, Alpaca) so stages only connect to what they explicitly configure
This commit is contained in:
@@ -11,7 +11,7 @@ metadata:
|
||||
{{- include "stonks.labels" $root | nindent 4 }}
|
||||
stonks-oracle/tier: {{ $svc.tier }}
|
||||
spec:
|
||||
replicas: {{ $svc.replicas }}
|
||||
replicas: {{ if and (hasKey $svc "pipeline") $svc.pipeline (not $root.Values.pipelineEnabled) }}0{{ else }}{{ $svc.replicas }}{{ end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ $svc.image }}
|
||||
|
||||
@@ -6,31 +6,11 @@
|
||||
image:
|
||||
tag: latest
|
||||
|
||||
## Single replica for API services, disable pipeline workers
|
||||
## Beta is for API testing only — no ingestion/extraction/aggregation
|
||||
## Pipeline OFF by default — beta is for API testing only
|
||||
pipelineEnabled: false
|
||||
|
||||
## Single replica for API services
|
||||
services:
|
||||
scheduler:
|
||||
replicas: 0
|
||||
symbolRegistry:
|
||||
replicas: 1
|
||||
ingestion:
|
||||
replicas: 0
|
||||
parser:
|
||||
replicas: 0
|
||||
extractor:
|
||||
replicas: 0
|
||||
aggregation:
|
||||
replicas: 0
|
||||
recommendation:
|
||||
replicas: 0
|
||||
tradingEngine:
|
||||
replicas: 1
|
||||
riskEngine:
|
||||
replicas: 1
|
||||
brokerAdapter:
|
||||
replicas: 0
|
||||
lakePublisher:
|
||||
replicas: 0
|
||||
queryApi:
|
||||
replicas: 1
|
||||
dashboard:
|
||||
|
||||
@@ -4,10 +4,16 @@ image:
|
||||
pullPolicy: Always
|
||||
tag: latest
|
||||
|
||||
## Pipeline toggle — when false, all worker services (ingestion, parsing,
|
||||
## extraction, aggregation, recommendation, broker, lake-publisher, scheduler)
|
||||
## are scaled to 0. API services always run.
|
||||
pipelineEnabled: true
|
||||
|
||||
## Service deployments — replicas and resource overrides
|
||||
services:
|
||||
scheduler:
|
||||
replicas: 1
|
||||
pipeline: true
|
||||
image: scheduler
|
||||
command: "python -m services.scheduler.app"
|
||||
tier: orchestration
|
||||
@@ -32,6 +38,7 @@ services:
|
||||
|
||||
ingestion:
|
||||
replicas: 2
|
||||
pipeline: true
|
||||
image: ingestion
|
||||
command: "python -m services.ingestion.worker"
|
||||
tier: ingestion
|
||||
@@ -42,6 +49,7 @@ services:
|
||||
|
||||
parser:
|
||||
replicas: 2
|
||||
pipeline: true
|
||||
image: parser
|
||||
command: "python -m services.parser.worker"
|
||||
tier: processing
|
||||
@@ -52,6 +60,7 @@ services:
|
||||
|
||||
extractor:
|
||||
replicas: 1
|
||||
pipeline: true
|
||||
image: extractor
|
||||
command: "python -m services.extractor.main"
|
||||
tier: processing
|
||||
@@ -62,6 +71,7 @@ services:
|
||||
|
||||
aggregation:
|
||||
replicas: 4
|
||||
pipeline: true
|
||||
image: aggregation
|
||||
command: "python -m services.aggregation.main"
|
||||
tier: processing
|
||||
@@ -72,6 +82,7 @@ services:
|
||||
|
||||
recommendation:
|
||||
replicas: 1
|
||||
pipeline: true
|
||||
image: recommendation
|
||||
command: "python -m services.recommendation.main"
|
||||
tier: processing
|
||||
@@ -107,6 +118,7 @@ services:
|
||||
|
||||
brokerAdapter:
|
||||
replicas: 1
|
||||
pipeline: true
|
||||
image: broker-adapter
|
||||
command: "python -m services.adapters.broker_service"
|
||||
tier: trading
|
||||
@@ -117,6 +129,7 @@ services:
|
||||
|
||||
lakePublisher:
|
||||
replicas: 1
|
||||
pipeline: true
|
||||
image: lake-publisher
|
||||
command: "python -m services.lake_publisher.jobs"
|
||||
tier: analytics
|
||||
|
||||
Reference in New Issue
Block a user