Skip to content

Commit 6fd4b02

Browse files
committed
Updated K8s helm charts for api tool calling and vault updates
1 parent 82d5a6d commit 6fd4b02

37 files changed

Lines changed: 712 additions & 317 deletions

DSL/CronManager/script/delete_secrets_from_vault.sh

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,18 @@
66
set -e # Exit on any error
77

88
# Configuration
9-
# Use vaultAgentUrl which points to vault-agent-cron proxy
10-
# The agent automatically injects the authentication token
11-
VAULT_ADDR="${vaultAgentUrl:-http://vault-agent-cron:8203}"
9+
# Resolve Vault Agent URL:
10+
# 1. Use vaultAgentUrl env var if set (from container env or CronManager request)
11+
# 2. Auto-detect Kubernetes via KUBERNETES_SERVICE_HOST (injected by kubelet, cannot be disabled)
12+
# 3. Auto-detect Kubernetes via service account token (mounted by default in every pod)
13+
# 4. Fallback to Docker Compose hostname
14+
if [ -n "$vaultAgentUrl" ]; then
15+
VAULT_ADDR="$vaultAgentUrl"
16+
elif [ -n "$KUBERNETES_SERVICE_HOST" ] || [ -f "/var/run/secrets/kubernetes.io/serviceaccount/token" ]; then
17+
VAULT_ADDR="http://localhost:8203"
18+
else
19+
VAULT_ADDR="http://vault-agent-cron:8203"
20+
fi
1221

