diff --git a/.packaged/index.yaml b/.packaged/index.yaml index 343a774..30b8f59 100644 --- a/.packaged/index.yaml +++ b/.packaged/index.yaml @@ -3,7 +3,7 @@ entries: jackett: - apiVersion: v2 appVersion: 1.16.0 - created: "2025-01-26T15:57:33.048023+01:00" + created: "2025-01-26T16:14:06.324594+01:00" description: A Helm chart for Kubernetes digest: cb583d90a982e50cb0028e2d8d2afce93ef8f64dc202ddffd59262a74ff33fe1 name: jackett @@ -14,7 +14,7 @@ entries: overseerr: - apiVersion: v2 appVersion: 1.16.0 - created: "2025-01-26T15:57:33.048557+01:00" + created: "2025-01-26T16:14:06.325136+01:00" description: A Helm chart for Kubernetes digest: ac634ebbb7000644e02606157bedbc8ab6e3dd59d22d8ee699093d0f683a2899 name: overseerr @@ -25,7 +25,7 @@ entries: owncloud: - apiVersion: v2 appVersion: 1.16.0 - created: "2025-01-26T15:57:33.050003+01:00" + created: "2025-01-26T16:14:06.327302+01:00" description: A Helm chart for Kubernetes digest: 9a1724f504cc46baffa8dbaff5e3f5b7f3c07d64143643acb3f653b07868e963 name: owncloud @@ -36,9 +36,9 @@ entries: plex: - apiVersion: v2 appVersion: 1.16.0 - created: "2025-01-26T15:57:33.050302+01:00" + created: "2025-01-26T16:14:06.327699+01:00" description: A Helm chart for Kubernetes - digest: b3b9ef72ae21a5948c757f1ccb6c739e035bd6c5a6ef030eca250c13498b7de6 + digest: 52d474c17f631c86fcc5d4eeeff6ec75d3121ea9317a00a9b200d5b7550281a0 name: plex type: application urls: @@ -47,7 +47,7 @@ entries: qbittorrent: - apiVersion: v2 appVersion: 1.16.0 - created: "2025-01-26T15:57:33.050702+01:00" + created: "2025-01-26T16:14:06.328134+01:00" description: A Helm chart for Kubernetes digest: 962463c2a27832ad6dc9709a3be008f242e1b039d9da7579becfa0bb96f6e063 name: qbittorrent @@ -58,7 +58,7 @@ entries: radarr: - apiVersion: v2 appVersion: 1.16.0 - created: "2025-01-26T15:57:33.051131+01:00" + created: "2025-01-26T16:14:06.328559+01:00" description: A Helm chart for Kubernetes digest: 78b75bd7d472fadde70016881f54f3359293b39d6ea964344131cc5572bb2b2f name: radarr @@ -69,7 +69,7 @@ entries: sonarr: - apiVersion: v2 appVersion: 1.16.0 - created: "2025-01-26T15:57:33.052972+01:00" + created: "2025-01-26T16:14:06.329033+01:00" description: A Helm chart for Kubernetes digest: ba9b24a526270d72b33d1918755baa182095f97fb4f38df16b5a833c8138d6dc name: sonarr @@ -77,4 +77,4 @@ entries: urls: - sonarr-0.1.0.tgz version: 0.1.0 -generated: "2025-01-26T15:57:33.047246+01:00" +generated: "2025-01-26T16:14:06.323898+01:00" diff --git a/.packaged/plex-0.1.0.tgz b/.packaged/plex-0.1.0.tgz index 83db994..b0001c4 100644 Binary files a/.packaged/plex-0.1.0.tgz and b/.packaged/plex-0.1.0.tgz differ diff --git a/plex/templates/deployment.yaml b/plex/templates/deployment.yaml index 3400981..e853ba8 100644 --- a/plex/templates/deployment.yaml +++ b/plex/templates/deployment.yaml @@ -78,14 +78,18 @@ spec: httpGet: path: /identity port: http - initialDelaySeconds: 30 + initialDelaySeconds: 60 periodSeconds: 10 + timeoutSeconds: 3 + failureThreshold: 5 readinessProbe: httpGet: path: /identity port: http - initialDelaySeconds: 30 + initialDelaySeconds: 60 periodSeconds: 10 + timeoutSeconds: 3 + failureThreshold: 5 resources: {{- toYaml .Values.resources | nindent 12 }} volumes: diff --git a/plex/values.yaml b/plex/values.yaml index 53c8a1c..c0cbc30 100644 --- a/plex/values.yaml +++ b/plex/values.yaml @@ -17,8 +17,8 @@ podSecurityContext: # Configurable user and group IDs securityContext: - PUID: 1000 - PGID: 1000 + PUID: 0 + PGID: 0 privileged: true capabilities: add: diff --git a/sabnzbd/.helmignore b/sabnzbd/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/sabnzbd/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/sabnzbd/Chart.yaml b/sabnzbd/Chart.yaml new file mode 100644 index 0000000..00c8ec0 --- /dev/null +++ b/sabnzbd/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: sabnzbd +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/sabnzbd/templates/NOTES.txt b/sabnzbd/templates/NOTES.txt new file mode 100644 index 0000000..3826497 --- /dev/null +++ b/sabnzbd/templates/NOTES.txt @@ -0,0 +1,22 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range .paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + {{- end }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "sabnzbd.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "sabnzbd.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "sabnzbd.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "sabnzbd.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} diff --git a/sabnzbd/templates/_helpers.tpl b/sabnzbd/templates/_helpers.tpl new file mode 100644 index 0000000..3d0af40 --- /dev/null +++ b/sabnzbd/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "sabnzbd.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "sabnzbd.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "sabnzbd.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "sabnzbd.labels" -}} +helm.sh/chart: {{ include "sabnzbd.chart" . }} +{{ include "sabnzbd.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "sabnzbd.selectorLabels" -}} +app.kubernetes.io/name: {{ include "sabnzbd.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "sabnzbd.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "sabnzbd.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/sabnzbd/templates/deployment.yaml b/sabnzbd/templates/deployment.yaml new file mode 100644 index 0000000..0b4e7d6 --- /dev/null +++ b/sabnzbd/templates/deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "sabnzbd.fullname" . }} + labels: + {{- include "sabnzbd.labels" . | nindent 4 }} +spec: + replicas: 1 + selector: + matchLabels: + {{- include "sabnzbd.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + {{- include "sabnzbd.selectorLabels" . | nindent 8 }} + spec: + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + {{- range .Values.env }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end }} + ports: + - name: http + containerPort: {{ .Values.service.port }} + protocol: TCP + volumeMounts: + - name: config + mountPath: {{ .Values.persistence.config.mountPath }} + - name: downloads + mountPath: {{ .Values.persistence.downloads.mountPath }} + - name: incomplete + mountPath: {{ .Values.persistence.incomplete.mountPath }} + volumes: + - name: config + persistentVolumeClaim: + claimName: {{ .Values.persistence.config.claimName }} + - name: downloads + persistentVolumeClaim: + claimName: {{ .Values.persistence.downloads.claimName }} + - name: incomplete + persistentVolumeClaim: + claimName: {{ .Values.persistence.incomplete.claimName }} diff --git a/sabnzbd/templates/hpa.yaml b/sabnzbd/templates/hpa.yaml new file mode 100644 index 0000000..cb03c9a --- /dev/null +++ b/sabnzbd/templates/hpa.yaml @@ -0,0 +1,32 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "sabnzbd.fullname" . }} + labels: + {{- include "sabnzbd.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "sabnzbd.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/sabnzbd/templates/ingress.yaml b/sabnzbd/templates/ingress.yaml new file mode 100644 index 0000000..d5ce404 --- /dev/null +++ b/sabnzbd/templates/ingress.yaml @@ -0,0 +1,61 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "sabnzbd.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} + {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} + {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} + {{- end }} +{{- end }} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1 +{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + {{- include "sabnzbd.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} + pathType: {{ .pathType }} + {{- end }} + backend: + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- else }} + serviceName: {{ $fullName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} diff --git a/sabnzbd/templates/pvc.yaml b/sabnzbd/templates/pvc.yaml new file mode 100644 index 0000000..273c309 --- /dev/null +++ b/sabnzbd/templates/pvc.yaml @@ -0,0 +1,32 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: sabnzbd-config +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: sabnzbd-downloads +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Gi +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: sabnzbd-incomplete +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Gi \ No newline at end of file diff --git a/sabnzbd/templates/service.yaml b/sabnzbd/templates/service.yaml new file mode 100644 index 0000000..ea69f7b --- /dev/null +++ b/sabnzbd/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "sabnzbd.fullname" . }} + labels: + {{- include "sabnzbd.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + {{- include "sabnzbd.selectorLabels" . | nindent 4 }} diff --git a/sabnzbd/templates/serviceaccount.yaml b/sabnzbd/templates/serviceaccount.yaml new file mode 100644 index 0000000..51f0074 --- /dev/null +++ b/sabnzbd/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "sabnzbd.serviceAccountName" . }} + labels: + {{- include "sabnzbd.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automount }} +{{- end }} diff --git a/sabnzbd/templates/tests/test-connection.yaml b/sabnzbd/templates/tests/test-connection.yaml new file mode 100644 index 0000000..7e35cb6 --- /dev/null +++ b/sabnzbd/templates/tests/test-connection.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "sabnzbd.fullname" . }}-test-connection" + labels: + {{- include "sabnzbd.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "sabnzbd.fullname" . }}:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/sabnzbd/values.yaml b/sabnzbd/values.yaml new file mode 100644 index 0000000..9d53f8c --- /dev/null +++ b/sabnzbd/values.yaml @@ -0,0 +1,125 @@ +# Default values for sabnzbd. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: linuxserver/sabnzbd + tag: latest + pullPolicy: IfNotPresent + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Automatically mount a ServiceAccount's API credentials? + automount: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: {} +podLabels: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 8080 + +ingress: + enabled: false + className: "" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +livenessProbe: + httpGet: + path: / + port: http +readinessProbe: + httpGet: + path: / + port: http + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +# Additional volumes on the output Deployment definition. +volumes: [] +# - name: foo +# secret: +# secretName: mysecret +# optional: false + +# Additional volumeMounts on the output Deployment definition. +volumeMounts: [] +# - name: foo +# mountPath: "/etc/foo" +# readOnly: true + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +env: + - name: TZ + value: "Europe/Berlin" + - name: PUID + value: "0" + - name: PGID + value: "0" + +persistence: + config: + claimName: sabnzbd-config + mountPath: /config + downloads: + claimName: sabnzbd-downloads + mountPath: /downloads + incomplete: + claimName: sabnzbd-incomplete + mountPath: /incomplete-downloads diff --git a/sonarr/templates/deployment.yaml b/sonarr/templates/deployment.yaml index de50658..5772692 100644 --- a/sonarr/templates/deployment.yaml +++ b/sonarr/templates/deployment.yaml @@ -5,7 +5,7 @@ metadata: labels: {{- include "sonarr.labels" . | nindent 4 }} spec: - replicas: {{ .Values.replicaCount }} + replicas: 1 selector: matchLabels: {{- include "sonarr.selectorLabels" . | nindent 6 }} @@ -22,15 +22,13 @@ spec: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} env: - - name: TZ - value: {{ .Values.env.TZ | quote }} - - name: PUID - value: {{ .Values.securityContext.PUID | quote }} - - name: PGID - value: {{ .Values.securityContext.PGID | quote }} + {{- range .Values.env }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end }} ports: - name: http containerPort: {{ .Values.service.port }} @@ -54,30 +52,14 @@ spec: {{- toYaml .Values.resources | nindent 12 }} volumes: - name: config - {{- if .Values.persistence.config.enabled }} persistentVolumeClaim: - claimName: {{ include "sonarr.fullname" . }}-config - {{- else }} - emptyDir: {} - {{- end }} + claimName: {{ .Values.persistence.config.claimName }} - name: tv - {{- if .Values.persistence.tv.enabled }} persistentVolumeClaim: - claimName: {{ include "sonarr.fullname" . }}-tv - {{- else }} - emptyDir: {} - {{- end }} + claimName: {{ .Values.persistence.tv.claimName }} - name: downloads - {{- if .Values.persistence.downloads.enabled }} persistentVolumeClaim: - {{- if .Values.persistence.downloads.existingClaim }} - claimName: {{ .Values.persistence.downloads.existingClaim }} - {{- else }} - claimName: {{ include "sonarr.fullname" . }}-downloads - {{- end }} - {{- else }} - emptyDir: {} - {{- end }} + claimName: {{ .Values.persistence.downloads.claimName }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/sonarr/templates/pvc.yaml b/sonarr/templates/pvc.yaml index 69d43b5..acb536c 100644 --- a/sonarr/templates/pvc.yaml +++ b/sonarr/templates/pvc.yaml @@ -2,52 +2,52 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: {{ include "sonarr.fullname" . }}-config + name: sonarr-config labels: {{- include "sonarr.labels" . | nindent 4 }} spec: accessModes: - - {{ .Values.persistence.config.accessMode | quote }} + - ReadWriteOnce {{- if .Values.persistence.config.storageClass }} storageClassName: {{ .Values.persistence.config.storageClass | quote }} {{- end }} resources: requests: - storage: {{ .Values.persistence.config.size | quote }} + storage: 1Gi {{- end }} --- {{- if .Values.persistence.tv.enabled }} apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: {{ include "sonarr.fullname" . }}-tv + name: sonarr-tv labels: {{- include "sonarr.labels" . | nindent 4 }} spec: accessModes: - - {{ .Values.persistence.tv.accessMode | quote }} + - ReadWriteOnce {{- if .Values.persistence.tv.storageClass }} storageClassName: {{ .Values.persistence.tv.storageClass | quote }} {{- end }} resources: requests: - storage: {{ .Values.persistence.tv.size | quote }} + storage: 100Gi {{- end }} --- {{- if and .Values.persistence.downloads.enabled (not .Values.persistence.downloads.existingClaim) }} apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: {{ include "sonarr.fullname" . }}-downloads + name: sonarr-downloads labels: {{- include "sonarr.labels" . | nindent 4 }} spec: accessModes: - - {{ .Values.persistence.downloads.accessMode | quote }} + - ReadWriteOnce {{- if .Values.persistence.downloads.storageClass }} storageClassName: {{ .Values.persistence.downloads.storageClass | quote }} {{- end }} resources: requests: - storage: {{ .Values.persistence.downloads.size | quote }} + storage: 100Gi {{- end }} \ No newline at end of file diff --git a/sonarr/values.yaml b/sonarr/values.yaml index f1dc8ee..7b6a415 100644 --- a/sonarr/values.yaml +++ b/sonarr/values.yaml @@ -6,8 +6,8 @@ replicaCount: 1 image: repository: linuxserver/sonarr + tag: latest pullPolicy: IfNotPresent - tag: "latest" imagePullSecrets: [] nameOverride: "" @@ -96,27 +96,21 @@ affinity: {} # Environment variables env: - TZ: "UTC" + - name: TZ + value: "Europe/Berlin" + - name: PUID + value: "0" + - name: PGID + value: "0" # Persistence configuration persistence: config: - enabled: true - storageClass: "" - accessMode: ReadWriteOnce - size: 1Gi + claimName: sonarr-config mountPath: /config tv: - enabled: true - storageClass: "" - accessMode: ReadWriteOnce - size: 100Gi + claimName: sonarr-tv mountPath: /tv downloads: - enabled: true - storageClass: "" - accessMode: ReadWriteOnce - size: 20Gi + claimName: sonarr-downloads mountPath: /downloads - # If you want to use existing PVC from qBittorrent - existingClaim: ""