summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-01-31 17:04:00 +0200
committerPaul Buetow <paul@buetow.org>2026-01-31 17:04:00 +0200
commit32a57d822cfe4315f5ad16186caa25337d6ef7b0 (patch)
treeda8e93c8853e2f00590abaff308b8b787b5c568d
parent2486a5e3965d25344e34c9ef98300f893fcdeb39 (diff)
Add MinVid deployment
Amp-Thread-ID: https://ampcode.com/threads/T-019c1492-bec0-70f8-8d02-ef3596a7228b Co-authored-by: Amp <amp@ampcode.com>
-rw-r--r--f3s/argocd-apps/services/minvid.yaml28
-rw-r--r--f3s/minvid/Justfile38
-rw-r--r--f3s/minvid/helm-chart/Chart.yaml5
-rw-r--r--f3s/minvid/helm-chart/templates/deployment.yaml43
-rw-r--r--f3s/minvid/helm-chart/templates/ingress.yaml20
-rw-r--r--f3s/minvid/helm-chart/templates/persistent-volumes.yaml27
6 files changed, 161 insertions, 0 deletions
diff --git a/f3s/argocd-apps/services/minvid.yaml b/f3s/argocd-apps/services/minvid.yaml
new file mode 100644
index 0000000..1e7d431
--- /dev/null
+++ b/f3s/argocd-apps/services/minvid.yaml
@@ -0,0 +1,28 @@
+apiVersion: argoproj.io/v1alpha1
+kind: Application
+metadata:
+ name: minvid
+ namespace: cicd
+ finalizers:
+ - resources-finalizer.argocd.argoproj.io
+spec:
+ project: default
+ source:
+ repoURL: http://git-server.cicd.svc.cluster.local/conf.git
+ targetRevision: master
+ path: f3s/minvid/helm-chart
+ destination:
+ server: https://kubernetes.default.svc
+ namespace: services
+ syncPolicy:
+ automated:
+ prune: true
+ selfHeal: true
+ syncOptions:
+ - CreateNamespace=false
+ retry:
+ limit: 3
+ backoff:
+ duration: 5s
+ factor: 2
+ maxDuration: 1m
diff --git a/f3s/minvid/Justfile b/f3s/minvid/Justfile
new file mode 100644
index 0000000..9e17f2c
--- /dev/null
+++ b/f3s/minvid/Justfile
@@ -0,0 +1,38 @@
+NAMESPACE := "services"
+APP_NAME := "minvid"
+
+status:
+ @echo "=== Pods ==="
+ @kubectl get pods -n {{NAMESPACE}} | grep minvid
+ @echo ""
+ @echo "=== Service ==="
+ @kubectl get svc -n {{NAMESPACE}} minvid-service
+ @echo ""
+ @echo "=== Ingress ==="
+ @kubectl get ingress -n {{NAMESPACE}} minvid-ingress
+ @echo ""
+ @echo "=== PVCs ==="
+ @kubectl get pvc -n {{NAMESPACE}} | grep minvid
+ @echo ""
+ @echo "=== ArgoCD Status ==="
+ @kubectl get application {{APP_NAME}} -n cicd -o jsonpath='Sync: {.status.sync.status}, Health: {.status.health.status}' 2>/dev/null && echo ""
+
+logs lines="100":
+ kubectl logs -n {{NAMESPACE}} -l app=minvid --tail={{lines}} -f
+
+port-forward port="3000":
+ @echo "Forwarding minvid to localhost:{{port}}"
+ kubectl port-forward -n {{NAMESPACE}} svc/minvid-service {{port}}:3000
+
+sync:
+ @echo "Triggering ArgoCD sync..."
+ @kubectl annotate application {{APP_NAME}} -n cicd argocd.argoproj.io/refresh=normal --overwrite
+ @sleep 2
+ @kubectl get application {{APP_NAME}} -n cicd -o jsonpath='Sync: {.status.sync.status}, Health: {.status.health.status}' && echo ""
+
+argocd-status:
+ argocd app get {{APP_NAME}} --core
+
+restart:
+ @echo "Restarting minvid..."
+ kubectl rollout restart -n {{NAMESPACE}} deployment/minvid
diff --git a/f3s/minvid/helm-chart/Chart.yaml b/f3s/minvid/helm-chart/Chart.yaml
new file mode 100644
index 0000000..994b2f4
--- /dev/null
+++ b/f3s/minvid/helm-chart/Chart.yaml
@@ -0,0 +1,5 @@
+apiVersion: v2
+name: minvid
+description: A Helm chart for deploying MinVid.
+version: 0.1.0
+appVersion: "latest"
diff --git a/f3s/minvid/helm-chart/templates/deployment.yaml b/f3s/minvid/helm-chart/templates/deployment.yaml
new file mode 100644
index 0000000..9cbdf29
--- /dev/null
+++ b/f3s/minvid/helm-chart/templates/deployment.yaml
@@ -0,0 +1,43 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: minvid
+ namespace: services
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: minvid
+ template:
+ metadata:
+ labels:
+ app: minvid
+ spec:
+ containers:
+ - name: minvid
+ image: ghcr.io/mariodian/minvid
+ ports:
+ - containerPort: 3000
+ volumeMounts:
+ - name: minvid-data
+ mountPath: /data
+ volumes:
+ - name: minvid-data
+ persistentVolumeClaim:
+ claimName: minvid-data-pvc
+---
+apiVersion: v1
+kind: Service
+metadata:
+ labels:
+ app: minvid
+ name: minvid-service
+ namespace: services
+spec:
+ ports:
+ - name: web
+ port: 3000
+ protocol: TCP
+ targetPort: 3000
+ selector:
+ app: minvid
diff --git a/f3s/minvid/helm-chart/templates/ingress.yaml b/f3s/minvid/helm-chart/templates/ingress.yaml
new file mode 100644
index 0000000..024d515
--- /dev/null
+++ b/f3s/minvid/helm-chart/templates/ingress.yaml
@@ -0,0 +1,20 @@
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+ name: minvid-ingress
+ namespace: services
+ annotations:
+ spec.ingressClassName: traefik
+ traefik.ingress.kubernetes.io/router.entrypoints: web
+spec:
+ rules:
+ - host: minvid.f3s.buetow.org
+ http:
+ paths:
+ - path: /
+ pathType: Prefix
+ backend:
+ service:
+ name: minvid-service
+ port:
+ number: 3000
diff --git a/f3s/minvid/helm-chart/templates/persistent-volumes.yaml b/f3s/minvid/helm-chart/templates/persistent-volumes.yaml
new file mode 100644
index 0000000..a6b40a0
--- /dev/null
+++ b/f3s/minvid/helm-chart/templates/persistent-volumes.yaml
@@ -0,0 +1,27 @@
+apiVersion: v1
+kind: PersistentVolume
+metadata:
+ name: minvid-data-pv
+spec:
+ capacity:
+ storage: 1Ti
+ volumeMode: Filesystem
+ accessModes:
+ - ReadWriteOnce
+ persistentVolumeReclaimPolicy: Retain
+ hostPath:
+ path: /data/nfs/k3svolumes/minvid/data
+ type: Directory
+---
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+ name: minvid-data-pvc
+ namespace: services
+spec:
+ storageClassName: ""
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 1Ti