diff --git a/apps/jellyfin/deployment.yaml b/apps/jellyfin/deployment.yaml new file mode 100644 index 0000000..49927e0 --- /dev/null +++ b/apps/jellyfin/deployment.yaml @@ -0,0 +1,73 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: jellyfin + namespace: jellyfin +spec: + replicas: 1 + strategy: + type: Recreate + selector: + matchLabels: + component: web + template: + metadata: + labels: + component: web + spec: + securityContext: + runAsNonRoot: true + runAsUser: 999 + runAsGroup: 999 + seccompProfile: + type: RuntimeDefault + containers: + - name: jellyfin + image: "{{ .apps.jellyfin.image }}" + imagePullPolicy: IfNotPresent + ports: + - name: http + containerPort: 8096 + protocol: TCP + env: + - name: TZ + value: "{{ .apps.jellyfin.timezone }}" + - name: JELLYFIN_PublishedServerUrl + value: "{{ .apps.jellyfin.publishedServerUrl }}" + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: false + volumeMounts: + - name: config + mountPath: /config + - name: cache + mountPath: /cache + - name: media + mountPath: /media + livenessProbe: + httpGet: + path: /health + port: http + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + readinessProbe: + httpGet: + path: /health + port: http + initialDelaySeconds: 5 + periodSeconds: 10 + timeoutSeconds: 5 + volumes: + - name: config + persistentVolumeClaim: + claimName: jellyfin-config + - name: cache + persistentVolumeClaim: + claimName: jellyfin-cache + - name: media + persistentVolumeClaim: + claimName: jellyfin-media \ No newline at end of file diff --git a/apps/jellyfin/ingress.yaml b/apps/jellyfin/ingress.yaml new file mode 100644 index 0000000..aea60d8 --- /dev/null +++ b/apps/jellyfin/ingress.yaml @@ -0,0 +1,24 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: jellyfin-public + namespace: jellyfin + annotations: + external-dns.alpha.kubernetes.io/target: "{{ .cloud.domain }}" + external-dns.alpha.kubernetes.io/cloudflare-proxied: "false" +spec: + rules: + - host: "{{ .apps.jellyfin.domain }}" + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: jellyfin + port: + number: {{ .apps.jellyfin.port }} + tls: + - secretName: "{{ .apps.jellyfin.tlsSecretName }}" + hosts: + - "{{ .apps.jellyfin.domain }}" diff --git a/apps/jellyfin/kustomization.yaml b/apps/jellyfin/kustomization.yaml new file mode 100644 index 0000000..cabffb8 --- /dev/null +++ b/apps/jellyfin/kustomization.yaml @@ -0,0 +1,15 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: jellyfin +labels: + - includeSelectors: true + pairs: + app: jellyfin + managedBy: kustomize + partOf: wild-cloud +resources: + - namespace.yaml + - deployment.yaml + - service.yaml + - ingress.yaml + - pvc.yaml diff --git a/apps/jellyfin/manifest.yaml b/apps/jellyfin/manifest.yaml new file mode 100644 index 0000000..5b77652 --- /dev/null +++ b/apps/jellyfin/manifest.yaml @@ -0,0 +1,16 @@ +name: jellyfin +description: Jellyfin is a free and open-source media server and suite of multimedia applications designed to organize, manage, and share digital media files +version: 10.10.3 +icon: https://jellyfin.org/images/banner-light.svg +requires: [] +defaultConfig: + image: jellyfin/jellyfin:10.10.3 + domain: jellyfin.{{ .cloud.domain }} + tlsSecretName: wildcard-wild-cloud-tls + port: 8096 + configStorage: 1Gi + cacheStorage: 10Gi + mediaStorage: 100Gi + timezone: UTC + publishedServerUrl: "https://jellyfin.{{ .cloud.domain }}" +requiredSecrets: [] \ No newline at end of file diff --git a/apps/jellyfin/namespace.yaml b/apps/jellyfin/namespace.yaml new file mode 100644 index 0000000..a02d3bc --- /dev/null +++ b/apps/jellyfin/namespace.yaml @@ -0,0 +1,5 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: jellyfin \ No newline at end of file diff --git a/apps/jellyfin/pvc.yaml b/apps/jellyfin/pvc.yaml new file mode 100644 index 0000000..f034983 --- /dev/null +++ b/apps/jellyfin/pvc.yaml @@ -0,0 +1,36 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: jellyfin-config + namespace: jellyfin +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: "{{ .apps.jellyfin.configStorage }}" +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: jellyfin-cache + namespace: jellyfin +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: "{{ .apps.jellyfin.cacheStorage }}" +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: jellyfin-media + namespace: jellyfin +spec: + accessModes: + - ReadWriteMany + storageClassName: nfs + resources: + requests: + storage: "{{ .apps.jellyfin.mediaStorage }}" \ No newline at end of file diff --git a/apps/jellyfin/service.yaml b/apps/jellyfin/service.yaml new file mode 100644 index 0000000..439a70b --- /dev/null +++ b/apps/jellyfin/service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: jellyfin + namespace: jellyfin +spec: + ports: + - name: http + port: {{ .apps.jellyfin.port }} + targetPort: http + protocol: TCP + selector: + component: web \ No newline at end of file