jellyfin: Add an initial Chart
This commit is contained in:
		
						commit
						afaa5222ed
					
				
							
								
								
									
										5
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,5 @@ | ||||
| .idea/ | ||||
| infra-charts.iml | ||||
| 
 | ||||
| # Chart dependencies | ||||
| **/charts/*.tgz | ||||
							
								
								
									
										14
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,14 @@ | ||||
| # infra-charts | ||||
| 
 | ||||
| Custom Helm Charts that do not exist like this anywhere else. | ||||
| 
 | ||||
| ## Requirements | ||||
| 
 | ||||
| - Helm | ||||
| 
 | ||||
| ## Adding/Modifying Charts | ||||
| 
 | ||||
| To create a new Helm Chart, run `helm create <name>`. Make sure to depend on the local `common` Chart as it provides | ||||
| common templates, like application labels, etc. | ||||
| 
 | ||||
| When done, run `helm lint <chart>` to lint the Helm Chart. | ||||
							
								
								
									
										23
									
								
								common/.helmignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								common/.helmignore
									
									
									
									
									
										Normal 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/ | ||||
							
								
								
									
										6
									
								
								common/Chart.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								common/Chart.yaml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | ||||
| apiVersion: v2 | ||||
| name: common | ||||
| description: Common helpers for Chart definitions | ||||
| type: library | ||||
| version: 0.1.0 | ||||
| appVersion: "1.16.0" | ||||
							
								
								
									
										5
									
								
								common/templates/_templates.tpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								common/templates/_templates.tpl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,5 @@ | ||||
| {{- define "common.app.labels" -}} | ||||
| app.kubernetes.io/name: {{ .name }} | ||||
| app.kubernetes.io/version: {{ .version }} | ||||
| app.kubernetes.io/managed-by: Helm | ||||
| {{- end }} | ||||
							
								
								
									
										0
									
								
								common/values.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								common/values.yaml
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										23
									
								
								jellyfin/.helmignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								jellyfin/.helmignore
									
									
									
									
									
										Normal 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/ | ||||
							
								
								
									
										6
									
								
								jellyfin/Chart.lock
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								jellyfin/Chart.lock
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | ||||
| dependencies: | ||||
| - name: common | ||||
|   repository: file://../common | ||||
|   version: 0.1.0 | ||||
| digest: sha256:636a65e9846bdff17cc4e65b0849061f783759a37aa51fb85ff6fd8ba5e68467 | ||||
| generated: "2025-09-29T00:12:03.73138765+02:00" | ||||
							
								
								
									
										11
									
								
								jellyfin/Chart.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								jellyfin/Chart.yaml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,11 @@ | ||||
| apiVersion: v2 | ||||
| name: jellyfin | ||||
| description: A Helm chart Jellyfin | ||||
| type: application | ||||
| version: 0.1.0 | ||||
| appVersion: "1.16.0" | ||||
| 
 | ||||
| dependencies: | ||||
|   - name: common | ||||
|     version: 0.1.0 | ||||
|     repository: "file://../common" | ||||
							
								
								
									
										60
									
								
								jellyfin/templates/deployment.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								jellyfin/templates/deployment.yaml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,60 @@ | ||||
| {{- $labelsenv := dict "name" "jellyfin" "version" .Values.imageVersion }} | ||||
| --- | ||||
| apiVersion: apps/v1 | ||||
| kind: Deployment | ||||
| metadata: | ||||
|   name: jellyfin | ||||
|   namespace: {{ .Values.namespace }} | ||||
|   labels: {{ include "common.app.labels" $labelsenv | nindent 4 }} | ||||
| spec: | ||||
|   replicas: 1 | ||||
|   selector: | ||||
|     matchLabels: {{ include "common.app.labels" $labelsenv | nindent 6 }} | ||||
|   template: | ||||
|     metadata: | ||||
|       labels: {{ include "common.app.labels" $labelsenv | nindent 8 }} | ||||
|     spec: | ||||
|       securityContext: | ||||
|         runAsUser: {{ .Values.security.user }} | ||||
|         runAsGroup: {{ .Values.security.group }} | ||||
|         runAsNonRoot: true | ||||
|         capabilities: | ||||
|           drop: | ||||
|             - ALL | ||||
|       containers: | ||||
|         - name: jellyfin | ||||
|           image: "{{ .Values.image }}:{{ .Values.imageVersion }}" | ||||
|           env: | ||||
|             - name: JELLYFIN_PublishedServerUrl | ||||
|               value: {{ .Values.network.externalUrl | quote }} | ||||
|           ports: | ||||
|             - containerPort: 8096 | ||||
|               protocol: TCP | ||||
|               name: http | ||||
|           livenessProbe: | ||||
|             httpGet: | ||||
|               path: /System/Ping | ||||
|               port: http | ||||
|               scheme: HTTP | ||||
|           readinessProbe: | ||||
|             httpGet: | ||||
|               path: /System/Ping | ||||
|               port: http | ||||
|               scheme: HTTP | ||||
|           volumeMounts: | ||||
|             - name: storage | ||||
|               mountPath: /storage | ||||
|             - name: config | ||||
|               mountPath: /config | ||||
|             - name: cache | ||||
|               mountPath: /var/cache/jellyfin | ||||
|       volumes: | ||||
|         - name: storage | ||||
|           persistentVolumeClaim: | ||||
|             claimName: {{ .Values.storage.data.claimName }} | ||||
|         - name: cache | ||||
|           persistentVolumeClaim: | ||||
|             claimName: {{ .Values.storage.cache.claimName }} | ||||
|         - name: config | ||||
|           persistentVolumeClaim: | ||||
|             claimName: {{ .Values.storage.config.claimName }} | ||||
							
								
								
									
										45
									
								
								jellyfin/templates/persistentvolumeclaim.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								jellyfin/templates/persistentvolumeclaim.yaml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,45 @@ | ||||
| {{- if .Values.storage.local }} | ||||
| {{- $labelsenv := dict "name" "jellyfin" "version" .Values.imageVersion }} | ||||
| --- | ||||
| apiVersion: v1 | ||||
| kind: PersistentVolumeClaim | ||||
| metadata: | ||||
|   name: {{ .Values.storage.config.claimName }} | ||||
|   namespace: {{ .Values.namespace }} | ||||
|   labels: {{ include "common.app.labels" $labelsenv | nindent 4 }} | ||||
| spec: | ||||
|   storageClassName: local-path | ||||
|   accessModes: | ||||
|     - ReadWriteOnce | ||||
|   resources: | ||||
|     requests: | ||||
|       storage: {{ .Values.storage.config.size }} | ||||
| --- | ||||
| apiVersion: v1 | ||||
| kind: PersistentVolumeClaim | ||||
| metadata: | ||||
|   name: {{ .Values.storage.cache.claimName }} | ||||
|   namespace: {{ .Values.namespace }} | ||||
|   labels: {{ include "common.app.labels" $labelsenv | nindent 4 }} | ||||
| spec: | ||||
|   storageClassName: local-path | ||||
|   accessModes: | ||||
|     - ReadWriteOnce | ||||
|   resources: | ||||
|     requests: | ||||
|       storage: {{ .Values.storage.cache.size }} | ||||
| --- | ||||
| apiVersion: v1 | ||||
| kind: PersistentVolumeClaim | ||||
| metadata: | ||||
|   name: {{ .Values.storage.data.claimName }} | ||||
|   namespace: {{ .Values.namespace }} | ||||
|   labels: {{ include "common.app.labels" $labelsenv | nindent 4 }} | ||||
| spec: | ||||
|   storageClassName: local-path | ||||
|   accessModes: | ||||
|     - ReadWriteOnce | ||||
|   resources: | ||||
|     requests: | ||||
|       storage: {{ .Values.storage.data.size }} | ||||
| {{- end }} | ||||
							
								
								
									
										15
									
								
								jellyfin/templates/service.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								jellyfin/templates/service.yaml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| {{- $labelsenv := dict "name" "jellyfin" "version" .Values.imageVersion }} | ||||
| --- | ||||
| apiVersion: v1 | ||||
| kind: Service | ||||
| metadata: | ||||
|   name: jellyfin | ||||
|   namespace: {{ .Values.namespace }} | ||||
|   labels: {{ include "common.app.labels" $labelsenv | nindent 4 }} | ||||
| spec: | ||||
|   selector: {{ include "common.app.labels" $labelsenv | nindent 4 }} | ||||
|   ports: | ||||
|     - port: 8096 | ||||
|       protocol: TCP | ||||
|       name: http | ||||
|   type: ClusterIP | ||||
							
								
								
									
										22
									
								
								jellyfin/values.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								jellyfin/values.yaml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,22 @@ | ||||
| image: jellyfin/jellyfin | ||||
| imageVersion: 10.10.6 | ||||
| namespace: default | ||||
| 
 | ||||
| network: | ||||
|   externalUrl: "http://localhost:8080" | ||||
| 
 | ||||
| storage: | ||||
|   local: true | ||||
|   data: | ||||
|     claimName: "data-pvc" | ||||
|     size: 2Gi | ||||
|   config: | ||||
|     claimName: "config-pvc" | ||||
|     size: 2Gi | ||||
|   cache: | ||||
|     claimName: "cache-pvc" | ||||
|     size: 2Gi | ||||
| 
 | ||||
| security: | ||||
|   user: 10000 | ||||
|   group: 10000 | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user