mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-01-24 16:09:08 +00:00
[qbittorrent] No longer require additionalports
This commit is contained in:
parent
e3e42eea31
commit
571372c4c7
@ -5,11 +5,11 @@ metadata:
|
||||
labels:
|
||||
{{- include "media-common.labels" . | nindent 4 }}
|
||||
data:
|
||||
{{- if .Values.qbittorrent.service.additionalPorts.bittorrent }}
|
||||
{{- if and .Values.qbittorrent.btService .Values.qbittorrent.btService.port }}
|
||||
31-update-port: |-
|
||||
#!/bin/bash
|
||||
QBITTORRENT_CONFIGFILE="/config/qBittorrent/qBittorrent.conf"
|
||||
INCOMING_PORT={{- .Values.qbittorrent.service.additionalPorts.bittorrent.port }}
|
||||
INCOMING_PORT={{- .Values.qbittorrent.btService.port }}
|
||||
|
||||
incoming_port_exist=$(cat ${QBITTORRENT_CONFIGFILE} | grep -m 1 'Connection\\PortRangeMin='${INCOMING_PORT})
|
||||
if [[ -z "${incoming_port_exist}" ]]; then
|
||||
|
28
charts/qbittorrent/templates/service.yaml
Normal file
28
charts/qbittorrent/templates/service.yaml
Normal file
@ -0,0 +1,28 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "media-common.fullname" . }}-bittorrent
|
||||
labels:
|
||||
{{- include "media-common.labels" . | nindent 4 }}
|
||||
{{- if .Values.qbittorrent.btService.labels }}
|
||||
{{ toYaml .Values.qbittorrent.btService.labels | indent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.qbittorrent.btService.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.qbittorrent.btService.type }}
|
||||
ports:
|
||||
- name: bittorrent
|
||||
port: {{ .Values.qbittorrent.btService.port }}
|
||||
protocol: TCP
|
||||
targetPort: {{ .Values.qbittorrent.btService.port }}
|
||||
{{- if (and (eq .Values.qbittorrent.btService.type "NodePort") (not (empty .Values.qbittorrent.btService.nodePort))) }}
|
||||
nodePort: {{ .Values.qbittorrent.btService.nodePort }}
|
||||
{{- end }}
|
||||
{{- with .Values.qbittorrent.btService.additionalSpec }}
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "media-common.selectorLabels" . | nindent 4 }}
|
@ -7,17 +7,29 @@ qbittorrent:
|
||||
pullPolicy: IfNotPresent
|
||||
tag: 14.2.5.99202004250119-7015-2c65b79ubuntu18.04.1-ls91
|
||||
|
||||
env: {}
|
||||
# TZ: UTC
|
||||
# PUID: 1001
|
||||
# PGID: 1001
|
||||
# UMASK: 022
|
||||
env:
|
||||
TZ: UTC
|
||||
PUID: 1001
|
||||
PGID: 1001
|
||||
UMASK: 022
|
||||
|
||||
service:
|
||||
port: 8080
|
||||
additionalPorts:
|
||||
bittorrent:
|
||||
port: 6881
|
||||
|
||||
btService:
|
||||
type: ClusterIP
|
||||
port: 6881
|
||||
## 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: {}
|
||||
labels: {}
|
||||
additionalSpec: {}
|
||||
|
||||
persistence:
|
||||
downloads:
|
||||
|
Loading…
Reference in New Issue
Block a user