48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
{{- if and .Values.apiportal.enabled .Values.apiportal.ingress.enabled -}}
|
|
{{- $fullName := include "gateway.fullname" . -}}
|
|
{{- $svcPort := .Values.apiportal.service.ports.target.port }}
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ $fullName }}-apiportal
|
|
labels:
|
|
{{- include "gateway.labels" . | nindent 4 }}
|
|
{{- with .Values.apiportal.ingress.annotations }}
|
|
annotations:
|
|
{{- tpl (toYaml .) $ | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- if .Values.apiportal.ingress.className }}
|
|
ingressClassName: {{ .Values.apiportal.ingress.className }}
|
|
{{- end }}
|
|
{{- if .Values.apiportal.ingress.tls }}
|
|
tls:
|
|
{{- range .Values.apiportal.ingress.tls }}
|
|
- hosts:
|
|
{{- range .hosts }}
|
|
- {{ tpl . $ | quote }}
|
|
{{- end }}
|
|
{{- if .secretName }}
|
|
secretName: {{ tpl (.secretName) $ }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
rules:
|
|
{{- range .Values.apiportal.ingress.hosts }}
|
|
- host: {{ tpl .host $ | quote }}
|
|
http:
|
|
paths:
|
|
{{- range .paths }}
|
|
- path: {{ .path }}
|
|
{{- if .pathType }}
|
|
pathType: {{ .pathType }}
|
|
{{- end }}
|
|
backend:
|
|
service:
|
|
name: {{ $fullName }}-apiportal
|
|
port:
|
|
number: {{ $svcPort }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|