2021-09-03 22:12:58 +00:00
|
|
|
{{/* Define the portalHook */}}
|
|
|
|
{{- define "traefik.portalhook" -}}
|
2021-09-03 18:58:30 +00:00
|
|
|
{{- if .Values.portalhook.enabled }}
|
|
|
|
{{- $namespace := ( printf "ix-%s" .Release.Name ) }}
|
|
|
|
{{- if or ( not .Values.ingressClass.enabled ) ( and ( .Values.ingressClass.enabled ) ( .Values.ingressClass.isDefaultClass ) ) }}
|
2021-09-04 09:07:09 +00:00
|
|
|
{{- $namespace = "default" }}
|
2021-09-03 18:58:30 +00:00
|
|
|
{{- end }}
|
|
|
|
---
|
|
|
|
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
name: portalhook
|
2021-09-03 19:41:32 +00:00
|
|
|
namespace: {{ $namespace }}
|
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 -}}
|