Skip to content

Commit 1e6bb54

Browse files
Missing helm charts for Vault (buerokratt#375)
* remove unwanted file * updated changes * fixed requested changes * fixed issue * service workflow implementation without calling service endpoints * fixed requested changes * fixed issues * protocol related requested changes * fixed requested changes * update time tracking * added time tracking and reloacate input guardrail before toolclassifiier * fixed issue * fixed issue * added hybrid search for the service detection * update tool classifier * fixing merge conflicts * fixed issue * optimize first user query response generation time * fixed pr reviewed issues * service integration * context based response generation flow * fixed pr review suggested issues * removed service project layer * fixed issues * delete unnessary files * added requested changes * added seperate db for langfuse * fixed issue * partially completed langfuse deployment issue * Add Helm chart for RAG Module with database and service configurations * fixed missinng helm charts issue --------- Co-authored-by: Thiru Dinesh <56014038+Thirunayan22@users.noreply.github.com>
1 parent 25afb7c commit 1e6bb54

23 files changed

Lines changed: 679 additions & 174 deletions

File tree

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

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,41 @@ spec:
4444
4545
mkdir -p /app/src/vector_indexer &&
4646
mkdir -p /app/scripts &&
47-
mkdir -p /DSL
47+
mkdir -p /DSL &&
48+
mkdir -p /app/src/utils
4849
4950
cp -r /tmp/rag/DSL/CronManager/DSL/* /DSL/ &&
5051
cp -r /tmp/rag/DSL/CronManager/script/* /app/scripts/ &&
5152
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/ &&
5254
5355
# Set execute permissions on all shell scripts
5456
chmod +x /app/scripts/*.sh &&
5557
echo "Scripts copied and permissions set successfully"
5658
5759
containers:
60+
{{- if .Values.vaultAgent.enabled }}
61+
# CronManager connects to localhost:8203, never directly to Vault
62+
- name: vault-agent-cron
63+
image: hashicorp/vault:1.20.3
64+
command: ["vault", "agent", "-config=/agent/config/cron-agent.hcl", "-log-level=info"]
65+
ports:
66+
- name: agent-api
67+
containerPort: 8203
68+
protocol: TCP
69+
volumeMounts:
70+
- name: vault-agent-config
71+
mountPath: /agent/config
72+
readOnly: true
73+
- name: vault-agent-creds
74+
mountPath: /agent/credentials
75+
readOnly: true
76+
- name: vault-agent-cron-token
77+
mountPath: /agent/cron-token
78+
securityContext:
79+
capabilities:
80+
add: ["IPC_LOCK"]
81+
{{- end }}
5882
- name: "{{ .Values.release_name }}"
5983
image: "{{ .Values.cronmanager.image.registry }}/{{ .Values.cronmanager.image.repository }}:{{ .Values.cronmanager.image.tag }}"
6084
imagePullPolicy: {{ .Values.cronmanager.image.pullPolicy }}
@@ -65,8 +89,11 @@ spec:
6589
env:
6690
- name: PYTHONPATH
6791
value: {{ .Values.cronmanager.environment.pythonPath | quote }}
68-
- name: VAULT_ADDR
69-
value: {{ .Values.cronmanager.environment.VAULT_ADDR | quote }}
92+
{{- if .Values.vaultAgent.enabled }}
93+
# Vault Agent proxy URL (localhost sidecar)
94+
- name: VAULT_AGENT_URL
95+
value: "http://localhost:8203"
96+
{{- end }}
7097
- name: RAG_MODULE_RUUTER_PRIVATE
7198
value: {{ .Values.constants.RAG_MODULE_RUUTER_PRIVATE | quote }}
7299
- name: RAG_MODULE_RESQL
@@ -103,5 +130,19 @@ spec:
103130
- name: config-volume
104131
configMap:
105132
name: "{{ .Values.release_name }}-config"
133+
{{- if .Values.vaultAgent.enabled }}
134+
# Vault Agent configuration (from Vault-Agent-Cron chart configmap)
135+
- name: vault-agent-config
136+
configMap:
137+
name: vault-agent-cron-config
138+
# Shared AppRole credentials (created by vault-init Job)
139+
- name: vault-agent-creds
140+
persistentVolumeClaim:
141+
claimName: vault-agent-creds
142+
# CronManager-specific token storage (pod-scoped, short-lived)
143+
# Tokens are generated by Vault Agent and destroyed when pod terminates
144+
- name: vault-agent-cron-token
145+
emptyDir: {}
146+
{{- end }}
106147

107148
{{- end }}

kubernetes/charts/CronManager/values.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,15 @@ constants:
3636

3737
resources:
3838
requests:
39-
memory: "1Gi"
40-
cpu: "500m"
39+
memory: "512Mi"
40+
cpu: "100m"
4141
limits:
42-
memory: "4Gi"
43-
cpu: "2000m"
42+
memory: "2Gi"
43+
cpu: "500m"
4444

4545
podAnnotations:
46-
dsl-checksum: "initial"
46+
dsl-checksum: "initial"
47+
48+
# Vault Agent sidecar configuration
49+
vaultAgent:
50+
enabled: true
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{{- if .Values.gui.enabled }}
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: {{ .Values.gui.release_name }}-vite-config
6+
namespace: rag-module
7+
labels:
8+
app: {{ .Values.gui.release_name }}
9+
data:
10+
vite.config.ts: |
11+
import { defineConfig } from 'vite';
12+
import react from '@vitejs/plugin-react';
13+
import tsconfigPaths from 'vite-tsconfig-paths';
14+
import svgr from 'vite-plugin-svgr';
15+
import path from 'path';
16+
import { removeHiddenMenuItems } from './vitePlugin';
17+
18+
// https://vitejs.dev/config/
19+
export default defineConfig({
20+
envPrefix: 'REACT_APP_',
21+
plugins: [
22+
react(),
23+
tsconfigPaths(),
24+
svgr(),
25+
{
26+
name: 'removeHiddenMenuItemsPlugin',
27+
transform: (str, id) => {
28+
if(!id.endsWith('/menu-structure.json'))
29+
return str;
30+
return removeHiddenMenuItems(str);
31+
},
32+
},
33+
],
34+
base: '/rag-search',
35+
build: {
36+
outDir: './build',
37+
target: 'es2015',
38+
emptyOutDir: true,
39+
},
40+
server: {
41+
host: '0.0.0.0',
42+
allowedHosts: [{{- range $index, $host := splitList "," .Values.gui.vite.allowedHosts }}{{ if $index }}, {{ end }}'{{ $host | trim }}'{{- end }}],
43+
headers: {
44+
...(process.env.REACT_APP_CSP && {
45+
'Content-Security-Policy': process.env.REACT_APP_CSP,
46+
}),
47+
},
48+
},
49+
resolve: {
50+
alias: {
51+
'~@fontsource': path.resolve(__dirname, 'node_modules/@fontsource'),
52+
'@': `${path.resolve(__dirname, './src')}`,
53+
},
54+
},
55+
});
56+
{{- end }}

kubernetes/charts/GUI/templates/deployment-byk-gui.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,48 @@ spec:
1717

1818
spec:
1919
containers:
20+
# sidecar: GUI connects to localhost:8202 (vault-agent)
21+
{{- if .Values.vaultAgent.enabled }}
22+
- name: vault-agent-gui
23+
image: hashicorp/vault:1.20.3
24+
command: ["vault", "agent", "-config=/agent/config/gui-agent.hcl", "-log-level=info"]
25+
ports:
26+
- name: agent-api
27+
containerPort: 8202
28+
protocol: TCP
29+
volumeMounts:
30+
- name: vault-agent-config
31+
mountPath: /agent/config
32+
readOnly: true
33+
- name: vault-agent-creds
34+
mountPath: /agent/credentials
35+
readOnly: true
36+
- name: vault-agent-gui-token
37+
mountPath: /agent/gui-token
38+
securityContext:
39+
capabilities:
40+
add: ["IPC_LOCK"]
41+
# # Health check: Ensure token file exists and is not empty
42+
# livenessProbe:
43+
# exec:
44+
# command:
45+
# - sh
46+
# - -c
47+
# - test -f /agent/gui-token/token && test -s /agent/gui-token/token
48+
# initialDelaySeconds: 10
49+
# periodSeconds: 10
50+
# timeoutSeconds: 3
51+
# failureThreshold: 3
52+
# readinessProbe:
53+
# exec:
54+
# command:
55+
# - sh
56+
# - -c
57+
# - test -f /agent/gui-token/token && test -s /agent/gui-token/token
58+
# initialDelaySeconds: 5
59+
# periodSeconds: 5
60+
# timeoutSeconds: 3
61+
{{- end }}
2062
- name: {{ .Values.gui.release_name }}
2163
image: "{{ .Values.gui.image.repository }}:{{ .Values.gui.image.tag }}"
2264
imagePullPolicy: {{ .Values.gui.image.pullPolicy }}
@@ -51,13 +93,24 @@ spec:
5193
value: {{ .Values.gui.serviceId | quote }}
5294
- name: REACT_APP_ENABLE_HIDDEN_FEATURES
5395
value: {{ .Values.gui.enableHiddenFeatures | quote | upper }}
96+
97+
{{- if .Values.vaultAgent.enabled }}
98+
# Vault Agent proxy URL (localhost sidecar)
99+
- name: VAULT_AGENT_URL
100+
value: "http://localhost:8202"
101+
{{- end }}
54102

55103
# Vite development server configuration
56104
- name: VITE_HOST
57105
value: {{ .Values.gui.vite.host | quote }}
58106
- name: VITE_ALLOWED_HOSTS
59107
value: {{ .Values.gui.vite.allowedHosts | quote }}
60108

109+
volumeMounts:
110+
- name: vite-config
111+
mountPath: /app/vite.config.ts
112+
subPath: vite.config.ts
113+
61114
resources:
62115
limits:
63116
cpu: {{ .Values.gui.resources.limits.cpu }}
@@ -82,6 +135,25 @@ spec:
82135
# periodSeconds: 5
83136
# timeoutSeconds: 3
84137

138+
volumes:
139+
- name: vite-config
140+
configMap:
141+
name: {{ .Values.gui.release_name }}-vite-config
142+
{{- if .Values.vaultAgent.enabled }}
143+
# Vault Agent configuration (from Vault-Agent-GUI chart)
144+
- name: vault-agent-config
145+
configMap:
146+
name: vault-agent-gui-config
147+
# Shared AppRole credentials (created by vault-init Job)
148+
- name: vault-agent-creds
149+
persistentVolumeClaim:
150+
claimName: vault-agent-creds
151+
# GUI-specific token storage (pod-scoped, short-lived)
152+
# Tokens are generated by Vault Agent and destroyed when pod terminates
153+
- name: vault-agent-gui-token
154+
emptyDir: {}
155+
{{- end }}
156+
85157
restartPolicy: Always
86158

87159
{{- end }}

kubernetes/charts/GUI/templates/ingress-byk-gui.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ metadata:
55
namespace: rag-module
66
annotations:
77
kubernetes.io/ingress.class: nginx
8+
nginx.ingress.kubernetes.io/use-regex: "true"
89
spec:
910
rules:
10-
- host: localhost
11+
- host: {{ .Values.gui.ingress.host }}
1112
http:
1213
paths:
1314
- path: /rag-search
@@ -16,5 +17,4 @@ spec:
1617
service:
1718
name: gui
1819
port:
19-
number: 3003
20-
20+
number: 3001

kubernetes/charts/GUI/values.yaml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ gui:
33
release_name: gui
44
image:
55
repository: "ghcr.io/buerokratt/rag-gui" # Update with actual GUI image repository
6-
tag: sha-84833e1
6+
tag: sha-1331462
77
pullPolicy: Always
88

99
# React application configuration
@@ -14,37 +14,46 @@ gui:
1414

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

2323
# Content Security Policy - Updated for browser access
24-
csp: "default-src 'self'; connect-src 'self' http://ruuter-public:8086 https://ruuter-public:8086 http://ruuter-private:8088 https://ruuter-private:8088 http://authentication-layer:3004 https://authentication-layer:3004 http://notifications-node:4040 https://notifications-node:4040 http://dataset-gen-service:8000 https://dataset-gen-service:8000 http://localhost:* https://localhost:* http://global-classifier.local https://global-classifier.local ws://global-classifier.local wss://global-classifier.local; script-src 'self' 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; font-src 'self' data:;"
24+
csp: "default-src 'self'; connect-src 'self' http://<your-domain>/ruuter-public http://<your-domain>/ruuter-private http://<your-domain> http://<your-domain> http://notifications-node:4040 http://notifications-node:4040 http://dataset-gen-service:8000 http://dataset-gen-service:8000 http://localhost:* http://localhost:* http://global-classifier.local http://global-classifier.local ws://global-classifier.local ws://global-classifier.local; script-src 'self' 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; font-src 'self' data:;"
2525

2626
# Service configuration
2727
serviceId: "conversations,settings,monitoring"
2828

2929
# Vite development server (for development mode)
3030
vite:
3131
host: "0.0.0.0"
32-
allowedHosts: "localhost,127.0.0.1"
32+
allowedHosts: "localhost,127.0.0.1,<your-domain>" # Update with actual domain for development access
33+
34+
# Ingress host
35+
ingress:
36+
host: "<your-domain>" # Update with actual domain
3337

3438
resources:
3539
limits:
36-
cpu: 500m
37-
memory: 1Gi
40+
cpu: 200m
41+
memory: 512Mi
3842
requests:
39-
cpu: 100m
40-
memory: 256Mi
43+
cpu: 50m
44+
memory: 128Mi
4145

4246
replicas: 1
4347

4448
service:
4549
type: ClusterIP
4650
port: 3001
4751
targetPort: 3001
52+
53+
# Vault Agent sidecar configuration
54+
vaultAgent:
55+
enabled: true
56+
4857

4958
# ingress:
5059
# enabled: true

0 commit comments

Comments
 (0)