scale-catalog/premium/traefik/27.0.14/templates/middlewares/buffering.yaml

27 lines
1.4 KiB
YAML
Raw Normal View History

2024-07-13 07:59:30 +00:00
{{- range $index, $middlewareData := .Values.middlewares.buffering }}
---
# Declaring the user list
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: {{ ternary (printf "%v-%v" $.Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
namespace: {{ $.Release.Namespace }}
spec:
buffering: {{/* Only render if its not <nil> and has a value of 0 or greater */}}
{{- if and (not (kindIs "invalid" $middlewareData.maxRequestBodyBytes)) (ge ($middlewareData.maxRequestBodyBytes | int) 0) }}
maxRequestBodyBytes: {{ $middlewareData.maxRequestBodyBytes }}
{{- end -}}
{{- if and (not (kindIs "invalid" $middlewareData.memRequestBodyBytes)) (ge ($middlewareData.memRequestBodyBytes | int) 0) }}
memRequestBodyBytes: {{ $middlewareData.memRequestBodyBytes }}
{{- end -}}
{{- if and (not (kindIs "invalid" $middlewareData.maxResponseBodyBytes)) (ge ($middlewareData.maxResponseBodyBytes | int) 0) }}
maxResponseBodyBytes: {{ $middlewareData.maxResponseBodyBytes }}
{{- end -}}
{{- if and (not (kindIs "invalid" $middlewareData.memResponseBodyBytes)) (ge ($middlewareData.memResponseBodyBytes | int) 0) }}
memResponseBodyBytes: {{ $middlewareData.memResponseBodyBytes }}
{{- end -}}
{{- if $middlewareData.retryExpression }}
retryExpression: {{ $middlewareData.retryExpression | quote }}
{{- end -}}
{{- end -}}