Skip to content

Commit c677bac

Browse files
authored
fix(Traefik Proxy): supported ingressRoute.*.annotations breaks templating
1 parent fdaa699 commit c677bac

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

traefik/templates/ingressroute.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{{- if and $.Values.ingressClass.enabled $.Values.providers.kubernetesCRD.enabled $.Values.providers.kubernetesCRD.ingressClass }}
55
{{ $ingressClassAnnotations = dict "kubernetes.io/ingress.class" $.Values.providers.kubernetesCRD.ingressClass }}
66
{{- end }}
7-
{{ $annotations := merge $ingressClassAnnotations $config.annotations }}
7+
{{ $annotations := merge $ingressClassAnnotations (default $config.annotations dict) }}
88
---
99
apiVersion: traefik.io/v1alpha1
1010
kind: IngressRoute
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
suite: unsupported IngressRoute configuration
2+
templates:
3+
- ingressroute.yaml
4+
tests:
5+
- it: should not fail when enabling an unsupported IngressRoute
6+
set:
7+
ingressRoute:
8+
api:
9+
enabled: true
10+
asserts:
11+
- hasDocuments:
12+
count: 1
13+
- equal:
14+
path: metadata.name
15+
value: RELEASE-NAME-api

traefik/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ gatewayClass: # @schema additionalProperties: false
185185
# -- Additional gatewayClass labels (e.g. for filtering gateway objects by custom labels)
186186
labels: {}
187187

188+
# -- Only dashboard & healthcheck IngressRoute are supported. It's recommended to create workloads CR outside of this Chart.
188189
ingressRoute:
189190
dashboard:
190191
# -- Create an IngressRoute for the dashboard

0 commit comments

Comments
 (0)