Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Gateway API): status should not use default service when it's disabled #1300

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions traefik/tests/traefik-config_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,28 @@ tests:
- contains:
path: spec.template.spec.containers[0].args
content: "--providers.kubernetesingress.ingressendpoint.publishedservice=foo/bar"
- it: should not set default publishedService when service is disabled
set:
service:
enabled: false
asserts:
- notContains:
path: spec.template.spec.containers[0].args
content: "--providers.kubernetesingress.ingressendpoint.publishedservice=NAMESPACE/RELEASE-NAME-traefik"
- it: should not set default statusAddress when service is disabled
set:
service:
enabled: false
providers:
kubernetesGateway:
enabled: true
asserts:
- notContains:
path: spec.template.spec.containers[0].args
content: "--providers.kubernetesgateway.statusaddress.service.name=RELEASE-NAME-traefik"
- notContains:
path: spec.template.spec.containers[0].args
content: "--providers.kubernetesgateway.statusaddress.service.namespace=NAMESPACE"
- it: should be possible to set statusAddress fields
set:
providers:
Expand Down
4 changes: 2 additions & 2 deletions traefik/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ providers: # @schema additionalProperties: false
hostname: ""
# -- The Kubernetes service to copy status addresses from. When using third parties tools like External-DNS, this option can be used to copy the service loadbalancer.status (containing the service's endpoints IPs) to the gateways. Default to Service of this Chart.
service:
name: "{{ (include \"traefik.fullname\" .) }}"
namespace: "{{ include \"traefik.namespace\" . }}"
name: "{{ .Values.service.enabled | ternary (include \"traefik.fullname\" .) nil }}"
namespace: "{{ .Values.service.enabled | ternary (include \"traefik.namespace\" .) nil }}"

file:
# -- Create a file provider
Expand Down
Loading