Compare commits

...
21 changed files with 731 additions and 494 deletions

No files matched your search

+10 -3
View File
@@ -1,6 +1,13 @@
{ {
"$schema": "https://docs.renovatebot.com/renovate-schema.json", "$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [ "extends": ["github>jellyfin/.github//renovate-presets/default"],
"github>jellyfin/.github//renovate-presets/default" "customManagers": [
{
"customType": "regex",
"fileMatch": ["charts/jellyfin/Chart.yaml"],
"matchStrings": ["appVersion: (?<currentValue>.*?)\\n"],
"datasourceTemplate": "docker",
"depNameTemplate": "jellyfin/jellyfin"
}
] ]
} }
+2 -2
View File
@@ -17,12 +17,12 @@ jobs:
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with: with:
persist-credentials: false persist-credentials: false
- name: Set up Python - name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5 uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6
with: with:
python-version: 3.x python-version: 3.x
+2 -2
View File
@@ -14,12 +14,12 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Helm Docs GitHub Action - name: Helm Docs GitHub Action
uses: losisin/helm-docs-github-action@57d2dc9379d9f0d5d22d2845a62c935d32cddfe2 # v1.3.3 uses: losisin/helm-docs-github-action@a57fae5676e4c55a228ea654a1bcaec8dd3cf5b5 # v1.6.2
with: with:
git-push: true git-push: true
git-commit-message: "docs(charts): :memo: write updated reademe" git-commit-message: "docs(charts): :memo: write updated reademe"
+3 -3
View File
@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with: with:
fetch-depth: 0 fetch-depth: 0
@@ -28,12 +28,12 @@ jobs:
git config --global user.email "team@jellyfin.org" git config --global user.email "team@jellyfin.org"
- name: Install Helm - name: Install Helm
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4 uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4
env: env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Run chart-releaser - name: Run chart-releaser
uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0 uses: helm/chart-releaser-action@cae68fefc6b5f367a0275617c9f83181ba54714f # v1.7.0
env: env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with: with:
+2 -2
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: Each Helm chart is stored in its own directory. Each chart follows the standard Helm chart structure:
```plaintext ```plaintext
hellyfin-helm/ jellyfin-helm/
├── jellyfin/ ├── jellyfin/
│ ├── Chart.yaml │ ├── Chart.yaml
│ ├── values.yaml │ ├── values.yaml
@@ -32,7 +32,7 @@ hellyfin-helm/
To use the charts in this repository, first add the repository to Helm: To use the charts in this repository, first add the repository to Helm:
```bash ```bash
helm repo add jellyfin https://<your-repo-url>.git helm repo add jellyfin https://jellyfin.github.io/jellyfin-helm
helm repo update helm repo update
``` ```
+23
View File
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
+3 -3
View File
@@ -1,8 +1,6 @@
apiVersion: v2 apiVersion: v2
appVersion: 10.10.1
description: Jellyfin Media Server
name: jellyfin name: jellyfin
version: 1.5.0 description: A Helm chart for Jellyfin Media Server
type: application type: application
home: https://jellyfin.org/ home: https://jellyfin.org/
icon: https://jellyfin.org/images/logo.svg icon: https://jellyfin.org/images/logo.svg
@@ -10,3 +8,5 @@ keywords:
- jellyfin - jellyfin
- media - media
- self-hosted - self-hosted
version: 2.4.0
appVersion: 10.11.0
+44
View File
@@ -0,0 +1,44 @@
# Migration Guide
## v1.x to v2.x
### General
1. The `enableDLNA` key has been moved from the top level to the `jellyfin` subkey.
2. Some renames have occurred to align with the standard:
```yaml
extraPodLabels -> podLabels
extraPodAnnotations -> podAnnotations
```
3. The `extraEnvVars` key has been moved and renamed to `jellyfin.env`.
4. `extraVolumes` has been moved to `volumes`, and `extraVolumeMounts` has been moved to `volumeMounts`.
5. The `extraExistingClaimMounts` key has been removed, as it can now be represented with `volumes` and `volumeMounts`.
### Service
1. The `name` field has been renamed to `portName` for consistency.
2. The following fields have been added:
```yaml
# -- Configure dual-stack IP family policy. See: https://kubernetes.io/docs/concepts/services-networking/dual-stack/
ipFamilyPolicy: ""
# -- Supported IP families (IPv4, IPv6).
ipFamilies: []
# -- Class of the LoadBalancer.
loadBalancerClass: ""
# -- External traffic policy (Cluster or Local).
# externalTrafficPolicy: Cluster
```
### Ingress
1. The `className` field has been added for ingress class, as annotations are deprecated.
2. The `path` field has been moved under the `hosts` key to better represent the actual CRD, providing more fine-grained control.
3. The `labels` field has been added for additional labels.
### Persistence
PVC creation is now enabled by default to prevent data loss when the chart is used without a specific configuration.
### Probes
The liveness and readiness probes are now always enabled to ensure proper Kubernetes lifecycle management. Adjust the values accordingly if you have a large library.
+76 -50
View File
@@ -1,8 +1,8 @@
# jellyfin # jellyfin
![Version: 1.4.0](https://img.shields.io/badge/Version-1.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.4.0](https://img.shields.io/badge/AppVersion-1.4.0-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)
Jellyfin Media Server A Helm chart for Jellyfin Media Server
**Homepage:** <https://jellyfin.org/> **Homepage:** <https://jellyfin.org/>
@@ -13,7 +13,7 @@ Jellyfin Media Server
Helm repositories contain collections of charts. You can add an existing repository using the following command: Helm repositories contain collections of charts. You can add an existing repository using the following command:
```bash ```bash
helm repo add <repo-name> <repo-url> helm repo add jellyfin https://jellyfin.github.io/jellyfin-helm
``` ```
### 2. Install the Helm Chart ### 2. Install the Helm Chart
@@ -21,7 +21,7 @@ helm repo add <repo-name> <repo-url>
To install a chart, use the following command: To install a chart, use the following command:
```bash ```bash
helm install <release-name> <repo-name>/jellyfin helm install my-jellyfin jellyfin/jellyfin
``` ```
### 3. View the Installation ### 3. View the Installation
@@ -29,7 +29,7 @@ helm install <release-name> <repo-name>/jellyfin
You can check the status of the release using: You can check the status of the release using:
```bash ```bash
helm status <release-name> helm status my-jellyfin
``` ```
## Customizing the Chart ## Customizing the Chart
@@ -38,68 +38,94 @@ Helm charts come with default values, but you can customize them by using the --
### 1. Using --set to Override Values ### 1. Using --set to Override Values
```bash ```bash
helm install <release-name> <chart-name> --set key1=value1,key2=value2 helm install my-jellyfin jellyfin/jellyfin --set key1=value1,key2=value2
``` ```
### 2. Using a values.yaml File ### 2. Using a values.yaml File
You can create a custom values.yaml file and pass it to the install command: You can create a custom values.yaml file and pass it to the install command:
```bash ```bash
helm install <release-name> <chart-name> -f values.yaml helm install my-jellyfin jellyfin/jellyfin -f values.yaml
``` ```
## Values ## Values
| Key | Type | Default | Description | | Key | Type | Default | Description |
|-----|------|---------|-------------| |-----|------|---------|-------------|
| affinity | object | `{}` | | | affinity | object | `{}` | Affinity rules for pod scheduling. |
| enableDLNA | bool | `false` | Setting this to true enables DLNA which requires the pod to be attached to the host network in order to be useful - this can break things like ingress to the service https://jellyfin.org/docs/general/networking/dlna.html | | 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. | | extraContainers | list | `[]` | additional sidecar containers to run inside the pod. |
| extraEnvVars | list | `[]` | aditional environment variables passed to the pod |
| extraInitContainers | list | `[]` | additional init containers to run inside the pod. | | extraInitContainers | list | `[]` | additional init containers to run inside the pod. |
| extraPodAnnotations | object | `{}` | additional annotations applied to the pod | | fullnameOverride | string | `""` | Override the default full name of the chart. |
| extraPodLabels | object | `{}` | additional pod labels. Not used as a selector label. | | image.pullPolicy | string | `"IfNotPresent"` | Image pull policy (Always, IfNotPresent, or Never). |
| extraVolumeMounts | list | `[]` | Define mount points for additional volumes. | | image.repository | string | `"docker.io/jellyfin/jellyfin"` | Container image repository for Jellyfin. |
| extraVolumes | list | `[]` | Define additional volumes to mount to the pod. | | image.tag | string | `""` | Jellyfin container image tag. Leave empty to automatically use the Chart's app version. |
| fullnameOverride | string | `""` | | | imagePullSecrets | list | `[]` | Image pull secrets to authenticate with private repositories. See: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ |
| image.pullPolicy | string | `"IfNotPresent"` | | | ingress | object | `{"annotations":{},"className":"","enabled":false,"hosts":[{"host":"chart-example.local","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}` | Ingress configuration. See: https://kubernetes.io/docs/concepts/services-networking/ingress/ |
| image.repository | string | `"docker.io/jellyfin/jellyfin"` | Set cutom repository for jellyfin image | | jellyfin.args | list | `[]` | Additional arguments for the entrypoint command. |
| image.tag | string | `""` | Set jellyfin version which should be required since chart is updated with new versions automatically | | jellyfin.command | list | `[]` | Custom command to use as container entrypoint. |
| imagePullSecrets | list | `[]` | | | jellyfin.enableDLNA | bool | `false` | Enable DLNA. Requires host network. See: https://jellyfin.org/docs/general/networking/dlna.html |
| ingress.annotations | object | `{}` | | | jellyfin.env | list | `[]` | Additional environment variables for the container. |
| ingress.enabled | bool | `false` | | | livenessProbe | object | `{"initialDelaySeconds":10,"tcpSocket":{"port":"http"}}` | Configure liveness probe for Jellyfin. |
| ingress.hosts[0] | string | `"chart-example.local"` | | | 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 |
| ingress.labels | object | `{}` | | | metrics.enabled | bool | `false` | Enable or disable metrics collection |
| ingress.path | string | `"/"` | | | 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 |
| ingress.tls | list | `[]` | | | metrics.serviceMonitor.enabled | bool | `false` | Enable or disable the creation of a ServiceMonitor resource |
| livenessProbe | object | `{"enabled":true,"initialDelaySeconds":10}` | Larger libraries may need to increase the readinessProbe and livenessProbe timeouts. Start by increasing the initialDelaySeconds. | | metrics.serviceMonitor.interval | string | `"30s"` | Interval at which metrics should be scraped |
| nameOverride | string | `""` | | | metrics.serviceMonitor.labels | object | `{}` | Labels to add to the ServiceMonitor resource |
| nodeSelector | object | `{}` | | | metrics.serviceMonitor.metricRelabelings | list | `[]` | Relabeling rules for the metrics before ingestion |
| metrics.serviceMonitor.namespace | string | `""` | Namespace where the ServiceMonitor resource should be created. Defaults to Release.Namespace |
| metrics.serviceMonitor.path | string | `"/metrics"` | Path to scrape for metrics |
| metrics.serviceMonitor.port | int | `8096` | Port to scrape for metrics |
| metrics.serviceMonitor.relabelings | list | `[]` | Relabeling rules for the scraped metrics |
| metrics.serviceMonitor.scheme | string | `"http"` | Scheme to use for scraping metrics (http or https) |
| metrics.serviceMonitor.scrapeTimeout | string | `"30s"` | Timeout for scraping metrics |
| metrics.serviceMonitor.targetLabels | list | `[]` | Target labels to add to the scraped metrics |
| metrics.serviceMonitor.tlsConfig | object | `{}` | TLS configuration for scraping metrics |
| nameOverride | string | `""` | Override the default name of the chart. |
| nodeSelector | object | `{}` | Node selector for pod scheduling. |
| persistence.config.accessMode | string | `"ReadWriteOnce"` | | | persistence.config.accessMode | string | `"ReadWriteOnce"` | |
| persistence.config.annotations | object | `{}` | Custom annotations to be added to the PVC | | persistence.config.annotations | object | `{}` | Custom annotations to be added to the PVC |
| persistence.config.enabled | bool | `false` | | | persistence.config.enabled | bool | `true` | set to false to use emptyDir |
| persistence.config.labels | object | `{}` | Custom labels to be added to the PVC | | persistence.config.size | string | `"5Gi"` | |
| persistence.config.size | string | `"1Gi"` | | | persistence.config.storageClass | string | `""` | If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. |
| 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"` | PVC specific settings, only used if type is 'pvc'. |
| persistence.extraExistingClaimMounts | list | `[]` | Add aditional PVs/PVCs to our container. Check values.yaml to see an example. |
| persistence.media.accessMode | string | `"ReadWriteOnce"` | |
| persistence.media.annotations | object | `{}` | Custom annotations to be added to the PVC | | persistence.media.annotations | object | `{}` | Custom annotations to be added to the PVC |
| persistence.media.enabled | bool | `false` | | | persistence.media.enabled | bool | `true` | set to false to use emptyDir |
| persistence.media.labels | object | `{}` | Custom labels to be added to the PVC | | persistence.media.hostPath | string | `""` | Path on the host node for media storage, only used if type is 'hostPath'. |
| persistence.media.size | string | `"10Gi"` | | | 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.storageClass | string | `""` | If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. |
| podSecurityContext | object | `{}` | SecurityContext configuration for the Jellyfin pod | | 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. |
| readinessProbe | object | `{"enabled":true,"initialDelaySeconds":10}` | Larger libraries may need to increase the readinessProbe and livenessProbe timeouts. Start by increasing the initialDelaySeconds. | | podAnnotations | object | `{}` | Annotations to add to the pod. |
| replicaCount | int | `1` | Number of jellyfin replicas to start. Should be left at 1 | | podLabels | object | `{}` | Additional labels to add to the pod. |
| resources | object | `{}` | | | podSecurityContext | object | `{}` | Security context for the pod. |
| runtimeClassName | string | `nil` | | | priorityClassName | string | `""` | Define a priorityClassName for the pod. |
| securityContext | object | `{}` | SecurityContext configuration for the Jellyfin container | | readinessProbe | object | `{"initialDelaySeconds":10,"tcpSocket":{"port":"http"}}` | Configure readiness probe for Jellyfin. |
| service.annotations | object | `{}` | | | replicaCount | int | `1` | Number of Jellyfin replicas to start. Should be left at 1. |
| service.labels | object | `{}` | | | resources | object | `{}` | Resource requests and limits for the Jellyfin container. |
| service.loadBalancerIP | string | `nil` | | | runtimeClassName | string | `""` | Define a custom runtimeClassName for the pod. |
| service.port | int | `8096` | | | securityContext | object | `{}` | Security context for the container. |
| service.type | string | `"ClusterIP"` | | | service.annotations | object | `{}` | Annotations for the service. |
| tolerations | list | `[]` | | | service.ipFamilies | list | `[]` | Supported IP families (IPv4, IPv6). |
| service.ipFamilyPolicy | string | `""` | Configure dual-stack IP family policy. See: https://kubernetes.io/docs/concepts/services-networking/dual-stack/ |
| service.labels | object | `{}` | Labels for the service. |
| service.loadBalancerClass | string | `""` | Class of the LoadBalancer. |
| service.loadBalancerIP | string | `""` | Specific IP address for the LoadBalancer. |
| service.loadBalancerSourceRanges | list | `[]` | Source ranges allowed to access the LoadBalancer. |
| service.port | int | `8096` | Port for the Jellyfin service. |
| service.portName | string | `"service"` | Name of the port in the service. |
| service.type | string | `"ClusterIP"` | Service type (ClusterIP, NodePort, or LoadBalancer). |
| serviceAccount | object | `{"annotations":{},"automount":true,"create":true,"name":""}` | Service account configuration. See: https://kubernetes.io/docs/concepts/security/service-accounts/ |
| serviceAccount.annotations | object | `{}` | Annotations for the service account. |
| serviceAccount.automount | bool | `true` | Automatically mount API credentials for the service account. |
| serviceAccount.create | bool | `true` | Specifies whether to create a service account. |
| serviceAccount.name | string | `""` | Custom name for the service account. If left empty, the name will be autogenerated. |
| tolerations | list | `[]` | Tolerations for pod scheduling. |
| volumeMounts | list | `[]` | Additional volume mounts for the Jellyfin container. |
| volumes | list | `[]` | Additional volumes to mount in the Jellyfin pod. |
---------------------------------------------- ----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
+5 -5
View File
@@ -14,7 +14,7 @@
Helm repositories contain collections of charts. You can add an existing repository using the following command: Helm repositories contain collections of charts. You can add an existing repository using the following command:
```bash ```bash
helm repo add <repo-name> <repo-url> helm repo add jellyfin https://jellyfin.github.io/jellyfin-helm
``` ```
### 2. Install the Helm Chart ### 2. Install the Helm Chart
@@ -22,7 +22,7 @@ helm repo add <repo-name> <repo-url>
To install a chart, use the following command: To install a chart, use the following command:
```bash ```bash
helm install <release-name> <repo-name>/jellyfin helm install my-jellyfin jellyfin/jellyfin
``` ```
### 3. View the Installation ### 3. View the Installation
@@ -30,7 +30,7 @@ helm install <release-name> <repo-name>/jellyfin
You can check the status of the release using: You can check the status of the release using:
```bash ```bash
helm status <release-name> helm status my-jellyfin
``` ```
## Customizing the Chart ## Customizing the Chart
@@ -39,14 +39,14 @@ Helm charts come with default values, but you can customize them by using the --
### 1. Using --set to Override Values ### 1. Using --set to Override Values
```bash ```bash
helm install <release-name> <chart-name> --set key1=value1,key2=value2 helm install my-jellyfin jellyfin/jellyfin --set key1=value1,key2=value2
``` ```
### 2. Using a values.yaml File ### 2. Using a values.yaml File
You can create a custom values.yaml file and pass it to the install command: You can create a custom values.yaml file and pass it to the install command:
```bash ```bash
helm install <release-name> <chart-name> -f values.yaml helm install my-jellyfin jellyfin/jellyfin -f values.yaml
``` ```
{{ template "chart.maintainersSection" . }} {{ template "chart.maintainersSection" . }}
-19
View File
@@ -1,19 +0,0 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "jellyfin.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ include "jellyfin.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "jellyfin.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "jellyfin.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
Visit http://127.0.0.1:8080 to use your application
kubectl port-forward $POD_NAME 8080:80
{{- end }}
+53 -16
View File
@@ -1,10 +1,16 @@
{{/* vim: set filetype=mustache: */}} {{/*
Fail if command and metrics are set
*/}}
{{- if and .Values.image.command .Values.metrics.enabled }}
{{- fail "Can't use custom command and metrics in combination. They are exclusive features" }}
{{- end }}
{{/* {{/*
Expand the name of the chart. Expand the name of the chart.
*/}} */}}
{{- define "jellyfin.name" -}} {{- define "jellyfin.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end -}} {{- end }}
{{/* {{/*
Create a default fully qualified app name. Create a default fully qualified app name.
@@ -12,21 +18,52 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
If release name contains chart name it will be used as a full name. If release name contains chart name it will be used as a full name.
*/}} */}}
{{- define "jellyfin.fullname" -}} {{- define "jellyfin.fullname" -}}
{{- if .Values.fullnameOverride -}} {{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else -}} {{- else }}
{{- $name := default .Chart.Name .Values.nameOverride -}} {{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name -}} {{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}} {{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else -}} {{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end -}} {{- end }}
{{- end -}} {{- end }}
{{- end -}} {{- end }}
{{/* {{/*
Create chart name and version as used by the chart label. Create chart name and version as used by the chart label.
*/}} */}}
{{- define "jellyfin.chart" -}} {{- define "jellyfin.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end -}} {{- end }}
{{/*
Common labels
*/}}
{{- define "jellyfin.labels" -}}
helm.sh/chart: {{ include "jellyfin.chart" . }}
{{ include "jellyfin.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "jellyfin.selectorLabels" -}}
app.kubernetes.io/name: {{ include "jellyfin.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "jellyfin.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "jellyfin.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
-32
View File
@@ -1,32 +0,0 @@
{{- if and .Values.persistence.config.enabled (not .Values.persistence.config.existingClaim) }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "jellyfin.fullname" . }}-config
labels:
app.kubernetes.io/name: {{ include "jellyfin.name" . }}
helm.sh/chart: {{ include "jellyfin.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- with .Values.persistence.config.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.persistence.config.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
accessModes:
- {{ .Values.persistence.config.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.config.size | quote }}
{{- if .Values.persistence.config.storageClass }}
{{- if (eq "-" .Values.persistence.config.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.config.storageClass }}"
{{- end }}
{{- end }}
{{- end -}}
+132 -132
View File
@@ -2,175 +2,175 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: {{ include "jellyfin.fullname" . }} name: {{ include "jellyfin.fullname" . }}
{{- with .Values.deploymentAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels: labels:
app.kubernetes.io/name: {{ include "jellyfin.name" . }} {{- include "jellyfin.labels" . | nindent 4 }}
helm.sh/chart: {{ include "jellyfin.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec: spec:
{{- with .Values.deploymentStrategy }}
strategy: strategy:
type: Recreate {{- toYaml . | trim | nindent 4 }}
{{- end }}
replicas: {{ .Values.replicaCount }} replicas: {{ .Values.replicaCount }}
selector: selector:
matchLabels: matchLabels:
app.kubernetes.io/name: {{ include "jellyfin.name" . }} {{- include "jellyfin.selectorLabels" . | nindent 6 }}
app.kubernetes.io/instance: {{ .Release.Name }}
template: template:
metadata: metadata:
labels: {{- with .Values.podAnnotations }}
app.kubernetes.io/name: {{ include "jellyfin.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- with .Values.extraPodLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.extraPodAnnotations }}
annotations: annotations:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
labels:
{{- include "jellyfin.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec: spec:
{{- with .Values.imagePullSecrets }} {{- with .Values.imagePullSecrets }}
imagePullSecrets: imagePullSecrets:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
{{- if .Values.enableDLNA }} serviceAccountName: {{ include "jellyfin.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.jellyfin.enableDLNA }}
hostNetwork: true hostNetwork: true
{{- end }} {{- end }}
containers: containers:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{ if .Values.image.command }}
command:
{{- toYaml .Values.image.command | nindent 12 }}
{{- end }}
{{ if .Values.image.args }}
args:
{{- toYaml .Values.image.args | nindent 12 }}
{{- end }}
{{ if .Values.extraEnvVars }}
env:
{{- toYaml .Values.extraEnvVars | nindent 12 }}
{{- end }}
{{ if .Values.securityContext }}
securityContext: securityContext:
{{- toYaml .Values.securityContext | nindent 12 }} {{- toYaml .Values.securityContext | nindent 12 }}
{{- end }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.jellyfin.command }}
command:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.jellyfin.args }}
args:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.jellyfin.env }}
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: ports:
- name: http - name: http
containerPort: 8096 containerPort: 8096
protocol: TCP protocol: TCP
{{ if .Values.enableDLNA }} {{- if .Values.jellyfin.enableDLNA }}
- name: dlna - name: dlna
containerPort: 1900 containerPort: 1900
hostPort: 1900 hostPort: 1900
protocol: UDP protocol: UDP
{{- end }} {{- end }}
{{ if .Values.livenessProbe.enabled }}
livenessProbe: livenessProbe:
{{ if .Values.livenessProbe.initialDelaySeconds }} {{- toYaml .Values.livenessProbe | nindent 12 }}
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
{{- end }}
{{ if .Values.livenessProbe.periodSeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
{{- end }}
{{ if .Values.livenessProbe.timeoutSeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
{{- end }}
{{ if .Values.livenessProbe.failureThreshold }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
{{- end }}
{{ if .Values.livenessProbe.successThreshold }}
successThreshold: {{ .Values.livenessProbe.successThreshold }}
{{- end }}
tcpSocket:
port: http
{{- end }}
{{ if .Values.readinessProbe.enabled }}
readinessProbe: readinessProbe:
{{ if .Values.readinessProbe.initialDelaySeconds }} {{- toYaml .Values.readinessProbe | nindent 12 }}
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} resources:
{{- end }} {{- toYaml .Values.resources | nindent 12 }}
{{ if .Values.readinessProbe.periodSeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
{{- end }}
{{ if .Values.readinessProbe.timeoutSeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
{{- end }}
{{ if .Values.readinessProbe.failureThreshold }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
{{- end }}
{{ if .Values.readinessProbe.successThreshold }}
successThreshold: {{ .Values.readinessProbe.successThreshold }}
{{- end }}
tcpSocket:
port: http
{{- end }}
volumeMounts: volumeMounts:
- mountPath: /config - mountPath: /config
name: config name: config
{{- if .Values.persistence.config.subPath }}
subPath: {{ .Values.persistence.config.subPath }}
{{- end }}
- mountPath: /media - mountPath: /media
name: media name: media
{{- if .Values.persistence.media.subPath }} {{- with .Values.volumeMounts }}
subPath: {{ .Values.persistence.media.subPath }} {{- toYaml . | nindent 12 }}
{{- end }} {{- end }}
{{- range .Values.persistence.extraExistingClaimMounts }} {{- with .Values.extraContainers }}
- name: {{ .name }} {{- toYaml . | nindent 8 }}
mountPath: {{ .mountPath }} {{- end }}
readOnly: {{ .readOnly }} {{- with .Values.initContainers }}
{{- end }}
{{- if .Values.extraVolumeMounts }}
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
{{- end }}
{{- if .Values.extraContainers }}
{{- toYaml .Values.extraContainers | nindent 8 }}
{{- end }}
resources:
{{ toYaml .Values.resources | indent 12 }}
terminationMessagePolicy: FallbackToLogsOnError
securityContext: {{- toYaml .Values.securityContext | nindent 12 }}
{{- if .Values.extraInitContainers }}
initContainers: initContainers:
{{- toYaml .Values.extraInitContainers | nindent 10 }} {{- toYaml . | nindent 6 }}
{{- end }} {{- end }}
volumes: volumes:
- name: config - name: config
{{- if .Values.persistence.config.enabled }} {{- if .Values.persistence.config.enabled }}
persistentVolumeClaim: persistentVolumeClaim:
claimName: {{ if .Values.persistence.config.existingClaim }}{{ .Values.persistence.config.existingClaim }}{{- else }}{{ template "jellyfin.fullname" . }}-config{{- end }} claimName: {{ if .Values.persistence.config.existingClaim }}{{ .Values.persistence.config.existingClaim }}{{- else }}{{ template "jellyfin.fullname" . }}-config{{- end }}
{{- else }} {{- else }}
emptyDir: {} emptyDir: {}
{{- end }} {{- end }}
- name: media - name: media
{{- if .Values.persistence.media.enabled }} {{- if .Values.persistence.media.enabled }}
persistentVolumeClaim: {{- if eq .Values.persistence.media.type "pvc" }}
claimName: {{ if .Values.persistence.media.existingClaim }}{{ .Values.persistence.media.existingClaim }}{{- else }}{{ template "jellyfin.fullname" . }}-media{{- end }} persistentVolumeClaim:
{{- else }} claimName: {{ if .Values.persistence.media.existingClaim }}{{ .Values.persistence.media.existingClaim }}{{- else }}{{ template "jellyfin.fullname" . }}-media{{- end }}
emptyDir: {} {{- else if eq .Values.persistence.media.type "hostPath" }}
{{- end }} hostPath:
{{- range .Values.persistence.extraExistingClaimMounts }} path: {{ .Values.persistence.media.hostPath }}
- name: {{ .name }} type: Directory
persistentVolumeClaim: {{- else }}
claimName: {{ .existingClaim }} emptyDir: {}
{{- end }} {{- end }}
{{- if .Values.extraVolumes }} {{- else }}
{{- toYaml .Values.extraVolumes | nindent 6 }} emptyDir: {}
{{- end }} {{- end }}
{{- with .Values.nodeSelector }} {{- with .Values.volumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector: nodeSelector:
{{ toYaml . | indent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
{{- with .Values.affinity }} {{- with .Values.affinity }}
affinity: affinity:
{{ toYaml . | indent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
{{- with .Values.tolerations }} {{- with .Values.tolerations }}
tolerations: tolerations:
{{ toYaml . | indent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} {{- with .Values.runtimeClassName }}
{{- if .Values.runtimeClassName }} runtimeClassName: {{ . | quote }}
runtimeClassName: {{.Values.runtimeClassName}} {{- end }}
{{- end }} {{- with .Values.priorityClassName }}
priorityClassName: {{ . | quote }}
{{- end }}
{{- with .Values.dnsConfig }}
dnsConfig:
{{- toYaml . | nindent 8}}
{{- end }}
{{- with .Values.dnsPolicy }}
dnsPolicy: {{ . | quote }}
{{- end }}
+24 -31
View File
@@ -1,50 +1,43 @@
{{- if .Values.ingress.enabled -}} {{- if .Values.ingress.enabled }}
{{- $fullName := include "jellyfin.fullname" . -}}
{{- $servicePort := .Values.service.port -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: {{ $fullName }} name: {{ include "jellyfin.fullname" . }}
labels: labels:
app.kubernetes.io/name: {{ include "jellyfin.name" . }} {{- include "jellyfin.labels" . | nindent 4 }}
helm.sh/chart: {{ include "jellyfin.chart" . }} {{- with .Values.ingress.annotations }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- with .Values.ingress.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.ingress.annotations }}
annotations: annotations:
{{ toYaml . | indent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
spec: spec:
{{- if or (.Capabilities.APIVersions.Has "networking.k8s.io/v1/IngressClass") (.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/IngressClass") }} {{- with .Values.ingress.className }}
{{- if .Values.ingress.ingressClassName }} ingressClassName: {{ . }}
ingressClassName: {{ .Values.ingress.ingressClassName }}
{{- end }} {{- end }}
{{- end }} {{- if .Values.ingress.tls }}
{{- if .Values.ingress.tls }}
tls: tls:
{{- range .Values.ingress.tls }} {{- range .Values.ingress.tls }}
- hosts: - hosts:
{{- range .hosts }} {{- range .hosts }}
- {{ . | quote }} - {{ . | quote }}
{{- end }} {{- end }}
secretName: {{ .secretName }} secretName: {{ .secretName }}
{{- end }}
{{- end }} {{- end }}
{{- end }}
rules: rules:
{{- range .Values.ingress.hosts }} {{- range .Values.ingress.hosts }}
- host: {{ . | quote }} - host: {{ .host | quote }}
http: http:
paths: paths:
- pathType: Prefix {{- range .paths }}
path: {{ $ingressPath }} - path: {{ .path }}
{{- with .pathType }}
pathType: {{ . }}
{{- end }}
backend: backend:
service: service:
name: {{ $fullName }} name: {{ include "jellyfin.fullname" $ }}
port: port:
name: http number: {{ $.Values.service.port }}
{{- end }} {{- end }}
{{- end }}
{{- end }} {{- end }}
-32
View File
@@ -1,32 +0,0 @@
{{- if and .Values.persistence.media.enabled (not .Values.persistence.media.existingClaim) }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "jellyfin.fullname" . }}-media
labels:
app.kubernetes.io/name: {{ include "jellyfin.name" . }}
helm.sh/chart: {{ include "jellyfin.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- with .Values.persistence.media.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.persistence.media.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
accessModes:
- {{ .Values.persistence.media.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.media.size | quote }}
{{- if .Values.persistence.media.storageClass }}
{{- if (eq "-" .Values.persistence.media.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.media.storageClass }}"
{{- end }}
{{- end }}
{{- end -}}
@@ -0,0 +1,45 @@
{{- if and .Values.persistence.config.enabled (not .Values.persistence.config.existingClaim) }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "jellyfin.fullname" . }}-config
labels:
{{- include "jellyfin.labels" . | nindent 4 }}
{{- with .Values.persistence.config.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
accessModes:
- {{ .Values.persistence.config.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.config.size | quote }}
{{- with .Values.persistence.config.storageClass }}
storageClassName: {{ . | quote }}
{{- end }}
{{- end }}
{{- if and .Values.persistence.media.enabled (eq .Values.persistence.media.type "pvc") (not .Values.persistence.media.existingClaim) }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "jellyfin.fullname" . }}-media
labels:
{{- include "jellyfin.labels" . | nindent 4 }}
{{- with .Values.persistence.media.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
accessModes:
- {{ .Values.persistence.media.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.media.size | quote }}
{{- with .Values.persistence.media.storageClass }}
storageClassName: {{ . | quote }}
{{- end }}
{{- end }}
+43 -37
View File
@@ -1,52 +1,58 @@
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{ template "jellyfin.fullname" . }} name: {{ include "jellyfin.fullname" . }}
labels: labels:
app.kubernetes.io/name: {{ include "jellyfin.name" . }} {{- include "jellyfin.labels" . | nindent 4 }}
helm.sh/chart: {{ include "jellyfin.chart" . }} {{- with .Values.service.labels }}
app.kubernetes.io/instance: {{ .Release.Name }} {{- toYaml . | nindent 4 }}
app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end }}
{{- if .Values.service.labels }} {{- with .Values.service.annotations }}
{{ toYaml .Values.service.labels | indent 4 }}
{{- end }}
{{- with .Values.service.annotations }}
annotations: annotations:
{{ toYaml . | indent 4 }} {{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if (or (eq .Values.service.type "ClusterIP") (empty .Values.service.type)) }}
type: ClusterIP
{{- if .Values.service.clusterIP }}
clusterIP: {{ .Values.service.clusterIP }}
{{end}}
{{- else if eq .Values.service.type "LoadBalancer" }}
type: {{ .Values.service.type }}
{{- if .Values.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }} {{- end }}
{{- if .Values.service.loadBalancerSourceRanges }} spec:
{{- if (or (eq .Values.service.type "ClusterIP") (empty .Values.service.type)) }}
type: ClusterIP
{{- with .Values.service.clusterIP }}
clusterIP: {{ . }}
{{- end }}
{{- else if eq .Values.service.type "LoadBalancer" }}
type: LoadBalancer
{{- with .Values.service.loadBalancerIP }}
loadBalancerIP: {{ . }}
{{- end }}
{{- with .Values.service.loadBalancerClass }}
loadBalancerClass: {{ . }}
{{- end }}
{{- with .Values.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges: loadBalancerSourceRanges:
{{ toYaml .Values.service.loadBalancerSourceRanges | indent 4 }} {{- toYaml . | nindent 4 }}
{{- end -}} {{- end }}
{{- else }} {{- else }}
type: {{ .Values.service.type }} type: {{ .Values.service.type }}
{{- end }} {{- end }}
{{- if .Values.service.externalIPs }} {{- if .Values.service.ipFamilyPolicy }}
ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }}
{{- end }}
{{- if .Values.service.ipFamilies }}
ipFamilies:
{{- toYaml .Values.service.ipFamilies | nindent 4 }}
{{- end }}
{{- with .Values.service.externalIPs }}
externalIPs: externalIPs:
{{ toYaml .Values.service.externalIPs | indent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
{{- if .Values.service.externalTrafficPolicy }} {{- with .Values.service.externalTrafficPolicy }}
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }} externalTrafficPolicy: {{ . }}
{{- end }} {{- end }}
ports: ports:
- name: http - name: {{ .Values.service.name | default "http" }}
port: {{ .Values.service.port }} port: {{ .Values.service.port }}
protocol: TCP protocol: TCP
targetPort: http targetPort: http
{{ if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }} {{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
nodePort: {{.Values.service.nodePort}} nodePort: {{ .Values.service.nodePort }}
{{ end }} {{- end }}
selector: selector:
app.kubernetes.io/name: {{ include "jellyfin.name" . }} {{- include "jellyfin.selectorLabels" . | nindent 4 }}
app.kubernetes.io/instance: {{ .Release.Name }}
@@ -0,0 +1,48 @@
{{- if and .Values.metrics.serviceMonitor.enabled .Values.metrics.enabled }}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "jellyfin.fullname" . }}
{{- if .Values.metrics.serviceMonitor.namespace }}
namespace: {{ tpl .Values.metrics.serviceMonitor.namespace . }}
{{- end }}
labels:
{{- include "jellyfin.labels" . | nindent 4 }}
{{- with .Values.metrics.serviceMonitor.labels }}
{{- tpl (toYaml . | nindent 4) $ }}
{{- end }}
spec:
endpoints:
- port: {{ .Values.service.name | default "http" }}
{{- with .Values.metrics.serviceMonitor.interval }}
interval: {{ . }}
{{- end }}
{{- with .Values.metrics.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ . }}
{{- end }}
honorLabels: true
path: {{ .Values.metrics.serviceMonitor.path }}
scheme: {{ .Values.metrics.serviceMonitor.scheme }}
{{- with .Values.metrics.serviceMonitor.tlsConfig }}
tlsConfig:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.metrics.serviceMonitor.relabelings }}
relabelings:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.metrics.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{- toYaml . | nindent 8 }}
{{- end }}
jobLabel: "{{ .Release.Name }}"
selector:
matchLabels:
app.kubernetes.io/name: {{ include "jellyfin.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- with .Values.metrics.serviceMonitor.targetLabels }}
targetLabels:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
@@ -0,0 +1,13 @@
{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "jellyfin.serviceAccountName" . }}
labels:
{{- include "jellyfin.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
{{- end }}
+203 -125
View File
@@ -1,174 +1,252 @@
# -- Number of jellyfin replicas to start. Should be left at 1 # Default values for Jellyfin.
# This is a YAML-formatted file.
# -- Number of Jellyfin replicas to start. Should be left at 1.
replicaCount: 1 replicaCount: 1
# -- Image pull secrets to authenticate with private repositories.
# See: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
imagePullSecrets: [] imagePullSecrets: []
image: image:
# -- Set cutom repository for jellyfin image # -- Container image repository for Jellyfin.
repository: docker.io/jellyfin/jellyfin repository: docker.io/jellyfin/jellyfin
# -- Set jellyfin version which should be required since chart is updated with new versions automatically # -- Jellyfin container image tag. Leave empty to automatically use the Chart's app version.
tag: "" tag: ""
# -- Image pull policy (Always, IfNotPresent, or Never).
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# -- Override the default name of the chart.
nameOverride: "" nameOverride: ""
# -- Override the default full name of the chart.
fullnameOverride: "" fullnameOverride: ""
# -- Setting this to true enables DLNA which requires the pod to be attached to the # -- Service account configuration. See: https://kubernetes.io/docs/concepts/security/service-accounts/
# host network in order to be useful - this can break things like ingress to the service serviceAccount:
# https://jellyfin.org/docs/general/networking/dlna.html # -- Specifies whether to create a service account.
enableDLNA: false create: true
# -- Automatically mount API credentials for the service account.
automount: true
# -- Annotations for the service account.
annotations: {}
# -- Custom name for the service account. If left empty, the name will be autogenerated.
name: ""
# -- Annotations to add to the pod.
podAnnotations: {}
# -- Additional labels to add to the pod.
podLabels: {}
# -- Security context for the pod.
podSecurityContext: {}
# fsGroup: 2000
# -- Security context for the container.
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
# -- 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: service:
# # -- Custom name for the service port
# name: http
# -- Service type (ClusterIP, NodePort, or LoadBalancer).
type: ClusterIP type: ClusterIP
# -- Configure dual-stack IP family policy. See: https://kubernetes.io/docs/concepts/services-networking/dual-stack/
ipFamilyPolicy: ""
# -- Supported IP families (IPv4, IPv6).
ipFamilies: []
# -- Specific IP address for the LoadBalancer.
loadBalancerIP: ""
# -- Class of the LoadBalancer.
loadBalancerClass: ""
# -- Source ranges allowed to access the LoadBalancer.
loadBalancerSourceRanges: []
# -- Port for the Jellyfin service.
port: 8096 port: 8096
## Specify the nodePort value for the LoadBalancer and NodePort service types. # -- Name of the port in the service.
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport portName: service
## # -- Annotations for the service.
# nodePort:
## Provide any additional annotations which may be required. This can be used to
## set the LoadBalancer service type to internal only.
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
##
annotations: {} annotations: {}
# -- Labels for the service.
labels: {} labels: {}
## Use loadBalancerIP to request a specific static IP, # -- External traffic policy (Cluster or Local).
## otherwise leave blank
##
loadBalancerIP:
# loadBalancerSourceRanges: []
## Set the externalTrafficPolicy in the Service to either Cluster or Local
# externalTrafficPolicy: Cluster # externalTrafficPolicy: Cluster
# -- NodePort for the service (if applicable).
# nodePort:
# -- Ingress configuration. See: https://kubernetes.io/docs/concepts/services-networking/ingress/
ingress: ingress:
enabled: false enabled: false
labels: {} className: ""
annotations: {} annotations: {}
# kubernetes.io/ingress.class: nginx # kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true" # kubernetes.io/tls-acme: "true"
path: /
hosts: hosts:
- chart-example.local - host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls: [] tls: []
# - secretName: chart-example-tls # - secretName: chart-example-tls
# hosts: # hosts:
# - chart-example.local # - chart-example.local
persistence: # -- Resource requests and limits for the Jellyfin container.
config:
enabled: false
# -- If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner.
storageClass: "-"
## If you want to reuse an existing claim, you can pass the name of the PVC using
## the existingClaim variable
# existingClaim: your-claim
# subPath: some-subpath
accessMode: ReadWriteOnce
size: 1Gi
# -- Custom labels to be added to the PVC
labels: {}
# -- Custom annotations to be added to the PVC
annotations: {}
media:
enabled: false
# -- If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner.
storageClass: "-"
## If you want to reuse an existing claim, you can pass the name of the PVC using
## the existingClaim variable
# existingClaim: your-claim
# subPath: some-subpath
accessMode: ReadWriteOnce
size: 10Gi
# -- Custom labels to be added to the PVC
labels: {}
# -- Custom annotations to be added to the PVC
annotations: {}
# -- Add aditional PVs/PVCs to our container. Check values.yaml to see an example.
extraExistingClaimMounts: []
# - name: external-mount
# mountPath: /srv/external-mount
## A manually managed Persistent Volume and Claim
## If defined, PVC must be created manually before volume will be bound
# existingClaim:
# readOnly: true
resources: {} resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits: # limits:
# cpu: 100m # cpu: 100m
# memory: 128Mi # memory: 128Mi
# requests: # requests:
# cpu: 100m # cpu: 100m
# memory: 128Mi # memory: 128Mi
# Define a custom runtimeClassName for the pod, e.g. "nvidia" if you have the NVIDIA GPU Operator installed # -- Configure liveness probe for Jellyfin.
runtimeClassName: livenessProbe:
initialDelaySeconds: 10
tcpSocket:
port: http
# successThreshold: 1
# failureThreshold: 3
# timeoutSeconds: 1
# periodSeconds: 10
# -- Configure readiness probe for Jellyfin.
readinessProbe:
initialDelaySeconds: 10
tcpSocket:
port: http
# successThreshold: 1
# failureThreshold: 3
# timeoutSeconds: 1
# periodSeconds: 10
# -- Additional volumes to mount in the Jellyfin pod.
volumes: []
# - name: foo
# secret:
# secretName: mysecret
# optional: false
# -- Additional volume mounts for the Jellyfin container.
volumeMounts: []
# - name: foo
# mountPath: "/etc/foo"
# readOnly: true
# -- Node selector for pod scheduling.
nodeSelector: {} nodeSelector: {}
# -- Tolerations for pod scheduling.
tolerations: [] tolerations: []
# -- Affinity rules for pod scheduling.
affinity: {} affinity: {}
# -- Define additional volumes to mount to the pod. jellyfin:
extraVolumes: [] # -- Enable DLNA. Requires host network. See: https://jellyfin.org/docs/general/networking/dlna.html
#- name: renderD129 enableDLNA: false
# hostPath: # -- Custom command to use as container entrypoint.
# path: /dev/dri/renderD129 command: []
# -- Additional arguments for the entrypoint command.
args: []
# -- Additional environment variables for the container.
env: []
# -- Define mount points for additional volumes. persistence:
extraVolumeMounts: [] config:
#- mountPath: /dev/dri/renderD129 # -- set to false to use emptyDir
# name: renderD129 enabled: true
accessMode: ReadWriteOnce
size: 5Gi
# -- Custom annotations to be added to the PVC
annotations: {}
# -- If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner.
storageClass: ''
## -- Use an existing PVC for this mount
# existingClaim: ''
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
annotations: {}
# -- If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner.
storageClass: ''
## -- Use an existing PVC for this mount
# existingClaim: ''
# -- additional pod labels. Not used as a selector label. # -- Configuration for metrics collection and monitoring
extraPodLabels: {} metrics:
# -- Enable or disable metrics collection
# -- aditional environment variables passed to the pod enabled: false
extraEnvVars: [] # -- Configuration for the Prometheus ServiceMonitor
#- name: MY_ENV_VAR serviceMonitor:
# value: my-env-var-value # -- Enable or disable the creation of a ServiceMonitor resource
enabled: false
# -- additional annotations applied to the pod # -- Namespace where the ServiceMonitor resource should be created. Defaults to Release.Namespace
extraPodAnnotations: {} namespace: ''
# -- Labels to add to the ServiceMonitor resource
labels: {}
# -- Interval at which metrics should be scraped
interval: 30s
# -- Timeout for scraping metrics
scrapeTimeout: 30s
# -- Path to scrape for metrics
path: /metrics
# -- Port to scrape for metrics
port: 8096
# -- Scheme to use for scraping metrics (http or https)
scheme: http
# -- TLS configuration for scraping metrics
tlsConfig: {}
# -- Relabeling rules for the scraped metrics
relabelings: []
# -- Relabeling rules for the metrics before ingestion
metricRelabelings: []
# -- Target labels to add to the scraped metrics
targetLabels: []
# -- additional init containers to run inside the pod. # -- additional init containers to run inside the pod.
extraInitContainers: [] extraInitContainers: []
# -- additional sidecar containers to run inside the pod. # -- additional sidecar containers to run inside the pod.
extraContainers: [] extraContainers: []
# -- SecurityContext configuration for the Jellyfin pod
podSecurityContext: {}
# Jellyfin can be run as an unprivileged user with the following settings:
# runAsUser: 65534
# runAsGroup: 65534
# -- SecurityContext configuration for the Jellyfin container
securityContext: {}
# For example, you might need to grant the following capabilities to enable hardware acceleration when mounting a /dev/dri device:
# capabilities:
# add:
# - "SYS_ADMIN"
# drop:
# - "ALL"
# -- Larger libraries may need to increase the readinessProbe and livenessProbe timeouts. Start by increasing the initialDelaySeconds.
livenessProbe:
enabled: true
# failureThreshold: 3
initialDelaySeconds: 10
# periodSeconds: 10
# successThreshold: 1
# timeoutSeconds: 1
# -- Larger libraries may need to increase the readinessProbe and livenessProbe timeouts. Start by increasing the initialDelaySeconds.
readinessProbe:
enabled: true
# failureThreshold: 3
initialDelaySeconds: 10
# periodSeconds: 10
# successThreshold: 1
# timeoutSeconds: 1