summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2023-08-03 10:02:02 +0200
committerPatrick Spek <p.spek@tyil.nl>2023-08-03 10:02:02 +0200
commit21e6e861ef32e16b5313b5adeac11e69fa8cecfc (patch)
tree5911a4ed188b9a334edd454aac33d1476cb91974
parent6cb3b6363671fe9ff5aa0b67d460846c03171ea9 (diff)
Add invidious back to the home cluster
-rw-r--r--data.d/k3s-master/manifests.d/oolah/public-services/invidious/deployment.yaml54
-rw-r--r--data.d/k3s-master/manifests.d/oolah/public-services/invidious/ingress.yaml31
-rw-r--r--data.d/k3s-master/manifests.d/oolah/public-services/invidious/service.yaml24
3 files changed, 109 insertions, 0 deletions
diff --git a/data.d/k3s-master/manifests.d/oolah/public-services/invidious/deployment.yaml b/data.d/k3s-master/manifests.d/oolah/public-services/invidious/deployment.yaml
new file mode 100644
index 0000000..d910c47
--- /dev/null
+++ b/data.d/k3s-master/manifests.d/oolah/public-services/invidious/deployment.yaml
@@ -0,0 +1,54 @@
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: invidious
+ namespace: public-services
+ labels:
+ app.kubernetes.io/created-by: tyil
+ app.kubernetes.io/managed-by: manual
+ app.kubernetes.io/name: invidious
+ app.kubernetes.io/part-of: public-services
+spec:
+ replicas: 2
+ selector:
+ matchLabels:
+ app.kubernetes.io/created-by: tyil
+ app.kubernetes.io/managed-by: manual
+ app.kubernetes.io/name: invidious
+ app.kubernetes.io/part-of: public-services
+ template:
+ metadata:
+ labels:
+ app.kubernetes.io/created-by: tyil
+ app.kubernetes.io/managed-by: manual
+ app.kubernetes.io/name: invidious
+ app.kubernetes.io/part-of: public-services
+ spec:
+ containers:
+ - name: invidious
+ image: quay.io/invidious/invidious:latest
+ ports:
+ - containerPort: 8080
+ env:
+ - name: INVIDIOUS_CONFIG
+ valueFrom:
+ secretKeyRef:
+ name: invidious-config
+ key: config.yml
+ resources:
+ requests:
+ memory: 64Mi
+ limits:
+ memory: 128Mi
+ affinity:
+ podAntiAffinity:
+ requiredDuringSchedulingIgnoredDuringExecution:
+ - labelSelector:
+ matchExpressions:
+ - key: app.kubernetes.io/name
+ operator: In
+ values:
+ - invidious
+ topologyKey: "kubernetes.io/hostname"
+...
diff --git a/data.d/k3s-master/manifests.d/oolah/public-services/invidious/ingress.yaml b/data.d/k3s-master/manifests.d/oolah/public-services/invidious/ingress.yaml
new file mode 100644
index 0000000..cb675a9
--- /dev/null
+++ b/data.d/k3s-master/manifests.d/oolah/public-services/invidious/ingress.yaml
@@ -0,0 +1,31 @@
+---
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+ name: invidious
+ namespace: public-services
+ annotations:
+ cert-manager.io/cluster-issuer: "letsencrypt-production"
+ labels:
+ app.kubernetes.io/created-by: tyil
+ app.kubernetes.io/managed-by: manual
+ app.kubernetes.io/name: invidious
+ app.kubernetes.io/part-of: public-services
+spec:
+ ingressClassName: "traefik"
+ tls:
+ - hosts:
+ - youtube.alt.tyil.nl
+ secretName: tls-nl.tyil.alt.youtube
+ rules:
+ - host: youtube.alt.tyil.nl
+ http:
+ paths:
+ - path: /
+ pathType: Prefix
+ backend:
+ service:
+ name: invidious-http
+ port:
+ number: 80
+...
diff --git a/data.d/k3s-master/manifests.d/oolah/public-services/invidious/service.yaml b/data.d/k3s-master/manifests.d/oolah/public-services/invidious/service.yaml
new file mode 100644
index 0000000..e4f95be
--- /dev/null
+++ b/data.d/k3s-master/manifests.d/oolah/public-services/invidious/service.yaml
@@ -0,0 +1,24 @@
+---
+apiVersion: v1
+kind: Service
+metadata:
+ # Funfact: if this name is set to "invidious", things will break!
+ # https://github.com/iv-org/invidious/issues/2970
+ name: invidious-http
+ namespace: public-services
+ labels:
+ app.kubernetes.io/created-by: tyil
+ app.kubernetes.io/managed-by: manual
+ app.kubernetes.io/name: invidious
+ app.kubernetes.io/part-of: public-services
+spec:
+ selector:
+ app.kubernetes.io/created-by: tyil
+ app.kubernetes.io/managed-by: manual
+ app.kubernetes.io/name: invidious
+ app.kubernetes.io/part-of: public-services
+ ports:
+ - protocol: TCP
+ port: 80
+ targetPort: 3000
+...