{{- if .Values.ingressRoute.enabled -}} apiVersion: traefik.containo.us/v1alpha1 kind: IngressRoute metadata: name: {{ include "chart.fullname" . }} annotations: {{- with .Values.ingressRoute.annotations }} {{- toYaml . | nindent 4 }} {{- end }} labels: {{- include "chart.labels" . | nindent 4 }} {{- with .Values.ingressRoute.labels }} {{- toYaml . | nindent 4 }} {{- end }} spec: entryPoints: {{- range .Values.ingressRoute.entryPoints }} - {{ . }} {{- end }} routes: - kind: Rule match: {{ .Values.ingressRoute.matchRule }} services: - name: {{ include "chart.fullname" . }} port: {{ .Values.service.port }} {{- with .Values.ingressRoute.middlewares }} middlewares: {{- toYaml . | nindent 6 }} {{- end -}} {{- with .Values.ingressRoute.tls }} tls: {{- toYaml . | nindent 4 }} {{- end }} {{- end -}}