feat(traefik): Add stripPrefixRegex (#2422)
* feat(traefic): Add stripPrefixRegex Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com> * Update charts/core/traefik/templates/middlewares/stripPrefixRegex.yaml * feat(traefik): Add stripPrefixRegex: Part 2 > I'm missing the required minor version bump in Chart.yaml and the definition + comments in values.yaml Additionally, add the changelog entry to-be Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com> * feat(traefik): Add stripPrefixRegex: Oops Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com> Co-authored-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
This commit is contained in:
co-authored by
Kjeld Schouten-Lebbing
parent
cef8425fa0
commit
5ac0465496
@@ -22,7 +22,7 @@ sources:
|
|||||||
- https://github.com/traefik/traefik-helm-chart
|
- https://github.com/traefik/traefik-helm-chart
|
||||||
- https://traefik.io/
|
- https://traefik.io/
|
||||||
type: application
|
type: application
|
||||||
version: 11.0.13
|
version: 11.1.0
|
||||||
annotations:
|
annotations:
|
||||||
truecharts.org/catagories: |
|
truecharts.org/catagories: |
|
||||||
- network
|
- network
|
||||||
|
|||||||
@@ -469,6 +469,29 @@ questions:
|
|||||||
type: boolean
|
type: boolean
|
||||||
required: true
|
required: true
|
||||||
default: false
|
default: false
|
||||||
|
- variable: stripPrefixRegex
|
||||||
|
label: "stripPrefixRegex"
|
||||||
|
schema:
|
||||||
|
type: list
|
||||||
|
default: []
|
||||||
|
items:
|
||||||
|
- variable: stripPrefixRegexEntry
|
||||||
|
label: ""
|
||||||
|
schema:
|
||||||
|
additional_attrs: true
|
||||||
|
type: dict
|
||||||
|
attrs:
|
||||||
|
- variable: name
|
||||||
|
label: "Name"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
- variable: regex
|
||||||
|
label: "Regex"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
default: ""
|
||||||
|
|
||||||
- variable: ipWhiteList
|
- variable: ipWhiteList
|
||||||
label: "ipWhiteList"
|
label: "ipWhiteList"
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
{{- $values := .Values }}
|
||||||
|
{{- $namespace := ( printf "ix-%s" .Release.Name ) }}
|
||||||
|
{{- if or ( not .Values.ingressClass.enabled ) ( and ( .Values.ingressClass.enabled ) ( .Values.ingressClass.isDefaultClass ) ) }}
|
||||||
|
{{- $namespace = "default" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{ range $index, $middlewareData := .Values.middlewares.stripPrefixRegex }}
|
||||||
|
---
|
||||||
|
apiVersion: traefik.containo.us/v1alpha1
|
||||||
|
kind: Middleware
|
||||||
|
metadata:
|
||||||
|
name: {{ $middlewareData.name }}
|
||||||
|
namespace: {{ $namespace }}
|
||||||
|
spec:
|
||||||
|
stripPrefixRegex:
|
||||||
|
regex: {{ $middlewareData.regex | quote }}
|
||||||
|
{{ end }}
|
||||||
@@ -305,6 +305,9 @@ middlewares:
|
|||||||
# regex: putregexhere
|
# regex: putregexhere
|
||||||
# replacement: replacementurlhere
|
# replacement: replacementurlhere
|
||||||
# permanent: false
|
# permanent: false
|
||||||
|
stripPrefixRegex: []
|
||||||
|
# - name: stripPrefixRegexName
|
||||||
|
# regex: putregexhere
|
||||||
ipWhiteList: []
|
ipWhiteList: []
|
||||||
# - name: ipWhiteListName
|
# - name: ipWhiteListName
|
||||||
# sourceRange: []
|
# sourceRange: []
|
||||||
|
|||||||
Reference in New Issue
Block a user