TrueChartsClone/charts/enterprise/traefik/templates/middlewares/ratelimit.yaml

20 lines
596 B
YAML
Raw Normal View History

2021-09-03 17:52:32 +00:00
{{- $values := .Values }}
{{- $namespace := ( printf "ix-%s" .Release.Name ) }}
2021-09-03 17:52:32 +00:00
{{- if or ( not .Values.ingressClass.enabled ) ( and ( .Values.ingressClass.enabled ) ( .Values.ingressClass.isDefaultClass ) ) }}
{{- $namespace = "default" }}
2021-09-03 17:52:32 +00:00
{{- end }}
{{ range $index, $middlewareData := .Values.middlewares.rateLimit }}
---
# Declaring the user list
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: {{ $middlewareData.name }}
2021-09-03 17:34:31 +00:00
namespace: {{ $namespace }}
spec:
rateLimit:
average: {{ $middlewareData.average }}
burst: {{ $middlewareData.burst }}
{{ end }}