diff --git a/helm-charts/k8s-mediaserver/.helmignore b/helm-charts/k8s-mediaserver/.helmignore
deleted file mode 100644
index 0e8a0eb..0000000
--- a/helm-charts/k8s-mediaserver/.helmignore
+++ /dev/null
@@ -1,23 +0,0 @@
-# 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/
diff --git a/helm-charts/k8s-mediaserver/Chart.lock b/helm-charts/k8s-mediaserver/Chart.lock
new file mode 100644
index 0000000..013d0dd
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/Chart.lock
@@ -0,0 +1,27 @@
+dependencies:
+- name: k8s-jackett
+ repository: file://./jackett
+ version: 0.9.1
+- name: k8s-sonarr
+ repository: file://./sonarr
+ version: 0.9.1
+- name: k8s-radarr
+ repository: file://./radarr
+ version: 0.9.1
+- name: k8s-prowlarr
+ repository: file://./prowlarr
+ version: 0.9.1
+- name: k8s-sabnzbd
+ repository: file://./sabnzbd
+ version: 0.9.1
+- name: k8s-plex
+ repository: file://./plex
+ version: 0.9.1
+- name: k8s-jellyfin
+ repository: file://./jellyfin/
+ version: 0.9.1
+- name: k8s-transmission
+ repository: file://./transmission/
+ version: 0.9.1
+digest: sha256:842c38872ca31d1fe4bc2b995317d96e9987a7c81f32c85f9448b9e6c54d97c2
+generated: "2023-12-30T15:57:55.62729-06:00"
diff --git a/helm-charts/k8s-mediaserver/Chart.yaml b/helm-charts/k8s-mediaserver/Chart.yaml
index 6fc6f7a..6c7bfb6 100644
--- a/helm-charts/k8s-mediaserver/Chart.yaml
+++ b/helm-charts/k8s-mediaserver/Chart.yaml
@@ -1,6 +1,39 @@
apiVersion: v2
appVersion: 0.9.1
-description: A Helm chart for Kubernetes mediaserver
+description: A Helm chart for kubernetes based Media services.
name: k8s-mediaserver
type: application
version: 0.9.1
+dependencies:
+- name: k8s-jackett
+ version: ^0.9.0
+ repository: "file://./jackett"
+ condition: jackett.enabled
+- name: k8s-sonarr
+ version: ^0.9.0
+ repository: "file://./sonarr"
+ condition: sonarr.enabled
+- name: k8s-radarr
+ version: ^0.9.0
+ repository: "file://./radarr"
+ condition: radarr.enabled
+- name: k8s-prowlarr
+ version: ^0.9.0
+ repository: "file://./prowlarr"
+ condition: prowlarr.enabled
+- name: k8s-sabnzbd
+ version: ^0.9.0
+ repository: "file://./sabnzbd"
+ condition: sabnzbd.enabled
+- name: k8s-plex
+ version: ^0.9.0
+ repository: "file://./plex"
+ condition: plex.enabled
+- name: k8s-jellyfin
+ version: ^0.9.0
+ repository: "file://./jellyfin/"
+ condition: jellyfin.enabled
+- name: k8s-transmission
+ version: ^0.9.0
+ repository: "file://./transmission/"
+ condition: transmission.enabled
diff --git a/helm-charts/k8s-mediaserver/charts/k8s-jackett-0.9.1.tgz b/helm-charts/k8s-mediaserver/charts/k8s-jackett-0.9.1.tgz
new file mode 100644
index 0000000..c979d87
Binary files /dev/null and b/helm-charts/k8s-mediaserver/charts/k8s-jackett-0.9.1.tgz differ
diff --git a/helm-charts/k8s-mediaserver/charts/k8s-jellyfin-0.9.1.tgz b/helm-charts/k8s-mediaserver/charts/k8s-jellyfin-0.9.1.tgz
new file mode 100644
index 0000000..4023f38
Binary files /dev/null and b/helm-charts/k8s-mediaserver/charts/k8s-jellyfin-0.9.1.tgz differ
diff --git a/helm-charts/k8s-mediaserver/charts/k8s-plex-0.9.1.tgz b/helm-charts/k8s-mediaserver/charts/k8s-plex-0.9.1.tgz
new file mode 100644
index 0000000..527cea0
Binary files /dev/null and b/helm-charts/k8s-mediaserver/charts/k8s-plex-0.9.1.tgz differ
diff --git a/helm-charts/k8s-mediaserver/charts/k8s-prowlarr-0.9.1.tgz b/helm-charts/k8s-mediaserver/charts/k8s-prowlarr-0.9.1.tgz
new file mode 100644
index 0000000..562a18f
Binary files /dev/null and b/helm-charts/k8s-mediaserver/charts/k8s-prowlarr-0.9.1.tgz differ
diff --git a/helm-charts/k8s-mediaserver/charts/k8s-radarr-0.9.1.tgz b/helm-charts/k8s-mediaserver/charts/k8s-radarr-0.9.1.tgz
new file mode 100644
index 0000000..7057afb
Binary files /dev/null and b/helm-charts/k8s-mediaserver/charts/k8s-radarr-0.9.1.tgz differ
diff --git a/helm-charts/k8s-mediaserver/charts/k8s-sabnzbd-0.9.1.tgz b/helm-charts/k8s-mediaserver/charts/k8s-sabnzbd-0.9.1.tgz
new file mode 100644
index 0000000..8f3ad3d
Binary files /dev/null and b/helm-charts/k8s-mediaserver/charts/k8s-sabnzbd-0.9.1.tgz differ
diff --git a/helm-charts/k8s-mediaserver/charts/k8s-sonarr-0.9.1.tgz b/helm-charts/k8s-mediaserver/charts/k8s-sonarr-0.9.1.tgz
new file mode 100644
index 0000000..d5a9f4b
Binary files /dev/null and b/helm-charts/k8s-mediaserver/charts/k8s-sonarr-0.9.1.tgz differ
diff --git a/helm-charts/k8s-mediaserver/charts/k8s-transmission-0.9.1.tgz b/helm-charts/k8s-mediaserver/charts/k8s-transmission-0.9.1.tgz
new file mode 100644
index 0000000..081c888
Binary files /dev/null and b/helm-charts/k8s-mediaserver/charts/k8s-transmission-0.9.1.tgz differ
diff --git a/helm-charts/k8s-mediaserver/jackett/Chart.yaml b/helm-charts/k8s-mediaserver/jackett/Chart.yaml
new file mode 100644
index 0000000..35df89c
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/jackett/Chart.yaml
@@ -0,0 +1,7 @@
+apiVersion: v2
+appVersion: 0.9.1
+description: A Helm chart for kubernetes based jackett service.
+name: k8s-jackett
+type: application
+version: 0.9.1
+
diff --git a/helm-charts/k8s-mediaserver/templates/_helpers.tpl b/helm-charts/k8s-mediaserver/jackett/templates/_helpers.tpl
similarity index 100%
rename from helm-charts/k8s-mediaserver/templates/_helpers.tpl
rename to helm-charts/k8s-mediaserver/jackett/templates/_helpers.tpl
diff --git a/helm-charts/k8s-mediaserver/templates/jackett-resources.yml b/helm-charts/k8s-mediaserver/jackett/templates/jackett-resources.yml
similarity index 62%
rename from helm-charts/k8s-mediaserver/templates/jackett-resources.yml
rename to helm-charts/k8s-mediaserver/jackett/templates/jackett-resources.yml
index e9c96d4..1a8eb45 100644
--- a/helm-charts/k8s-mediaserver/templates/jackett-resources.yml
+++ b/helm-charts/k8s-mediaserver/jackett/templates/jackett-resources.yml
@@ -1,12 +1,10 @@
-{{ if .Values.jackett.enabled }}
----
### CONFIGMAPS
## INIT-CONTAINER
apiVersion: v1
data:
ServerConfig.json: |
{
- "BasePathOverride": "{{ .Values.jackett.ingress.path }}"
+ "BasePathOverride": "{{ .Values.ingress.path }}"
}
init-jackett.sh: |
#!/bin/bash
@@ -25,8 +23,8 @@ kind: ConfigMap
metadata:
name: jackett-config
data:
- PGID: "{{ .Values.general.pgid }}"
- PUID: "{{ .Values.general.puid }}"
+ PGID: "{{ .Values.global.pgid }}"
+ PUID: "{{ .Values.global.puid }}"
---
### DEPLOYMENT
apiVersion: apps/v1
@@ -53,70 +51,70 @@ spec:
volumeMounts:
- mountPath: /init-jackett
name: init-files-jackett
- {{- if .Values.jackett.volume }}
- - name: {{ .Values.jackett.volume.name }}
+ {{- if .Values.volume }}
+ - name: {{ .Values.volume.name }}
mountPath: /jackett-config
{{- else }}
- name: mediaserver-volume
mountPath: /jackett-config
- subPath: "{{ .Values.general.storage.subPaths.config }}/jackett/Jackett"
+ subPath: "{{ .Values.global.storage.subPaths.config }}/jackett/Jackett"
{{- end }}
securityContext:
- runAsUser: {{ .Values.general.puid }}
- runAsGroup: {{ .Values.general.pgid }}
+ runAsUser: {{ .Values.global.puid }}
+ runAsGroup: {{ .Values.global.pgid }}
containers:
- name: {{ .Chart.Name }}
envFrom:
- configMapRef:
name: jackett-config
- image: "{{ .Values.jackett.container.image }}:{{ .Values.jackett.container.tag | default .Values.general.image_tag }}"
+ image: "{{ .Values.container.image }}:{{ .Values.container.tag | default .Values.global.image_tag }}"
imagePullPolicy: Always
readinessProbe:
httpGet:
- port: {{ .Values.jackett.container.port }}
+ port: {{ .Values.container.port }}
path: /{{ .Values.radarr.ingress.path }}/UI/Dashboard
initialDelaySeconds: 5
periodSeconds: 10
ports:
- name: jackett-port
- containerPort: {{ .Values.jackett.container.port }}
+ containerPort: {{ .Values.container.port }}
protocol: TCP
volumeMounts:
- {{- if .Values.jackett.volume }}
- - name: {{ .Values.jackett.volume.name }}
+ {{- if .Values.volume }}
+ - name: {{ .Values.volume.name }}
mountPath: /config
{{- else }}
- name: mediaserver-volume
mountPath: "/config"
- subPath: "{{ .Values.general.storage.subPaths.config }}/jackett"
+ subPath: "{{ .Values.global.storage.subPaths.config }}/jackett"
{{- end }}
- {{- with .Values.jackett.resources }}
+ {{- with .Values.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
volumes:
- {{- if not .Values.general.storage.customVolume }}
+ {{- if not .Values.global.storage.customVolume }}
- name: mediaserver-volume
persistentVolumeClaim:
- claimName: {{ .Values.general.storage.pvcName }}
+ claimName: {{ .Values.global.storage.pvcName }}
{{- else }}
- name: mediaserver-volume
- {{- toYaml .Values.general.storage.volumes | nindent 10 }}
+ {{- toYaml .Values.global.storage.volumes | nindent 10 }}
{{- end }}
- {{- if .Values.jackett.volume }}
- - name: {{ .Values.jackett.volume.name }}
+ {{- if .Values.volume }}
+ - name: {{ .Values.volume.name }}
persistentVolumeClaim:
- claimName: {{ .Values.jackett.volume.name }}
+ claimName: {{ .Values.volume.name }}
{{- end }}
- name: init-files-jackett
configMap:
defaultMode: 493
name: init-jackett-cm
- {{- with merge .Values.jackett.container.nodeSelector .Values.general.nodeSelector }}
+ {{- with merge .Values.container.nodeSelector .Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
- {{- if eq .Values.general.podDistribution "cluster" }}
+ {{- if eq .Values.global.podDistribution "cluster" }}
affinity:
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
@@ -129,7 +127,7 @@ spec:
- {{ .Release.Name }}
topologyKey: "kubernetes.io/hostname"
weight: 100
- {{- else if eq .Values.general.podDistribution "spread" }}
+ {{- else if eq .Values.global.podDistribution "spread" }}
topologySpreadConstraints:
- maxSkew: 1
topologyKey: "kubernetes.io/hostname"
@@ -147,25 +145,25 @@ metadata:
labels:
{{- include "k8s-mediaserver.labels" . | nindent 4 }}
spec:
- type: {{ .Values.jackett.service.type }}
+ type: {{ .Values.service.type }}
ports:
- - port: {{ .Values.jackett.service.port }}
- targetPort: {{ .Values.jackett.container.port }}
+ - port: {{ .Values.service.port }}
+ targetPort: {{ .Values.container.port }}
protocol: TCP
-{{ if eq .Values.jackett.service.type "NodePort" }}
- nodePort: {{ .Values.jackett.service.nodePort }}
+{{ if eq .Values.service.type "NodePort" }}
+ nodePort: {{ .Values.service.nodePort }}
{{ end }}
name: jackett-port
selector:
app: jackett
---
-{{ if .Values.jackett.service.extraLBService }}
+{{ if .Values.service.extraLBService }}
apiVersion: v1
kind: Service
metadata:
name: jackett-lb
- {{- with .Values.jackett.service.extraLBAnnotations }}
+ {{- with .Values.service.extraLBAnnotations }}
annotations:
{{- . | toYaml | nindent 4 }}
{{- end }}
@@ -174,8 +172,8 @@ metadata:
spec:
type: LoadBalancer
ports:
- - port: {{ .Values.jackett.service.port }}
- targetPort: {{ .Values.jackett.container.port }}
+ - port: {{ .Values.service.port }}
+ targetPort: {{ .Values.container.port }}
protocol: TCP
name: jackett-port
selector:
@@ -184,35 +182,34 @@ spec:
---
### INGRESS
-{{ if .Values.jackett.ingress.enabled }}
+{{ if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: jackett
labels:
{{- include "k8s-mediaserver.labels" . | nindent 4 }}
- {{- with .Values.jackett.ingress.annotations }}
+ {{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
-{{ if .Values.jackett.ingress.tls.enabled }}
+{{ if .Values.ingress.tls.enabled }}
tls:
- hosts:
- - {{ .Values.general.ingress_host | quote }}
- secretName: {{ .Values.jackett.ingress.tls.secretName }}
+ - {{ .Values.global.ingress_host | quote }}
+ secretName: {{ .Values.ingress.tls.secretName }}
{{ end }}
- ingressClassName: {{ .Values.general.ingress.ingressClassName }}
+ ingressClassName: {{ .Values.global.ingress.ingressClassName }}
rules:
- - host: {{ .Values.general.ingress_host | quote }}
+ - host: {{ .Values.global.ingress_host | quote }}
http:
paths:
- - path: {{ .Values.jackett.ingress.path }}
+ - path: {{ .Values.ingress.path }}
pathType: Prefix
backend:
service:
name: jackett
port:
- number: {{ .Values.jackett.service.port }}
-{{ end }}
+ number: {{ .Values.service.port }}
{{ end }}
diff --git a/helm-charts/k8s-mediaserver/jackett/values.yaml b/helm-charts/k8s-mediaserver/jackett/values.yaml
new file mode 100644
index 0000000..aba4590
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/jackett/values.yaml
@@ -0,0 +1,22 @@
+container:
+ image: docker.io/linuxserver/jackett
+ nodeSelector: {}
+ port: 9117
+service:
+ type: ClusterIP
+ port: 9117
+ nodePort:
+ extraLBService: false
+ extraLBAnnotations: {}
+ingress:
+ enabled: true
+ annotations: {}
+ path: /jackett
+ tls:
+ enabled: false
+ secretName: ""
+resources: {}
+image_tag: latest
+radarr:
+ ingress:
+ path: /radarr
diff --git a/helm-charts/k8s-mediaserver/jellyfin/Chart.yaml b/helm-charts/k8s-mediaserver/jellyfin/Chart.yaml
new file mode 100644
index 0000000..4a7a965
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/jellyfin/Chart.yaml
@@ -0,0 +1,6 @@
+apiVersion: v2
+appVersion: 0.9.1
+description: A Helm chart for Kubernetes Jellyfin.
+name: k8s-jellyfin
+type: application
+version: 0.9.1
diff --git a/helm-charts/k8s-mediaserver/jellyfin/templates/_helpers.tpl b/helm-charts/k8s-mediaserver/jellyfin/templates/_helpers.tpl
new file mode 100644
index 0000000..e7783a1
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/jellyfin/templates/_helpers.tpl
@@ -0,0 +1,45 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "k8s-mediaserver.name" -}}
+{{- default .Chart.Name | trunc 63 }}
+{{- end }}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "k8s-mediaserver.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Common labels
+*/}}
+{{- define "k8s-mediaserver.labels" -}}
+helm.sh/chart: {{ include "k8s-mediaserver.chart" . }}
+{{ include "k8s-mediaserver.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end }}
+
+{{/*
+Selector labels
+*/}}
+{{- define "k8s-mediaserver.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "k8s-mediaserver.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end }}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "k8s-mediaserver.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create }}
+{{- default (include "k8s-mediaserver.fullname" .) .Values.serviceAccount.name }}
+{{- else }}
+{{- default "default" .Values.serviceAccount.name }}
+{{- end }}
+{{- end }}
diff --git a/helm-charts/k8s-mediaserver/jellyfin/templates/jellyfin-resources.yaml b/helm-charts/k8s-mediaserver/jellyfin/templates/jellyfin-resources.yaml
new file mode 100644
index 0000000..3ea93b1
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/jellyfin/templates/jellyfin-resources.yaml
@@ -0,0 +1,157 @@
+### CONFIGMAP
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: jellyfin-config
+data:
+ PGID: "{{ .Values.global.pgid }}"
+ PUID: "{{ .Values.global.puid }}"
+---
+### DEPLOYMENT
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: jellyfin
+ labels:
+ {{- include "k8s-mediaserver.labels" . | nindent 4 }}
+spec:
+ replicas: {{ .Values.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.global.storage.customVolume }}
+ - name: mediaserver-volume
+ persistentVolumeClaim:
+ claimName: {{ .Values.global.storage.pvcName }}
+ {{- else }}
+ - name: mediaserver-volume
+ {{- toYaml .Values.global.storage.volumes | nindent 10 }}
+ {{- end }}
+ {{- if .Values.volume }}
+ - name: {{ .Values.volume.name }}
+ persistentVolumeClaim:
+ claimName: {{ .Values.volume.name }}
+ {{- end }}
+ containers:
+ - name: {{ .Chart.Name }}
+ envFrom:
+ - configMapRef:
+ name: jellyfin-config
+ image: "{{ .Values.container.image }}:{{ .Values.container.tag | default .Values.global.image_tag }}"
+ imagePullPolicy: Always
+ readinessProbe:
+ tcpSocket:
+ port: {{ .Values.container.port }}
+ initialDelaySeconds: 20
+ periodSeconds: 15
+ ports:
+ - name: jellyfin-port
+ containerPort: {{ .Values.container.port }}
+ protocol: TCP
+ volumeMounts:
+ {{- if .Values.volume }}
+ - name: {{ .Values.volume.name }}
+ mountPath: /config
+ {{- else }}
+ - name: mediaserver-volume
+ mountPath: /config
+ subPath: "{{ .Values.global.storage.subPaths.config }}/jellyfin"
+ {{- end }}
+ - name: mediaserver-volume
+ mountPath: /movies
+ subPath: "{{ .Values.global.storage.subPaths.movies }}"
+ - name: mediaserver-volume
+ mountPath: /books
+ subPath: media/books
+ - name: mediaserver-volume
+ mountPath: /tv
+ subPath: "{{ .Values.global.storage.subPaths.tv }}"
+ {{- with .Values.resources }}
+ resources:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
+ {{- with .Values.global.nodeSelector }}
+ nodeSelector:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+---
+### SERVICE
+apiVersion: v1
+kind: Service
+metadata:
+ name: jellyfin
+ labels:
+ {{- include "k8s-mediaserver.labels" . | nindent 4 }}
+spec:
+ type: {{ .Values.service.type }}
+ ports:
+ - port: {{ .Values.service.port }}
+ targetPort: {{ .Values.container.port }}
+ protocol: TCP
+ name: jellyfin-port
+{{ if eq .Values.service.type "NodePort" }}
+ nodePort: {{ .Values.service.nodePort }}
+{{ end }}
+ selector:
+ app: jellyfin
+
+---
+{{ if .Values.service.extraLBService }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: jellyfin-lb
+ annotations:
+ {{- include .Values.service.extraLBService.annotations . | nindent 4 }}
+ labels:
+ {{- include "k8s-mediaserver.labels" . | nindent 4 }}
+spec:
+ type: LoadBalancer
+ ports:
+ - port: {{ .Values.service.port }}
+ targetPort: {{ .Values.container.port }}
+ protocol: TCP
+ name: jellyfin-port
+ selector:
+ app: jellyfin
+{{ end }}
+---
+### INGRESS
+{{ if .Values.ingress.enabled }}
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+ name: jellyfin
+ labels:
+ {{- include "k8s-mediaserver.labels" . | nindent 4 }}
+ {{- with .Values.ingress.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+{{- if .Values.ingress.tls.enabled }}
+ tls:
+ - hosts:
+ - {{ .Values.global.jellyfin_ingress_host | quote }}
+ secretName: {{ .Values.ingress.tls.secretName }}
+{{ end }}
+ ingressClassName: {{ .Values.global.ingress.ingressClassName }}
+ rules:
+ - host: {{ .Values.global.jellyfin_ingress_host | quote }}
+ http:
+ paths:
+ - path: /
+ pathType: Prefix
+ backend:
+ service:
+ name: jellyfin
+ port:
+ number: {{ .Values.service.port }}
+{{ end }}
diff --git a/helm-charts/k8s-mediaserver/jellyfin/values.yaml b/helm-charts/k8s-mediaserver/jellyfin/values.yaml
new file mode 100644
index 0000000..5f9b39e
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/jellyfin/values.yaml
@@ -0,0 +1,46 @@
+replicaCount: 1
+container:
+ image: docker.io/linuxserver/jellyfin
+ nodeSelector: {}
+ port: 8096
+service:
+ type: ClusterIP
+ port: 8096
+ nodePort:
+ extraLBService: false
+ingress:
+ enabled: true
+ annotations: {}
+ tls:
+ enabled: false
+ secretName: ""
+resources: {}
+volume: {}
+
+global:
+ ingress_host: k8s-mediaserver.k8s.test
+ ingress:
+ ingressClassName: ""
+ image_tag: latest
+ podDistribution: cluster # can be "spread" or "cluster"
+ #UID to run the process with
+ puid: 1000
+ #GID to run the process with
+ pgid: 1000
+ #Persistent storage selections and pathing
+ storage:
+ customVolume: false #set to true if not using a PVC (must provide volume below)
+ accessMode: ""
+ pvcName: mediaserver-pvc
+ size: 5Gi
+ pvcStorageClass: ""
+ # the path starting from the top level of the pv you're passing. If your share is server.local/share/, then tv is server.local/share/media/tv
+ subPaths:
+ tv: media/tv
+ movies: media/movies
+ downloads: downloads
+ transmission: transmission
+ sabnzbd: sabnzbd
+ config: config
+ volumes: {}
+ nodeSelector: {}
diff --git a/helm-charts/k8s-mediaserver/plex/Chart.yaml b/helm-charts/k8s-mediaserver/plex/Chart.yaml
new file mode 100644
index 0000000..8a79157
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/plex/Chart.yaml
@@ -0,0 +1,6 @@
+apiVersion: v2
+appVersion: 0.9.1
+description: A Helm chart for kubernetes based Plex.
+name: k8s-plex
+type: application
+version: 0.9.1
diff --git a/helm-charts/k8s-mediaserver/plex/templates/_helpers.tpl b/helm-charts/k8s-mediaserver/plex/templates/_helpers.tpl
new file mode 100644
index 0000000..e7783a1
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/plex/templates/_helpers.tpl
@@ -0,0 +1,45 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "k8s-mediaserver.name" -}}
+{{- default .Chart.Name | trunc 63 }}
+{{- end }}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "k8s-mediaserver.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Common labels
+*/}}
+{{- define "k8s-mediaserver.labels" -}}
+helm.sh/chart: {{ include "k8s-mediaserver.chart" . }}
+{{ include "k8s-mediaserver.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end }}
+
+{{/*
+Selector labels
+*/}}
+{{- define "k8s-mediaserver.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "k8s-mediaserver.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end }}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "k8s-mediaserver.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create }}
+{{- default (include "k8s-mediaserver.fullname" .) .Values.serviceAccount.name }}
+{{- else }}
+{{- default "default" .Values.serviceAccount.name }}
+{{- end }}
+{{- end }}
diff --git a/helm-charts/k8s-mediaserver/templates/plex-resources.yml b/helm-charts/k8s-mediaserver/plex/templates/plex-resources.yml
similarity index 59%
rename from helm-charts/k8s-mediaserver/templates/plex-resources.yml
rename to helm-charts/k8s-mediaserver/plex/templates/plex-resources.yml
index fc06c6c..7555321 100644
--- a/helm-charts/k8s-mediaserver/templates/plex-resources.yml
+++ b/helm-charts/k8s-mediaserver/plex/templates/plex-resources.yml
@@ -1,14 +1,12 @@
-{{ if .Values.plex.enabled }}
----
### CONFIGMAP
apiVersion: v1
kind: ConfigMap
metadata:
name: plex-config
data:
- PGID: "{{ .Values.general.pgid }}"
- PUID: "{{ .Values.general.puid }}"
- PLEX_CLAIM: {{ .Values.plex.claim }}
+ PGID: "{{ .Values.global.pgid }}"
+ PUID: "{{ .Values.global.puid }}"
+ PLEX_CLAIM: {{ .Values.claim }}
---
### DEPLOYMENT
apiVersion: apps/v1
@@ -20,7 +18,7 @@ metadata:
spec:
strategy:
type: Recreate
- replicas: {{ .Values.plex.replicaCount }}
+ replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "k8s-mediaserver.selectorLabels" . | nindent 6 }}
@@ -31,60 +29,60 @@ spec:
app: plex
spec:
volumes:
- {{- if not .Values.general.storage.customVolume }}
+ {{- if not .Values.global.storage.customVolume }}
- name: mediaserver-volume
persistentVolumeClaim:
- claimName: {{ .Values.general.storage.pvcName }}
+ claimName: {{ .Values.global.storage.pvcName }}
{{- else }}
- name: mediaserver-volume
- {{- toYaml .Values.general.storage.volumes | nindent 10 }}
+ {{- toYaml .Values.global.storage.volumes | nindent 10 }}
{{- end }}
- {{- if .Values.plex.volume }}
- - name: {{ .Values.plex.volume.name }}
+ {{- if .Values.volume }}
+ - name: {{ .Values.volume.name }}
persistentVolumeClaim:
- claimName: {{ .Values.plex.volume.name }}
+ claimName: {{ .Values.volume.name }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
envFrom:
- configMapRef:
name: plex-config
- image: "{{ .Values.plex.container.image }}:{{ .Values.plex.container.tag | default .Values.general.image_tag }}"
+ image: "{{ .Values.container.image }}:{{ .Values.container.tag | default .Values.global.image_tag }}"
imagePullPolicy: Always
readinessProbe:
httpGet:
- port: {{ .Values.plex.container.port }}
+ port: {{ .Values.container.port }}
path: "/"
initialDelaySeconds: 20
periodSeconds: 15
ports:
- name: plex-port
- containerPort: {{ .Values.plex.container.port }}
+ containerPort: {{ .Values.container.port }}
protocol: TCP
volumeMounts:
- {{- if .Values.plex.volume }}
- - name: {{ .Values.plex.volume.name }}
+ {{- if .Values.volume }}
+ - name: {{ .Values.volume.name }}
mountPath: /config
{{- else }}
- name: mediaserver-volume
mountPath: /config
- subPath: "{{ .Values.general.storage.subPaths.config }}/plex"
+ subPath: "{{ .Values.global.storage.subPaths.config }}/plex"
{{- end }}
- name: mediaserver-volume
mountPath: /movies
- subPath: "{{ .Values.general.storage.subPaths.movies }}"
+ subPath: "{{ .Values.global.storage.subPaths.movies }}"
- name: mediaserver-volume
mountPath: /tv
- subPath: "{{ .Values.general.storage.subPaths.tv }}"
- {{- with .Values.plex.resources }}
+ subPath: "{{ .Values.global.storage.subPaths.tv }}"
+ {{- with .Values.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
- {{- with merge .Values.plex.container.nodeSelector .Values.general.nodeSelector }}
+ {{- with merge .Values.container.nodeSelector .Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
- {{- if eq .Values.general.podDistribution "cluster" }}
+ {{- if eq .Values.global.podDistribution "cluster" }}
affinity:
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
@@ -97,7 +95,7 @@ spec:
- {{ .Release.Name }}
topologyKey: "kubernetes.io/hostname"
weight: 100
- {{- else if eq .Values.general.podDistribution "spread" }}
+ {{- else if eq .Values.global.podDistribution "spread" }}
topologySpreadConstraints:
- maxSkew: 1
topologyKey: "kubernetes.io/hostname"
@@ -115,25 +113,25 @@ metadata:
labels:
{{- include "k8s-mediaserver.labels" . | nindent 4 }}
spec:
- type: {{ .Values.plex.service.type }}
+ type: {{ .Values.service.type }}
ports:
- - port: {{ .Values.plex.service.port }}
- targetPort: {{ .Values.plex.container.port }}
+ - port: {{ .Values.service.port }}
+ targetPort: {{ .Values.container.port }}
protocol: TCP
name: plex-port
-{{ if eq .Values.plex.service.type "NodePort" }}
- nodePort: {{ .Values.plex.service.nodePort }}
+{{ if eq .Values.service.type "NodePort" }}
+ nodePort: {{ .Values.service.nodePort }}
{{ end }}
selector:
app: plex
---
-{{ if .Values.plex.service.extraLBService }}
+{{ if .Values.service.extraLBService }}
apiVersion: v1
kind: Service
metadata:
name: plex-lb
- {{- with .Values.plex.service.extraLBAnnotations }}
+ {{- with .Values.service.extraLBAnnotations }}
annotations:
{{- . | toYaml | nindent 4 }}
{{- end }}
@@ -142,8 +140,8 @@ metadata:
spec:
type: LoadBalancer
ports:
- - port: {{ .Values.plex.service.port }}
- targetPort: {{ .Values.plex.container.port }}
+ - port: {{ .Values.service.port }}
+ targetPort: {{ .Values.container.port }}
protocol: TCP
name: plex-port
selector:
@@ -151,27 +149,27 @@ spec:
{{ end }}
---
### INGRESS
-{{ if .Values.plex.ingress.enabled }}
+{{ if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: plex
labels:
{{- include "k8s-mediaserver.labels" . | nindent 4 }}
- {{- with .Values.plex.ingress.annotations }}
+ {{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
-{{- if .Values.plex.ingress.tls.enabled }}
+{{- if .Values.ingress.tls.enabled }}
tls:
- hosts:
- - {{ .Values.general.plex_ingress_host | quote }}
- secretName: {{ .Values.plex.ingress.tls.secretName }}
+ - {{ .Values.global.plex_ingress_host | quote }}
+ secretName: {{ .Values.ingress.tls.secretName }}
{{ end }}
- ingressClassName: {{ .Values.general.ingress.ingressClassName }}
+ ingressClassName: {{ .Values.global.ingress.ingressClassName }}
rules:
- - host: {{ .Values.general.plex_ingress_host | quote }}
+ - host: {{ .Values.global.plex_ingress_host | quote }}
http:
paths:
- path: /
@@ -180,6 +178,5 @@ spec:
service:
name: plex
port:
- number: {{ .Values.plex.service.port }}
-{{ end }}
+ number: {{ .Values.service.port }}
{{ end }}
diff --git a/helm-charts/k8s-mediaserver/plex/values.yaml b/helm-charts/k8s-mediaserver/plex/values.yaml
new file mode 100644
index 0000000..16f8535
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/plex/values.yaml
@@ -0,0 +1,21 @@
+claim: "CHANGEME"
+replicaCount: 1
+container:
+ image: docker.io/linuxserver/plex
+ nodeSelector: {}
+ port: 32400
+service:
+ type: ClusterIP
+ port: 32400
+ nodePort:
+ extraLBService: false
+ extraLBAnnotations: {}
+ingress:
+ enabled: true
+ annotations: {}
+ tls:
+ enabled: false
+ secretName: ""
+resources: {}
+volume: {}
+nodeSelector: {}
diff --git a/helm-charts/k8s-mediaserver/prowlarr/Chart.yaml b/helm-charts/k8s-mediaserver/prowlarr/Chart.yaml
new file mode 100644
index 0000000..85f80a3
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/prowlarr/Chart.yaml
@@ -0,0 +1,6 @@
+apiVersion: v2
+appVersion: 0.9.1
+description: A Helm chart for Kubernetes prowlarr.
+name: k8s-prowlarr
+type: application
+version: 0.9.1
diff --git a/helm-charts/k8s-mediaserver/prowlarr/templates/_helpers.tpl b/helm-charts/k8s-mediaserver/prowlarr/templates/_helpers.tpl
new file mode 100644
index 0000000..e7783a1
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/prowlarr/templates/_helpers.tpl
@@ -0,0 +1,45 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "k8s-mediaserver.name" -}}
+{{- default .Chart.Name | trunc 63 }}
+{{- end }}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "k8s-mediaserver.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Common labels
+*/}}
+{{- define "k8s-mediaserver.labels" -}}
+helm.sh/chart: {{ include "k8s-mediaserver.chart" . }}
+{{ include "k8s-mediaserver.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end }}
+
+{{/*
+Selector labels
+*/}}
+{{- define "k8s-mediaserver.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "k8s-mediaserver.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end }}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "k8s-mediaserver.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create }}
+{{- default (include "k8s-mediaserver.fullname" .) .Values.serviceAccount.name }}
+{{- else }}
+{{- default "default" .Values.serviceAccount.name }}
+{{- end }}
+{{- end }}
diff --git a/helm-charts/k8s-mediaserver/templates/prowlarr-resources.yml b/helm-charts/k8s-mediaserver/prowlarr/templates/prowlarr-resources.yml
similarity index 59%
rename from helm-charts/k8s-mediaserver/templates/prowlarr-resources.yml
rename to helm-charts/k8s-mediaserver/prowlarr/templates/prowlarr-resources.yml
index a51c676..df6def8 100644
--- a/helm-charts/k8s-mediaserver/templates/prowlarr-resources.yml
+++ b/helm-charts/k8s-mediaserver/prowlarr/templates/prowlarr-resources.yml
@@ -1,12 +1,10 @@
-{{ if .Values.prowlarr.enabled }}
----
### CONFIGMAPS
## INIT-CONTAINER
apiVersion: v1
data:
config.xml: |
- {{ .Values.prowlarr.ingress.path }}
+ {{ .Values.ingress.path }}
init-prowlarr.sh: |
#!/bin/bash
@@ -25,8 +23,8 @@ kind: ConfigMap
metadata:
name: prowlarr-config
data:
- PGID: "{{ .Values.general.pgid }}"
- PUID: "{{ .Values.general.puid }}"
+ PGID: "{{ .Values.global.pgid }}"
+ PUID: "{{ .Values.global.puid }}"
---
### DEPLOYMENT
apiVersion: apps/v1
@@ -55,70 +53,70 @@ spec:
volumeMounts:
- mountPath: /init-prowlarr
name: init-files-prowlarr
- {{- if .Values.prowlarr.volume }}
- - name: {{ .Values.prowlarr.volume.name }}
+ {{- if .Values.volume }}
+ - name: {{ .Values.volume.name }}
mountPath: /prowlarr-config
{{- else }}
- name: mediaserver-volume
mountPath: /prowlarr-config
- subPath: "{{ .Values.general.storage.subPaths.config }}/prowlarr"
+ subPath: "{{ .Values.global.storage.subPaths.config }}/prowlarr"
{{- end }}
securityContext:
- runAsUser: {{ .Values.general.puid }}
- runAsGroup: {{ .Values.general.pgid }}
+ runAsUser: {{ .Values.global.puid }}
+ runAsGroup: {{ .Values.global.pgid }}
containers:
- name: {{ .Chart.Name }}
envFrom:
- configMapRef:
name: prowlarr-config
- image: "{{ .Values.prowlarr.container.image }}:{{ .Values.prowlarr.container.tag | default .Values.general.image_tag }}"
+ image: "{{ .Values.container.image }}:{{ .Values.container.tag | default .Values.global.image_tag }}"
imagePullPolicy: Always
readinessProbe:
httpGet:
- path: "/{{ .Values.prowlarr.ingress.path }}/ping"
- port: {{ .Values.prowlarr.container.port }}
+ path: "/{{ .Values.ingress.path }}/ping"
+ port: {{ .Values.container.port }}
initialDelaySeconds: 10
periodSeconds: 20
ports:
- name: prowlarr-port
- containerPort: {{ .Values.prowlarr.container.port }}
+ containerPort: {{ .Values.container.port }}
protocol: TCP
volumeMounts:
- {{- if .Values.prowlarr.volume }}
- - name: {{ .Values.prowlarr.volume.name }}
+ {{- if .Values.volume }}
+ - name: {{ .Values.volume.name }}
mountPath: /config
{{- else }}
- name: mediaserver-volume
mountPath: "/config"
- subPath: "{{ .Values.general.storage.subPaths.config }}/prowlarr"
+ subPath: "{{ .Values.global.storage.subPaths.config }}/prowlarr"
{{- end }}
- {{- with .Values.prowlarr.resources }}
+ {{- with .Values.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
volumes:
- {{ if not .Values.general.storage.customVolume }}
+ {{ if not .Values.global.storage.customVolume }}
- name: mediaserver-volume
persistentVolumeClaim:
- claimName: {{ .Values.general.storage.pvcName }}
+ claimName: {{ .Values.global.storage.pvcName }}
{{ else }}
- name: mediaserver-volume
- {{- toYaml .Values.general.storage.volumes | nindent 10 }}
+ {{- toYaml .Values.global.storage.volumes | nindent 10 }}
{{ end }}
- {{- if .Values.prowlarr.volume }}
- - name: {{ .Values.prowlarr.volume.name }}
+ {{- if .Values.volume }}
+ - name: {{ .Values.volume.name }}
persistentVolumeClaim:
- claimName: {{ .Values.prowlarr.volume.name }}
+ claimName: {{ .Values.volume.name }}
{{- end }}
- name: init-files-prowlarr
configMap:
defaultMode: 493
name: init-prowlarr-cm
- {{- with merge .Values.prowlarr.container.nodeSelector .Values.general.nodeSelector }}
+ {{- with merge .Values.container.nodeSelector .Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
- {{- if eq .Values.general.podDistribution "cluster" }}
+ {{- if eq .Values.global.podDistribution "cluster" }}
affinity:
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
@@ -131,7 +129,7 @@ spec:
- {{ .Release.Name }}
topologyKey: "kubernetes.io/hostname"
weight: 100
- {{- else if eq .Values.general.podDistribution "spread" }}
+ {{- else if eq .Values.global.podDistribution "spread" }}
topologySpreadConstraints:
- maxSkew: 1
topologyKey: "kubernetes.io/hostname"
@@ -149,25 +147,25 @@ metadata:
labels:
{{- include "k8s-mediaserver.labels" . | nindent 4 }}
spec:
- type: {{ .Values.prowlarr.service.type }}
+ type: {{ .Values.service.type }}
ports:
- - port: {{ .Values.prowlarr.service.port }}
- targetPort: {{ .Values.prowlarr.container.port }}
+ - port: {{ .Values.service.port }}
+ targetPort: {{ .Values.container.port }}
protocol: TCP
-{{ if eq .Values.prowlarr.service.type "NodePort" }}
- nodePort: {{ .Values.prowlarr.service.nodePort }}
+{{ if eq .Values.service.type "NodePort" }}
+ nodePort: {{ .Values.service.nodePort }}
{{ end }}
name: prowlarr-port
selector:
app: prowlarr
---
-{{ if .Values.prowlarr.service.extraLBService }}
+{{ if .Values.service.extraLBService }}
apiVersion: v1
kind: Service
metadata:
name: prowlarr-lb
- {{- with .Values.prowlarr.service.extraLBAnnotations }}
+ {{- with .Values.service.extraLBAnnotations }}
annotations:
{{- . | toYaml | nindent 4 }}
{{- end }}
@@ -176,8 +174,8 @@ metadata:
spec:
type: LoadBalancer
ports:
- - port: {{ .Values.prowlarr.service.port }}
- targetPort: {{ .Values.prowlarr.container.port }}
+ - port: {{ .Values.service.port }}
+ targetPort: {{ .Values.container.port }}
protocol: TCP
name: prowlarr-port
selector:
@@ -185,35 +183,34 @@ spec:
{{ end }}
---
### INGRESS ###
-{{ if .Values.prowlarr.ingress.enabled }}
+{{ if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: prowlarr
labels:
{{- include "k8s-mediaserver.labels" . | nindent 4 }}
- {{- with .Values.prowlarr.ingress.annotations }}
+ {{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
-{{ if .Values.prowlarr.ingress.tls.enabled }}
+{{ if .Values.ingress.tls.enabled }}
tls:
- hosts:
- - {{ .Values.general.ingress_host | quote }}
- secretName: {{ .Values.prowlarr.ingress.tls.secretName }}
+ - {{ .Values.global.ingress_host | quote }}
+ secretName: {{ .Values.ingress.tls.secretName }}
{{ end }}
- ingressClassName: {{ .Values.general.ingress.ingressClassName }}
+ ingressClassName: {{ .Values.global.ingress.ingressClassName }}
rules:
- - host: {{ .Values.general.ingress_host | quote }}
+ - host: {{ .Values.global.ingress_host | quote }}
http:
paths:
- - path: {{ .Values.prowlarr.ingress.path }}
+ - path: {{ .Values.ingress.path }}
pathType: Prefix
backend:
service:
name: prowlarr
port:
- number: {{ .Values.prowlarr.service.port }}
-{{ end }}
+ number: {{ .Values.service.port }}
{{ end }}
diff --git a/helm-charts/k8s-mediaserver/prowlarr/values.yaml b/helm-charts/k8s-mediaserver/prowlarr/values.yaml
new file mode 100644
index 0000000..0c83854
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/prowlarr/values.yaml
@@ -0,0 +1,20 @@
+container:
+ image: docker.io/linuxserver/prowlarr
+ tag: develop
+ nodeSelector: {}
+ port: 9696
+service:
+ type: ClusterIP
+ port: 9696
+ nodePort:
+ extraLBService: false
+ extraLBAnnotations: {}
+ingress:
+ enabled: true
+ annotations: {}
+ path: /prowlarr
+ tls:
+ enabled: false
+ secretName: ""
+resources: {}
+volume: {}
diff --git a/helm-charts/k8s-mediaserver/radarr/Chart.yaml b/helm-charts/k8s-mediaserver/radarr/Chart.yaml
new file mode 100644
index 0000000..4a3dd58
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/radarr/Chart.yaml
@@ -0,0 +1,6 @@
+apiVersion: v2
+appVersion: 0.9.1
+description: A Helm chart for Kubernetes radarr.
+name: k8s-radarr
+type: application
+version: 0.9.1
diff --git a/helm-charts/k8s-mediaserver/radarr/templates/_helpers.tpl b/helm-charts/k8s-mediaserver/radarr/templates/_helpers.tpl
new file mode 100644
index 0000000..e7783a1
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/radarr/templates/_helpers.tpl
@@ -0,0 +1,45 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "k8s-mediaserver.name" -}}
+{{- default .Chart.Name | trunc 63 }}
+{{- end }}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "k8s-mediaserver.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Common labels
+*/}}
+{{- define "k8s-mediaserver.labels" -}}
+helm.sh/chart: {{ include "k8s-mediaserver.chart" . }}
+{{ include "k8s-mediaserver.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end }}
+
+{{/*
+Selector labels
+*/}}
+{{- define "k8s-mediaserver.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "k8s-mediaserver.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end }}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "k8s-mediaserver.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create }}
+{{- default (include "k8s-mediaserver.fullname" .) .Values.serviceAccount.name }}
+{{- else }}
+{{- default "default" .Values.serviceAccount.name }}
+{{- end }}
+{{- end }}
diff --git a/helm-charts/k8s-mediaserver/templates/radarr-resources.yml b/helm-charts/k8s-mediaserver/radarr/templates/radarr-resources.yml
similarity index 61%
rename from helm-charts/k8s-mediaserver/templates/radarr-resources.yml
rename to helm-charts/k8s-mediaserver/radarr/templates/radarr-resources.yml
index 9624770..d94054c 100644
--- a/helm-charts/k8s-mediaserver/templates/radarr-resources.yml
+++ b/helm-charts/k8s-mediaserver/radarr/templates/radarr-resources.yml
@@ -1,5 +1,3 @@
-{{ if .Values.radarr.enabled }}
----
### CONFIGMAP
## INIT-CONTAINER
---
@@ -7,7 +5,7 @@ apiVersion: v1
data:
config.xml: |
- {{ .Values.radarr.ingress.path }}
+ {{ .Values.ingress.path }}
init-radarr.sh: |
#!/bin/bash
@@ -26,8 +24,8 @@ kind: ConfigMap
metadata:
name: radarr-config
data:
- PGID: "{{ .Values.general.pgid }}"
- PUID: "{{ .Values.general.puid }}"
+ PGID: "{{ .Values.global.pgid }}"
+ PUID: "{{ .Values.global.puid }}"
---
### DEPLOYMENT
apiVersion: apps/v1
@@ -56,76 +54,76 @@ spec:
volumeMounts:
- mountPath: /init-radarr
name: init-files-radarr
- {{- if .Values.radarr.volume }}
- - name: {{ .Values.radarr.volume.name }}
+ {{- if .Values.volume }}
+ - name: {{ .Values.volume.name }}
mountPath: /radarr-config
{{- else }}
- name: mediaserver-volume
mountPath: /radarr-config
- subPath: "{{ .Values.general.storage.subPaths.config }}/radarr"
+ subPath: "{{ .Values.global.storage.subPaths.config }}/radarr"
{{- end }}
securityContext:
- runAsUser: {{ .Values.general.puid }}
- runAsGroup: {{ .Values.general.pgid }}
+ runAsUser: {{ .Values.global.puid }}
+ runAsGroup: {{ .Values.global.pgid }}
containers:
- name: {{ .Chart.Name }}
envFrom:
- configMapRef:
name: radarr-config
- image: "{{ .Values.radarr.container.image }}:{{ .Values.radarr.container.tag | default .Values.general.image_tag }}"
+ image: "{{ .Values.container.image }}:{{ .Values.container.tag | default .Values.global.image_tag }}"
imagePullPolicy: Always
readinessProbe:
httpGet:
- path: "/{{ .Values.radarr.ingress.path }}/ping"
- port: {{ .Values.radarr.container.port }}
+ path: "/{{ .Values.ingress.path }}/ping"
+ port: {{ .Values.container.port }}
initialDelaySeconds: 10
periodSeconds: 20
ports:
- name: radarr-port
- containerPort: {{ .Values.radarr.container.port }}
+ containerPort: {{ .Values.container.port }}
protocol: TCP
volumeMounts:
- {{- if .Values.radarr.volume }}
- - name: {{ .Values.radarr.volume.name }}
+ {{- if .Values.volume }}
+ - name: {{ .Values.volume.name }}
mountPath: /config
{{- else }}
- name: mediaserver-volume
mountPath: "/config"
- subPath: "{{ .Values.general.storage.subPaths.config }}/radarr"
+ subPath: "{{ .Values.global.storage.subPaths.config }}/radarr"
{{- end }}
- name: mediaserver-volume
mountPath: "/downloads"
- subPath: "{{ .Values.general.storage.subPaths.downloads }}"
+ subPath: "{{ .Values.global.storage.subPaths.downloads }}"
- name: mediaserver-volume
mountPath: "/movies"
- subPath: "{{ .Values.general.storage.subPaths.movies }}"
- {{- with .Values.radarr.resources }}
+ subPath: "{{ .Values.global.storage.subPaths.movies }}"
+ {{- with .Values.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
volumes:
- {{- if not .Values.general.storage.customVolume }}
+ {{- if not .Values.global.storage.customVolume }}
- name: mediaserver-volume
persistentVolumeClaim:
- claimName: {{ .Values.general.storage.pvcName }}
+ claimName: {{ .Values.global.storage.pvcName }}
{{- else }}
- name: mediaserver-volume
- {{- toYaml .Values.general.storage.volumes | nindent 10 }}
+ {{- toYaml .Values.global.storage.volumes | nindent 10 }}
{{- end }}
- {{- if .Values.radarr.volume }}
- - name: {{ .Values.radarr.volume.name }}
+ {{- if .Values.volume }}
+ - name: {{ .Values.volume.name }}
persistentVolumeClaim:
- claimName: {{ .Values.radarr.volume.name }}
+ claimName: {{ .Values.volume.name }}
{{- end }}
- name: init-files-radarr
configMap:
defaultMode: 493
name: init-radarr-cm
- {{- with merge .Values.radarr.container.nodeSelector .Values.general.nodeSelector }}
+ {{- with merge .Values.container.nodeSelector .Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
- {{- if eq .Values.general.podDistribution "cluster" }}
+ {{- if eq .Values.global.podDistribution "cluster" }}
affinity:
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
@@ -138,7 +136,7 @@ spec:
- {{ .Release.Name }}
topologyKey: "kubernetes.io/hostname"
weight: 100
- {{- else if eq .Values.general.podDistribution "spread" }}
+ {{- else if eq .Values.global.podDistribution "spread" }}
topologySpreadConstraints:
- maxSkew: 1
topologyKey: "kubernetes.io/hostname"
@@ -156,25 +154,25 @@ metadata:
labels:
{{- include "k8s-mediaserver.labels" . | nindent 4 }}
spec:
- type: {{ .Values.radarr.service.type }}
+ type: {{ .Values.service.type }}
ports:
- - port: {{ .Values.radarr.service.port }}
- targetPort: {{ .Values.radarr.container.port }}
+ - port: {{ .Values.service.port }}
+ targetPort: {{ .Values.container.port }}
protocol: TCP
-{{ if eq .Values.radarr.service.type "NodePort" }}
- nodePort: {{ .Values.radarr.service.nodePort }}
+{{ if eq .Values.service.type "NodePort" }}
+ nodePort: {{ .Values.service.nodePort }}
{{ end }}
name: radarr-port
selector:
app: radarr
---
-{{ if .Values.radarr.service.extraLBService }}
+{{ if .Values.service.extraLBService }}
apiVersion: v1
kind: Service
metadata:
name: radarr-lb
- {{- with .Values.radarr.service.extraLBAnnotations }}
+ {{- with .Values.service.extraLBAnnotations }}
annotations:
{{- . | toYaml | nindent 4 }}
{{- end }}
@@ -183,8 +181,8 @@ metadata:
spec:
type: LoadBalancer
ports:
- - port: {{ .Values.radarr.service.port }}
- targetPort: {{ .Values.radarr.container.port }}
+ - port: {{ .Values.service.port }}
+ targetPort: {{ .Values.container.port }}
protocol: TCP
name: radarr-port
selector:
@@ -192,35 +190,34 @@ spec:
{{ end }}
---
### INGRESS ###
-{{ if .Values.radarr.ingress.enabled }}
+{{ if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: radarr
labels:
{{- include "k8s-mediaserver.labels" . | nindent 4 }}
- {{- with .Values.radarr.ingress.annotations }}
+ {{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
-{{- if .Values.radarr.ingress.tls.enabled }}
+{{- if .Values.ingress.tls.enabled }}
tls:
- hosts:
- - {{ .Values.general.ingress_host | quote }}
- secretName: {{ .Values.radarr.ingress.tls.secretName }}
+ - {{ .Values.global.ingress_host | quote }}
+ secretName: {{ .Values.ingress.tls.secretName }}
{{ end }}
- ingressClassName: {{ .Values.general.ingress.ingressClassName }}
+ ingressClassName: {{ .Values.global.ingress.ingressClassName }}
rules:
- - host: {{ .Values.general.ingress_host | quote }}
+ - host: {{ .Values.global.ingress_host | quote }}
http:
paths:
- - path: {{ .Values.radarr.ingress.path }}
+ - path: {{ .Values.ingress.path }}
pathType: Prefix
backend:
service:
name: radarr
port:
- number: {{ .Values.radarr.service.port }}
-{{ end }}
+ number: {{ .Values.service.port }}
{{ end }}
diff --git a/helm-charts/k8s-mediaserver/radarr/values.yaml b/helm-charts/k8s-mediaserver/radarr/values.yaml
new file mode 100644
index 0000000..c4a328b
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/radarr/values.yaml
@@ -0,0 +1,34 @@
+container:
+ image: docker.io/linuxserver/radarr
+ nodeSelector: {}
+ port: 7878
+service:
+ type: ClusterIP
+ port: 7878
+ nodePort:
+ extraLBService: false
+ extraLBAnnotations: {}
+ingress:
+ enabled: true
+ annotations: {}
+ path: /radarr
+ tls:
+ enabled: false
+ secretName: ""
+resources: {}
+volume: {}
+storage:
+ customVolume: false #set to true if not using a PVC (must provide volume below)
+ pvcName: mediaserver-pvc
+ accessMode: ""
+ size: 5Gi
+ pvcStorageClass: ""
+ subPaths:
+ tv: media/tv
+ movies: media/movies
+ downloads: downloads
+ transmission: transmission
+ sabnzbd: sabnzbd
+ config: config
+ volumes: {}
+nodeSelector: {}
diff --git a/helm-charts/k8s-mediaserver/sabnzbd/Chart.yaml b/helm-charts/k8s-mediaserver/sabnzbd/Chart.yaml
new file mode 100644
index 0000000..16f703c
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/sabnzbd/Chart.yaml
@@ -0,0 +1,6 @@
+apiVersion: v2
+appVersion: 0.9.1
+description: A Helm chart for Kubernetes sabnzbd.
+name: k8s-sabnzbd
+type: application
+version: 0.9.1
diff --git a/helm-charts/k8s-mediaserver/sabnzbd/templates/_helpers.tpl b/helm-charts/k8s-mediaserver/sabnzbd/templates/_helpers.tpl
new file mode 100644
index 0000000..e7783a1
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/sabnzbd/templates/_helpers.tpl
@@ -0,0 +1,45 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "k8s-mediaserver.name" -}}
+{{- default .Chart.Name | trunc 63 }}
+{{- end }}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "k8s-mediaserver.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Common labels
+*/}}
+{{- define "k8s-mediaserver.labels" -}}
+helm.sh/chart: {{ include "k8s-mediaserver.chart" . }}
+{{ include "k8s-mediaserver.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end }}
+
+{{/*
+Selector labels
+*/}}
+{{- define "k8s-mediaserver.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "k8s-mediaserver.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end }}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "k8s-mediaserver.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create }}
+{{- default (include "k8s-mediaserver.fullname" .) .Values.serviceAccount.name }}
+{{- else }}
+{{- default "default" .Values.serviceAccount.name }}
+{{- end }}
+{{- end }}
diff --git a/helm-charts/k8s-mediaserver/templates/sabnzbd-resources.yml b/helm-charts/k8s-mediaserver/sabnzbd/templates/sabnzbd-resources.yml
similarity index 78%
rename from helm-charts/k8s-mediaserver/templates/sabnzbd-resources.yml
rename to helm-charts/k8s-mediaserver/sabnzbd/templates/sabnzbd-resources.yml
index b829810..8e24bd4 100644
--- a/helm-charts/k8s-mediaserver/templates/sabnzbd-resources.yml
+++ b/helm-charts/k8s-mediaserver/sabnzbd/templates/sabnzbd-resources.yml
@@ -1,5 +1,3 @@
-{{- if .Values.sabnzbd.enabled -}}
----
### CONFIGMAP
## INIT-CONTAINER
apiVersion: v1
@@ -47,9 +45,9 @@ data:
api_key = 7a50bedb4f764603bab47212c7a16ec4
nzb_key = c7378d3a9b024117baacb21de005b1a6
permissions = ""
- download_dir = /{{ .Values.general.storage.subPaths.downloads }}/{{ .Values.general.storage.subPaths.sabnzbd }}/incomplete
+ download_dir = /{{ .Values.global.storage.subPaths.downloads }}/{{ .Values.global.storage.subPaths.sabnzbd }}/incomplete
download_free = ""
- complete_dir = /{{ .Values.general.storage.subPaths.downloads }}/{{ .Values.general.storage.subPaths.sabnzbd }}/complete
+ complete_dir = /{{ .Values.global.storage.subPaths.downloads }}/{{ .Values.global.storage.subPaths.sabnzbd }}/complete
complete_free = ""
fulldisk_autoresume = 0
script_dir = ""
@@ -183,7 +181,7 @@ data:
nomedia_marker = ""
ipv6_servers = 1
url_base = /sabnzbd
- host_whitelist = {{ .Values.general.ingress_host }}
+ host_whitelist = {{ .Values.global.ingress_host }}
local_ranges = ,
max_url_retries = 10
downloader_sleep_time = 10
@@ -328,8 +326,8 @@ kind: ConfigMap
metadata:
name: sabnzbd-config
data:
- PGID: "{{ .Values.general.pgid }}"
- PUID: "{{ .Values.general.puid }}"
+ PGID: "{{ .Values.global.pgid }}"
+ PUID: "{{ .Values.global.puid }}"
---
### DEPLOYMENT
apiVersion: apps/v1
@@ -358,76 +356,76 @@ spec:
volumeMounts:
- mountPath: /init-sabnzbd
name: init-files-sabnzbd
- {{- if .Values.sabnzbd.volume }}
- - name: {{ .Values.sabnzbd.volume.name }}
+ {{- if .Values.volume }}
+ - name: {{ .Values.volume.name }}
mountPath: /sabnzbd-config
{{- else }}
- name: mediaserver-volume
mountPath: "/sabnzbd-config"
- subPath: "{{ .Values.general.storage.subPaths.config }}/sabnzbd"
+ subPath: "{{ .Values.global.storage.subPaths.config }}/sabnzbd"
{{- end }}
securityContext:
- runAsUser: {{ .Values.general.puid }}
- runAsGroup: {{ .Values.general.pgid }}
+ runAsUser: {{ .Values.global.puid }}
+ runAsGroup: {{ .Values.global.pgid }}
containers:
- name: {{ .Chart.Name }}
envFrom:
- configMapRef:
name: sabnzbd-config
- image: "{{ .Values.sabnzbd.container.image }}:{{ .Values.sabnzbd.container.tag | default .Values.general.image_tag }}"
+ image: "{{ .Values.container.image }}:{{ .Values.container.tag | default .Values.global.image_tag }}"
imagePullPolicy: Always
readinessProbe:
httpGet:
- path: /{{ .Values.sabnzbd.ingress.path }}/wizard/
- port: {{ .Values.sabnzbd.container.port.http }}
+ path: /{{ .Values.ingress.path }}/wizard/
+ port: {{ .Values.container.port.http }}
initialDelaySeconds: 5
periodSeconds: 10
ports:
- name: sabnzbd-http
- containerPort: {{ .Values.sabnzbd.container.port.http }}
+ containerPort: {{ .Values.container.port.http }}
protocol: TCP
- name: sabnzbd-https
- containerPort: {{ .Values.sabnzbd.container.port.https }}
+ containerPort: {{ .Values.container.port.https }}
protocol: TCP
volumeMounts:
- {{- if .Values.sabnzbd.volume }}
- - name: {{ .Values.sabnzbd.volume.name }}
+ {{- if .Values.volume }}
+ - name: {{ .Values.volume.name }}
mountPath: /config
{{- else }}
- name: mediaserver-volume
mountPath: "/config"
- subPath: "{{ .Values.general.storage.subPaths.config }}/sabnzbd"
+ subPath: "{{ .Values.global.storage.subPaths.config }}/sabnzbd"
{{- end }}
- name: mediaserver-volume
mountPath: "/downloads"
- subPath: "{{ .Values.general.storage.subPaths.downloads }}"
- {{- with .Values.sabnzbd.resources }}
+ subPath: "{{ .Values.global.storage.subPaths.downloads }}"
+ {{- with .Values.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
volumes:
- {{- if not .Values.general.storage.customVolume }}
+ {{- if not .Values.global.storage.customVolume }}
- name: mediaserver-volume
persistentVolumeClaim:
- claimName: {{ .Values.general.storage.pvcName }}
+ claimName: {{ .Values.global.storage.pvcName }}
{{- else }}
- name: mediaserver-volume
- {{- toYaml .Values.general.storage.volumes | nindent 10 }}
+ {{- toYaml .Values.global.storage.volumes | nindent 10 }}
{{- end }}
- {{- if .Values.sabnzbd.volume }}
- - name: {{ .Values.sabnzbd.volume.name }}
+ {{- if .Values.volume }}
+ - name: {{ .Values.volume.name }}
persistentVolumeClaim:
- claimName: {{ .Values.sabnzbd.volume.name }}
+ claimName: {{ .Values.volume.name }}
{{- end }}
- name: init-files-sabnzbd
configMap:
defaultMode: 493
name: init-sabnzbd-cm
- {{- with merge .Values.sabnzbd.container.nodeSelector .Values.general.nodeSelector }}
+ {{- with merge .Values.container.nodeSelector .Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
- {{- if eq .Values.general.podDistribution "cluster" }}
+ {{- if eq .Values.global.podDistribution "cluster" }}
affinity:
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
@@ -440,7 +438,7 @@ spec:
- {{ .Release.Name }}
topologyKey: "kubernetes.io/hostname"
weight: 100
- {{- else if eq .Values.general.podDistribution "spread" }}
+ {{- else if eq .Values.global.podDistribution "spread" }}
topologySpreadConstraints:
- maxSkew: 1
topologyKey: "kubernetes.io/hostname"
@@ -458,14 +456,14 @@ metadata:
labels:
{{- include "k8s-mediaserver.labels" . | nindent 4 }}
spec:
- type: {{ .Values.sabnzbd.service.http.type }}
+ type: {{ .Values.service.http.type }}
ports:
- - port: {{ .Values.sabnzbd.service.http.port }}
- targetPort: {{ .Values.sabnzbd.container.port.http }}
+ - port: {{ .Values.service.http.port }}
+ targetPort: {{ .Values.container.port.http }}
protocol: TCP
name: sabnzbd-http
-{{ if eq .Values.sabnzbd.service.http.type "NodePort" }}
- nodePort: {{ .Values.sabnzbd.service.http.nodePort }}
+{{ if eq .Values.service.http.type "NodePort" }}
+ nodePort: {{ .Values.service.http.nodePort }}
{{ end }}
selector:
app: sabnzbd
@@ -477,24 +475,24 @@ metadata:
labels:
{{- include "k8s-mediaserver.labels" . | nindent 4 }}
spec:
- type: {{ .Values.sabnzbd.service.https.type }}
+ type: {{ .Values.service.https.type }}
ports:
- - port: {{ .Values.sabnzbd.service.https.port }}
- targetPort: {{ .Values.sabnzbd.container.port.https }}
+ - port: {{ .Values.service.https.port }}
+ targetPort: {{ .Values.container.port.https }}
protocol: TCP
name: sabnzbd-https
-{{ if eq .Values.sabnzbd.service.http.type "NodePort" }}
- nodePort: {{ .Values.sabnzbd.service.http.nodePort }}
+{{ if eq .Values.service.http.type "NodePort" }}
+ nodePort: {{ .Values.service.http.nodePort }}
{{ end }}
selector:
app: sabnzbd
---
-{{ if .Values.sabnzbd.service.http.extraLBService }}
+{{ if .Values.service.http.extraLBService }}
apiVersion: v1
kind: Service
metadata:
name: sabnzbd-lb
- {{- with .Values.sabnzbd.service.http.extraLBAnnotations }}
+ {{- with .Values.service.http.extraLBAnnotations }}
annotations:
{{- . | toYaml | nindent 4 }}
{{- end }}
@@ -503,20 +501,20 @@ metadata:
spec:
type: LoadBalancer
ports:
- - port: {{ .Values.sabnzbd.service.http.port }}
- targetPort: {{ .Values.sabnzbd.container.port.http }}
+ - port: {{ .Values.service.http.port }}
+ targetPort: {{ .Values.container.port.http }}
protocol: TCP
name: sabnzbd-http
selector:
app: sabnzbd
{{ end }}
---
-{{ if .Values.sabnzbd.service.https.extraLBService }}
+{{ if .Values.service.https.extraLBService }}
apiVersion: v1
kind: Service
metadata:
name: sabnzbd-lb-https
- {{- with .Values.sabnzbd.service.https.extraLBAnnotations }}
+ {{- with .Values.service.https.extraLBAnnotations }}
annotations:
{{- . | toYaml | nindent 4 }}
{{- end }}
@@ -525,8 +523,8 @@ metadata:
spec:
type: LoadBalancer
ports:
- - port: {{ .Values.sabnzbd.service.https.port }}
- targetPort: {{ .Values.sabnzbd.container.port.https }}
+ - port: {{ .Values.service.https.port }}
+ targetPort: {{ .Values.container.port.https }}
protocol: TCP
name: sabnzbd-https
selector:
@@ -534,35 +532,34 @@ spec:
{{ end }}
---
### INGRESS
-{{ if .Values.sabnzbd.ingress.enabled }}
+{{ if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: sabnzbd
labels:
{{- include "k8s-mediaserver.labels" . | nindent 4 }}
- {{- with .Values.sabnzbd.ingress.annotations }}
+ {{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
-{{- if .Values.sabnzbd.ingress.tls.enabled }}
+{{- if .Values.ingress.tls.enabled }}
tls:
- hosts:
- - {{ .Values.general.ingress_host | quote }}
- secretName: {{ .Values.sabnzbd.ingress.tls.secretName }}
+ - {{ .Values.global.ingress_host | quote }}
+ secretName: {{ .Values.ingress.tls.secretName }}
{{ end }}
- ingressClassName: {{ .Values.general.ingress.ingressClassName }}
+ ingressClassName: {{ .Values.global.ingress.ingressClassName }}
rules:
- - host: {{ .Values.general.ingress_host | quote }}
+ - host: {{ .Values.global.ingress_host | quote }}
http:
paths:
- - path: {{ .Values.sabnzbd.ingress.path }}
+ - path: {{ .Values.ingress.path }}
pathType: Prefix
backend:
service:
name: sabnzbd
port:
- number: {{ .Values.sabnzbd.service.http.port }}
-{{ end }}
+ number: {{ .Values.service.http.port }}
{{ end }}
diff --git a/helm-charts/k8s-mediaserver/sabnzbd/values.yaml b/helm-charts/k8s-mediaserver/sabnzbd/values.yaml
new file mode 100644
index 0000000..bcccf20
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/sabnzbd/values.yaml
@@ -0,0 +1,44 @@
+enabled: true
+container:
+ image: docker.io/linuxserver/sabnzbd
+ nodeSelector: {}
+ port:
+ http: 8080
+ https: 9090
+service:
+ http:
+ type: ClusterIP
+ port: 8080
+ nodePort:
+ extraLBService: false
+ extraLBAnnotations: {}
+ https:
+ type: ClusterIP
+ port: 9090
+ nodePort:
+ extraLBService: false
+ extraLBAnnotations: {}
+ingress:
+ enabled: true
+ annotations: {}
+ path: /sabnzbd
+ tls:
+ enabled: false
+ secretName: ""
+resources: {}
+volume: {}
+storage:
+ customVolume: false #set to true if not using a PVC (must provide volume below)
+ pvcName: mediaserver-pvc
+ accessMode: ""
+ size: 5Gi
+ pvcStorageClass: ""
+ subPaths:
+ tv: media/tv
+ movies: media/movies
+ downloads: downloads
+ transmission: transmission
+ sabnzbd: sabnzbd
+ config: config
+ volumes: {}
+nodeSelector: {}
diff --git a/helm-charts/k8s-mediaserver/sonarr/Chart.yaml b/helm-charts/k8s-mediaserver/sonarr/Chart.yaml
new file mode 100644
index 0000000..27ce1b8
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/sonarr/Chart.yaml
@@ -0,0 +1,6 @@
+apiVersion: v2
+appVersion: 0.9.1
+description: A Helm chart for Kubernetes sonarr.
+name: k8s-sonarr
+type: application
+version: 0.9.1
diff --git a/helm-charts/k8s-mediaserver/sonarr/templates/_helpers.tpl b/helm-charts/k8s-mediaserver/sonarr/templates/_helpers.tpl
new file mode 100644
index 0000000..e7783a1
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/sonarr/templates/_helpers.tpl
@@ -0,0 +1,45 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "k8s-mediaserver.name" -}}
+{{- default .Chart.Name | trunc 63 }}
+{{- end }}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "k8s-mediaserver.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Common labels
+*/}}
+{{- define "k8s-mediaserver.labels" -}}
+helm.sh/chart: {{ include "k8s-mediaserver.chart" . }}
+{{ include "k8s-mediaserver.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end }}
+
+{{/*
+Selector labels
+*/}}
+{{- define "k8s-mediaserver.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "k8s-mediaserver.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end }}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "k8s-mediaserver.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create }}
+{{- default (include "k8s-mediaserver.fullname" .) .Values.serviceAccount.name }}
+{{- else }}
+{{- default "default" .Values.serviceAccount.name }}
+{{- end }}
+{{- end }}
diff --git a/helm-charts/k8s-mediaserver/templates/sonarr-resources.yml b/helm-charts/k8s-mediaserver/sonarr/templates/sonarr-resources.yml
similarity index 61%
rename from helm-charts/k8s-mediaserver/templates/sonarr-resources.yml
rename to helm-charts/k8s-mediaserver/sonarr/templates/sonarr-resources.yml
index 894ffac..557f0cd 100644
--- a/helm-charts/k8s-mediaserver/templates/sonarr-resources.yml
+++ b/helm-charts/k8s-mediaserver/sonarr/templates/sonarr-resources.yml
@@ -1,12 +1,10 @@
-{{ if .Values.sonarr.enabled }}
----
### CONFIGMAP
## INIT-CONTAINER
apiVersion: v1
data:
config.xml: |
- {{ .Values.sonarr.ingress.path }}
+ {{ .Values.ingress.path }}
init-sonarr.sh: |
#!/bin/bash
@@ -25,8 +23,8 @@ kind: ConfigMap
metadata:
name: sonarr-config
data:
- PGID: "{{ .Values.general.pgid }}"
- PUID: "{{ .Values.general.puid }}"
+ PGID: "{{ .Values.global.pgid }}"
+ PUID: "{{ .Values.global.puid }}"
---
### DEPLOYMENT
apiVersion: apps/v1
@@ -55,76 +53,76 @@ spec:
volumeMounts:
- mountPath: /init-sonarr
name: init-files-sonarr
- {{- if .Values.sonarr.volume }}
- - name: {{ .Values.sonarr.volume.name }}
+ {{- if .Values.volume }}
+ - name: {{ .Values.volume.name }}
mountPath: /sonarr-config
{{- else }}
- name: mediaserver-volume
mountPath: /sonarr-config
- subPath: "{{ .Values.general.storage.subPaths.config }}/sonarr"
+ subPath: "{{ .Values.global.storage.subPaths.config }}/sonarr"
{{- end }}
securityContext:
- runAsUser: {{ .Values.general.puid }}
- runAsGroup: {{ .Values.general.pgid }}
+ runAsUser: {{ .Values.global.puid }}
+ runAsGroup: {{ .Values.global.pgid }}
containers:
- name: {{ .Chart.Name }}
envFrom:
- configMapRef:
name: sonarr-config
- image: "{{ .Values.sonarr.container.image }}:{{ .Values.sonarr.container.tag | default .Values.general.image_tag }}"
+ image: "{{ .Values.container.image }}:{{ .Values.container.tag | default .Values.global.image_tag }}"
imagePullPolicy: Always
readinessProbe:
httpGet:
- path: "/{{ .Values.sonarr.ingress.path }}/ping"
- port: {{ .Values.sonarr.container.port }}
+ path: "/{{ .Values.ingress.path }}/ping"
+ port: {{ .Values.container.port }}
initialDelaySeconds: 10
periodSeconds: 20
ports:
- name: sonarr-port
- containerPort: {{ .Values.sonarr.container.port }}
+ containerPort: {{ .Values.container.port }}
protocol: TCP
volumeMounts:
- {{- if .Values.sonarr.volume }}
- - name: {{ .Values.sonarr.volume.name }}
+ {{- if .Values.volume }}
+ - name: {{ .Values.volume.name }}
mountPath: /config
{{- else }}
- name: mediaserver-volume
mountPath: "/config"
- subPath: "{{ .Values.general.storage.subPaths.config }}/sonarr"
+ subPath: "{{ .Values.global.storage.subPaths.config }}/sonarr"
{{- end }}
- name: mediaserver-volume
mountPath: "/downloads"
- subPath: "{{ .Values.general.storage.subPaths.downloads }}"
+ subPath: "{{ .Values.global.storage.subPaths.downloads }}"
- name: mediaserver-volume
mountPath: "/tv"
- subPath: "{{ .Values.general.storage.subPaths.tv }}"
- {{- with .Values.sonarr.resources }}
+ subPath: "{{ .Values.global.storage.subPaths.tv }}"
+ {{- with .Values.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
volumes:
- {{- if not .Values.general.storage.customVolume }}
+ {{- if not .Values.global.storage.customVolume }}
- name: mediaserver-volume
persistentVolumeClaim:
- claimName: {{ .Values.general.storage.pvcName }}
+ claimName: {{ .Values.global.storage.pvcName }}
{{- else }}
- name: mediaserver-volume
- {{- toYaml .Values.general.storage.volumes | nindent 10 }}
+ {{- toYaml .Values.global.storage.volumes | nindent 10 }}
{{- end }}
- {{- if .Values.sonarr.volume }}
- - name: {{ .Values.sonarr.volume.name }}
+ {{- if .Values.volume }}
+ - name: {{ .Values.volume.name }}
persistentVolumeClaim:
- claimName: {{ .Values.sonarr.volume.name }}
+ claimName: {{ .Values.volume.name }}
{{- end }}
- name: init-files-sonarr
configMap:
defaultMode: 493
name: init-sonarr-cm
- {{- with merge .Values.sonarr.container.nodeSelector .Values.general.nodeSelector }}
+ {{- with merge .Values.container.nodeSelector .Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
- {{- if eq .Values.general.podDistribution "cluster" }}
+ {{- if eq .Values.global.podDistribution "cluster" }}
affinity:
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
@@ -137,7 +135,7 @@ spec:
- {{ .Release.Name }}
topologyKey: "kubernetes.io/hostname"
weight: 100
- {{- else if eq .Values.general.podDistribution "spread" }}
+ {{- else if eq .Values.global.podDistribution "spread" }}
topologySpreadConstraints:
- maxSkew: 1
topologyKey: "kubernetes.io/hostname"
@@ -155,24 +153,24 @@ metadata:
labels:
{{- include "k8s-mediaserver.labels" . | nindent 4 }}
spec:
- type: {{ .Values.sonarr.service.type }}
+ type: {{ .Values.service.type }}
ports:
- - port: {{ .Values.sonarr.service.port }}
- targetPort: {{ .Values.sonarr.container.port }}
+ - port: {{ .Values.service.port }}
+ targetPort: {{ .Values.container.port }}
protocol: TCP
-{{ if eq .Values.sonarr.service.type "NodePort" }}
- nodePort: {{ .Values.sonarr.service.nodePort }}
+{{ if eq .Values.service.type "NodePort" }}
+ nodePort: {{ .Values.service.nodePort }}
{{ end }}
name: sonarr-port
selector:
app: sonarr
---
-{{ if .Values.sonarr.service.extraLBService }}
+{{ if .Values.service.extraLBService }}
apiVersion: v1
kind: Service
metadata:
name: sonarr-lb
- {{- with .Values.sonarr.service.extraLBAnnotations }}
+ {{- with .Values.service.extraLBAnnotations }}
annotations:
{{- . | toYaml | nindent 4 }}
{{- end }}
@@ -181,8 +179,8 @@ metadata:
spec:
type: LoadBalancer
ports:
- - port: {{ .Values.sonarr.service.port }}
- targetPort: {{ .Values.sonarr.container.port }}
+ - port: {{ .Values.service.port }}
+ targetPort: {{ .Values.container.port }}
protocol: TCP
name: sonarr-port
selector:
@@ -190,35 +188,34 @@ spec:
{{ end }}
---
### INGRESS
-{{ if .Values.sonarr.ingress.enabled }}
+{{ if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: sonarr
labels:
{{- include "k8s-mediaserver.labels" . | nindent 4 }}
- {{- with .Values.sonarr.ingress.annotations }}
+ {{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
-{{- if .Values.sonarr.ingress.tls.enabled }}
+{{- if .Values.ingress.tls.enabled }}
tls:
- hosts:
- - {{ .Values.general.ingress_host | quote }}
- secretName: {{ .Values.sonarr.ingress.tls.secretName }}
+ - {{ .Values.global.ingress_host | quote }}
+ secretName: {{ .Values.ingress.tls.secretName }}
{{ end }}
- ingressClassName: {{ .Values.general.ingress.ingressClassName }}
+ ingressClassName: {{ .Values.global.ingress.ingressClassName }}
rules:
- - host: {{ .Values.general.ingress_host | quote }}
+ - host: {{ .Values.global.ingress_host | quote }}
http:
paths:
- - path: {{ .Values.sonarr.ingress.path }}
+ - path: {{ .Values.ingress.path }}
pathType: Prefix
backend:
service:
name: sonarr
port:
- number: {{ .Values.sonarr.service.port }}
-{{ end }}
+ number: {{ .Values.service.port }}
{{ end }}
diff --git a/helm-charts/k8s-mediaserver/sonarr/values.yaml b/helm-charts/k8s-mediaserver/sonarr/values.yaml
new file mode 100644
index 0000000..298a108
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/sonarr/values.yaml
@@ -0,0 +1,19 @@
+container:
+ image: docker.io/linuxserver/sonarr
+ nodeSelector: {}
+ port: 8989
+service:
+ type: ClusterIP
+ port: 8989
+ nodePort:
+ extraLBService: false
+ extraLBAnnotations: {}
+ingress:
+ enabled: true
+ annotations: {}
+ path: /sonarr
+ tls:
+ enabled: false
+ secretName: ""
+resources: {}
+volume: {}
diff --git a/helm-charts/k8s-mediaserver/templates/storage-resources.yml b/helm-charts/k8s-mediaserver/templates/storage.yaml
similarity index 90%
rename from helm-charts/k8s-mediaserver/templates/storage-resources.yml
rename to helm-charts/k8s-mediaserver/templates/storage.yaml
index 143077b..d667eba 100644
--- a/helm-charts/k8s-mediaserver/templates/storage-resources.yml
+++ b/helm-charts/k8s-mediaserver/templates/storage.yaml
@@ -1,16 +1,16 @@
---
-{{- if not .Values.general.storage.customVolume }}
+{{- if not .Values.global.storage.customVolume }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
- name: {{ .Values.general.storage.pvcName }}
+ name: {{ .Values.global.storage.pvcName }}
spec:
accessModes:
- - {{ .Values.general.storage.accessMode | default "ReadWriteMany" }}
+ - {{ .Values.global.storage.accessMode | default "ReadWriteMany" }}
resources:
requests:
- storage: {{ .Values.general.storage.size }}
- storageClassName: {{ if (kindIs "invalid" .Values.general.storage.pvcStorageClass) }}""{{- else }}{{ .Values.general.storage.pvcStorageClass | quote }}{{- end }}
+ storage: {{ .Values.global.storage.size }}
+ storageClassName: {{ if (kindIs "invalid" .Values.global.storage.pvcStorageClass) }}""{{- else }}{{ .Values.global.storage.pvcStorageClass | quote }}{{- end }}
{{- end }}
{{- with .Values.sonarr.volume }}
---
@@ -195,3 +195,4 @@ spec:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
+
diff --git a/helm-charts/k8s-mediaserver/transmission/Chart.yaml b/helm-charts/k8s-mediaserver/transmission/Chart.yaml
new file mode 100644
index 0000000..9d3c7e9
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/transmission/Chart.yaml
@@ -0,0 +1,6 @@
+apiVersion: v2
+appVersion: 0.9.1
+description: A Helm chart for Kubernetes transmission.
+name: k8s-transmission
+type: application
+version: 0.9.1
diff --git a/helm-charts/k8s-mediaserver/transmission/templates/_helpers.tpl b/helm-charts/k8s-mediaserver/transmission/templates/_helpers.tpl
new file mode 100644
index 0000000..e7783a1
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/transmission/templates/_helpers.tpl
@@ -0,0 +1,45 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "k8s-mediaserver.name" -}}
+{{- default .Chart.Name | trunc 63 }}
+{{- end }}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "k8s-mediaserver.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Common labels
+*/}}
+{{- define "k8s-mediaserver.labels" -}}
+helm.sh/chart: {{ include "k8s-mediaserver.chart" . }}
+{{ include "k8s-mediaserver.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end }}
+
+{{/*
+Selector labels
+*/}}
+{{- define "k8s-mediaserver.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "k8s-mediaserver.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end }}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "k8s-mediaserver.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create }}
+{{- default (include "k8s-mediaserver.fullname" .) .Values.serviceAccount.name }}
+{{- else }}
+{{- default "default" .Values.serviceAccount.name }}
+{{- end }}
+{{- end }}
diff --git a/helm-charts/k8s-mediaserver/templates/transmission-resources.yml b/helm-charts/k8s-mediaserver/transmission/templates/transmission-resources.yml
similarity index 62%
rename from helm-charts/k8s-mediaserver/templates/transmission-resources.yml
rename to helm-charts/k8s-mediaserver/transmission/templates/transmission-resources.yml
index e0c8098..2ab96c2 100644
--- a/helm-charts/k8s-mediaserver/templates/transmission-resources.yml
+++ b/helm-charts/k8s-mediaserver/transmission/templates/transmission-resources.yml
@@ -1,4 +1,4 @@
-{{- if .Values.transmission.enabled -}}
+{{- if .Values.enabled -}}
---
### CONFIGMAP
## INIT-CONTAINER
@@ -26,13 +26,13 @@ data:
"blocklist-url": "http://www.example.com/blocklist",
"cache-size-mb": 4,
"dht-enabled": true,
- "download-dir": "/{{ .Values.general.storage.subPaths.downloads }}/{{ .Values.general.storage.subPaths.transmission }}/complete",
+ "download-dir": "/{{ .Values.global.storage.subPaths.downloads }}/{{ .Values.global.storage.subPaths.transmission }}/complete",
"download-queue-enabled": true,
"download-queue-size": 5,
"encryption": 1,
"idle-seeding-limit": 30,
"idle-seeding-limit-enabled": false,
- "incomplete-dir": "/{{ .Values.general.storage.subPaths.downloads }}/{{ .Values.general.storage.subPaths.transmission }}/incomplete",
+ "incomplete-dir": "/{{ .Values.global.storage.subPaths.downloads }}/{{ .Values.global.storage.subPaths.transmission }}/incomplete",
"incomplete-dir-enabled": true,
"lpd-enabled": false,
"message-level": 2,
@@ -40,7 +40,7 @@ data:
"peer-id-ttl-hours": 6,
"peer-limit-global": 200,
"peer-limit-per-torrent": 50,
- "peer-port": {{ .Values.transmission.service.peer.port }},
+ "peer-port": {{ .Values.service.peer.port }},
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
"peer-port-random-on-start": false,
@@ -54,15 +54,15 @@ data:
"ratio-limit": 2,
"ratio-limit-enabled": false,
"rename-partial-files": true,
- "rpc-authentication-required": {{ .Values.transmission.config.auth.enabled }},
+ "rpc-authentication-required": {{ .Values.config.auth.enabled }},
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-host-whitelist": "",
"rpc-host-whitelist-enabled": false,
- "rpc-password": {{ .Values.transmission.config.auth.password | quote }} ,
+ "rpc-password": {{ .Values.config.auth.password | quote }} ,
"rpc-port": 9091,
- "rpc-url": "{{ .Values.transmission.ingress.path }}/",
- "rpc-username": {{ .Values.transmission.config.auth.username | quote }},
+ "rpc-url": "{{ .Values.ingress.path }}/",
+ "rpc-username": {{ .Values.config.auth.username | quote }},
"rpc-whitelist": "127.0.0.1",
"rpc-whitelist-enabled": false,
"scrape-paused-torrents-enabled": true,
@@ -92,8 +92,8 @@ kind: ConfigMap
metadata:
name: transmission-config
data:
- PGID: "{{ .Values.general.pgid }}"
- PUID: "{{ .Values.general.puid }}"
+ PGID: "{{ .Values.global.pgid }}"
+ PUID: "{{ .Values.global.puid }}"
---
### DEPLOYMENT
apiVersion: apps/v1
@@ -122,79 +122,79 @@ spec:
volumeMounts:
- mountPath: /init-transmission
name: init-files-transmission
- {{ if .Values.transmission.volume }}
- - name: {{ .Values.transmission.volume.name }}
+ {{ if .Values.volume }}
+ - name: {{ .Values.volume.name }}
mountPath: /transmission-config
{{ else }}
- name: mediaserver-volume
mountPath: "/transmission-config"
- subPath: "{{ .Values.general.storage.subPaths.config }}/transmission"
+ subPath: "{{ .Values.global.storage.subPaths.config }}/transmission"
{{ end }}
securityContext:
- runAsUser: {{ .Values.general.puid }}
- runAsGroup: {{ .Values.general.pgid }}
+ runAsUser: {{ .Values.global.puid }}
+ runAsGroup: {{ .Values.global.pgid }}
containers:
- name: {{ .Chart.Name }}
envFrom:
- configMapRef:
name: transmission-config
- image: "{{ .Values.transmission.container.image }}:{{ .Values.transmission.container.tag | default .Values.general.image_tag }}"
+ image: "{{ .Values.container.image }}:{{ .Values.container.tag | default .Values.global.image_tag }}"
imagePullPolicy: Always
readinessProbe:
httpGet:
- path: /{{ .Values.transmission.ingress.path }}/
- port: {{ .Values.transmission.container.port.utp }}
+ path: /{{ .Values.ingress.path }}/
+ port: {{ .Values.container.port.utp }}
initialDelaySeconds: 5
periodSeconds: 10
ports:
- name: trans-port
- containerPort: {{ .Values.transmission.container.port.utp }}
+ containerPort: {{ .Values.container.port.utp }}
protocol: TCP
- name: trans-peer-tcp
- containerPort: {{ .Values.transmission.container.port.peer }}
+ containerPort: {{ .Values.container.port.peer }}
protocol: TCP
- name: trans-peer-udp
- containerPort: {{ .Values.transmission.container.port.peer }}
+ containerPort: {{ .Values.container.port.peer }}
protocol: UDP
volumeMounts:
- {{ if .Values.transmission.volume }}
- - name: {{ .Values.transmission.volume.name }}
+ {{ if .Values.volume }}
+ - name: {{ .Values.volume.name }}
mountPath: /config
{{ else }}
- name: mediaserver-volume
mountPath: "/config"
- subPath: "{{ .Values.general.storage.subPaths.config }}/transmission"
+ subPath: "{{ .Values.global.storage.subPaths.config }}/transmission"
{{ end }}
- name: mediaserver-volume
mountPath: "/downloads"
- subPath: "{{ .Values.general.storage.subPaths.downloads }}"
- {{- with .Values.transmission.resources }}
+ subPath: "{{ .Values.global.storage.subPaths.downloads }}"
+ {{- with .Values.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
volumes:
- {{ if not .Values.general.storage.customVolume }}
+ {{ if not .Values.global.storage.customVolume }}
- name: mediaserver-volume
persistentVolumeClaim:
- claimName: {{ .Values.general.storage.pvcName }}
+ claimName: {{ .Values.global.storage.pvcName }}
{{ else }}
- name: mediaserver-volume
- {{- toYaml .Values.general.storage.volumes | nindent 10 }}
+ {{- toYaml .Values.global.storage.volumes | nindent 10 }}
{{ end }}
- {{ if .Values.transmission.volume }}
- - name: {{ .Values.transmission.volume.name }}
+ {{ if .Values.volume }}
+ - name: {{ .Values.volume.name }}
persistentVolumeClaim:
- claimName: {{ .Values.transmission.volume.name }}
+ claimName: {{ .Values.volume.name }}
{{ end }}
- name: init-files-transmission
configMap:
defaultMode: 493
name: init-transmission-cm
- {{- with merge .Values.transmission.container.nodeSelector .Values.general.nodeSelector }}
+ {{- with merge .Values.container.nodeSelector .Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
- {{- if eq .Values.general.podDistribution "cluster" }}
+ {{- if eq .Values.global.podDistribution "cluster" }}
affinity:
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
@@ -207,7 +207,7 @@ spec:
- {{ .Release.Name }}
topologyKey: "kubernetes.io/hostname"
weight: 100
- {{- else if eq .Values.general.podDistribution "spread" }}
+ {{- else if eq .Values.global.podDistribution "spread" }}
topologySpreadConstraints:
- maxSkew: 1
topologyKey: "kubernetes.io/hostname"
@@ -225,14 +225,14 @@ metadata:
labels:
{{- include "k8s-mediaserver.labels" . | nindent 4 }}
spec:
- type: {{ .Values.transmission.service.utp.type }}
+ type: {{ .Values.service.utp.type }}
ports:
- - port: {{ .Values.transmission.service.utp.port }}
- targetPort: {{ .Values.transmission.container.port.utp }}
+ - port: {{ .Values.service.utp.port }}
+ targetPort: {{ .Values.container.port.utp }}
protocol: TCP
name: trans-port
-{{ if eq .Values.transmission.service.utp.type "NodePort" }}
- nodePort: {{ .Values.transmission.service.utp.nodePort }}
+{{ if eq .Values.service.utp.type "NodePort" }}
+ nodePort: {{ .Values.service.utp.nodePort }}
{{ end }}
selector:
app: transmission
@@ -244,14 +244,14 @@ metadata:
labels:
{{- include "k8s-mediaserver.labels" . | nindent 4 }}
spec:
- type: {{ .Values.transmission.service.peer.type }}
+ type: {{ .Values.service.peer.type }}
ports:
- - port: {{ .Values.transmission.service.peer.port }}
- targetPort: {{ .Values.transmission.container.port.peer }}
+ - port: {{ .Values.service.peer.port }}
+ targetPort: {{ .Values.container.port.peer }}
protocol: TCP
name: trans-peer-tcp
-{{ if eq .Values.transmission.service.peer.type "NodePort" }}
- nodePort: {{ .Values.transmission.service.peer.nodePort }}
+{{ if eq .Values.service.peer.type "NodePort" }}
+ nodePort: {{ .Values.service.peer.nodePort }}
{{ end }}
selector:
app: transmission
@@ -263,24 +263,24 @@ metadata:
labels:
{{- include "k8s-mediaserver.labels" . | nindent 4 }}
spec:
- type: {{ .Values.transmission.service.peer.type }}
+ type: {{ .Values.service.peer.type }}
ports:
- - port: {{ .Values.transmission.service.peer.port }}
- targetPort: {{ .Values.transmission.container.port.peer }}
+ - port: {{ .Values.service.peer.port }}
+ targetPort: {{ .Values.container.port.peer }}
protocol: UDP
name: trans-peer-udp
-{{ if eq .Values.transmission.service.peer.type "NodePort" }}
- nodePort: {{ .Values.transmission.service.peer.nodePortUDP }}
+{{ if eq .Values.service.peer.type "NodePort" }}
+ nodePort: {{ .Values.service.peer.nodePortUDP }}
{{ end }}
selector:
app: transmission
---
-{{ if .Values.transmission.service.utp.extraLBService }}
+{{ if .Values.service.utp.extraLBService }}
apiVersion: v1
kind: Service
metadata:
name: transmission-lb
- {{- with .Values.transmission.service.utp.extraLBAnnotations }}
+ {{- with .Values.service.utp.extraLBAnnotations }}
annotations:
{{- . | toYaml | nindent 4 }}
{{- end }}
@@ -289,20 +289,20 @@ metadata:
spec:
type: LoadBalancer
ports:
- - port: {{ .Values.transmission.service.utp.port }}
- targetPort: {{ .Values.transmission.container.port.utp }}
+ - port: {{ .Values.service.utp.port }}
+ targetPort: {{ .Values.container.port.utp }}
protocol: TCP
name: trans-port
selector:
app: transmission
---
{{ end }}
-{{ if .Values.transmission.service.peer.extraLBService }}
+{{ if .Values.service.peer.extraLBService }}
apiVersion: v1
kind: Service
metadata:
name: transmission-lb-peer-tcp
- {{- with .Values.transmission.service.peer.extraLBAnnotations }}
+ {{- with .Values.service.peer.extraLBAnnotations }}
annotations:
{{- . | toYaml | nindent 4 }}
{{- end }}
@@ -311,8 +311,8 @@ metadata:
spec:
type: LoadBalancer
ports:
- - port: {{ .Values.transmission.service.peer.port }}
- targetPort: {{ .Values.transmission.container.port.peer }}
+ - port: {{ .Values.service.peer.port }}
+ targetPort: {{ .Values.container.port.peer }}
protocol: TCP
name: trans-peer-tcp
selector:
@@ -322,7 +322,7 @@ apiVersion: v1
kind: Service
metadata:
name: transmission-lb-peer-udp
- {{- with .Values.transmission.service.peer.extraLBAnnotations }}
+ {{- with .Values.service.peer.extraLBAnnotations }}
annotations:
{{- . | toYaml | nindent 4 }}
{{- end }}
@@ -331,8 +331,8 @@ metadata:
spec:
type: LoadBalancer
ports:
- - port: {{ .Values.transmission.service.peer.port }}
- targetPort: {{ .Values.transmission.container.port.peer }}
+ - port: {{ .Values.service.peer.port }}
+ targetPort: {{ .Values.container.port.peer }}
protocol: UDP
name: trans-peer-udp
selector:
@@ -340,35 +340,35 @@ spec:
{{ end }}
---
### INGRESS
-{{ if .Values.transmission.ingress.enabled }}
+{{ if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: transmission
labels:
{{- include "k8s-mediaserver.labels" . | nindent 4 }}
- {{- with .Values.transmission.ingress.annotations }}
+ {{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
-{{- if .Values.transmission.ingress.tls.enabled }}
+{{- if .Values.ingress.tls.enabled }}
tls:
- hosts:
- - {{ .Values.general.ingress_host | quote }}
- secretName: {{ .Values.transmission.ingress.tls.secretName }}
+ - {{ .Values.global.ingress_host | quote }}
+ secretName: {{ .Values.ingress.tls.secretName }}
{{ end }}
- ingressClassName: {{ .Values.general.ingress.ingressClassName }}
+ ingressClassName: {{ .Values.global.ingress.ingressClassName }}
rules:
- - host: {{ .Values.general.ingress_host | quote }}
+ - host: {{ .Values.global.ingress_host | quote }}
http:
paths:
- - path: {{ .Values.transmission.ingress.path }}
+ - path: {{ .Values.ingress.path }}
pathType: Prefix
backend:
service:
name: transmission
port:
- number: {{ .Values.transmission.service.utp.port }}
+ number: {{ .Values.service.utp.port }}
{{ end }}
{{ end }}
diff --git a/helm-charts/k8s-mediaserver/transmission/values.yaml b/helm-charts/k8s-mediaserver/transmission/values.yaml
new file mode 100644
index 0000000..71665ad
--- /dev/null
+++ b/helm-charts/k8s-mediaserver/transmission/values.yaml
@@ -0,0 +1,54 @@
+enabled: true
+container:
+ image: docker.io/linuxserver/transmission
+ nodeSelector: {}
+ port:
+ utp: 9091
+ peer: 51413
+service:
+ utp:
+ type: ClusterIP
+ port: 9091
+ # if type is NodePort, nodePort must be set
+ nodePort:
+ # Defines an additional LB service, requires cloud provider service or MetalLB
+ extraLBService: false
+ extraLBAnnotations: {}
+ peer:
+ type: ClusterIP
+ port: 51413
+ # if type is NodePort, nodePort and nodePortUDP must be set
+ nodePort:
+ nodePortUDP:
+ # Defines an additional LB service, requires cloud provider service or MetalLB
+ extraLBService: false
+ extraLBAnnotations: {}
+ingress:
+ enabled: true
+ annotations: {}
+ path: /transmission
+ tls:
+ enabled: false
+ secretName: ""
+config:
+ auth:
+ enabled: false
+ username: ""
+ password: ""
+resources: {}
+volume: {}
+storage:
+ customVolume: false #set to true if not using a PVC (must provide volume below)
+ pvcName: mediaserver-pvc
+ accessMode: ""
+ size: 5Gi
+ pvcStorageClass: ""
+ subPaths:
+ tv: media/tv
+ movies: media/movies
+ downloads: downloads
+ transmission: transmission
+ sabnzbd: sabnzbd
+ config: config
+ volumes: {}
+nodeSelector: {}
diff --git a/helm-charts/k8s-mediaserver/values.yaml b/helm-charts/k8s-mediaserver/values.yaml
index 3d591e2..1e8aa78 100644
--- a/helm-charts/k8s-mediaserver/values.yaml
+++ b/helm-charts/k8s-mediaserver/values.yaml
@@ -1,10 +1,7 @@
-# Default values for k8s-mediaserver.
-# This is a YAML-formatted file.
-# Declare variables to be passed into your templates.
-
-general:
+global:
ingress_host: k8s-mediaserver.k8s.test
- plex_ingress_host: k8s-plex.k8s.test
+ ingress:
+ ingressClassName: ""
image_tag: latest
podDistribution: cluster # can be "spread" or "cluster"
#UID to run the process with
@@ -14,8 +11,8 @@ general:
#Persistent storage selections and pathing
storage:
customVolume: false #set to true if not using a PVC (must provide volume below)
- pvcName: mediaserver-pvc
accessMode: ""
+ pvcName: mediaserver-pvc
size: 5Gi
pvcStorageClass: ""
# the path starting from the top level of the pv you're passing. If your share is server.local/share/, then tv is server.local/share/media/tv
@@ -27,255 +24,20 @@ general:
sabnzbd: sabnzbd
config: config
volumes: {}
- # hostPath:
- # path: /mnt/share
- ingress:
- ingressClassName: ""
nodeSelector: {}
-
+jackett:
+ enabled: true
sonarr:
enabled: true
- container:
- image: docker.io/linuxserver/sonarr
- nodeSelector: {}
- port: 8989
- service:
- type: ClusterIP
- port: 8989
- nodePort:
- extraLBService: false
- extraLBAnnotations: {}
- # Defines an additional LB service, requires cloud provider service or MetalLB
- ingress:
- enabled: true
- annotations: {}
- path: /sonarr
- tls:
- enabled: false
- secretName: ""
- resources: {}
- volume: {}
- #name: pvc-sonarr-config
- #storageClassName: longhorn
- #annotations:
- # my-annotation/test: my-value
- #labels:
- # my-label/test: my-other-value
- #accessModes: ReadWriteOnce
- #storage: 5Gi
- #selector: {}
-
radarr:
enabled: true
- container:
- image: docker.io/linuxserver/radarr
- nodeSelector: {}
- port: 7878
- service:
- type: ClusterIP
- port: 7878
- nodePort:
- # Defines an additional LB service, requires cloud provider service or MetalLB
- extraLBService: false
- extraLBAnnotations: {}
- ingress:
- enabled: true
- annotations: {}
- path: /radarr
- tls:
- enabled: false
- secretName: ""
- resources: {}
- volume: {}
- #name: pvc-radarr-config
- #storageClassName: longhorn
- #annotations: {}
- #labels: {}
- #accessModes: ReadWriteOnce
- #storage: 5Gi
- #selector: {}
-
-jackett:
- enabled: true
- container:
- image: docker.io/linuxserver/jackett
- nodeSelector: {}
- port: 9117
- service:
- type: ClusterIP
- port: 9117
- nodePort:
- extraLBService: false
- extraLBAnnotations: {}
- # Defines an additional LB service, requires cloud provider service or MetalLB
- ingress:
- enabled: true
- annotations: {}
- path: /jackett
- tls:
- enabled: false
- secretName: ""
- resources: {}
- volume: {}
- # name: pvc-jackett-config
- # storageClassName: longhorn
- # annotations: {}
- # labels: {}
- # accessModes: ReadWriteOnce
- # storage: 5Gi
- # selector: {}
-
-transmission:
+prowlarr:
enabled: true
- container:
- image: docker.io/linuxserver/transmission
- nodeSelector: {}
- port:
- utp: 9091
- peer: 51413
- service:
- utp:
- type: ClusterIP
- port: 9091
- # if type is NodePort, nodePort must be set
- nodePort:
- # Defines an additional LB service, requires cloud provider service or MetalLB
- extraLBService: false
- extraLBAnnotations: {}
- peer:
- type: ClusterIP
- port: 51413
- # if type is NodePort, nodePort and nodePortUDP must be set
- nodePort:
- nodePortUDP:
- # Defines an additional LB service, requires cloud provider service or MetalLB
- extraLBService: false
- extraLBAnnotations: {}
- ingress:
- enabled: true
- annotations: {}
- path: /transmission
- tls:
- enabled: false
- secretName: ""
- config:
- auth:
- enabled: false
- username: ""
- password: ""
- resources: {}
- volume: {}
- # name: pvc-transmission-config
- # storageClassName: longhorn
- # annotations: {}
- # labels: {}
- # accessModes: ReadWriteOnce
- # storage: 5Gi
- # selector: {}
-
sabnzbd:
enabled: true
- container:
- image: docker.io/linuxserver/sabnzbd
- nodeSelector: {}
- port:
- http: 8080
- https: 9090
- service:
- http:
- type: ClusterIP
- port: 8080
- nodePort:
- # Defines an additional LB service, requires cloud provider service or MetalLB
- extraLBService: false
- extraLBAnnotations: {}
- https:
- type: ClusterIP
- port: 9090
- nodePort:
- # Defines an additional LB service, requires cloud provider service or MetalLB
- extraLBService: false
- extraLBAnnotations: {}
- ingress:
- enabled: true
- annotations: {}
- path: /sabnzbd
- tls:
- enabled: false
- secretName: ""
- resources: {}
- volume: {}
- # name: pvc-plex-config
- # storageClassName: longhorn
- # annotations: {}
- # labels: {}
- # accessModes: ReadWriteOnce
- # storage: 5Gi
- # selector: {}
-
-prowlarr:
- enabled: true
- container:
- image: docker.io/linuxserver/prowlarr
- tag: develop
- nodeSelector: {}
- port: 9696
- service:
- type: ClusterIP
- port: 9696
- nodePort:
- extraLBService: false
- extraLBAnnotations: {}
- ingress:
- enabled: true
- annotations: {}
- path: /prowlarr
- tls:
- enabled: false
- secretName: ""
- resources: {}
- volume: {}
- # name: pvc-prowlarr-config
- # storageClassName: longhorn
- # annotations: {}
- # labels: {}
- # accessModes: ReadWriteOnce
- # storage: 5Gi
- # selector: {}
-
plex:
enabled: true
- claim: "CHANGEME"
- replicaCount: 1
- container:
- image: docker.io/linuxserver/plex
- nodeSelector: {}
- port: 32400
- service:
- type: ClusterIP
- port: 32400
- nodePort:
- # Defines an additional LB service, requires cloud provider service or MetalLB
- extraLBService: false
- extraLBAnnotations: {}
- ingress:
- enabled: true
- annotations: {}
- tls:
- enabled: false
- secretName: ""
- resources: {}
- # limits:
- # cpu: 100m
- # memory: 100Mi
- # requests:
- # cpu: 100m
- # memory: 100Mi
- volume: {}
- # name: pvc-plex-config
- # storageClassName: longhorn
- # annotations: {}
- # labels: {}
- # accessModes: ReadWriteOnce
- # storage: 5Gi
- # selector: {}
+jellyfin:
+ enabled: true
+transmission:
+ enabled: true