Skip to content

Commit b932958

Browse files
authoredNov 26, 2024··
feat(Traefik Proxy): add abortOnPluginFailure field
1 parent 40473e8 commit b932958

File tree

5 files changed

+17
-0
lines changed

5 files changed

+17
-0
lines changed
 

‎traefik/VALUES.md

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Kubernetes: `>=1.22.0-0`
6262
| deployment.terminationGracePeriodSeconds | int | `60` | Amount of time (in seconds) before Kubernetes will send the SIGKILL signal if Traefik does not shut down |
6363
| env | list | See _values.yaml_ | Additional Environment variables to be passed to Traefik's binary |
6464
| envFrom | list | `[]` | Environment variables to be passed to Traefik's binary from configMaps or secrets |
65+
| experimental.abortOnPluginFailure | bool | `false` | Defines whether all plugins must be loaded successfully for Traefik to start |
6566
| experimental.kubernetesGateway.enabled | bool | `false` | Enable traefik experimental GatewayClass CRD |
6667
| experimental.plugins | object | `{}` | Enable traefik experimental plugins |
6768
| extraObjects | list | `[]` | Extra objects to deploy (value evaluated as a template) In some cases, it can avoid the need for additional, extended or adhoc deployments. See #595 for more details and traefik/tests/values/extra.yaml for example. |

‎traefik/templates/_podtemplate.tpl

+3
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,9 @@
448448
- "--experimental.plugins.{{ $pluginName }}.moduleName={{ $plugin.moduleName }}"
449449
- "--experimental.plugins.{{ $pluginName }}.version={{ $plugin.version }}"
450450
{{- end }}
451+
{{- if and (semverCompare ">=3.2.1-0" $version) (.Values.experimental.abortOnPluginFailure)}}
452+
- "--experimental.abortonpluginfailure={{ .Values.experimental.abortOnPluginFailure }}"
453+
{{- end }}
451454
{{- if .Values.providers.kubernetesCRD.enabled }}
452455
- "--providers.kubernetescrd"
453456
{{- if .Values.providers.kubernetesCRD.labelSelector }}

‎traefik/tests/deployment-config_test.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,14 @@ tests:
201201
- --providers.kubernetesingress.ingressendpoint.publishedservice=NAMESPACE/RELEASE-NAME-traefik
202202
- --entryPoints.websecure.http.tls=true
203203
- --log.level=INFO
204+
- it: should have abortOnPluginFailure, when enabled
205+
set:
206+
experimental:
207+
abortOnPluginFailure: true
208+
asserts:
209+
- contains:
210+
path: spec.template.spec.containers[0].args
211+
content: "--experimental.abortonpluginfailure=true"
204212
- it: should have http redirections enabled, when enabled with redirectTo
205213
set:
206214
ports:

‎traefik/values.schema.json

+3
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@
149149
},
150150
"experimental": {
151151
"properties": {
152+
"abortOnPluginFailure": {
153+
"type": "boolean"
154+
},
152155
"kubernetesGateway": {
153156
"properties": {
154157
"enabled": {

‎traefik/values.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ core: # @schema additionalProperties: false
120120

121121
# Traefik experimental features
122122
experimental:
123+
# -- Defines whether all plugins must be loaded successfully for Traefik to start
124+
abortOnPluginFailure: false
123125
# -- Enable traefik experimental plugins
124126
plugins: {}
125127
# demo:

0 commit comments

Comments
 (0)
Please sign in to comment.