mirror of
https://github.com/truecharts/charts.git
synced 2026-07-09 19:05:39 -03:00
feat(treafik): add RealIP and addPrefix middleware (#3884)
* fix typo * feat(treafik): add RealIP middleware * move middlewares to includes * bump minor * remove pilot reference * lint * lint * fix typo in workflow * add script to update traefikMiddlewares * add empty space * realIP empty array * add addprefix middleware
This commit is contained in:
55
.github/scripts/build-catalog.sh
vendored
55
.github/scripts/build-catalog.sh
vendored
@@ -296,6 +296,61 @@ include_questions(){
|
||||
/# Include{proxyProtocol}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/proxyProtocol.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
# Replace # Include{basicAuth} with the standard basicAuth codesnippet
|
||||
awk 'NR==FNR { a[n++]=$0; next }
|
||||
/# Include{basicAuth}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/middlewares/basicAuth.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
# Replace # Include{forwardAuth} with the standard forwardAuth codesnippet
|
||||
awk 'NR==FNR { a[n++]=$0; next }
|
||||
/# Include{forwardAuth}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/middlewares/forwardAuth.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
# Replace # Include{chain} with the standard chain codesnippet
|
||||
awk 'NR==FNR { a[n++]=$0; next }
|
||||
/# Include{chain}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/middlewares/chain.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
# Replace # Include{redirectScheme} with the standard redirectScheme codesnippet
|
||||
awk 'NR==FNR { a[n++]=$0; next }
|
||||
/# Include{redirectScheme}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/middlewares/redirectScheme.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
# Replace # Include{rateLimit} with the standard rateLimit codesnippet
|
||||
awk 'NR==FNR { a[n++]=$0; next }
|
||||
/# Include{rateLimit}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/middlewares/rateLimit.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
# Replace # Include{redirectRegex} with the standard redirectRegex codesnippet
|
||||
awk 'NR==FNR { a[n++]=$0; next }
|
||||
/# Include{redirectRegex}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/middlewares/redirectRegex.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
# Replace # Include{stripPrefixRegex} with the standard stripPrefixRegex codesnippet
|
||||
awk 'NR==FNR { a[n++]=$0; next }
|
||||
/# Include{stripPrefixRegex}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/middlewares/stripPrefixRegex.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
# Replace # Include{ipWhitelist} with the standard ipWhitelist codesnippet
|
||||
awk 'NR==FNR { a[n++]=$0; next }
|
||||
/# Include{ipWhitelist}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/middlewares/ipWhitelist.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
# Replace # Include{themePark} with the standard themePark codesnippet
|
||||
awk 'NR==FNR { a[n++]=$0; next }
|
||||
/# Include{themePark}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/middlewares/themePark.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
# Replace # Include{realIP} with the standard realIP codesnippet
|
||||
awk 'NR==FNR { a[n++]=$0; next }
|
||||
/# Include{realIP}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/middlewares/realIP.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
# Replace # Include{addPrefix} with the standard addPrefix codesnippet
|
||||
awk 'NR==FNR { a[n++]=$0; next }
|
||||
/# Include{addPrefix}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/middlewares/addPrefix.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
}
|
||||
export -f include_questions
|
||||
|
||||
|
||||
49
.github/scripts/updateTraefikMiddlewareVersions.sh
vendored
Executable file
49
.github/scripts/updateTraefikMiddlewareVersions.sh
vendored
Executable file
@@ -0,0 +1,49 @@
|
||||
#! /bin/bash
|
||||
|
||||
trainsPath="./charts"
|
||||
traefikTrain="stable"
|
||||
|
||||
get_latest_release() {
|
||||
# Get latest release from GitHub api
|
||||
curl --silent \
|
||||
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
|
||||
--url "https://api.github.com/repos/$1/releases/latest" |
|
||||
# Get tag line
|
||||
grep '"tag_name":' |
|
||||
# Pluck JSON value
|
||||
sed -E 's/.*"([^"]+)".*/\1/'
|
||||
}
|
||||
|
||||
set_key_to_version() {
|
||||
key="$1"
|
||||
version="$2"
|
||||
traefikValuesFile="$trainsPath/$traefikTrain/traefik/values.yaml"
|
||||
echo "Setting $key to $version..."
|
||||
sed -i "s/${key}: .*/${key}: ${version}/" $traefikValuesFile
|
||||
|
||||
content=$(grep "$key:" "$traefikValuesFile" | sed "s/\s*${key}:\s*//" )
|
||||
echo "New content of $key in values.yaml: $content"
|
||||
echo ""
|
||||
}
|
||||
|
||||
update_plugin() {
|
||||
repo="$1"
|
||||
key="$2"
|
||||
pluginName="$3"
|
||||
|
||||
version=$(get_latest_release "$repo")
|
||||
if [ -z "$version" ]
|
||||
then
|
||||
echo "Got empty version, skipping..."
|
||||
else
|
||||
echo "Fetched $pluginName plugin version: $version"
|
||||
set_key_to_version "$key" "$version"
|
||||
fi;
|
||||
}
|
||||
# Example
|
||||
# update_plugin "repo" "key_holding_version_in_values.yaml" "plugin_name_used_for_verbose_printing_only"
|
||||
# Real IP
|
||||
update_plugin "soulbalz/traefik-real-ip" "realIPVersion" "RealIP"
|
||||
|
||||
# Theme Park
|
||||
update_plugin "packruler/traefik-themepark" "themeParkVersion" "ThemePark"
|
||||
2
.github/workflows/renovate-bump.yaml
vendored
2
.github/workflows/renovate-bump.yaml
vendored
@@ -45,7 +45,7 @@ jobs:
|
||||
echo "changed apps: ${APPS[*]}"
|
||||
for chart in ${APPS[*]}
|
||||
do
|
||||
if [[ "${chart}" == '.gitkee' ]]; then
|
||||
if [[ "${chart}" == '.gitkeep' ]]; then
|
||||
echo "Skipping..."
|
||||
return
|
||||
elif test -f "./charts/stable/${chart}/Chart.yaml"; then
|
||||
|
||||
@@ -23,7 +23,7 @@ sources:
|
||||
- https://github.com/traefik/traefik-helm-chart
|
||||
- https://traefik.io/
|
||||
type: application
|
||||
version: 13.3.11
|
||||
version: 13.4.0
|
||||
annotations:
|
||||
truecharts.org/catagories: |
|
||||
- network
|
||||
|
||||
@@ -22,7 +22,7 @@ Edit your existing traefik install (or install fresh if you don't have it instal
|
||||
This will capture `https://remote.domain.com` or `https://remote.domain.com/`
|
||||
and redirect it to `https://remote.domain.com/guacamole`
|
||||
|
||||
## Applying the theme to the app
|
||||
## Applying the regex redirect middleware to the app
|
||||
|
||||
Edit your existing _App_, in this example we will use `guacamole-client`.
|
||||
|
||||
|
||||
@@ -176,366 +176,17 @@ questions:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: basicAuth
|
||||
label: "basicAuth"
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: basicAuthEntry
|
||||
label: ""
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: name
|
||||
label: "Name"
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: users
|
||||
label: "Users"
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: usersEntry
|
||||
label: ""
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: username
|
||||
label: "Username"
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: password
|
||||
label: "Password"
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: forwardAuth
|
||||
label: "forwardAuth"
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: basicAuthEntry
|
||||
label: ""
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: name
|
||||
label: "Name"
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: address
|
||||
label: "Address"
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: trustForwardHeader
|
||||
label: "trustForwardHeader"
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
- variable: authResponseHeadersRegex
|
||||
label: "authResponseHeadersRegex"
|
||||
schema:
|
||||
type: string
|
||||
default: ""
|
||||
- variable: authResponseHeaders
|
||||
label: "authResponseHeaders"
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: authResponseHeadersEntry
|
||||
label: ""
|
||||
schema:
|
||||
type: string
|
||||
default: ""
|
||||
- variable: authRequestHeaders
|
||||
label: "authRequestHeaders"
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: authRequestHeadersEntry
|
||||
label: ""
|
||||
schema:
|
||||
type: string
|
||||
default: ""
|
||||
- variable: chain
|
||||
label: "chain"
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: chainEntry
|
||||
label: ""
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: name
|
||||
label: "Name"
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
- variable: middlewares
|
||||
label: "Middlewares to Chain"
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: name
|
||||
label: "Name"
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: redirectScheme
|
||||
label: "redirectScheme"
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: redirectSchemeEntry
|
||||
label: ""
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: name
|
||||
label: "Name"
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
- variable: scheme
|
||||
label: "Scheme"
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: "https"
|
||||
enum:
|
||||
- value: "https"
|
||||
description: "https"
|
||||
- value: "http"
|
||||
description: "http"
|
||||
- variable: permanent
|
||||
label: "Permanent"
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
- variable: rateLimit
|
||||
label: "rateLimit"
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: rateLimitEntry
|
||||
label: ""
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: name
|
||||
label: "Name"
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
- variable: average
|
||||
label: "Average"
|
||||
schema:
|
||||
type: int
|
||||
required: true
|
||||
default: 300
|
||||
- variable: burst
|
||||
label: "Burst"
|
||||
schema:
|
||||
type: int
|
||||
required: true
|
||||
default: 200
|
||||
- variable: redirectRegex
|
||||
label: "redirectRegex"
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: redirectRegexEntry
|
||||
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: replacement
|
||||
label: "Replacement"
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: permanent
|
||||
label: "Permanent"
|
||||
schema:
|
||||
type: boolean
|
||||
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: list
|
||||
default: []
|
||||
items:
|
||||
- variable: regexEntry
|
||||
label: "Regex"
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: ipWhiteList
|
||||
label: "ipWhiteList"
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: ipWhiteListEntry
|
||||
label: ""
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: name
|
||||
label: "Name"
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: sourceRange
|
||||
label: "Source Range"
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: sourceRangeEntry
|
||||
label: ""
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: ipStrategy
|
||||
label: "IP Strategy"
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: depth
|
||||
label: "Depth"
|
||||
schema:
|
||||
type: int
|
||||
required: true
|
||||
- variable: excludedIPs
|
||||
label: "Excluded IPs"
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: excludedIPsEntry
|
||||
label: ""
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: themePark
|
||||
label: "theme.park"
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: themeParkEntry
|
||||
label: ""
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: name
|
||||
label: "Name"
|
||||
description: This is a 3rd party plugin and not maintained by TrueCharts,
|
||||
for more information go to <a href="https://github.com/packruler/traefik-themepark">traefik-themepark</a>
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
- variable: appName
|
||||
label: App Name
|
||||
description: Lower case, name of the app to be themed.
|
||||
<br />Go to <a href="https://docs.theme-park.dev/themes/">https://docs.theme-park.dev/themes/</a> to see supported apps.
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
- variable: themeName
|
||||
label: Theme Name
|
||||
description: Lower case, name of the theme to be applied.
|
||||
<br />Go to <a href="https://docs.theme-park.dev/theme-options/">https://docs.theme-park.dev/theme-options/</a> to see supported themes.
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
- variable: baseUrl
|
||||
label: Base URL
|
||||
description: Replace `https://theme-park.dev` URL for self-hosting reference.
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: https://theme-park.dev
|
||||
- variable: addons
|
||||
label: Addons
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: addonEntry
|
||||
label: "Addon"
|
||||
description: Currently only supports 'darker' and '4k-logo' for *arr apps.
|
||||
<br />Go to <a href="https://docs.theme-park.dev/themes/addons/">https://docs.theme-park.dev/themes/addons/</a> for Addon information.
|
||||
<br />Go to <a href="https://github.com/packruler/traefik-themepark">https://github.com/packruler/traefik-themepark</a> for more context on plugin
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
# Include{basicAuth}
|
||||
# Include{forwardAuth}
|
||||
# Include{chain}
|
||||
# Include{redirectScheme}
|
||||
# Include{rateLimit}
|
||||
# Include{redirectRegex}
|
||||
# Include{stripPrefixRegex}
|
||||
# Include{ipWhitelist}
|
||||
# Include{themePark}
|
||||
# Include{realIP}
|
||||
# Include{addPrefix}
|
||||
- variable: service
|
||||
group: "Networking and Services"
|
||||
label: "Configure Service Entrypoint"
|
||||
|
||||
@@ -158,6 +158,12 @@ args:
|
||||
- "--experimental.plugins.traefik-themepark.version={{ .Values.middlewares.themeParkVersion }}"
|
||||
{{- end }}
|
||||
{{/* End of theme.park */}}
|
||||
{{/* RealIP */}}
|
||||
{{- if .Values.middlewares.realIP }}
|
||||
- "--experimental.plugins.traefik-real-ip.modulename=github.com/soulbalz/traefik-real-ip"
|
||||
- "--experimental.plugins.traefik-real-ip.version={{ .Values.middlewares.realIPVersion }}"
|
||||
{{- end }}
|
||||
{{/* End of RealIP */}}
|
||||
{{- with .Values.additionalArguments }}
|
||||
{{- range . }}
|
||||
- {{ . | quote }}
|
||||
|
||||
17
charts/stable/traefik/templates/middlewares/addPrefix.yaml
Normal file
17
charts/stable/traefik/templates/middlewares/addPrefix.yaml
Normal file
@@ -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.addPrefix }}
|
||||
|
||||
---
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ $middlewareData.name }}
|
||||
namespace: {{ $namespace }}
|
||||
spec:
|
||||
addPrefix:
|
||||
prefix: {{ $middlewareData.prefix }}
|
||||
{{- end }}
|
||||
21
charts/stable/traefik/templates/middlewares/real-ip.yaml
Normal file
21
charts/stable/traefik/templates/middlewares/real-ip.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
{{- $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.realIP }}
|
||||
|
||||
---
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ $middlewareData.name }}
|
||||
namespace: {{ $namespace }}
|
||||
spec:
|
||||
plugin:
|
||||
traefik-real-ip:
|
||||
excludednets:
|
||||
{{- range $middlewareData.excludedNetworks }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -12,14 +12,6 @@ ingressClass:
|
||||
# Use to force a networking.k8s.io API Version for certain CI/CD applications. E.g. "v1beta1"
|
||||
fallbackApiVersion: ""
|
||||
|
||||
# -- Deprecated (will be removed later)
|
||||
# -- Activate Pilot integration
|
||||
pilot:
|
||||
enabled: false
|
||||
token: ""
|
||||
# Toggle Pilot Dashboard
|
||||
# dashboard: false
|
||||
|
||||
# -- Create an IngressRoute for the dashboard
|
||||
ingressRoute:
|
||||
dashboard:
|
||||
@@ -359,8 +351,7 @@ middlewares:
|
||||
# ipStrategy:
|
||||
# depth: 2
|
||||
# excludedIPs: []
|
||||
# -- Currently requires to enable Traefik Pilot.
|
||||
# -- Until it's deprecated.
|
||||
themeParkVersion: v1.2.2
|
||||
themePark: []
|
||||
# - name: themeParkName
|
||||
# -- Supported apps, lower case name
|
||||
@@ -372,7 +363,19 @@ middlewares:
|
||||
# theme: themenamehere
|
||||
# -- https://theme-park.dev or a self hosted url
|
||||
# baseUrl: https://theme-park.dev
|
||||
themeParkVersion: v1.2.1
|
||||
realIPVersion: v1.0.3
|
||||
# Sets X-Real-Ip with an IP from the X-Forwarded-For or
|
||||
# Cf-Connecting-Ip (If from Cloudflare)
|
||||
# Evaluation of those headers will go from last to first
|
||||
realIP: []
|
||||
# - name: realIPName
|
||||
# -- The real IP will be the first one that is
|
||||
# -- not included in any of the CIDRs passed here
|
||||
# excludedNetworks:
|
||||
# - 1.1.1.1/24
|
||||
addPrefix: []
|
||||
# - name: addPrefixName
|
||||
# prefix: "/foo"
|
||||
|
||||
portalhook:
|
||||
enabled: true
|
||||
|
||||
@@ -57,6 +57,7 @@ words:
|
||||
- duplicati
|
||||
- dynmap
|
||||
- ebgp
|
||||
- elif
|
||||
- emby
|
||||
- entrypoints
|
||||
- eptgmk
|
||||
|
||||
24
templates/questions/traefik/middlewares/addPrefix.yaml
Normal file
24
templates/questions/traefik/middlewares/addPrefix.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
- variable: addPrefix
|
||||
label: Add Prefix
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: addPrefixEntry
|
||||
label: ""
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: name
|
||||
label: Name
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: prefix
|
||||
label: Prefix
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
42
templates/questions/traefik/middlewares/basciAuth.yaml
Normal file
42
templates/questions/traefik/middlewares/basciAuth.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
- variable: basicAuth
|
||||
label: basicAuth
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: basicAuthEntry
|
||||
label: ""
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: name
|
||||
label: Name
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: users
|
||||
label: Users
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: usersEntry
|
||||
label: ""
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: username
|
||||
label: Username
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: password
|
||||
label: Password
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
29
templates/questions/traefik/middlewares/chain.yaml
Normal file
29
templates/questions/traefik/middlewares/chain.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
- variable: chain
|
||||
label: Chain
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: chainEntry
|
||||
label: ""
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: name
|
||||
label: Name
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
- variable: middlewares
|
||||
label: Middlewares to Chain
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: name
|
||||
label: Name
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
56
templates/questions/traefik/middlewares/forwardAuth.yaml
Normal file
56
templates/questions/traefik/middlewares/forwardAuth.yaml
Normal file
@@ -0,0 +1,56 @@
|
||||
- variable: forwardAuth
|
||||
label: forwardAuth
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: basicAuthEntry
|
||||
label: ""
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: name
|
||||
label: Name
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: address
|
||||
label: Address
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: trustForwardHeader
|
||||
label: trustForwardHeader
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
- variable: authResponseHeadersRegex
|
||||
label: authResponseHeadersRegex
|
||||
schema:
|
||||
type: string
|
||||
default: ""
|
||||
- variable: authResponseHeaders
|
||||
label: authResponseHeaders
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: authResponseHeadersEntry
|
||||
label: ""
|
||||
schema:
|
||||
type: string
|
||||
default: ""
|
||||
- variable: authRequestHeaders
|
||||
label: authRequestHeaders
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: authRequestHeadersEntry
|
||||
label: ""
|
||||
schema:
|
||||
type: string
|
||||
default: ""
|
||||
53
templates/questions/traefik/middlewares/ipWhitelist.yaml
Normal file
53
templates/questions/traefik/middlewares/ipWhitelist.yaml
Normal file
@@ -0,0 +1,53 @@
|
||||
- variable: ipWhiteList
|
||||
label: ipWhiteList
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: ipWhiteListEntry
|
||||
label: ""
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: name
|
||||
label: Name
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: sourceRange
|
||||
label: Source Range
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: sourceRangeEntry
|
||||
label: ""
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: ipStrategy
|
||||
label: IP Strategy
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: depth
|
||||
label: Depth
|
||||
schema:
|
||||
type: int
|
||||
required: true
|
||||
- variable: excludedIPs
|
||||
label: Excluded IPs
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: excludedIPsEntry
|
||||
label: ""
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
29
templates/questions/traefik/middlewares/rateLimit.yaml
Normal file
29
templates/questions/traefik/middlewares/rateLimit.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
- variable: rateLimit
|
||||
label: rateLimit
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: rateLimitEntry
|
||||
label: ""
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: name
|
||||
label: Name
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
- variable: average
|
||||
label: Average
|
||||
schema:
|
||||
type: int
|
||||
required: true
|
||||
default: 300
|
||||
- variable: burst
|
||||
label: Burst
|
||||
schema:
|
||||
type: int
|
||||
required: true
|
||||
default: 200
|
||||
31
templates/questions/traefik/middlewares/realIP.yaml
Normal file
31
templates/questions/traefik/middlewares/realIP.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
- variable: realIP
|
||||
label: Real IP
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: realIPEntry
|
||||
label: ""
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: name
|
||||
label: Name
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: excludedNetworks
|
||||
label: Excluded Networks
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: excludedNetEntry
|
||||
label: Excluded Network Entry
|
||||
description: Network to exclude setting it to X-Real-Ip
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
34
templates/questions/traefik/middlewares/redirectRegex.yaml
Normal file
34
templates/questions/traefik/middlewares/redirectRegex.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
- variable: redirectRegex
|
||||
label: redirectRegex
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: redirectRegexEntry
|
||||
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: replacement
|
||||
label: Replacement
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: permanent
|
||||
label: Permanent
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
33
templates/questions/traefik/middlewares/redirectScheme.yaml
Normal file
33
templates/questions/traefik/middlewares/redirectScheme.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
- variable: redirectScheme
|
||||
label: redirectScheme
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: redirectSchemeEntry
|
||||
label: ""
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: name
|
||||
label: Name
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
- variable: scheme
|
||||
label: Scheme
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: https
|
||||
enum:
|
||||
- value: https
|
||||
description: https
|
||||
- value: http
|
||||
description: http
|
||||
- variable: permanent
|
||||
label: Permanent
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
@@ -0,0 +1,29 @@
|
||||
- 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: list
|
||||
default: []
|
||||
items:
|
||||
- variable: regexEntry
|
||||
label: Regex
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
58
templates/questions/traefik/middlewares/themePark.yaml
Normal file
58
templates/questions/traefik/middlewares/themePark.yaml
Normal file
@@ -0,0 +1,58 @@
|
||||
- variable: themePark
|
||||
label: theme.park
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: themeParkEntry
|
||||
label: ""
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: name
|
||||
label: Name
|
||||
description: This is a 3rd party plugin and not maintained by TrueCharts,
|
||||
for more information go to <a href="https://github.com/packruler/traefik-themepark">traefik-themepark</a>
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: appName
|
||||
label: App Name
|
||||
description: Lower case, name of the app to be themed.
|
||||
<br />Go to <a href="https://docs.theme-park.dev/themes/">https://docs.theme-park.dev/themes/</a> to see supported apps.
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: themeName
|
||||
label: Theme Name
|
||||
description: Lower case, name of the theme to be applied.
|
||||
<br />Go to <a href="https://docs.theme-park.dev/theme-options/">https://docs.theme-park.dev/theme-options/</a> to see supported themes.
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- variable: baseUrl
|
||||
label: Base URL
|
||||
description: Replace `https://theme-park.dev` URL for self-hosting reference.
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: https://theme-park.dev
|
||||
- variable: addons
|
||||
label: Addons
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: addonEntry
|
||||
label: Addon
|
||||
description: Currently only supports 'darker' and '4k-logo' for *arr apps.
|
||||
<br />Go to <a href="https://docs.theme-park.dev/themes/addons/">https://docs.theme-park.dev/themes/addons/</a> for Addon information.
|
||||
<br />Go to <a href="https://github.com/packruler/traefik-themepark">https://github.com/packruler/traefik-themepark</a> for more context on plugin
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
@@ -388,6 +388,61 @@ include_questions(){
|
||||
/# Include{proxyProtocol}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/proxyProtocol.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
# Replace # Include{basicAuth} with the standard basicAuth codesnippet
|
||||
awk 'NR==FNR { a[n++]=$0; next }
|
||||
/# Include{basicAuth}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/middlewares/basicAuth.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
# Replace # Include{forwardAuth} with the standard forwardAuth codesnippet
|
||||
awk 'NR==FNR { a[n++]=$0; next }
|
||||
/# Include{forwardAuth}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/middlewares/forwardAuth.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
# Replace # Include{chain} with the standard chain codesnippet
|
||||
awk 'NR==FNR { a[n++]=$0; next }
|
||||
/# Include{chain}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/middlewares/chain.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
# Replace # Include{redirectScheme} with the standard redirectScheme codesnippet
|
||||
awk 'NR==FNR { a[n++]=$0; next }
|
||||
/# Include{redirectScheme}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/middlewares/redirectScheme.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
# Replace # Include{rateLimit} with the standard rateLimit codesnippet
|
||||
awk 'NR==FNR { a[n++]=$0; next }
|
||||
/# Include{rateLimit}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/middlewares/rateLimit.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
# Replace # Include{redirectRegex} with the standard redirectRegex codesnippet
|
||||
awk 'NR==FNR { a[n++]=$0; next }
|
||||
/# Include{redirectRegex}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/middlewares/redirectRegex.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
# Replace # Include{stripPrefixRegex} with the standard stripPrefixRegex codesnippet
|
||||
awk 'NR==FNR { a[n++]=$0; next }
|
||||
/# Include{stripPrefixRegex}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/middlewares/stripPrefixRegex.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
# Replace # Include{ipWhitelist} with the standard ipWhitelist codesnippet
|
||||
awk 'NR==FNR { a[n++]=$0; next }
|
||||
/# Include{ipWhitelist}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/middlewares/ipWhitelist.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
# Replace # Include{themePark} with the standard themePark codesnippet
|
||||
awk 'NR==FNR { a[n++]=$0; next }
|
||||
/# Include{themePark}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/middlewares/themePark.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
# Replace # Include{realIP} with the standard realIP codesnippet
|
||||
awk 'NR==FNR { a[n++]=$0; next }
|
||||
/# Include{realIP}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/middlewares/realIP.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
# Replace # Include{addPrefix} with the standard addPrefix codesnippet
|
||||
awk 'NR==FNR { a[n++]=$0; next }
|
||||
/# Include{addPrefix}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/traefik/middlewares/addPrefix.yaml ${target}/questions.yaml > "tmp${chartname}" && mv "tmp${chartname}" ${target}/questions.yaml
|
||||
|
||||
}
|
||||
export -f include_questions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user