7
|
1 apiVersion: apps/v1
|
|
2 kind: Deployment
|
|
3 metadata:
|
|
4 name: sco-bot
|
|
5 spec:
|
|
6 replicas: 1
|
|
7 selector:
|
|
8 matchLabels:
|
|
9 app: sco-bot
|
|
10 template:
|
|
11 metadata:
|
|
12 labels:
|
|
13 app: sco-bot
|
|
14 spec:
|
8
|
15 volumes:
|
|
16 - name: sco-bot-data
|
|
17 persistentVolumeClaim:
|
|
18 claimName: sco-bot-data
|
7
|
19 containers:
|
|
20 - name: vite
|
|
21 image: reg:5000/sco_bot_web
|
|
22 workingDir: /opt
|
|
23 command:
|
|
24 - pnpm
|
|
25 - exec
|
|
26 - vite
|
|
27 ports:
|
|
28 - containerPort: 8002
|
|
29 - name: search
|
|
30 image: reg:5000/sco_bot_search
|
|
31 workingDir: /opt
|
|
32 command:
|
|
33 - pdm
|
|
34 - run
|
|
35 - fastapi
|
|
36 - dev
|
|
37 - --host
|
|
38 - "0.0.0.0"
|
|
39 - --port
|
|
40 - "8001"
|
|
41 - search/query.py
|
|
42 ports:
|
8
|
43 - containerPort: 8001
|
|
44 volumeMounts:
|
|
45 - name: sco-bot-data
|
|
46 mountPath: /opt/data
|
|
47 affinity:
|
|
48 nodeAffinity:
|
|
49 requiredDuringSchedulingIgnoredDuringExecution:
|
|
50 nodeSelectorTerms:
|
|
51 - matchExpressions:
|
|
52 - key: "kubernetes.io/hostname"
|
|
53 operator: In
|
|
54 values: ["ditto", "dash"] # need /my/serv |