commit ff54b32c12b4ae54d723d5ebd4a06c2a4b21ef9b
parent e0016f1fe9df017d4316abd0413e1f405184e29f
Author: MTRNord <mtrnord1@gmail.com>
Date: Fri, 6 Dec 2024 20:31:41 +0100
Twitch vods?
Diffstat:
5 files changed, 132 insertions(+), 0 deletions(-)
diff --git a/apps/2024_cluster/kustomization.yaml b/apps/2024_cluster/kustomization.yaml
@@ -32,3 +32,4 @@ resources:
- ../base/docuseal
- ../base/k8up
- ../base/bugzilla
+ - ../base/twitch-vod
diff --git a/apps/2024_cluster/namespaces/kustomization.yaml b/apps/2024_cluster/namespaces/kustomization.yaml
@@ -20,3 +20,4 @@ resources:
- k8up.yaml
- postgres-exporter.yaml
- bugzilla.yaml
+ - twitch-vod.yaml
diff --git a/apps/2024_cluster/namespaces/twitch-vod.yaml b/apps/2024_cluster/namespaces/twitch-vod.yaml
@@ -0,0 +1,4 @@
+apiVersion: v1
+kind: Namespace
+metadata:
+ name: twitch-vod
diff --git a/apps/base/twitch-vod/deployment.yaml b/apps/base/twitch-vod/deployment.yaml
@@ -0,0 +1,121 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: twitch-vod
+ labels:
+ app.kubernetes.io/name: twitch-vod
+ app.kubernetes.io/instance: twitch-vod
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app.kubernetes.io/name: twitch-vod
+ app.kubernetes.io/instance: twitch-vod
+ template:
+ metadata:
+ labels:
+ app.kubernetes.io/name: twitch-vod
+ app.kubernetes.io/instance: twitch-vod
+ spec:
+ initContainers:
+ - name: init-twitch-vod-vol
+ image: alpine:3.20
+ command:
+ - chown
+ - -R
+ - 10001:10001
+ - /usr/local/share/twitchautomator/data
+ volumeMounts:
+ - mountPath: /usr/local/share/twitchautomator/data
+ name: twitch-vod-data
+ containers:
+ - name: twitch-vod
+ image: mrbrax/twitchautomator:master
+ imagePullPolicy: Always
+ securityContext:
+ runAsUser: 10001
+ runAsGroup: 10001
+ fsGroup: 10001
+ env:
+ - name: NODE_ENV
+ value: production
+ - name: TCD_ENABLE_FILES_API
+ value: "0"
+ - name: TCD_EXPOSE_LOGS_TO_PUBLIC
+ value: "0"
+ - name: TCD_MIGRATE_OLD_VOD_JSON
+ value: "0"
+ ports:
+ - name: http
+ containerPort: 8080
+ protocol: TCP
+ livenessProbe:
+ httpGet:
+ path: /
+ port: http
+ readinessProbe:
+ httpGet:
+ path: /
+ port: http
+ volumeMounts:
+ - mountPath: /usr/local/share/twitchautomator/data
+ name: twitch-vod-data
+ volumes:
+ - name: twitch-vod-data
+ persistentVolumeClaim:
+ claimName: twitch-vod-data
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: twitch-vod
+ labels:
+ app.kubernetes.io/name: twitch-vod
+ app.kubernetes.io/instance: twitch-vod
+spec:
+ ports:
+ - name: http
+ port: 8080
+ targetPort: http
+ selector:
+ app.kubernetes.io/name: twitch-vod
+ app.kubernetes.io/instance: twitch-vod
+---
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+ name: twitch-vod-data
+spec:
+ accessModes:
+ - ReadWriteMany
+ resources:
+ requests:
+ storage: 20Gi
+---
+# Ingress for bugzilla
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+ name: twitch-vod
+ labels:
+ app.kubernetes.io/name: twitch-vod
+ app.kubernetes.io/instance: twitch-vod
+ annotations:
+ cert-manager.io/cluster-issuer: letsencrypt-dns
+ external-dns.alpha.kubernetes.io/hostname: midnightthoughts.space
+spec:
+ rules:
+ - host: twitch-vod.midnightthoughts.space
+ http:
+ paths:
+ - path: /
+ pathType: Prefix
+ backend:
+ service:
+ name: twitch-vod
+ port:
+ number: 8080
+ tls:
+ - hosts:
+ - twitch-vod.midnightthoughts.space
+ secretName: twitch-vod-tls
diff --git a/apps/base/twitch-vod/kustomization.yaml b/apps/base/twitch-vod/kustomization.yaml
@@ -0,0 +1,5 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+namespace: twitch-vod
+resources:
+ - deployment.yaml