Deluge fixes for #3

This commit is contained in:
2020-05-07 21:47:48 +01:00
parent 4dc7b0f9f2
commit 0da018df2f
5 changed files with 92 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
apiVersion: v1
description: Deluge is a Python BitTorrent client based on libtorrent
name: deluge
version: 1.1.2
version: 1.2.0
keywords:
- deluge
- libtorrent

View File

@@ -1,3 +1,5 @@
---
{{ if .Values.btservice.enabled }}
apiVersion: v1
kind: Service
metadata:
@@ -40,21 +42,14 @@ spec:
externalTrafficPolicy: {{ .Values.btservice.externalTrafficPolicy }}
{{- end }}
ports:
- name: daemon
port: 58846
protocol: TCP
targetPort: daemon
{{ if (eq .Values.btservice.type "NodePort") }}
nodePort: 58846
{{ end }}
- name: bt-tcp
port: 58946
protocol: TCP
targetPort: bt-tcp
{{ if (eq .Values.btservice.type "NodePort") }}
nodePort: 58946
nodePort: {{ default 30846 .Values.btservice.nodePort }}
{{ end }}
selector:
app.kubernetes.io/name: {{ include "deluge.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{ end }}

View File

@@ -1,3 +1,5 @@
---
{{ if .Values.btservice.enabled }}
apiVersion: v1
kind: Service
metadata:
@@ -45,9 +47,9 @@ spec:
protocol: UDP
targetPort: bt-udp
{{ if (eq .Values.btservice.type "NodePort") }}
nodePort: 58946
nodePort: {{ default 30846 .Values.btservice.nodePort }}
{{ end }}
selector:
app.kubernetes.io/name: {{ include "deluge.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{ end }}

View File

@@ -0,0 +1,53 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "deluge.fullname" . }}-daemon
labels:
app.kubernetes.io/name: {{ include "deluge.name" . }}
helm.sh/chart: {{ include "deluge.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.daemonservice.labels }}
{{ toYaml .Values.daemonservice.labels | indent 4 }}
{{- end }}
{{- with .Values.daemonservice.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if (or (eq .Values.daemonservice.type "ClusterIP") (empty .Values.daemonservice.type)) }}
type: ClusterIP
{{- if .Values.daemonservice.clusterIP }}
clusterIP: {{ .Values.daemonservice.clusterIP }}
{{end}}
{{- else if eq .Values.daemonservice.type "LoadBalancer" }}
type: {{ .Values.daemonservice.type }}
{{- if .Values.daemonservice.loadBalancerIP }}
loadBalancerIP: {{ .Values.daemonservice.loadBalancerIP }}
{{- end }}
{{- if .Values.daemonservice.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{ toYaml .Values.daemonservice.loadBalancerSourceRanges | indent 4 }}
{{- end -}}
{{- else }}
type: {{ .Values.daemonservice.type }}
{{- end }}
{{- if .Values.daemonservice.externalIPs }}
externalIPs:
{{ toYaml .Values.daemonservice.externalIPs | indent 4 }}
{{- end }}
{{- if .Values.daemonservice.externalTrafficPolicy }}
externalTrafficPolicy: {{ .Values.daemonservice.externalTrafficPolicy }}
{{- end }}
ports:
- name: daemon
port: 58846
protocol: TCP
targetPort: daemon
{{ if (eq .Values.daemonservice.type "NodePort") }}
nodePort: {{ default 30846 .Values.daemonservice.nodePort }}
{{ end }}
selector:
app.kubernetes.io/name: {{ include "deluge.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}

View File

@@ -32,6 +32,7 @@ pgid: 1001
##
# dockerMods: linuxserver/deluge:ssh
## Service for the WebUI port
webuiservice:
type: ClusterIP
port: 8112
@@ -53,8 +54,10 @@ webuiservice:
## Set the externalTrafficPolicy in the Service to either Cluster or Local
# externalTrafficPolicy: Cluster
btservice:
type: NodePort
## Service for the Daemon port
daemonservice:
type: ClusterIP
port:
## Specify the nodePort value for the LoadBalancer and NodePort service types.
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
##
@@ -73,6 +76,31 @@ btservice:
## Set the externalTrafficPolicy in the Service to either Cluster or Local
# externalTrafficPolicy: Cluster
## Service for the BT taffic port - ideally these should be a LB due to a high port
## and also sharing TCP and UDP services on the same port.
btservice:
enabled: false
type: LoadBalancer
## Specify the nodePort value for the LoadBalancer and NodePort service types.
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
##
# nodePort:
## Provide any additional annotations which may be required. This can be used to
## set the LoadBalancer service type to internal only.
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
##
annotations: {}
# annotations:
# metallb.universe.tf/allow-shared-ip: deluge
labels: {}
## Use loadBalancerIP to request a specific static IP,
## otherwise leave blank
##
loadBalancerIP:
# loadBalancerSourceRanges: []
## Set the externalTrafficPolicy in the Service to either Cluster or Local
# externalTrafficPolicy: Cluster
ingress:
enabled: false
annotations: {}