catalog/stable/traefik/10.0.0/templates/middlewares/chain.yaml

22 lines
662 B
YAML
Raw Normal View History

{{- $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.chain }}
---
# Declaring the user list
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: {{ $middlewareData.name }}
namespace: {{ $namespace }}
spec:
chain:
middlewares:
{{ range $index, $chainData := . }}
- name: {{ printf "%v-%v@%v" $namespace $chainData.name "kubernetescrd" }}
{{ end }}
{{ end }}