diff --git a/.github/scripts/updateTraefikMiddlewareVersions.sh b/.github/scripts/updateTraefikMiddlewareVersions.sh deleted file mode 100755 index 64850540ac0..00000000000 --- a/.github/scripts/updateTraefikMiddlewareVersions.sh +++ /dev/null @@ -1,53 +0,0 @@ -#! /bin/bash - -trainsPath="./charts" -traefikTrain="enterprise" - -get_latest_release() { - # Get latest release from GitHub api, NOTE: Remove the header when running locally (or add a valid token) - 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 "jramsgz/traefik-real-ip" "realIPVersion" "RealIP" - -# Theme Park -update_plugin "packruler/traefik-themepark" "themeParkVersion" "ThemePark" - -# GeoBlock -update_plugin "PascalMinder/geoblock" "geoBlockVersion" "GeoBlock" diff --git a/charts/enterprise/traefik/Chart.yaml b/charts/enterprise/traefik/Chart.yaml index 9df5218ba84..e1c817b2f52 100644 --- a/charts/enterprise/traefik/Chart.yaml +++ b/charts/enterprise/traefik/Chart.yaml @@ -23,7 +23,7 @@ sources: - https://github.com/traefik/traefik-helm-chart - https://traefik.io/ type: application -version: 21.0.1 +version: 21.0.2 annotations: truecharts.org/catagories: | - network diff --git a/charts/enterprise/traefik/templates/_args.tpl b/charts/enterprise/traefik/templates/_args.tpl index 536e2837b89..d318ebf0c36 100644 --- a/charts/enterprise/traefik/templates/_args.tpl +++ b/charts/enterprise/traefik/templates/_args.tpl @@ -176,6 +176,11 @@ args: - "--experimental.localPlugins.traefik-real-ip.modulename=github.com/jramsgz/traefik-real-ip" {{- end }} {{/* End of RealIP */}} + {{/* ModSecurity */}} + {{- if .Values.middlewares.modsecurity }} + - "--experimental.localPlugins.traefik-modsecurity-plugin.modulename=github.com/acouvreur/traefik-modsecurity-plugin" + {{- end }} + {{/* End of ModSecurity */}} {{- with .Values.additionalArguments }} {{- range . }} - {{ . | quote }}