2024-07-15 05:21:43 +00:00
|
|
|
{{- define "lib.ingress" }}
|
|
|
|
{{- range $k, $v := .Values.ingress }}
|
|
|
|
{{- $customName := printf "%s-%s" (include "chart.fullname" $) $k }}
|
|
|
|
{{- if $v.annotations -}}
|
|
|
|
{{- $annotations := $v.annotations }}
|
|
|
|
{{- else }}
|
|
|
|
{{- $annotations := "" }}
|
|
|
|
{{- end }}
|
|
|
|
---
|
|
|
|
# ---------------------------------------------------------------------
|
|
|
|
# This ingress is created as a part of softplayer helm library
|
|
|
|
# please see /lib/tempaltes/ingress/_ingress.tpl
|
|
|
|
# ---------------------------------------------------------------------
|
|
|
|
apiVersion: networking.k8s.io/v1
|
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
|
|
|
{{- include "lib.metadata" (dict "Context" $ "customName" $customName "annotations" $v.annotations)}}
|
|
|
|
spec:
|
2024-07-15 05:23:53 +00:00
|
|
|
ingressClassName: {{ $v.class }}
|
2024-07-15 05:21:43 +00:00
|
|
|
{{- with $v.rules }}
|
2024-07-15 05:47:25 +00:00
|
|
|
rules:
|
2024-07-15 05:21:43 +00:00
|
|
|
{{- tpl ( . | toYaml | nindent 4 | toString) $ }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with $v.tls }}
|
2024-07-15 05:47:25 +00:00
|
|
|
tls:
|
2024-07-15 05:21:43 +00:00
|
|
|
{{- tpl ( . | toYaml | nindent 4 | toString) $ }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|