multipoddeployment: add ingress for qbt and prowlarr ingress
This commit is contained in:
parent
5be965feca
commit
6dbebcd79f
@ -51,6 +51,6 @@
|
||||
{{- if not .Values.multiPodDeployment }}
|
||||
kubectl --namespace {{ .Release.Namespace }} logs deploy/media-stack -c qbittorrent
|
||||
{{- else }}
|
||||
kubectl --namespace {{ .Release.Namespace }} logs -l app=qbittorrent -c qbittorrent
|
||||
kubectl --namespace {{ .Release.Namespace }} logs -l app=qbt-prowlarr -c qbittorrent
|
||||
{{- end }}
|
||||
|
||||
|
90
helm/media-stack/templates/ingress-qbt-prowlarr.yaml
Normal file
90
helm/media-stack/templates/ingress-qbt-prowlarr.yaml
Normal file
@ -0,0 +1,90 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- if .multiPodDeployment -}}
|
||||
{{- $fullName := include "media-stack.fullname" . -}}-qbt-prowlarr
|
||||
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
|
||||
{{- if not (hasKey .Values.qbittorrent.ingress.annotations "kubernetes.io/ingress.class") }}
|
||||
{{- $_ := set .Values.qbittorrent.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
labels:
|
||||
{{- include "media-stack.labels" . | nindent 4 }}
|
||||
app: qbt-prowlarr
|
||||
{{- with .Values.qbittorrent.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
|
||||
ingressClassName: {{ .Values.ingress.className }}
|
||||
{{- end }}
|
||||
tls:
|
||||
{{- if .Values.qbittorrent.ingress.tls }}
|
||||
{{- with .Values.qbittorrent.ingress.tls }}
|
||||
- hosts:
|
||||
- {{ $.Values.qbittorrent.ingress.host | quote }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.prowlarr.ingress.tls }}
|
||||
{{- with .Values.prowlarr.ingress.tls }}
|
||||
- hosts:
|
||||
- {{ $.Values.prowlarr.ingress.host | quote }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- with .Values.qbittorrent.ingress }}
|
||||
- host: {{ .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ .path }}
|
||||
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
|
||||
pathType: {{ .pathType }}
|
||||
{{- end }}
|
||||
backend:
|
||||
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||
service:
|
||||
name: {{ $fullName }}
|
||||
port:
|
||||
number: {{ .servicePort }}
|
||||
{{- else }}
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: {{ .servicePort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.prowlarr.ingress }}
|
||||
- host: {{ .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ .path }}
|
||||
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
|
||||
pathType: {{ .pathType }}
|
||||
{{- end }}
|
||||
backend:
|
||||
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||
service:
|
||||
name: {{ $fullName }}
|
||||
port:
|
||||
number: {{ .servicePort }}
|
||||
{{- else }}
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: {{ .servicePort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
@ -172,6 +172,7 @@ radarr:
|
||||
|
||||
ingress:
|
||||
annotations: {}
|
||||
# Add ingress annotations for qbittorrent and prowlarr here, if needed
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
host: radarr.local
|
||||
@ -284,9 +285,6 @@ prowlarr:
|
||||
accessMode: ReadWriteOnce
|
||||
|
||||
ingress:
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
host: prowlarr.local
|
||||
paths:
|
||||
- path: /
|
||||
|
Loading…
Reference in New Issue
Block a user