-
Notifications
You must be signed in to change notification settings - Fork 79
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
Add support for prowlarr #31
Comments
this sounds interesting @Rahulsharma0810, did you have the chance to test it in your environment? |
not from k8s manifests however from their docker command references working fine. |
I've implemented this. It was rather simple: Add this to your values.yaml ...
prowlarr:
enabled: true
container:
nodeSelector: {}
port: 9696
image_tag: develop
service:
type: ClusterIP
port: 9696
nodePort:
extraLBService: true
ingress:
enabled: true
annotations: {}
path: /prowlarr
tls:
enabled: false
secretName: ""
resources: {}
... prowlarr-resources.yaml {{ if .Values.prowlarr.enabled }}
---
### CONFIGMAPS
## INIT-CONTAINER
apiVersion: v1
data:
config.xml: |
<Config>
<UrlBase>{{ .Values.prowlarr.ingress.path }}</UrlBase>
</Config>
init-prowlarr.sh: |
#!/bin/bash
echo "### Initializing config ###"
if [ ! -f /prowlarr-config/config.xml ]; then
cp -n /init-prowlarr/config.xml /prowlarr-config/config.xml
echo "### No configuration found, intialized with default settings ###"
fi
kind: ConfigMap
metadata:
name: init-prowlarr-cm
---
## APPLICATION
apiVersion: v1
kind: ConfigMap
metadata:
name: prowlarr-config
data:
PGID: "{{ .Values.general.pgid }}"
PUID: "{{ .Values.general.puid }}"
---
### DEPLOYMENT
apiVersion: apps/v1
kind: Deployment
metadata:
name: prowlarr
labels:
{{- include "k8s-mediaserver.labels" . | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "k8s-mediaserver.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "k8s-mediaserver.selectorLabels" . | nindent 8 }}
app: prowlarr
spec:
initContainers:
- name: config-prowlarr
image: docker.io/ubuntu:groovy
command: ["/init-prowlarr/init-prowlarr.sh"]
volumeMounts:
- mountPath: /init-prowlarr
name: init-files-prowlarr
- mountPath: /prowlarr-config
name: mediaserver-volume
subPath: "{{ .Values.general.storage.subPaths.config }}/prowlarr"
securityContext:
runAsUser: {{ .Values.general.puid }}
runAsGroup: {{ .Values.general.pgid }}
containers:
- name: {{ .Chart.Name }}
envFrom:
- configMapRef:
name: prowlarr-config
image: lscr.io/linuxserver/prowlarr:{{ .Values.prowlarr.container.image_tag }}
imagePullPolicy: Always
readinessProbe:
tcpSocket:
port: {{ .Values.prowlarr.container.port }}
initialDelaySeconds: 10
periodSeconds: 20
ports:
- name: prowlarr-port
containerPort: {{ .Values.prowlarr.container.port }}
protocol: TCP
volumeMounts:
- name: mediaserver-volume
mountPath: "/config"
subPath: "{{ .Values.general.storage.subPaths.config }}/prowlarr"
{{- with .Values.prowlarr.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
volumes:
{{ if not .Values.general.storage.customVolume }}
- name: mediaserver-volume
persistentVolumeClaim:
claimName: {{ .Values.general.storage.pvcName }}
{{ else }}
- name: mediaserver-volume
{{- toYaml .Values.general.storage.volumes | nindent 10 }}
{{ end }}
- name: init-files-prowlarr
configMap:
defaultMode: 493
name: init-prowlarr-cm
{{- with .Values.general.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
---
### SERVICES
apiVersion: v1
kind: Service
metadata:
name: prowlarr
labels:
{{- include "k8s-mediaserver.labels" . | nindent 4 }}
spec:
type: {{ .Values.prowlarr.service.type }}
ports:
- port: {{ .Values.prowlarr.service.port }}
targetPort: {{ .Values.prowlarr.container.port }}
protocol: TCP
{{ if eq .Values.prowlarr.service.type "NodePort" }}
nodePort: {{ .Values.prowlarr.service.nodePort }}
{{ end }}
name: prowlarr-port
selector:
app: prowlarr
---
{{ if .Values.prowlarr.service.extraLBService }}
apiVersion: v1
kind: Service
metadata:
name: prowlarr-lb
annotations:
service.beta.kubernetes.io/azure-dns-label-name: prowlarr-fds-mediaserver-v2
labels:
{{- include "k8s-mediaserver.labels" . | nindent 4 }}
spec:
type: LoadBalancer
ports:
- port: {{ .Values.prowlarr.service.port }}
targetPort: {{ .Values.prowlarr.container.port }}
protocol: TCP
name: prowlarr-port
selector:
app: prowlarr
{{ end }}
---
### INGRESS ###
{{ if .Values.prowlarr.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: prowlarr
labels:
{{- include "k8s-mediaserver.labels" . | nindent 4 }}
{{- with .Values.prowlarr.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{ if .Values.prowlarr.ingress.tls.enabled }}
tls:
- hosts:
- {{ .Values.general.ingress_host | quote }}
secretName: {{ .Values.prowlarr.ingress.tls.secretName }}
{{ end }}
ingressClassName: {{ .Values.general.ingress.ingressClassName }}
rules:
- host: {{ .Values.general.ingress_host | quote }}
http:
paths:
- path: {{ .Values.prowlarr.ingress.path }}
pathType: Prefix
backend:
service:
name: prowlarr
port:
number: {{ .Values.prowlarr.service.port }}
{{ end }}
{{ end }} |
I'll add this one and do the config for the custom volume after we're done with #39 and #28 Should be pretty straightforward since @dsfrederic has already done the heavy lifting |
feature(prowlarr): kubealex#31 Added prowlarr and extra lb annotations
feat(prowlarr): #31 Added prowlarr and extra lb annotations
…r-support Revert "feat(prowlarr): #31 Added prowlarr and extra lb annotations"
…dd-prowlarr-support feat(prowlarr): #31 Added prowlarr and extra lb annotations
…ature/31-add-prowlarr-support Revert "feat(prowlarr): #31 Added prowlarr and extra lb annotations"
feat(prowlarr): #31 Added prowlarr and extra lb annotations
prowlarr is a better alternative compared with jackett. https://hub.docker.com/r/linuxserver/prowlarr have already identical configuration container image.
The text was updated successfully, but these errors were encountered: