Skip to content
11 changes: 7 additions & 4 deletions apps/filehosting/jellyfin/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
allowEmpty: false
syncOptions:
- CreateNamespace=true
project: default
project: "{{ .customer.name }}-{{ .customer.project }}"
destination:
server: https://kubernetes.default.svc
namespace: "{{ .customer.name }}-jellyfin-{{ .customer.stage }}"
Expand All @@ -22,7 +22,7 @@ spec:
helm:
valuesObject:
service:
type: LoadBalancer
type: ClusterIP
ingress:
enabled: false
jellyfin:
Expand All @@ -40,9 +40,12 @@ spec:
config:
enabled: true
accessMode: ReadWriteOnce
size: 500Gi
size: 5Gi
storageClass: "{{ .cluster.defaultStorageClass }}"
media:
enabled: false
enabled: true
accessMode: ReadWriteOnce
size: 5Gi
storageClass: "{{ .cluster.defaultStorageClass }}"
cache:
enabled: false
91 changes: 91 additions & 0 deletions apps/filehosting/pinchflat/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: pinchflat
namespace: "{{ .customer.name }}-reserved"
spec:
syncPolicy:
automated:
prune: true
selfHeal: false
allowEmpty: false
syncOptions:
- CreateNamespace=true
project: "{{ .customer.name }}-{{ .customer.project }}"
destination:
server: https://kubernetes.default.svc
namespace: "{{ .customer.name }}-jellyfin-{{ .customer.stage }}"
source:
repoURL: https://bedag.github.io/helm-charts
targetRevision: 2.0.0
chart: raw
helm:
valuesObject:
resources:
- apiVersion: apps/v1
kind: Deployment
metadata:
name: pinchflat
labels:
app: pinchflat
spec:
replicas: 1
selector:
matchLabels:
app: pinchflat
template:
metadata:
labels:
app: pinchflat
spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- jellyfin
topologyKey: kubernetes.io/hostname
containers:
- name: pinchflat
image: ghcr.io/kieraneglin/pinchflat:latest
ports:
- name: http
containerPort: 8945
env:
- name: TZ
value: Europe/Zurich
- name: LOG_LEVEL
value: info
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 1000m
memory: 2Gi
volumeMounts:
- name: pinchflat-config
mountPath: /config
- name: media-library
mountPath: /downloads
volumes:
- name: pinchflat-config
emptyDir: {}
- name: media-library
persistentVolumeClaim:
claimName: "{{ .customer.name }}-jellyfin-{{ .customer.stage }}-media"
- apiVersion: v1
kind: Service
metadata:
name: pinchflat
spec:
selector:
app: pinchflat
ports:
- name: http
port: 8945
targetPort: http
type: ClusterIP
4 changes: 4 additions & 0 deletions apps/filehosting/pinchflat/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- app.yaml
2 changes: 2 additions & 0 deletions environments/customers/a01/overlays/prod/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ resources:
- ../../../../../apps/filehosting/nextcloud/
# - ../../../../../apps/productivity/overleaf/
- ../../../../../apps/productivity/jupyterhub/
- ../../../../../apps/filehosting/jellyfin/
- ../../../../../apps/filehosting/pinchflat/
patches:
# - target:
# kind: Application
Expand Down
19 changes: 19 additions & 0 deletions environments/customers/a01/overlays/prod/patches/jellyfin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
- op: replace
path: /spec/source/helm/valuesObject/persistence/media/size
value: 100Gi
- op: replace
path: /spec/source/helm/valuesObject/ingress
value:
enabled: true
className: nginx
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod-nginx
hosts:
- host: jellyfin.{{ .customer.domain }}
paths:
- path: /
pathType: ImplementationSpecific
tls:
- hosts:
- jellyfin.{{ .customer.domain }}
secretName: jellyfin-tls
20 changes: 20 additions & 0 deletions environments/customers/a01/overlays/prod/patches/pinchflat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
- op: replace
path: /spec/source/helm/valuesObject/resources/0/spec/template/spec/volumes/0
value:
name: pinchflat-config
persistentVolumeClaim:
claimName: pinchflat-config
- op: add
path: /spec/source/helm/valuesObject/resources/-
value:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pinchflat-config
spec:
accessModes:
- ReadWriteMany
storageClassName: nfs
resources:
requests:
storage: 2Gi
5 changes: 5 additions & 0 deletions environments/customers/a01/overlays/test/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ nameSuffix: "-test"
resources:
- placeholder-configmap.yaml
- ../../../../../apps/filehosting/jellyfin/
- ../../../../../apps/filehosting/pinchflat/
patches:
- target:
kind: Application
name: jellyfin
path: patches/jellyfin.yaml
- target:
kind: Application
name: pinchflat
path: patches/pinchflat.yaml
7 changes: 0 additions & 7 deletions environments/customers/a01/overlays/test/patches/ghost.yaml

This file was deleted.

14 changes: 3 additions & 11 deletions environments/customers/a01/overlays/test/patches/jellyfin.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: patch
spec:
source:
helm:
valuesObject:
persistence:
config:
size: 10Gi
- op: replace
path: /spec/source/helm/valuesObject/persistence/media/size
value: 10Gi
23 changes: 23 additions & 0 deletions environments/customers/a01/overlays/test/patches/pinchflat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
- op: replace
path: /spec/source/helm/valuesObject/resources/1/spec/type
value: LoadBalancer
- op: replace
path: /spec/source/helm/valuesObject/resources/0/spec/template/spec/volumes/0
value:
name: pinchflat-config
persistentVolumeClaim:
claimName: pinchflat-config
- op: add
path: /spec/source/helm/valuesObject/resources/-
value:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pinchflat-config
spec:
accessModes:
- ReadWriteMany
storageClassName: nfs
resources:
requests:
storage: 2Gi