1322
# Logging function
1423
log() {
@@ -169,4 +178,4 @@ delete_llm_secrets
169178
# Delete embedding secrets
170179
delete_embedding_secrets
171180

172-
log "=== Vault secrets deletion completed ==="
181+
log "=== Vault secrets deletion completed ==="

DSL/CronManager/script/store_secrets_in_vault.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,20 @@
66
set -e # Exit on any error
77

88
# Configuration
9-
# Use vaultAgentUrl which points to vault-agent-cron proxy
10-
# The agent automatically injects the authentication token
11-
VAULT_ADDR="${vaultAgentUrl:-http://vault-agent-cron:8203}"
9+
# Resolve Vault Agent URL:
10+
# 1. Use vaultAgentUrl env var if set (from container env or CronManager request)
11+
# 2. Auto-detect Kubernetes via KUBERNETES_SERVICE_HOST (injected by kubelet, cannot be disabled)
12+
# 3. Auto-detect Kubernetes via service account token (mounted by default in every pod)
13+
# 4. Fallback to Docker Compose hostname
14+
if [ -n "$vaultAgentUrl" ]; then
15+
VAULT_ADDR="$vaultAgentUrl"
16+
elif [ -n "$KUBERNETES_SERVICE_HOST" ] || [ -f "/var/run/secrets/kubernetes.io/serviceaccount/token" ]; then
17+
VAULT_ADDR="http://localhost:8203"
18+
else
19+
VAULT_ADDR="http://vault-agent-cron:8203"
20+
fi
21+
22+
echo "DEBUG: VAULT_ADDR=$VAULT_ADDR vaultAgentUrl=$vaultAgentUrl KUBERNETES_SERVICE_HOST=$KUBERNETES_SERVICE_HOST"
1223

1324
# Decryption Configuration
1425
PRIVATE_KEY_CACHE=""

kubernetes/Chart.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,7 @@ dependencies:
113113
version: 0.1.0
114114
repository: "file://./charts/Notifications-Node"
115115
condition: Notifications-Node.enabled
116-
116+
- name: OpenSearch
117+
version: 0.1.0
118+
repository: "file://./charts/OpenSearch"
119+
condition: OpenSearch.enabled

kubernetes/LANGFUSE_SETUP.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,12 @@ kubectl cp store-langfuse-secrets.sh rag-module/vault-0:/tmp/store-langfuse-secr
5151
kubectl exec -n your-namespace vault-0 -- sh -c \
5252
"LANGFUSE_INIT_PROJECT_PUBLIC_KEY=pk-lf-YOUR_KEY \
5353
LANGFUSE_INIT_PROJECT_SECRET_KEY=sk-lf-YOUR_KEY \
54+
LANGFUSE_HOST=http://langfuse-web:3005 \
5455
sh /tmp/store-langfuse-secrets.sh"
5556
```
5657

5758
Replace `pk-lf-YOUR_KEY` and `sk-lf-YOUR_KEY` with the actual keys from step 3.
5859

59-
The script stores them at `secret/data/langfuse/config` in Vault, where the LLM Orchestration Service reads them.
60+
> **Note:** In Kubernetes, the Langfuse-Web service port is `3005` (mapped to container port 3000), so `LANGFUSE_HOST` must be set explicitly. In Docker Compose, the default (`http://langfuse-web:3000`) is used automatically.
61+
62+
The script stores them at `secret/data/langfuse/config` in Vault, where the LLM Orchestration Service reads them.

kubernetes/charts/CronManager/templates/deployment-byk-cronmanager.yaml

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ spec:
3636
mountPath: /app/scripts
3737
- name: vector-indexer
3838
mountPath: /app/src/vector_indexer
39+
- name: tool-classifier
40+
mountPath: /app/src/tool_classifier
41+
- name: intent-data-enrichment
42+
mountPath: /app/src/intent_data_enrichment
43+
- name: api-tool-indexer
44+
mountPath: /app/src/api_tool_indexer
45+
- name: src-utils
46+
mountPath: /app/src/utils
3947
command:
4048
- sh
4149
- -c
@@ -45,12 +53,20 @@ spec:
4553
mkdir -p /app/src/vector_indexer &&
4654
mkdir -p /app/scripts &&
4755
mkdir -p /DSL &&
48-
mkdir -p /app/src/utils
56+
mkdir -p /app/src/utils &&
57+
mkdir -p /app/src/tool_classifier &&
58+
mkdir -p /app/src/intent_data_enrichment &&
59+
mkdir -p /app/src/api_tool_indexer
4960
5061
cp -r /tmp/rag/DSL/CronManager/DSL/* /DSL/ &&
5162
cp -r /tmp/rag/DSL/CronManager/script/* /app/scripts/ &&
5263
cp -r /tmp/rag/src/vector_indexer/* /app/src/vector_indexer/ &&
53-
cp -r /tmp/rag/src/utils/decrypt_vault_secrets.py /app/src/utils/ &&
64+
cp -r /tmp/rag/src/tool_classifier/* /app/src/tool_classifier/ &&
65+
cp -r /tmp/rag/src/intent_data_enrichment/* /app/src/intent_data_enrichment/ &&
66+
cp -r /tmp/rag/src/api_tool_indexer/* /app/src/api_tool_indexer/ &&
67+
cp /tmp/rag/src/utils/decrypt_vault_secrets.py /app/src/utils/ &&
68+
cp /tmp/rag/src/__init__.py /app/src/__init__.py &&
69+
cp /tmp/rag/grafana-configs/loki_logger.py /app/src/vector_indexer/loki_logger.py &&
5470
5571
# Set execute permissions on all shell scripts
5672
chmod +x /app/scripts/*.sh &&
@@ -91,7 +107,7 @@ spec:
91107
value: {{ .Values.cronmanager.environment.pythonPath | quote }}
92108
{{- if .Values.vaultAgent.enabled }}
93109
# Vault Agent proxy URL (localhost sidecar)
94-
- name: VAULT_AGENT_URL
110+
- name: vaultAgentUrl
95111
value: "http://localhost:8203"
96112
{{- end }}
97113
- name: RAG_MODULE_RUUTER_PRIVATE
@@ -112,6 +128,14 @@ spec:
112128
mountPath: /app/scripts
113129
- name: vector-indexer
114130
mountPath: /app/src/vector_indexer
131+
- name: tool-classifier
132+
mountPath: /app/src/tool_classifier
133+
- name: intent-data-enrichment
134+
mountPath: /app/src/intent_data_enrichment
135+
- name: api-tool-indexer
136+
mountPath: /app/src/api_tool_indexer
137+
- name: src-utils
138+
mountPath: /app/src/utils
115139
- name: datasets
116140
mountPath: /app/datasets
117141

@@ -122,8 +146,16 @@ spec:
122146
emptyDir: {}
123147
- name: vector-indexer
124148
emptyDir: {}
149+
- name: tool-classifier
150+
emptyDir: {}
151+
- name: intent-data-enrichment
152+
emptyDir: {}
153+
- name: api-tool-indexer
154+
emptyDir: {}
125155
- name: datasets
126156
emptyDir: {}
157+
- name: src-utils
158+
emptyDir: {}
127159
- name: cronmanager-data
128160
persistentVolumeClaim:
129161
claimName: "{{ .Values.release_name }}-data"

kubernetes/charts/CronManager/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ cronmanager:
1111

1212
environment:
1313
containerPort: "8080"
14-
pythonPath: "/app:/app/src/vector_indexer"
14+
pythonPath: "/app:/app/src:/app/src/vector_indexer:/app/src/intent_data_enrichment:/app/src/api_tool_indexer"
1515
VAULT_ADDR: "http://vault:8200"
1616

1717
service:

kubernetes/charts/GUI/templates/configmap-vite-config.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,21 @@ data:
4545
'Content-Security-Policy': process.env.REACT_APP_CSP,
4646
}),
4747
},
48+
proxy: {
49+
'/vault-agent-gui': {
50+
target: 'http://localhost:8202',
51+
changeOrigin: true,
52+
rewrite: (path) => path.replace(/^\/vault-agent-gui/, ''),
53+
},
54+
'/sse': {
55+
target: 'http://notifications-node:4040',
56+
changeOrigin: true,
57+
},
58+
'/channels': {
59+
target: 'http://notifications-node:4040',
60+
changeOrigin: true,
61+
},
62+
},
4863
},
4964
resolve: {
5065
alias: {
@@ -53,4 +68,4 @@ data:
5368
},
5469
},
5570
});
56-
{{- end }}
71+
{{- end }}

kubernetes/charts/GUI/values.yaml

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ gui:
1414

1515
#service URLs
1616
services:
17-
ruuterPublic: "http://<your-domain>/ruuter-public"
18-
ruuterPrivate: "http://<your-domain>/ruuter-private"
19-
authenticationLayer: "http://<your-domain>"
20-
notificationNode: "http://notifications-node:4040"
17+
ruuterPublic: "http://localhost:8086"
18+
ruuterPrivate: "http://localhost:8088"
19+
authenticationLayer: "http://localhost:3004"
20+
notificationNode: "http://localhost:3003"
2121
datasetGenerator: "http://dataset-gen-service:8000"
2222

2323
# Content Security Policy - Updated for browser access
@@ -33,7 +33,7 @@ gui:
3333

3434
# Ingress host
3535
ingress:
36-
host: "<your-domain>" # Update with actual domain
36+
host: "localhost" # Update with actual domain
3737

3838
resources:
3939
limits:
@@ -52,20 +52,4 @@ gui:
5252

5353
# Vault Agent sidecar configuration
5454
vaultAgent:
55-
enabled: true
56-
57-
58-
# ingress:
59-
# enabled: true
60-
# className: nginx
61-
# annotations:
62-
# nginx.ingress.kubernetes.io/rewrite-target: /
63-
# nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
64-
# nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
65-
# nginx.ingress.kubernetes.io/proxy-body-size: "50m"
66-
# hosts:
67-
# - host: rag.local
68-
# paths:
69-
# - path: /
70-
# pathType: Prefix
71-
# tls: []
55+
enabled: true

kubernetes/charts/LLM-Orchestration-Service/templates/deployment-byk-llm-orchestration.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ spec:
2121
initContainers:
2222
- name: volume-init
2323
image: "{{ .Values.initContainer.image.repository }}:{{ .Values.initContainer.image.tag }}"
24+
imagePullPolicy: {{ .Values.initContainer.image.pullPolicy }}
2425
command:
2526
- sh
2627
- -c
@@ -146,6 +147,11 @@ spec:
146147
- name: logs-volume
147148
mountPath: {{ .Values.volumes.logs.mountPath }}
148149
{{- end }}
150+
{{- if .Values.vaultAgent.enabled }}
151+
- name: vault-agent-llm-token
152+
mountPath: /agent/llm-token
153+
readOnly: true
154+
{{- end }}
149155

150156
resources:
151157
requests:

kubernetes/charts/LLM-Orchestration-Service/values.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ initContainer:
5050
image:
5151
repository: "ghcr.io/buerokratt/llm-orchestration-service" # Update with actual llm-orchestration image repository
5252
tag: "latest"
53+
pullPolicy: "IfNotPresent"
5354
# InitContainer will prepare the runtime volumes
5455
prepareVolumes: true
5556

@@ -73,9 +74,22 @@ healthcheck:
7374
# Additional readiness checks
7475
readinessPath: "/ready"
7576

77+
# Environment variables injected into the LLM container
78+
# Redis defaults match the in-cluster Redis service (see Redis chart)
79+
env:
80+
REDIS_HOST: "redis"
81+
REDIS_PORT: "6379"
82+
REDIS_AUTH: "myredissecret"
83+
REDIS_SESSION_DB: "0"
84+
VAULT_AGENT_PROXY: "true"
85+
TOOL_CLASSIFIER_ENABLED: "true"
86+
SERVICE_WORKFLOW_ENABLED: "true"
87+
API_TOOL_CALLING_WORKFLOW_ENABLED: "true"
88+
CONTEXT_WORKFLOW_ENABLED: "true"
89+
MULTI_INTENT_ENABLED: "true"
90+
7691
# Vault Agent sidecar configuration
7792
# WHY: LLM Orchestration needs read access to encrypted LLM API keys
7893
# Security: Agent enforces policy - read-only access to LLM secrets
7994
vaultAgent:
80-
enabled: true
81-
95+
enabled: true

0 commit comments

Comments
 (0)