scale-catalog/premium/traefik/26.10.18/templates/_portalhook.tpl

25 lines
598 B
Smarty
Raw Permalink Normal View History

2024-07-13 07:59:30 +00:00
{{/* Define the portalHook */}}
{{- define "traefik.portalhook" -}}
{{- if .Values.portalhook.enabled -}}
{{- $name := "portalhook" -}}
{{- if $.Values.ingressClass.enabled -}}
{{- $name = printf "portalhook-%v" .Release.Name -}}
{{- end }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $name }}
data:
{{- $ports := dict }}
{{- range $.Values.service }}
{{- range $name, $value := .ports }}
{{- $_ := set $ports $name $value }}
{{- end }}
{{- end }}
{{- range $name, $value := $ports }}
{{ $name }}: {{ $value.port | quote }}
{{- end }}
{{- end }}
{{- end -}}