33 lines
888 B
YAML
33 lines
888 B
YAML
{{- if .Values.ingress.enabled }}
|
|
{{- $url := urlParse (required "publicUrl is required" .Values.publicUrl) }}
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ include "meguri.fullname" . }}
|
|
labels:
|
|
{{- include "meguri.labels" . | nindent 4 }}
|
|
{{- with .Values.ingress.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- with .Values.ingress.className }}
|
|
ingressClassName: {{ . }}
|
|
{{- end }}
|
|
{{- if .Values.ingress.tlsSecretName }}
|
|
tls:
|
|
- hosts: [{{ $url.hostname | quote }}]
|
|
secretName: {{ .Values.ingress.tlsSecretName }}
|
|
{{- end }}
|
|
rules:
|
|
- host: {{ $url.hostname | quote }}
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ include "meguri.fullname" . }}
|
|
port: {name: http}
|
|
{{- end }}
|