Compare commits

...
11 changed files with 111 additions and 30 deletions

No files matched your search

+2 -2
View File
@@ -17,12 +17,12 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6
with:
python-version: 3.x
+2 -2
View File
@@ -14,12 +14,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
fetch-depth: 0
- name: Helm Docs GitHub Action
uses: losisin/helm-docs-github-action@0ad5e25e0c45c6c9e32a99776f64eb410b4a5657 # v1.4.0
uses: losisin/helm-docs-github-action@a57fae5676e4c55a228ea654a1bcaec8dd3cf5b5 # v1.6.2
with:
git-push: true
git-commit-message: "docs(charts): :memo: write updated reademe"
+2 -2
View File
@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
fetch-depth: 0
@@ -28,7 +28,7 @@ jobs:
git config --global user.email "team@jellyfin.org"
- name: Install Helm
uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
+1 -1
View File
@@ -7,7 +7,7 @@ This repository contains Helm charts for the jellyfin project.
Each Helm chart is stored in its own directory. Each chart follows the standard Helm chart structure:
```plaintext
hellyfin-helm/
jellyfin-helm/
├── jellyfin/
│ ├── Chart.yaml
│ ├── values.yaml
+2 -2
View File
@@ -8,5 +8,5 @@ keywords:
- jellyfin
- media
- self-hosted
version: 2.2.0
appVersion: 10.10.6
version: 2.4.0
appVersion: 10.11.0
+10 -4
View File
@@ -1,6 +1,6 @@
# jellyfin
![Version: 2.1.1](https://img.shields.io/badge/Version-2.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 10.10.6](https://img.shields.io/badge/AppVersion-10.10.6-informational?style=flat-square)
![Version: 2.3.0](https://img.shields.io/badge/Version-2.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 10.11.0](https://img.shields.io/badge/AppVersion-10.11.0-informational?style=flat-square)
A Helm chart for Jellyfin Media Server
@@ -53,7 +53,10 @@ helm install my-jellyfin jellyfin/jellyfin -f values.yaml
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | Affinity rules for pod scheduling. |
| deploymentAnnotations | object | `{}` | Annotations to add to the deployment. |
| deploymentStrategy | object | `{"type":"RollingUpdate"}` | Deployment strategy configuration. See `kubectl explain deployment.spec.strategy`. |
| dnsConfig | object | `{}` | Define a dnsConfig. See https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config Use this to provide a custom DNS resolver configuration |
| dnsPolicy | string | `""` | Define a dnsPolicy. See https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy |
| extraContainers | list | `[]` | additional sidecar containers to run inside the pod. |
| extraInitContainers | list | `[]` | additional init containers to run inside the pod. |
| fullnameOverride | string | `""` | Override the default full name of the chart. |
@@ -67,8 +70,8 @@ helm install my-jellyfin jellyfin/jellyfin -f values.yaml
| jellyfin.enableDLNA | bool | `false` | Enable DLNA. Requires host network. See: https://jellyfin.org/docs/general/networking/dlna.html |
| jellyfin.env | list | `[]` | Additional environment variables for the container. |
| livenessProbe | object | `{"initialDelaySeconds":10,"tcpSocket":{"port":"http"}}` | Configure liveness probe for Jellyfin. |
| metrics | object | `{"command":["bash","-c","sed 's,<EnableMetrics>false</EnableMetrics>,<EnableMetrics>true</EnableMetrics>,' -i /config/config/system.xml && /jellyfin/jellyfin"],"enabled":false,"serviceMonitor":{"enabled":false,"interval":"30s","labels":{},"metricRelabelings":[],"namespace":"","path":"/metrics","port":8096,"relabelings":[],"scheme":"http","scrapeTimeout":"30s","targetLabels":[],"tlsConfig":{}}}` | Configuration for metrics collection and monitoring |
| metrics.enabled | bool | `false` | Enable or disable metrics collection - Ensure you have started and configured your Jellyfin instance first as this will fail if system.xml does not exist yet. |
| metrics | object | `{"enabled":false,"serviceMonitor":{"enabled":false,"interval":"30s","labels":{},"metricRelabelings":[],"namespace":"","path":"/metrics","port":8096,"relabelings":[],"scheme":"http","scrapeTimeout":"30s","targetLabels":[],"tlsConfig":{}}}` | Configuration for metrics collection and monitoring |
| metrics.enabled | bool | `false` | Enable or disable metrics collection |
| metrics.serviceMonitor | object | `{"enabled":false,"interval":"30s","labels":{},"metricRelabelings":[],"namespace":"","path":"/metrics","port":8096,"relabelings":[],"scheme":"http","scrapeTimeout":"30s","targetLabels":[],"tlsConfig":{}}` | Configuration for the Prometheus ServiceMonitor |
| metrics.serviceMonitor.enabled | bool | `false` | Enable or disable the creation of a ServiceMonitor resource |
| metrics.serviceMonitor.interval | string | `"30s"` | Interval at which metrics should be scraped |
@@ -89,14 +92,17 @@ helm install my-jellyfin jellyfin/jellyfin -f values.yaml
| persistence.config.enabled | bool | `true` | set to false to use emptyDir |
| persistence.config.size | string | `"5Gi"` | |
| persistence.config.storageClass | string | `""` | If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. |
| persistence.media.accessMode | string | `"ReadWriteOnce"` | |
| persistence.media.accessMode | string | `"ReadWriteOnce"` | PVC specific settings, only used if type is 'pvc'. |
| persistence.media.annotations | object | `{}` | Custom annotations to be added to the PVC |
| persistence.media.enabled | bool | `true` | set to false to use emptyDir |
| persistence.media.hostPath | string | `""` | Path on the host node for media storage, only used if type is 'hostPath'. |
| persistence.media.size | string | `"25Gi"` | |
| persistence.media.storageClass | string | `""` | If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. |
| persistence.media.type | string | `"pvc"` | Type of volume for media storage (pvc, hostPath, emptyDir). If 'enabled' is false, 'emptyDir' is used regardless of this setting. |
| podAnnotations | object | `{}` | Annotations to add to the pod. |
| podLabels | object | `{}` | Additional labels to add to the pod. |
| podSecurityContext | object | `{}` | Security context for the pod. |
| priorityClassName | string | `""` | Define a priorityClassName for the pod. |
| readinessProbe | object | `{"initialDelaySeconds":10,"tcpSocket":{"port":"http"}}` | Configure readiness probe for Jellyfin. |
| replicaCount | int | `1` | Number of Jellyfin replicas to start. Should be left at 1. |
| resources | object | `{}` | Resource requests and limits for the Jellyfin container. |
+59 -6
View File
@@ -2,6 +2,10 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "jellyfin.fullname" . }}
{{- with .Values.deploymentAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "jellyfin.labels" . | nindent 4 }}
spec:
@@ -41,13 +45,9 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if and .Values.image.command (not .Values.metrics.enabled) }}
{{- with .Values.jellyfin.command }}
command:
{{- toYaml .Values.jellyfin.command | nindent 12 }}
{{- end }}
{{- if .Values.metrics.enabled }}
command:
{{- toYaml .Values.metrics.command | nindent 12 }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.jellyfin.args }}
args:
@@ -57,6 +57,41 @@ spec:
env:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.metrics.enabled }}
lifecycle:
postStart:
exec:
command:
- /bin/sh
- -c
- |
echo "Waiting for system.xml to enable metrics..."
timeout=300 # 5 minutes timeout
interval=5 # Check every 5 seconds
elapsed=0
while [ ! -f /config/config/system.xml ]; do
if [ $elapsed -ge $timeout ]; then
echo "ERROR: Timed out waiting for /config/config/system.xml" >&2
exit 1
fi
sleep $interval
elapsed=$((elapsed + interval))
done
echo "Found /config/config/system.xml, enabling metrics..."
# Check if metrics are already enabled before running sed
if ! grep -q '<EnableMetrics>true</EnableMetrics>' /config/config/system.xml; then
sed 's,<EnableMetrics>false</EnableMetrics>,<EnableMetrics>true</EnableMetrics>,' -i /config/config/system.xml
if [ $? -eq 0 ]; then
echo "Metrics enabled successfully."
else
echo "ERROR: Failed to enable metrics in /config/config/system.xml" >&2
exit 1
fi
else
echo "Metrics already enabled."
fi
exit 0
{{- end }}
ports:
- name: http
containerPort: 8096
@@ -98,8 +133,16 @@ spec:
{{- end }}
- name: media
{{- if .Values.persistence.media.enabled }}
{{- if eq .Values.persistence.media.type "pvc" }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.media.existingClaim }}{{ .Values.persistence.media.existingClaim }}{{- else }}{{ template "jellyfin.fullname" . }}-media{{- end }}
{{- else if eq .Values.persistence.media.type "hostPath" }}
hostPath:
path: {{ .Values.persistence.media.hostPath }}
type: Directory
{{- else }}
emptyDir: {}
{{- end }}
{{- else }}
emptyDir: {}
{{- end }}
@@ -121,3 +164,13 @@ spec:
{{- with .Values.runtimeClassName }}
runtimeClassName: {{ . | quote }}
{{- end }}
{{- with .Values.priorityClassName }}
priorityClassName: {{ . | quote }}
{{- end }}
{{- with .Values.dnsConfig }}
dnsConfig:
{{- toYaml . | nindent 8}}
{{- end }}
{{- with .Values.dnsPolicy }}
dnsPolicy: {{ . | quote }}
{{- end }}
@@ -21,7 +21,7 @@ spec:
{{- end }}
{{- end }}
{{- if and .Values.persistence.media.enabled (not .Values.persistence.media.existingClaim) }}
{{- if and .Values.persistence.media.enabled (eq .Values.persistence.media.type "pvc") (not .Values.persistence.media.existingClaim) }}
---
apiVersion: v1
kind: PersistentVolumeClaim
+1 -1
View File
@@ -47,7 +47,7 @@ spec:
externalTrafficPolicy: {{ . }}
{{- end }}
ports:
- name: {{ .Values.service.portName | default "http" }}
- name: {{ .Values.service.name | default "http" }}
port: {{ .Values.service.port }}
protocol: TCP
targetPort: http
@@ -14,7 +14,7 @@ metadata:
{{- end }}
spec:
endpoints:
- port: {{ .Values.service.name }}
- port: {{ .Values.service.name | default "http" }}
{{- with .Values.metrics.serviceMonitor.interval }}
interval: {{ . }}
{{- end }}
@@ -23,7 +23,6 @@ spec:
{{- end }}
honorLabels: true
path: {{ .Values.metrics.serviceMonitor.path }}
port: {{ .Values.metrics.serviceMonitor.port }}
scheme: {{ .Values.metrics.serviceMonitor.scheme }}
{{- with .Values.metrics.serviceMonitor.tlsConfig }}
tlsConfig:
+30 -7
View File
@@ -53,11 +53,35 @@ securityContext: {}
# -- Define a custom runtimeClassName for the pod.
runtimeClassName: ''
# -- Define a priorityClassName for the pod.
priorityClassName: ""
# -- Define a dnsConfig. See https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config
# Use this to provide a custom DNS resolver configuration
dnsConfig: {}
# nameservers:
# - 192.0.2.1
# searches:
# - ns1.svc.cluster-domain.example
# - my.dns.search.suffix
# options:
# - name: ndots
# value: "2"
# - name: edns0
# -- Define a dnsPolicy. See https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy
dnsPolicy: ""
# -- Deployment strategy configuration. See `kubectl explain deployment.spec.strategy`.
deploymentStrategy:
type: RollingUpdate
# -- Annotations to add to the deployment.
deploymentAnnotations: {}
service:
# # -- Custom name for the service port
# name: http
# -- Service type (ClusterIP, NodePort, or LoadBalancer).
type: ClusterIP
# -- Configure dual-stack IP family policy. See: https://kubernetes.io/docs/concepts/services-networking/dual-stack/
@@ -176,6 +200,11 @@ persistence:
media:
# -- set to false to use emptyDir
enabled: true
# -- Type of volume for media storage (pvc, hostPath, emptyDir). If 'enabled' is false, 'emptyDir' is used regardless of this setting.
type: pvc
# -- Path on the host node for media storage, only used if type is 'hostPath'.
hostPath: ""
# -- PVC specific settings, only used if type is 'pvc'.
accessMode: ReadWriteOnce
size: 25Gi
# -- Custom annotations to be added to the PVC
@@ -187,14 +216,8 @@ persistence:
# -- Configuration for metrics collection and monitoring
metrics:
# -- Enable or disable metrics collection - Ensure you have started and configured your Jellyfin instance first as this will fail if system.xml does not exist yet.
# -- Enable or disable metrics collection
enabled: false
command:
- bash
- '-c'
- >-
sed 's,<EnableMetrics>false</EnableMetrics>,<EnableMetrics>true</EnableMetrics>,' -i /config/config/system.xml &&
/jellyfin/jellyfin
# -- Configuration for the Prometheus ServiceMonitor
serviceMonitor:
# -- Enable or disable the creation of a ServiceMonitor resource