Skip to content

Commit

Permalink
fix: 🐛 ingressroute default name
Browse files Browse the repository at this point in the history
  • Loading branch information
mloiseleur committed Jul 24, 2024
1 parent 50c24e5 commit a494617
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion traefik/templates/ingressroute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: {{ template "traefik.fullname" $ }}-$name
name: {{ $.Release.Name }}-{{ $name }}
namespace: {{ template "traefik.namespace" $ }}
annotations:
{{- if and $.Values.ingressClass.enabled $.Values.providers.kubernetesCRD.enabled $.Values.providers.kubernetesCRD.ingressClass }}
Expand Down
5 changes: 4 additions & 1 deletion traefik/tests/dashboard-ingressroute_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ tests:
asserts:
- hasDocuments:
count: 0
- it: should have the expected default route match rule
- it: should have the expected default
asserts:
- equal:
path: spec.routes[0].match
value: PathPrefix(`/dashboard`) || PathPrefix(`/api`)
- equal:
path: metadata.name
value: RELEASE-NAME-dashboard
- it: should support overwriting the route match rule
set:
ingressRoute:
Expand Down
3 changes: 3 additions & 0 deletions traefik/tests/healthcheck-ingressroute_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ tests:
asserts:
- hasDocuments:
count: 1
- equal:
path: metadata.name
value: RELEASE-NAME-healthcheck
- it: should have the expected default route match rule
set:
ingressRoute:
Expand Down

0 comments on commit a494617

Please sign in to comment.