Files

31 lines
981 B
YAML
Raw Permalink Normal View History

2024-09-22 13:25:08 +02:00
{{- $hostname := include "wg-portal.hostname" . -}}
{{- if and .Values.ingress.enabled $hostname -}}
2024-07-04 22:37:30 +02:00
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
{{- with .Values.ingress.annotations }}
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
name: {{ include "wg-portal.fullname" . }}
labels: {{- include "wg-portal.labels" . | nindent 4 }}
spec:
ingressClassName: {{ .Values.ingress.className }}
rules:
2024-09-22 13:25:08 +02:00
- host: {{ $hostname }}
2024-07-04 22:37:30 +02:00
http:
paths:
2024-09-22 13:25:08 +02:00
- path: {{ default "/" (urlParse (tpl .Values.config.web.external_url .)).path }}
2026-02-23 22:55:40 +01:00
pathType: {{ default "ImplementationSpecific" .Values.ingress.pathType }}
2024-07-04 22:37:30 +02:00
backend:
service:
2024-09-22 13:25:08 +02:00
name: {{ include "wg-portal.fullname" . }}
2024-07-04 22:37:30 +02:00
port:
2024-09-22 13:25:08 +02:00
name: web
2024-07-04 22:37:30 +02:00
{{- if .Values.ingress.tls }}
tls:
- hosts:
2024-09-22 13:25:08 +02:00
- {{ $hostname | quote }}
secretName: {{ include "wg-portal.fullname" . }}-tls
2024-07-04 22:37:30 +02:00
{{- end }}
{{- end }}