diff --git a/charts/jackett/Chart.yaml b/charts/jackett/Chart.yaml index 7fade2c5..c8dcd72e 100644 --- a/charts/jackett/Chart.yaml +++ b/charts/jackett/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: v0.12.1582-ls39 description: API Support for your favorite torrent trackers name: jackett -version: 2.0.2 +version: 2.1.0 keywords: - jackett - torrent diff --git a/charts/jackett/README.md b/charts/jackett/README.md index bd8875a1..3fdddc13 100644 --- a/charts/jackett/README.md +++ b/charts/jackett/README.md @@ -65,6 +65,13 @@ The following tables lists the configurable parameters of the Sentry chart and t | `persistence.config.subPath` | Mount a sub directory of the persistent volume if set | `""` | | `persistence.config.storageClass` | Type of persistent volume claim | `-` | | `persistence.config.accessMode` | Persistence access mode | `ReadWriteOnce` | +| `persistence.torrentblackhole.enabled` | Use persistent volume to store torrent files | `true` | +| `persistence.torrentblackhole.size` | Size of persistent volume claim | `1Gi` | +| `persistence.torrentblackhole.existingClaim`| Use an existing PVC to persist data | `nil` | +| `persistence.torrentblackhole.subPath` | Mount a sub directory of the persistent volume if set | `""` | +| `persistence.torrentblackhole.storageClass` | Type of persistent volume claim | `-` | +| `persistence.torrentblackhole.accessMode` | Persistence access mode | `ReadWriteOnce` | +| `persistence.extraExistingClaimMounts` | Optionally add multiple existing claims | `[]` | | `resources` | CPU/Memory resource requests/limits | `{}` | | `nodeSelector` | Node labels for pod assignment | `{}` | | `tolerations` | Toleration labels for pod assignment | `[]` | diff --git a/charts/jackett/templates/deployment.yaml b/charts/jackett/templates/deployment.yaml index 71dee1d5..1afc82cf 100644 --- a/charts/jackett/templates/deployment.yaml +++ b/charts/jackett/templates/deployment.yaml @@ -65,6 +65,16 @@ spec: {{- if .Values.persistence.config.subPath }} subPath: "{{ .Values.persistence.config.subPath }}" {{- end }} + - mountPath: /downloads + name: torrentblackhole + {{- if .Values.persistence.torrentblackhole.subPath }} + subPath: "{{ .Values.persistence.torrentblackhole.subPath }}" + {{- end }} + {{- range .Values.persistence.extraExistingClaimMounts }} + - name: {{ .name }} + mountPath: {{ .mountPath }} + readOnly: {{ .readOnly }} + {{- end }} resources: {{ toYaml .Values.resources | indent 12 }} volumes: @@ -75,6 +85,18 @@ spec: {{- else }} emptyDir: {} {{ end }} + - name: torrentblackhole + {{- if .Values.persistence.torrentblackhole.enabled }} + persistentVolumeClaim: + claimName: {{ if .Values.persistence.torrentblackhole.existingClaim }}{{ .Values.persistence.torrentblackhole.existingClaim }}{{- else }}{{ template "jackett.fullname" . }}-torrentblackhole{{- end }} + {{- else }} + emptyDir: {} + {{- end }} + {{- range .Values.persistence.extraExistingClaimMounts }} + - name: {{ .name }} + persistentVolumeClaim: + claimName: {{ .existingClaim }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{ toYaml . | indent 8 }} diff --git a/charts/jackett/templates/torrent-blackhole-pvc.yaml b/charts/jackett/templates/torrent-blackhole-pvc.yaml new file mode 100644 index 00000000..163079be --- /dev/null +++ b/charts/jackett/templates/torrent-blackhole-pvc.yaml @@ -0,0 +1,25 @@ + +{{- if and .Values.persistence.torrentblackhole.enabled (not .Values.persistence.torrentblackhole.existingClaim) }} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ template "jackett.fullname" . }}-torrentblackhole + labels: + app.kubernetes.io/name: {{ include "jackett.name" . }} + helm.sh/chart: {{ include "jackett.chart" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} +spec: + accessModes: + - {{ .Values.persistence.torrentblackhole.accessMode | quote }} + resources: + requests: + storage: {{ .Values.persistence.torrentblackhole.size | quote }} +{{- if .Values.persistence.torrentblackhole.storageClass }} +{{- if (eq "-" .Values.persistence.torrentblackhole.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.torrentblackhole.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} diff --git a/charts/jackett/values.yaml b/charts/jackett/values.yaml index deb1872c..1aed02ce 100644 --- a/charts/jackett/values.yaml +++ b/charts/jackett/values.yaml @@ -86,6 +86,23 @@ persistence: ## This is especially handy for volume plugins that don't natively support sub mounting (like glusterfs). ## subPath: "" + torrentblackhole: + enabled: true + ## Jackett torrentblackhole directory volume configuration + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## + ## If you want to reuse an existing claim, you can pass the name of the PVC using + ## the existingClaim variable + # existingClaim: your-claim + # subPath: some-subpath + accessMode: ReadWriteOnce + size: 1Gi resources: {} # We usually recommend not to specify default resources and to leave this as a conscious