chore(traefik): Add blacklistMode on geoblock and fix label (#6416)
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
trainsPath="./charts"
|
trainsPath="./charts"
|
||||||
traefikTrain="stable"
|
traefikTrain="enterprise"
|
||||||
|
|
||||||
get_latest_release() {
|
get_latest_release() {
|
||||||
# Get latest release from GitHub api
|
# Get latest release from GitHub api, NOTE: Remove the header when running locally (or add a valid token)
|
||||||
curl --silent \
|
curl --silent \
|
||||||
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
|
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
|
||||||
--url "https://api.github.com/repos/$1/releases/latest" |
|
--url "https://api.github.com/repos/$1/releases/latest" |
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ spec:
|
|||||||
forceMonthlyUpdate: {{ $middlewareData.forceMonthlyUpdate }}
|
forceMonthlyUpdate: {{ $middlewareData.forceMonthlyUpdate }}
|
||||||
allowUnknownCountries: {{ $middlewareData.allowUnknownCountries }}
|
allowUnknownCountries: {{ $middlewareData.allowUnknownCountries }}
|
||||||
unknownCountryApiResponse: {{ $middlewareData.unknownCountryApiResponse }}
|
unknownCountryApiResponse: {{ $middlewareData.unknownCountryApiResponse }}
|
||||||
|
blackListMode: {{ $middlewareData.blackListMode }}
|
||||||
{{- if not $middlewareData.countries }}
|
{{- if not $middlewareData.countries }}
|
||||||
{{- fail "You have to define at least one country..." }}
|
{{- fail "You have to define at least one country..." }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -376,7 +376,7 @@ middlewares:
|
|||||||
addPrefix: []
|
addPrefix: []
|
||||||
# - name: addPrefixName
|
# - name: addPrefixName
|
||||||
# prefix: "/foo"
|
# prefix: "/foo"
|
||||||
geoBlockVersion: v0.2.3
|
geoBlockVersion: v0.2.4
|
||||||
geoBlock: []
|
geoBlock: []
|
||||||
# -- https://github.com/PascalMinder/geoblock
|
# -- https://github.com/PascalMinder/geoblock
|
||||||
# - name: geoBlockName
|
# - name: geoBlockName
|
||||||
@@ -390,6 +390,7 @@ middlewares:
|
|||||||
# forceMonthlyUpdate: true
|
# forceMonthlyUpdate: true
|
||||||
# allowUnknownCountries: false
|
# allowUnknownCountries: false
|
||||||
# unknownCountryApiResponse: nil
|
# unknownCountryApiResponse: nil
|
||||||
|
# blackListMode: false
|
||||||
# countries:
|
# countries:
|
||||||
# - RU
|
# - RU
|
||||||
|
|
||||||
|
|||||||
@@ -82,15 +82,22 @@
|
|||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
default: nil
|
default: nil
|
||||||
|
- variable: blackListMode
|
||||||
|
label: Blacklist Mode
|
||||||
|
description: When set to true the filter logic is inverted, i.e. requests originating from countries listed in the countries list are blocked.
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
- variable: countries
|
- variable: countries
|
||||||
label: Blocked Countries
|
description: Country codes (2 characters) from which connections to the service should be allowed or blocked, based on the mode.
|
||||||
|
label: Countries
|
||||||
schema:
|
schema:
|
||||||
type: list
|
type: list
|
||||||
default: []
|
default: []
|
||||||
items:
|
items:
|
||||||
- variable: blockedCountryEntry
|
- variable: countryEntry
|
||||||
label: Blocked Country
|
label: Country
|
||||||
description: Country codes (2 characters) from which connections to the service should be allowed.
|
description: Country codes (2 characters) from which connections to the service should be allowed or blocked, based on the mode.
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
|
|||||||
Reference in New Issue
Block a user