Files
nplus/charts/ilm/templates/ingress.tpl
2026-03-10 07:33:55 +01:00

31 lines
1.1 KiB
Smarty

{{- include "nplus.init" $ -}}
{{- if ( include "nplus.ingressEnabled" . ) }}
{{- $provider := (.this.ingress).provider -}}
{{- if eq $provider "ingress" }}
{{- include "nplus.ingress" (list . .component.fullName) | nindent 0 }}
- path: {{ .this.ingress.contextPath }}
pathType: Prefix
backend:
service:
name: {{ .component.fullName }}
port:
name: {{ include "nplus.backendProtocol" . }}
{{- else if eq $provider "gateway" }}
{{- include "nplus.gatewayRoute" (list . .component.fullName) | nindent 0 }}
- matches:
- path:
type: PathPrefix
value: {{ .this.ingress.contextPath }}
backendRefs:
- name: {{ .component.fullName }}
port: {{ include "nplus.backendPort" . }}
{{- else }}{{/* if provider */}}
{{- fail (printf "unsupported ingress provider: %s" $provider) -}}
{{- end }}{{/* if provider */}}
{{- else }}{{/* if ( include "nplus.ingressEnabled" . ) */}}
# kind: ingress
# Not Generating any Ingress for {{ .component.fullName }} as
# Ingress = {{ .this.ingress }}
# Service = {{ .this.service }}
{{- end }}{{/* if ( include "nplus.ingressEnabled" . ) else */}}