Skip to content
Open
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
1 change: 1 addition & 0 deletions traefik/VALUES.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ Kubernetes: `>=1.25.0-0`
| hub.apimanagement.admission.secretName | string | `"hub-agent-cert"` | Certificate name of the WebHook admission server. Default: "hub-agent-cert". |
| hub.apimanagement.admission.selfManagedCertificate | bool | `false` | By default, this chart handles directly the tls certificate required for the admission webhook. It's possible to disable this behavior and handle it outside of the chart. See EXAMPLES.md for more details. |
| hub.apimanagement.enabled | bool | `false` | Set to true in order to enable API Management. Requires a valid license token. |
| hub.apimanagement.openApi.refreshInterval | string | `""` | Interval to refresh the OpenAPI specification, as a Go duration. When empty, the provider default (`0`, disabled) applies. |
| hub.apimanagement.openApi.validateRequestMethodAndPath | bool | `false` | When set to true, it will only accept paths and methods that are explicitly defined in its OpenAPI specification |
| hub.enabled | bool | `true` when `hub.token` is set | Install Traefik Hub. Without `hub.token`, it runs in proxy mode: a drop-in Traefik Proxy, which requires Traefik Hub >= v3.21.0-ea. |
| hub.hardened | bool | `false` | Use the hardened image variant. It appends `-hardened` to the tag and defaults the image to `registry.traefik.io/traefik-hub`. Requires `hub.enabled` and Traefik Hub >= v3.21.0-ea. |
Expand Down
3 changes: 3 additions & 0 deletions traefik/templates/_podtemplate.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,9 @@
{{- if .openApi.validateRequestMethodAndPath }}
- "--hub.apiManagement.openApi.validateRequestMethodAndPath=true"
{{- end }}
{{- with .openApi.refreshInterval }}
- "--hub.apiManagement.openApi.refreshInterval={{ . }}"
{{- end }}
{{- end }}
{{- end }}
{{- with .aigateway }}
Expand Down
4 changes: 4 additions & 0 deletions traefik/templates/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@
{{ fail "ERROR: hub.hardened is only available for Traefik Hub >= v3.21.0-ea, set image.tag accordingly." }}
{{- end }}

{{- if and $.Values.hub.apimanagement.openApi.refreshInterval (semverCompare "<v3.21.0-0" $hubVersion) }}
{{ fail "ERROR: hub.apimanagement.openApi.refreshInterval is only available for Traefik Hub >= v3.21.0." }}
{{- end }}

{{- if semverCompare "<v3.20.0-ea.7" $hubVersion }}
{{- range $childName, $childConfig := $.Values.hub.providers.multicluster.children }}
{{- if or (($childConfig.serversTransport).forwardingTimeouts).readTimeout (($childConfig.serversTransport).forwardingTimeouts).writeTimeout }}
Expand Down
24 changes: 24 additions & 0 deletions traefik/tests/hub-apigateway-config_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,30 @@ tests:
- contains:
path: spec.template.spec.containers[0].args
content: "--hub.apiManagement.openApi.validateRequestMethodAndPath=true"
- it: should set the OpenAPI refresh interval
set:
image:
registry: ghcr.io
repository: traefik/traefik-hub
tag: v3.21.0-ea.1
hub:
apimanagement:
enabled: true
openApi:
refreshInterval: "5m"
asserts:
- contains:
path: spec.template.spec.containers[0].args
content: "--hub.apiManagement.openApi.refreshInterval=5m"
- it: should not set the OpenAPI refresh interval by default
set:
hub:
apimanagement:
enabled: true
asserts:
- notContains:
path: spec.template.spec.containers[0].args
content: "--hub.apiManagement.openApi.refreshInterval="
- it: api management and ai gateway should not be enabled by default
asserts:
- notContains:
Expand Down
29 changes: 29 additions & 0 deletions traefik/tests/requirements-config_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,35 @@ tests:
enabled: true
asserts:
- notFailedTemplate: {}
- it: should fail when using apiManagement openApi refreshInterval on Traefik Hub < v3.21.0
set:
image:
registry: "ghcr.io"
repository: "traefik/traefik-hub"
tag: v3.20.7
hub:
token: "xxx"
apimanagement:
enabled: true
openApi:
refreshInterval: "5m"
asserts:
- failedTemplate:
errorMessage: "ERROR: hub.apimanagement.openApi.refreshInterval is only available for Traefik Hub >= v3.21.0."
- it: should pass when using apiManagement openApi refreshInterval on Traefik Hub >= v3.21.0
set:
image:
registry: "ghcr.io"
repository: "traefik/traefik-hub"
tag: v3.21.0-ea.1
hub:
token: "xxx"
apimanagement:
enabled: true
openApi:
refreshInterval: "5m"
asserts:
- notFailedTemplate: {}
- it: should fail when using pluginRegistry sources with unused plugin
set:
image:
Expand Down
4 changes: 4 additions & 0 deletions traefik/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,10 @@
"openApi": {
"type": "object",
"properties": {
"refreshInterval": {
"description": "Interval to refresh the OpenAPI specification, as a Go duration. When empty, the provider default (`0`, disabled) applies.",
"type": "string"
},
"validateRequestMethodAndPath": {
"description": "When set to true, it will only accept paths and methods that are explicitly defined in its OpenAPI specification",
"type": "boolean"
Expand Down
2 changes: 2 additions & 0 deletions traefik/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,8 @@ hub: # @schema additionalProperties: false
openApi:
# -- When set to true, it will only accept paths and methods that are explicitly defined in its OpenAPI specification
validateRequestMethodAndPath: false
# -- Interval to refresh the OpenAPI specification, as a Go duration. When empty, the provider default (`0`, disabled) applies.
refreshInterval: ""

mcpgateway:
# -- Set to true in order to enable AI MCP Gateway. Requires a valid license token.
Expand Down