Mercurial > code > home > repos > sco-bot
annotate k8s/deploy.yaml @ 15:6ed25bcaaf1f
add prefect and rebuild flow to k8s
author | drewp@bigasterisk.com |
---|---|
date | Fri, 19 Jul 2024 00:30:47 -0700 |
parents | 403eff4a16c8 |
children | 7a87ba2f00d9 |
rev | line source |
---|---|
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 | |
15 | 29 name: web |
30 | |
31 - name: search-server | |
11 | 32 image: reg:5000/sco_bot_server |
15 | 33 securityContext: { runAsUser: 1020 } |
7 | 34 workingDir: /opt |
35 command: | |
36 - pdm | |
37 - run | |
38 - fastapi | |
39 - dev | |
40 - --host | |
41 - "0.0.0.0" | |
42 - --port | |
43 - "8001" | |
13
403eff4a16c8
fix up indexer flow and fastapi server
drewp@bigasterisk.com
parents:
11
diff
changeset
|
44 - scobot |
7 | 45 ports: |
8 | 46 - containerPort: 8001 |
15 | 47 name: server |
8 | 48 volumeMounts: |
49 - name: sco-bot-data | |
50 mountPath: /opt/data | |
15 | 51 |
52 - name: prefect | |
53 image: reg:5000/sco_bot_server | |
54 securityContext: { runAsUser: 1020 } | |
55 workingDir: /opt | |
56 env: | |
57 - name: PREFECT_API_URL | |
58 value: https://sco-bot-prefect.bigasterisk.com/api | |
59 command: | |
60 - pdm | |
61 - run_prefect_server | |
62 ports: | |
63 - containerPort: 4200 | |
64 name: prefect | |
65 volumeMounts: | |
66 - name: sco-bot-data | |
67 mountPath: /opt/data | |
68 | |
69 - name: build-flow | |
70 image: reg:5000/sco_bot_server | |
71 securityContext: { runAsUser: 1020 } | |
72 workingDir: /opt | |
73 env: | |
74 - name: PREFECT_API_URL | |
75 value: http://localhost:4200/api | |
76 command: | |
77 - pdm | |
78 - run_build_flow | |
79 volumeMounts: | |
80 - name: sco-bot-data | |
81 mountPath: /opt/data | |
82 | |
8 | 83 affinity: |
84 nodeAffinity: | |
85 requiredDuringSchedulingIgnoredDuringExecution: | |
86 nodeSelectorTerms: | |
87 - matchExpressions: | |
88 - key: "kubernetes.io/hostname" | |
89 operator: In | |
90 values: ["ditto", "dash"] # need /my/serv |