-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(charts): Add Jellyfin
- Loading branch information
Showing
10 changed files
with
735 additions
and
414 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ bin | |
*.swo | ||
*~ | ||
kubeserver.yml | ||
my-values.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
apiVersion: v2 | ||
appVersion: 0.9.2 | ||
appVersion: 0.10.0 | ||
description: A Helm chart for Kubernetes mediaserver | ||
name: k8s-mediaserver | ||
type: application | ||
version: 0.9.2 | ||
version: 0.10.0 |
157 changes: 157 additions & 0 deletions
157
helm-charts/k8s-mediaserver/templates/jellyfin-resources.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
{{ if .Values.jellyfin.enabled }} | ||
--- | ||
### CONFIGMAP | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: jellyfin-config | ||
data: | ||
PGID: "{{ .Values.general.pgid }}" | ||
PUID: "{{ .Values.general.puid }}" | ||
--- | ||
### DEPLOYMENT | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: jellyfin | ||
labels: | ||
{{- include "k8s-mediaserver.labels" . | nindent 4 }} | ||
spec: | ||
replicas: {{ .Values.jellyfin.replicaCount }} | ||
selector: | ||
matchLabels: | ||
{{- include "k8s-mediaserver.selectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "k8s-mediaserver.selectorLabels" . | nindent 8 }} | ||
app: jellyfin | ||
spec: | ||
volumes: | ||
{{- if not .Values.general.storage.customVolume }} | ||
- name: mediaserver-volume | ||
persistentVolumeClaim: | ||
claimName: {{ .Values.general.storage.pvcName }} | ||
{{- else }} | ||
- name: mediaserver-volume | ||
{{- toYaml .Values.general.storage.volumes | nindent 10 }} | ||
{{- end }} | ||
{{- if .Values.jellyfin.volume }} | ||
- name: {{ .Values.jellyfin.volume.name }} | ||
persistentVolumeClaim: | ||
claimName: {{ .Values.jellyfin.volume.name }} | ||
{{- end }} | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
envFrom: | ||
- configMapRef: | ||
name: jellyfin-config | ||
image: "{{ .Values.jellyfin.container.image }}:{{ .Values.jellyfin.container.tag | default .Values.general.image_tag }}" | ||
imagePullPolicy: Always | ||
readinessProbe: | ||
tcpSocket: | ||
port: {{ .Values.jellyfin.container.port }} | ||
initialDelaySeconds: 20 | ||
periodSeconds: 15 | ||
ports: | ||
- name: jellyfin-port | ||
containerPort: {{ .Values.jellyfin.container.port }} | ||
protocol: TCP | ||
volumeMounts: | ||
{{- if .Values.jellyfin.volume }} | ||
- name: {{ .Values.jellyfin.volume.name }} | ||
mountPath: /config | ||
{{- else }} | ||
- name: mediaserver-volume | ||
mountPath: /config | ||
subPath: "{{ .Values.general.storage.subPaths.config }}/jellyfin" | ||
{{- end }} | ||
- name: mediaserver-volume | ||
mountPath: /movies | ||
subPath: "{{ .Values.general.storage.subPaths.movies }}" | ||
- name: mediaserver-volume | ||
mountPath: /tv | ||
subPath: "{{ .Values.general.storage.subPaths.tv }}" | ||
{{- with .Values.jellyfin.resources }} | ||
resources: | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
{{- with .Values.general.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
--- | ||
### SERVICE | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: jellyfin | ||
labels: | ||
{{- include "k8s-mediaserver.labels" . | nindent 4 }} | ||
spec: | ||
type: {{ .Values.jellyfin.service.type }} | ||
ports: | ||
- port: {{ .Values.jellyfin.service.port }} | ||
targetPort: {{ .Values.jellyfin.container.port }} | ||
protocol: TCP | ||
name: jellyfin-port | ||
{{ if eq .Values.jellyfin.service.type "NodePort" }} | ||
nodePort: {{ .Values.jellyfin.service.nodePort }} | ||
{{ end }} | ||
selector: | ||
app: jellyfin | ||
|
||
--- | ||
{{ if .Values.jellyfin.service.extraLBService }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: jellyfin-lb | ||
annotations: | ||
{{- include .Values.jellyfin.service.extraLBService.annotations . | nindent 4 }} | ||
labels: | ||
{{- include "k8s-mediaserver.labels" . | nindent 4 }} | ||
spec: | ||
type: LoadBalancer | ||
ports: | ||
- port: {{ .Values.jellyfin.service.port }} | ||
targetPort: {{ .Values.jellyfin.container.port }} | ||
protocol: TCP | ||
name: jellyfin-port | ||
selector: | ||
app: jellyfin | ||
{{ end }} | ||
--- | ||
### INGRESS | ||
{{ if .Values.jellyfin.ingress.enabled }} | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: jellyfin | ||
labels: | ||
{{- include "k8s-mediaserver.labels" . | nindent 4 }} | ||
{{- with .Values.jellyfin.ingress.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if .Values.jellyfin.ingress.tls.enabled }} | ||
tls: | ||
- hosts: | ||
- {{ .Values.general.jellyfin_ingress_host | quote }} | ||
secretName: {{ .Values.jellyfin.ingress.tls.secretName }} | ||
{{ end }} | ||
ingressClassName: {{ .Values.general.ingress.ingressClassName }} | ||
rules: | ||
- host: {{ .Values.general.jellyfin_ingress_host | quote }} | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: jellyfin | ||
port: | ||
number: {{ .Values.jellyfin.service.port }} | ||
{{ end }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.