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