-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft: Separate Helm Charts #92
base: master
Are you sure you want to change the base?
Changes from all commits
d57fc68
f1f1b1c
e3d06c7
b4a3b46
5a44666
e0b3771
f70bc42
129898f
3d235ea
995f7af
07e4a00
903eb1b
9cccd0e
34e93eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
{{ if .Values.jackett.enabled }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Get this for free from the superchart structure. |
||
--- | ||
### CONFIGMAPS | ||
## INIT-CONTAINER | ||
apiVersion: v1 | ||
data: | ||
ServerConfig.json: | | ||
{ | ||
"BasePathOverride": "{{ .Values.jackett.ingress.path }}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Each chart being self contained means qualified paths like this one don't need the |
||
"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 }}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
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 }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
enabled
flags move out of values and into the deps section.