mirror of
https://github.com/versia-pub/versia-go.git
synced 2025-12-06 06:28:18 +01:00
36 lines
1 KiB
YAML
36 lines
1 KiB
YAML
{{- if .Values.ingress.enabled }}
|
|
{{ $host := include "versiago.instanceHostname" .Values.versia.instance.address }}
|
|
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ include "versiago.fullname" . }}-ingress
|
|
annotations:
|
|
{{- if hasKey .Values.ingress "className" }}
|
|
# Istio requires this annotation
|
|
kubernetes.io/ingress.class: {{ .Values.ingress.className | quote }}
|
|
{{- end }}
|
|
spec:
|
|
{{- if and (hasKey .Values.ingress "className") (ne .Values.ingress.className "istio") }}
|
|
ingressClassName: {{ .Values.ingress.className | quote }}
|
|
{{- end}}
|
|
|
|
{{- if hasKey .Values.ingress "sslSecret" }}
|
|
tls:
|
|
- hosts:
|
|
- {{ $host | quote }}
|
|
secretName: {{ .Values.ingress.sslSecret | quote }}
|
|
{{- end }}
|
|
|
|
rules:
|
|
- host: {{ $host | quote }}
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ include "versiago.fullname" . | quote }}
|
|
port:
|
|
number: 80
|
|
{{- end }} |