mirror of
https://github.com/h44z/wg-portal
synced 2025-02-26 05:49:14 +00:00
* Added TLS support for web - Added optional configurations `cert_file` and `key_file` to run web server with https Signed-off-by: Dmytro Bondar <git@bonddim.com> * Helm chart update - Refactored Ingress to use one host only (`config.web.external_url` is required) - Added Certificate resource template (secret is mounted to container into `/app/certs/`) - Added support for service with mixed protocols (exposes UI and Wireguard ports on same IP) - Added helm-docs target to makefile - Changed pod labels to use selectorLabels - Removed default probes (app runs without healthy web) - Removed sections from README Signed-off-by: Dmytro Bondar <git@bonddim.com> * Fix chart workflow path filter * Fix chart lint issue * Skip clean-up tested chart * Try k3d cluster --------- Signed-off-by: Dmytro Bondar <git@bonddim.com>
31 lines
966 B
YAML
31 lines
966 B
YAML
{{- $hostname := include "wg-portal.hostname" . -}}
|
|
{{- if and .Values.ingress.enabled $hostname -}}
|
|
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:
|
|
- host: {{ $hostname }}
|
|
http:
|
|
paths:
|
|
- path: {{ default "/" (urlParse (tpl .Values.config.web.external_url .)).path }}
|
|
pathType: {{ default "ImplementationSpecific" .pathType }}
|
|
backend:
|
|
service:
|
|
name: {{ include "wg-portal.fullname" . }}
|
|
port:
|
|
name: web
|
|
{{- if .Values.ingress.tls }}
|
|
tls:
|
|
- hosts:
|
|
- {{ $hostname | quote }}
|
|
secretName: {{ include "wg-portal.fullname" . }}-tls
|
|
{{- end }}
|
|
{{- end }}
|