Add external ingress

This commit is contained in:
Jonny Ervine 2023-09-25 21:49:22 +08:00
parent 5ed62d1377
commit 0a36f63e03
2 changed files with 31 additions and 18 deletions

View File

@ -1,24 +1,24 @@
{{- if .Values.ingress.enabled -}}
{{- if .Values.ingress.external.enabled -}}
{{- $fullName := include "emby.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
apiVersion: networking.k8s.io/v1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
name: {{ $fullName }}-ext
labels:
{{- include "emby.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
{{- with .Values.ingress.external.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
{{- if .Values.ingress.external.tls }}
tls:
{{- range .Values.ingress.tls }}
{{- range .Values.ingress.external.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
@ -27,7 +27,7 @@ spec:
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
{{- range .Values.ingress.external.hosts }}
- host: {{ .host | quote }}
http:
paths:

View File

@ -35,17 +35,30 @@ service:
port: 8096
ingress:
enabled: false
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths: []
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
internal:
enabled: false
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths: []
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
external:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/backend-protocol: HTTP
hosts:
- host: emby.ervine.cloud
paths: []
tls:
- secretName: emby-ervine-cloud-tls
hosts:
- emby.ervine.cloud
resources:
# We usually recommend not to specify default resources and to leave this as a conscious