chart data loading
This commit is contained in:
@@ -23,7 +23,10 @@ spec:
|
||||
c.image.startsWith('ghcr.io/dexorder/agent:') ||
|
||||
c.image.startsWith('ghcr.io/dexorder/agent-') ||
|
||||
c.image.startsWith('localhost:5000/dexorder/agent') ||
|
||||
c.image.startsWith('dexorder/agent'))
|
||||
c.image.startsWith('dexorder/agent') ||
|
||||
c.image.startsWith('dexorder/ai-client-py') ||
|
||||
c.image.startsWith('ai-client-py') ||
|
||||
c.image.startsWith('lifecycle-sidecar'))
|
||||
message: "Only approved dexorder agent images are allowed"
|
||||
reason: Forbidden
|
||||
|
||||
|
||||
47
deploy/k8s/dev/agent-config.yaml
Normal file
47
deploy/k8s/dev/agent-config.yaml
Normal file
@@ -0,0 +1,47 @@
|
||||
# Agent ConfigMap in dexorder-agents namespace
|
||||
# This is mounted into dynamically created agent pods
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: agent-config
|
||||
namespace: dexorder-agents
|
||||
labels:
|
||||
app.kubernetes.io/name: agent
|
||||
app.kubernetes.io/component: config
|
||||
data:
|
||||
config.yaml: |
|
||||
# Default configuration for user agent containers
|
||||
# This is mounted at /app/config/config.yaml in agent pods
|
||||
|
||||
# Data directory for persistent storage (workspace, strategies, etc.)
|
||||
# This is mounted as a PVC at /app/data
|
||||
data_dir: "/app/data"
|
||||
|
||||
# User-specific settings (defaults, can be overridden per-user)
|
||||
user:
|
||||
timezone: "UTC"
|
||||
|
||||
# Data sources
|
||||
data:
|
||||
iceberg:
|
||||
catalog_name: "dexorder"
|
||||
# Catalog properties loaded from secrets
|
||||
|
||||
relay:
|
||||
endpoint: "tcp://relay.dexorder.svc.cluster.local:5560"
|
||||
timeout_ms: 5000
|
||||
|
||||
# Strategy settings
|
||||
strategies:
|
||||
max_concurrent: 5
|
||||
default_timeout_minutes: 60
|
||||
|
||||
# Alert settings
|
||||
alerts:
|
||||
max_active: 100
|
||||
|
||||
# Logging
|
||||
logging:
|
||||
level: "INFO"
|
||||
include_timestamps: true
|
||||
@@ -23,7 +23,7 @@ kafka_topics_file: "/topics-dev.yaml" # Use topics-dev.yaml for single broker d
|
||||
|
||||
# Iceberg catalog
|
||||
iceberg_catalog_uri: "http://iceberg-catalog:8181"
|
||||
iceberg_warehouse: "s3://trading-warehouse/"
|
||||
iceberg_warehouse: "s3://warehouse/"
|
||||
iceberg_namespace: "trading"
|
||||
iceberg_table_prefix: "market"
|
||||
hadoop_conf_dir: "/etc/hadoop/conf"
|
||||
|
||||
@@ -31,7 +31,7 @@ data:
|
||||
kubernetes:
|
||||
namespace: dexorder-agents
|
||||
in_cluster: true
|
||||
agent_image: ghcr.io/dexorder/agent:latest
|
||||
agent_image: ai-client-py:latest
|
||||
sidecar_image: lifecycle-sidecar:latest
|
||||
storage_class: standard
|
||||
|
||||
@@ -48,6 +48,8 @@ data:
|
||||
iceberg:
|
||||
catalog_uri: http://iceberg-catalog:8181
|
||||
namespace: gateway
|
||||
ohlc_catalog_uri: http://iceberg-catalog:8181
|
||||
ohlc_namespace: trading
|
||||
s3_endpoint: http://minio:9000
|
||||
|
||||
# Event router (ZeroMQ)
|
||||
|
||||
@@ -158,9 +158,24 @@ spec:
|
||||
- -c
|
||||
- |
|
||||
CLUSTER_ID="dexorder-dev-cluster"
|
||||
if [ ! -f /var/lib/kafka/data/meta.properties ]; then
|
||||
/opt/kafka/bin/kafka-storage.sh format -t $CLUSTER_ID -c /opt/kafka/config/kraft/server.properties
|
||||
LOG_DIR="/var/lib/kafka/data"
|
||||
|
||||
# Ensure log directory exists
|
||||
mkdir -p $LOG_DIR
|
||||
|
||||
# Create temporary config with custom log.dirs for formatting
|
||||
cp /opt/kafka/config/kraft/server.properties /tmp/server.properties
|
||||
echo "log.dirs=$LOG_DIR" >> /tmp/server.properties
|
||||
|
||||
# Format storage if not already formatted
|
||||
if [ ! -f $LOG_DIR/meta.properties ]; then
|
||||
echo "Formatting Kafka storage with cluster ID: $CLUSTER_ID"
|
||||
/opt/kafka/bin/kafka-storage.sh format -t $CLUSTER_ID -c /tmp/server.properties
|
||||
else
|
||||
echo "Kafka storage already formatted, skipping format step"
|
||||
fi
|
||||
|
||||
# Start Kafka server
|
||||
/opt/kafka/bin/kafka-server-start.sh /opt/kafka/config/kraft/server.properties \
|
||||
--override node.id=1 \
|
||||
--override process.roles=broker,controller \
|
||||
@@ -169,7 +184,7 @@ spec:
|
||||
--override controller.quorum.voters=1@kafka:9093 \
|
||||
--override controller.listener.names=CONTROLLER \
|
||||
--override listener.security.protocol.map=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT \
|
||||
--override log.dirs=/var/lib/kafka/data \
|
||||
--override log.dirs=$LOG_DIR \
|
||||
--override offsets.topic.replication.factor=1 \
|
||||
--override transaction.state.log.replication.factor=1 \
|
||||
--override transaction.state.log.min.isr=1
|
||||
@@ -315,6 +330,44 @@ spec:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
---
|
||||
# MinIO bucket initialization job
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: minio-init-buckets
|
||||
spec:
|
||||
ttlSecondsAfterFinished: 100
|
||||
template:
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
containers:
|
||||
- name: create-buckets
|
||||
image: minio/mc:latest
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
echo "Waiting for MinIO to be ready..."
|
||||
until mc alias set minio http://minio:9000 $MINIO_ROOT_USER $MINIO_ROOT_PASSWORD; do
|
||||
sleep 2
|
||||
done
|
||||
|
||||
echo "Creating warehouse bucket..."
|
||||
mc mb minio/warehouse --ignore-existing
|
||||
|
||||
echo "Buckets initialized successfully"
|
||||
env:
|
||||
- name: MINIO_ROOT_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: minio-secret
|
||||
key: root-user
|
||||
- name: MINIO_ROOT_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: minio-secret
|
||||
key: root-password
|
||||
---
|
||||
# Iceberg REST Catalog
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
@@ -422,6 +475,9 @@ spec:
|
||||
- name: wait-for-kafka
|
||||
image: busybox:1.36
|
||||
command: ['sh', '-c', 'until nc -z kafka 9092; do echo waiting for kafka; sleep 2; done;']
|
||||
- name: wait-for-iceberg-catalog
|
||||
image: busybox:1.36
|
||||
command: ['sh', '-c', 'until nc -z iceberg-catalog 8181; do echo waiting for iceberg-catalog; sleep 2; done;']
|
||||
containers:
|
||||
- name: flink-jobmanager
|
||||
image: dexorder/flink:latest
|
||||
|
||||
@@ -8,6 +8,7 @@ resources:
|
||||
- storage-class.yaml
|
||||
- configs/gateway-config.yaml
|
||||
- gateway-health-ingress.yaml
|
||||
- agent-config.yaml # ConfigMap for agent pods in dexorder-agents namespace
|
||||
|
||||
# Dev-specific patches
|
||||
patches:
|
||||
@@ -62,4 +63,92 @@ generatorOptions:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user