Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	traefik/templates/requirements.yaml
  • Loading branch information
David Heredero committed Dec 10, 2024
2 parents b9da7e6 + 9749d01 commit 0153e6f
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions traefik/VALUES.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ Kubernetes: `>=1.22.0-0`
| providers.kubernetesGateway.experimentalChannel | bool | `false` | Toggles support for the Experimental Channel resources (Gateway API release channels documentation). This option currently enables support for TCPRoute and TLSRoute. |
| providers.kubernetesGateway.labelselector | string | `""` | A label selector can be defined to filter on specific GatewayClass objects only. |
| providers.kubernetesGateway.namespaces | list | `[]` | Array of namespaces to watch. If left empty, Traefik watches all namespaces. |
| providers.kubernetesGateway.nativeLBByDefault | bool | `false` | Defines whether to use Native Kubernetes load-balancing mode by default. |
| providers.kubernetesGateway.statusAddress.hostname | string | `""` | This Hostname will get copied to the Gateway status.addresses. |
| providers.kubernetesGateway.statusAddress.ip | string | `""` | This IP will get copied to the Gateway status.addresses, and currently only supports one IP value (IPv4 or IPv6). |
| providers.kubernetesGateway.statusAddress.service | object | `{"name":"{{ (include \"traefik.fullname\" .) }}","namespace":"{{ .Release.Namespace }}"}` | 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. |
Expand Down
3 changes: 3 additions & 0 deletions traefik/templates/_podtemplate.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,9 @@
- "--providers.kubernetesgateway.statusaddress.service.namespace={{ tpl .namespace $ }}"
{{- end }}
{{- end }}
{{- if .nativeLBByDefault }}
- "--providers.kubernetesgateway.nativeLBByDefault=true"
{{- end }}
{{- if or .namespaces (and $.Values.rbac.enabled $.Values.rbac.namespaced) }}
- "--providers.kubernetesgateway.namespaces={{ template "providers.kubernetesGateway.namespaces" $ }}"
{{- end }}
Expand Down
4 changes: 4 additions & 0 deletions traefik/templates/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
{{- fail "ERROR: abortOnPluginFailure is an experimental feature only available for traefik >= v3.3.0." }}
{{- end }}

{{- if and (semverCompare "<3.2.0-0" $version) (.Values.providers.kubernetesGateway.nativeLBByDefault)}}
{{- fail "ERROR: nativeLBByDefault has been introduced in Kubernetes Gateway provider in v3.2.0" }}
{{- end }}

{{- if and (semverCompare "<v3.1.0-0" $version) .Values.tracing.safeQueryParams }}
{{ fail "ERROR: safeQueryParams is a feature only available for traefik >= v3.1.0."}}
{{- end }}
11 changes: 11 additions & 0 deletions traefik/tests/requirements-config_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ tests:
asserts:
- failedTemplate:
errorMessage: "ERROR: Before traefik v3.1.0-rc3, kubernetesGateway is experimental. Enable it by setting experimental.kubernetesGateway.enabled to true"
- it: should fail when using nativeLBByDefault on kubernetesGateway on traefik < 3.2
set:
image:
tag: v3.1.0
providers:
kubernetesGateway:
enabled: true
nativeLBByDefault: true
asserts:
- failedTemplate:
errorMessage: "ERROR: nativeLBByDefault has been introduced in Kubernetes Gateway provider in v3.2.0"
- it: should not fail when using kubernetesGateway on traefik > 3.1.0-rc3 without experimental flag
set:
image:
Expand Down
4 changes: 4 additions & 0 deletions traefik/tests/traefik-config_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,7 @@ tests:
kubernetesGateway:
enabled: true
experimentalChannel: true
nativeLBByDefault: true
labelselector: "app=traefik"
asserts:
- contains:
Expand All @@ -714,6 +715,9 @@ tests:
- contains:
path: spec.template.spec.containers[0].args
content: "--providers.kubernetesgateway.labelselector=app=traefik"
- contains:
path: spec.template.spec.containers[0].args
content: "--providers.kubernetesgateway.nativeLBByDefault=true"
- it: should be possible to allow ACME bypass
set:
ports:
Expand Down
3 changes: 3 additions & 0 deletions traefik/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1357,6 +1357,9 @@
"namespaces": {
"type": "array"
},
"nativeLBByDefault": {
"type": "boolean"
},
"statusAddress": {
"properties": {
"hostname": {
Expand Down
2 changes: 2 additions & 0 deletions traefik/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ providers: # @schema additionalProperties: false
namespaces: []
# -- A label selector can be defined to filter on specific GatewayClass objects only.
labelselector: ""
# -- Defines whether to use Native Kubernetes load-balancing mode by default.
nativeLBByDefault: false
statusAddress:
# -- This IP will get copied to the Gateway status.addresses, and currently only supports one IP value (IPv4 or IPv6).
ip: ""
Expand Down

0 comments on commit 0153e6f

Please sign in to comment.