2022-04-04 19:48:33 +00:00
|
|
|
{{- $values := .Values }}
|
|
|
|
{{- $namespace := ( printf "ix-%s" .Release.Name ) }}
|
|
|
|
{{- if or ( not .Values.ingressClass.enabled ) ( and ( .Values.ingressClass.enabled ) ( .Values.ingressClass.isDefaultClass ) ) }}
|
|
|
|
{{- $namespace = "default" }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{ range $index, $middlewareData := .Values.middlewares.stripPrefixRegex }}
|
|
|
|
---
|
|
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
|
|
kind: Middleware
|
|
|
|
metadata:
|
|
|
|
name: {{ $middlewareData.name }}
|
|
|
|
namespace: {{ $namespace }}
|
|
|
|
spec:
|
|
|
|
stripPrefixRegex:
|
2022-04-04 20:40:27 +00:00
|
|
|
regex:
|
|
|
|
{{- range $middlewareData.regex }}
|
|
|
|
- {{ . | quote }}
|
|
|
|
{{- end }}
|
2022-04-04 19:48:33 +00:00
|
|
|
{{ end }}
|