2021-09-03 22:12:58 +00:00
|
|
|
{{/* Define the portalHook */}}
|
|
|
|
{{- define "traefik.portalhook" -}}
|
2023-06-28 07:06:26 +00:00
|
|
|
{{- if .Values.portalhook.enabled -}}
|
|
|
|
{{- $name := "portalhook" -}}
|
|
|
|
{{- if $.Values.ingressClass.enabled -}}
|
|
|
|
{{- $name = printf "portalhook-%v" .Release.Name -}}
|
|
|
|
{{- end }}
|
2021-09-03 18:58:30 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
2023-06-28 07:06:26 +00:00
|
|
|
name: {{ $name }}
|
2021-09-03 18:58:30 +00:00
|
|
|
data:
|
|
|
|
{{- $ports := dict }}
|
|
|
|
{{- range $.Values.service }}
|
|
|
|
{{- range $name, $value := .ports }}
|
|
|
|
{{- $_ := set $ports $name $value }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- range $name, $value := $ports }}
|
2021-09-03 19:27:17 +00:00
|
|
|
{{ $name }}: {{ $value.port | quote }}
|
2021-09-03 18:58:30 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
2021-09-03 22:12:58 +00:00
|
|
|
{{- end -}}
|