-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathinit-index-job.yaml
44 lines (44 loc) · 1.33 KB
/
init-index-job.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
apiVersion: batch/v1
kind: Job
metadata:
name: init-elasticsearch-index-test
spec:
template:
spec:
containers:
- name: init-index
#update your image location for chatbot rag app or continue to use this prebuilt one
image: ghcr.io/elastic/elasticsearch-labs/chatbot-rag-app:latest
workingDir: /app/api
command: ["python3", "-m", "flask", "--app", "app", "create-index"]
env:
- name: FLASK_APP
value: "app"
- name: LLM_TYPE
value: "openai"
- name: CHAT_MODEL
value: "gpt-4o-mini"
- name: ES_INDEX
value: "workplace-app-docs"
- name: ES_INDEX_CHAT_HISTORY
value: "workplace-app-docs-chat-history"
- name: ELASTICSEARCH_URL
valueFrom:
secretKeyRef:
name: chatbot-regular-secrets
key: ELASTICSEARCH_URL
- name: ELASTICSEARCH_USER
valueFrom:
secretKeyRef:
name: chatbot-regular-secrets
key: ELASTICSEARCH_USER
- name: ELASTICSEARCH_PASSWORD
valueFrom:
secretKeyRef:
name: chatbot-regular-secrets
key: ELASTICSEARCH_PASSWORD
envFrom:
- secretRef:
name: chatbot-regular-secrets
restartPolicy: Never
backoffLimit: 4