Skip to content

Commit

Permalink
fix: can't set gateway name
Browse files Browse the repository at this point in the history
  • Loading branch information
darkweaver87 committed Jul 16, 2024
1 parent 51fc564 commit 13d302d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion traefik/templates/gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: {{ default .Values.gateway.name "traefik-gateway" }}
name: {{ default "traefik-gateway" .Values.gateway.name }}
namespace: {{ template "traefik.namespace" . }}
labels:
{{- include "traefik.labels" . | nindent 4 }}
Expand Down
12 changes: 12 additions & 0 deletions traefik/tests/gateway-config_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,15 @@ tests:
equal:
path: spec.gatewayClassName
value: test
- it: should be possible to customize gateway name
set:
providers:
kubernetesGateway:
enabled: true
gateway:
name: test
asserts:
- template: gateway.yaml
equal:
path: metadata.name
value: test

0 comments on commit 13d302d

Please sign in to comment.