mirror of
https://github.com/truecharts/charts.git
synced 2026-07-14 11:04:21 -03:00
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:
@@ -22,7 +22,7 @@ sources:
|
||||
- https://github.com/traefik/traefik-helm-chart
|
||||
- https://traefik.io/
|
||||
type: application
|
||||
version: 11.0.13
|
||||
version: 11.1.0
|
||||
annotations:
|
||||
truecharts.org/catagories: |
|
||||
- network
|
||||
|
||||
@@ -469,6 +469,29 @@ questions:
|
||||
type: boolean
|
||||
required: true
|
||||
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
|
||||
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
|
||||
# replacement: replacementurlhere
|
||||
# permanent: false
|
||||
stripPrefixRegex: []
|
||||
# - name: stripPrefixRegexName
|
||||
# regex: putregexhere
|
||||
ipWhiteList: []
|
||||
# - name: ipWhiteListName
|
||||
# sourceRange: []
|
||||
|
||||
Reference in New Issue
Block a user