diff 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
line wrap: on
line diff
--- a/k8s/deploy.yaml	Thu Jul 11 22:11:41 2024 -0700
+++ b/k8s/deploy.yaml	Fri Jul 19 00:30:47 2024 -0700
@@ -26,8 +26,11 @@
             - vite
           ports:
             - containerPort: 8002
-        - name: server
+              name: web
+
+        - name: search-server
           image: reg:5000/sco_bot_server
+          securityContext: { runAsUser: 1020 }
           workingDir: /opt
           command:
             - pdm
@@ -41,9 +44,42 @@
             - scobot
           ports:
             - containerPort: 8001
+              name: server
           volumeMounts:
           - name: sco-bot-data
             mountPath: /opt/data
+
+        - name: prefect
+          image: reg:5000/sco_bot_server
+          securityContext: { runAsUser: 1020 }
+          workingDir: /opt
+          env:
+            - name: PREFECT_API_URL
+              value: https://sco-bot-prefect.bigasterisk.com/api
+          command:
+            - pdm
+            - run_prefect_server
+          ports:
+            - containerPort: 4200
+              name: prefect
+          volumeMounts:
+          - name: sco-bot-data
+            mountPath: /opt/data
+
+        - name: build-flow
+          image: reg:5000/sco_bot_server
+          securityContext: { runAsUser: 1020 }
+          workingDir: /opt
+          env:
+            - name: PREFECT_API_URL
+              value: http://localhost:4200/api
+          command:
+            - pdm
+            - run_build_flow
+          volumeMounts:
+          - name: sco-bot-data
+            mountPath: /opt/data
+
       affinity:
         nodeAffinity:
           requiredDuringSchedulingIgnoredDuringExecution: