apiVersion: v1 kind: Service metadata: name: {{ include "qbittorrent.fullname" . }} labels: {{- include "qbittorrent.labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} ports: - port: {{ .Values.service.webPort }} targetPort: web protocol: TCP name: web {{- if and (eq .Values.service.type "NodePort") .Values.service.webNodePort }} nodePort: {{ .Values.service.webNodePort }} {{- end }} - port: {{ .Values.service.btPort }} targetPort: bittorrent protocol: TCP name: bittorrent {{- if and (eq .Values.service.type "NodePort") .Values.service.btNodePort }} nodePort: {{ .Values.service.btNodePort }} {{- end }} selector: {{- include "qbittorrent.selectorLabels" . | nindent 4 }}