{{- if .Values.ingress.enabled }}
{{- if eq (default "traefik" .Values.ingress.className) "traefik" }}
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
  name: {{ .Release.Name }}-retry
  labels:
    {{- include "armature.labels" . | nindent 4 }}
spec:
  retry:
    attempts: {{ .Values.ingress.retry.attempts | default 2 }}
    initialInterval: {{ .Values.ingress.retry.initialInterval | default "100ms" }}
{{- end }}
{{- end }}
