2024-09-22 11:25:08 +00:00
|
|
|
{{- $hostname := include "wg-portal.hostname" . -}}
|
|
|
|
{{- if and .Values.ingress.enabled $hostname -}}
|
2024-07-04 20:37:30 +00: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 11:25:08 +00:00
|
|
|
- host: {{ $hostname }}
|
2024-07-04 20:37:30 +00:00
|
|
|
http:
|
|
|
|
paths:
|
2024-09-22 11:25:08 +00:00
|
|
|
- path: {{ default "/" (urlParse (tpl .Values.config.web.external_url .)).path }}
|
2024-07-04 20:37:30 +00:00
|
|
|
pathType: {{ default "ImplementationSpecific" .pathType }}
|
|
|
|
backend:
|
|
|
|
service:
|
2024-09-22 11:25:08 +00:00
|
|
|
name: {{ include "wg-portal.fullname" . }}
|
2024-07-04 20:37:30 +00:00
|
|
|
port:
|
2024-09-22 11:25:08 +00:00
|
|
|
name: web
|
2024-07-04 20:37:30 +00:00
|
|
|
{{- if .Values.ingress.tls }}
|
|
|
|
tls:
|
|
|
|
- hosts:
|
2024-09-22 11:25:08 +00:00
|
|
|
- {{ $hostname | quote }}
|
|
|
|
secretName: {{ include "wg-portal.fullname" . }}-tls
|
2024-07-04 20:37:30 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|