Skip to content

Commit 90fc9ca

Browse files
committed
Update values.yaml with API options and regenerate schema
1 parent 62ca59d commit 90fc9ca

4 files changed

Lines changed: 15 additions & 22 deletions

File tree

traefik/templates/_podtemplate.tpl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,8 @@
230230
{{- $apiConfig = omit $apiConfig "basePath" }}
231231
{{- end }}
232232
{{- if hasKey $apiConfig "dashboard" }}
233-
{{- if not $apiConfig.dashboard }}
234-
{{- if (and $.Values.ingressRoute.dashboard.enabled) }}
235-
{{- fail "ERROR: Cannot create an IngressRoute for the dashboard without enabling api.dashboard" -}}
236-
{{- end }}
233+
{{- if (and $.Values.ingressRoute.dashboard.enabled (not $apiConfig.dashboard)) }}
234+
{{- fail "ERROR: Cannot create an IngressRoute for the dashboard without enabling api.dashboard" -}}
237235
{{- end }}
238236
{{- end }}
239237
{{- if hasKey $apiConfig "insecure" }}

traefik/tests/api_test.yaml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,6 @@ tests:
5050
path: spec.template.spec.containers[0].args
5151
content: "--api.debug=true"
5252

53-
- it: should fail if api.insecure is not a boolean
54-
set:
55-
api:
56-
insecure: "yes"
57-
asserts:
58-
- failedTemplate:
59-
errorMessage: "ERROR: api.insecure must be a boolean"
60-
61-
- it: should fail if api.debug is not a boolean
62-
set:
63-
api:
64-
debug: "yes"
65-
asserts:
66-
- failedTemplate:
67-
errorMessage: "ERROR: api.debug must be a boolean"
68-
6953
- it: should fail if ingressRoute.dashboard is enabled but api.dashboard is false
7054
set:
7155
api:

traefik/values.schema.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,15 @@
2626
},
2727
"dashboard": {
2828
"type": "boolean"
29+
},
30+
"debug": {
31+
"type": "boolean"
32+
},
33+
"insecure": {
34+
"type": "boolean"
2935
}
30-
}
36+
},
37+
"additionalProperties": false
3138
},
3239
"autoscaling": {
3340
"type": "object",

traefik/values.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,13 @@ gatewayClass: # @schema additionalProperties: false
195195
# -- Additional gatewayClass labels (e.g. for filtering gateway objects by custom labels)
196196
labels: {}
197197

198-
api:
198+
api: # @schema additionalProperties: false
199199
# -- Enable the dashboard
200200
dashboard: true
201+
# -- Enable the insecure API (HTTP)
202+
insecure: false
203+
# -- Enable the debug API
204+
debug: false
201205
# -- Configure API basePath
202206
basePath: "" # @schema type:[string, null]; default: "/"
203207

0 commit comments

Comments
 (0)