diff deploy_files.yaml @ 2:78c1a2983010

rewrite UI and file serving parts; use vite
author drewp@bigasterisk.com
date Mon, 20 Mar 2023 20:26:02 -0700
parents
children ee55ed10faec
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy_files.yaml	Mon Mar 20 20:26:02 2023 -0700
@@ -0,0 +1,51 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: video-files
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: video-files
+  template:
+    metadata:
+      labels:
+        app: video-files
+      annotations: { prometheus.io/scrape: "false" }
+    spec:
+      volumes:
+        - name: data
+          persistentVolumeClaim:
+            claimName: video-data
+      containers:
+        - name: files
+          image: bang5:5000/video_image
+          command:
+            - pnpm
+            - exec
+            - node
+            - ./serve-files.js
+          ports:
+            - containerPort: 8003
+
+          volumeMounts:
+            - { name: data, mountPath: /data }
+
+      affinity:
+        nodeAffinity:
+          requiredDuringSchedulingIgnoredDuringExecution:
+            nodeSelectorTerms:
+              - matchExpressions:
+                  - key: "kubernetes.io/hostname"
+                    operator: In
+                    values: ["ditto"]
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: video-files
+spec:
+  ports:
+    - { port: 8003, targetPort: 8003, name: files }
+  selector:
+    app: video-files