[jackett] Migrate to common library (#113)

This commit is contained in:
Bernd Schörgers 2020-11-06 22:40:53 +01:00 committed by GitHub
parent c7f15f37a2
commit 45c9f3c39e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 55 additions and 98 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
appVersion: v0.16.1045 appVersion: v0.16.1045
description: API Support for your favorite torrent trackers description: API Support for your favorite torrent trackers
name: jackett name: jackett
version: 4.0.1 version: 5.0.0
keywords: keywords:
- jackett - jackett
- torrent - torrent
@ -15,7 +15,6 @@ maintainers:
- name: billimek - name: billimek
email: jeff@billimek.com email: jeff@billimek.com
dependencies: dependencies:
- name: media-common - name: common
repository: https://k8s-at-home.com/charts/ repository: https://k8s-at-home.com/charts/
version: ^1.0.0 version: ^1.0.3
alias: jackett

View File

@ -28,8 +28,9 @@ helm delete my-release --purge
The command removes all the Kubernetes components associated with the chart and deletes the release. The command removes all the Kubernetes components associated with the chart and deletes the release.
## Configuration ## Configuration
Read through the media-common [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/media-common/values.yaml) Read through the charts [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/jackett/values.yaml)
file. It has several commented out suggested values. file. It has several commented out suggested values.
Additionally you can take a look at the common library [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/common/values.yaml) for more (advanced) configuration options.
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```console ```console
@ -43,11 +44,9 @@ chart. For example,
helm install jackett k8s-at-home/jackett --values values.yaml helm install jackett k8s-at-home/jackett --values values.yaml
``` ```
These values will be nested as it is a dependency, for example
```yaml ```yaml
jackett: image:
image: tag: ...
tag: ...
``` ```
--- ---
@ -59,4 +58,19 @@ Error: rendered manifests contain a resource that already exists. Unable to cont
``` ```
it may be because you uninstalled the chart with `skipuninstall` enabled, you need to manually delete the pvc or use `existingClaim`. it may be because you uninstalled the chart with `skipuninstall` enabled, you need to manually delete the pvc or use `existingClaim`.
--- ---
## Upgrading an existing Release to a new major version
A major chart version change (like 4.0.1 -> 5.0.0) indicates that there is an incompatible breaking change potentially needing manual actions.
### Upgrading from 4.x.x to 5.x.x
Due to migrating to a centralized common library some values in `values.yaml` have changed.
Examples:
* `service.port` has been moved to `service.port.port`.
* `persistence.type` has been moved to `controllerType`.
Refer to the library values.yaml for more configuration options.

View File

@ -1,10 +0,0 @@
jackett:
image:
organization: linuxserver
repository: jackett
tag: v0.16.1045-ls14
service:
type: ClusterIP
port: 9117
ingress:
enabled: false

View File

@ -1,20 +1 @@
{{- $svcPort := .Values.jackett.service.port -}} {{- include "common.notes.defaultNotes" . -}}
1. Get the application URL by running these commands:
{{- if .Values.jackett.ingress.enabled }}
{{- range .Values.jackett.ingress.hosts }}
http{{ if $.Values.jackett.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.jackett.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.jackett.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "media-common.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.jackett.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 svc -w {{ include "media-common.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "media-common.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ $svcPort }}
{{- else if contains "ClusterIP" .Values.jackett.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "media-common.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:{{ $svcPort }}
{{- end }}

View File

@ -0,0 +1 @@
{{ include "common.all" . }}

View File

@ -1,22 +0,0 @@
{{- if and .Values.jackett.persistence.torrentblackhole.enabled (not .Values.jackett.persistence.torrentblackhole.existingClaim) }}
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "media-common.fullname" . }}-downloads
{{- if .Values.jackett.persistence.torrentblackhole.skipuninstall }}
annotations:
"helm.sh/resource-policy": keep
{{- end }}
labels:
{{- include "media-common.labels" . | nindent 4 }}
spec:
accessModes:
- {{ .Values.jackett.persistence.torrentblackhole.accessMode | quote }}
resources:
requests:
storage: {{ .Values.jackett.persistence.torrentblackhole.size | quote }}
{{- if .Values.jackett.persistence.torrentblackhole.storageClass }}
storageClassName: {{ if (eq "-" .Values.jackett.persistence.torrentblackhole.storageClass) }}""{{- else }}{{ .Values.jackett.persistence.torrentblackhole.storageClass | quote}}{{- end }}
{{- end }}
{{- end -}}

View File

@ -1,43 +1,37 @@
# Default values for Jackett. # Default values for Jackett.
jackett: image:
image: repository: linuxserver/jackett
organization: linuxserver pullPolicy: IfNotPresent
repository: jackett tag: v0.16.1045-ls14
pullPolicy: IfNotPresent
tag: v0.16.1045-ls14
service: service:
port:
port: 9117 port: 9117
env: {} env: {}
# TZ: UTC # TZ: UTC
# PUID: 1001 # PUID: 1001
# PGID: 1001 # PGID: 1001
persistence: persistence:
torrentblackhole: config:
enabled: false enabled: true
## Jackett torrent torrentblackhole Persistent Volume Storage Class emptyDir: true
## If defined, storageClassName: <storageClass>
## 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: "-"
# accessMode: ReadWriteOnce
# size: 1Gi
## Do not delete the pvc upon helm uninstall
# skipuninstall: false
# existingClaim: ""
additionalVolumes: torrentblackhole:
- name: torrentblackhole enabled: true
emptyDir: {} emptyDir: true
## When using persistence.torrentblackhole.enabled: true, adjust this to: mountPath: /downloads
# persistentVolumeClaim: ## Jackett torrent torrentblackhole Persistent Volume Storage Class
# claimName: jackett-torrentblackhole ## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
additionalVolumeMounts: ## If undefined (the default) or set to null, no storageClassName spec is
- name: torrentblackhole ## set, choosing the default provisioner. (gp2 on AWS, standard on
mountPath: /downloads ## GKE, AWS & OpenStack)
# storageClass: "-"
# accessMode: ReadWriteOnce
# size: 1Gi
## Do not delete the pvc upon helm uninstall
# skipuninstall: false
# existingClaim: ""