softplayer-helm-lib/charts/workload/templates/ingress/_ingresses.tpl

29 lines
920 B
Smarty
Raw Normal View History

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
rules:
{{- with $v.rules }}
{{- tpl ( . | toYaml | nindent 4 | toString) $ }}
{{- end }}
{{- with $v.tls }}
{{- tpl ( . | toYaml | nindent 4 | toString) $ }}
{{- end }}
{{- end }}
{{- end }}