7d4cef51f5
Adds a production-ready Helm chart under deploy/helm/jellyfin-ha/. Motivated by a community request on Reddit: https://www.reddit.com/r/JellyfinCommunity/comments/1rvj17f/jellyfin_ha_on_kubernetes_redisbacked_transcode/oav7mlz/ Features: - StatefulSet with configurable replica count (default 2 for HA) - Redis subchart (in-cluster) wired to ITranscodeSessionStore via Jellyfin__TranscodeStore__RedisConnectionString env var - Supports external Redis via ha.transcodeStore.existingSecret or ha.transcodeStore.redisConnectionString - Optional in-cluster PostgreSQL StatefulSet (experimental, mirrors existing kubernetes/apps/media/jellyfin-postgres.yaml pattern) - RWX config + transcode PVCs (required for multi-pod session takeover) - Per-pod cache via volumeClaimTemplates (RWO) - Optional NFS PV+PVC for media library - Intel QSV / VA-API GPUgit checkout -b feat/helm-chart && git add deploy/ && legit add deploy/ && git commit -m dagit commit -m featss
98 lines
3.0 KiB
YAML
98 lines
3.0 KiB
YAML
{{- if .Values.ingress.enabled }}
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ include "jellyfin-ha.fullname" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{- include "jellyfin-ha.labels" . | nindent 4 }}
|
|
{{- with .Values.ingress.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- if .Values.ingress.className }}
|
|
ingressClassName: {{ .Values.ingress.className }}
|
|
{{- end }}
|
|
{{- if .Values.ingress.tls }}
|
|
tls:
|
|
{{- toYaml .Values.ingress.tls | nindent 4 }}
|
|
{{- end }}
|
|
rules:
|
|
{{- range .Values.ingress.hosts }}
|
|
- host: {{ .host | quote }}
|
|
http:
|
|
paths:
|
|
{{- range .paths }}
|
|
- path: {{ .path }}
|
|
pathType: {{ .pathType }}
|
|
backend:
|
|
service:
|
|
name: {{ include "jellyfin-ha.fullname" $ }}
|
|
port:
|
|
name: http
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
---
|
|
{{- if .Values.traefikIngressRoute.enabled }}
|
|
# Traefik v3 IngressRoute (used by k3s default ingress controller).
|
|
# Enables sticky session cookies — required for multi-replica Jellyfin so that
|
|
# a client always lands on the same pod (session affinity).
|
|
apiVersion: traefik.io/v1alpha1
|
|
kind: IngressRoute
|
|
metadata:
|
|
name: {{ include "jellyfin-ha.fullname" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{- include "jellyfin-ha.labels" . | nindent 4 }}
|
|
{{- if .Values.traefikIngressRoute.tls.enabled }}
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: {{ .Values.traefikIngressRoute.tls.clusterIssuer }}
|
|
{{- end }}
|
|
spec:
|
|
entryPoints:
|
|
{{- toYaml .Values.traefikIngressRoute.entryPoints | nindent 4 }}
|
|
routes:
|
|
- match: Host(`{{ .Values.traefikIngressRoute.host }}`)
|
|
kind: Rule
|
|
services:
|
|
- name: {{ include "jellyfin-ha.fullname" . }}
|
|
port: {{ .Values.service.port }}
|
|
{{- if .Values.traefikIngressRoute.sticky.enabled }}
|
|
sticky:
|
|
cookie:
|
|
name: {{ .Values.traefikIngressRoute.sticky.cookieName }}
|
|
httpOnly: {{ .Values.traefikIngressRoute.sticky.httpOnly }}
|
|
secure: {{ .Values.traefikIngressRoute.sticky.secure }}
|
|
{{- end }}
|
|
{{- if .Values.traefikIngressRoute.tls.enabled }}
|
|
tls:
|
|
secretName: {{ .Values.traefikIngressRoute.tls.secretName }}
|
|
{{- end }}
|
|
|
|
---
|
|
{{- if .Values.traefikIngressRoute.tls.enabled }}
|
|
# cert-manager Certificate for Traefik TLS termination.
|
|
apiVersion: cert-manager.io/v1
|
|
kind: Certificate
|
|
metadata:
|
|
name: {{ include "jellyfin-ha.fullname" . }}-tls
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{- include "jellyfin-ha.labels" . | nindent 4 }}
|
|
spec:
|
|
secretName: {{ .Values.traefikIngressRoute.tls.secretName }}
|
|
issuerRef:
|
|
name: {{ .Values.traefikIngressRoute.tls.clusterIssuer }}
|
|
kind: ClusterIssuer
|
|
dnsNames:
|
|
{{- if .Values.traefikIngressRoute.tls.dnsNames }}
|
|
{{- toYaml .Values.traefikIngressRoute.tls.dnsNames | nindent 4 }}
|
|
{{- else }}
|
|
- {{ .Values.traefikIngressRoute.host }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|