From fa3bec20640d630f69cc1fc1cadb7854eb2430e0 Mon Sep 17 00:00:00 2001 From: Lars Scheibling Date: Thu, 1 Jun 2023 17:22:50 +0200 Subject: [PATCH] Added section for try webp --- .gitlab-ci.yml | 2 +- Chart/Chart.yaml | 2 +- Chart/templates/configmap.yaml | 22 ++++++++++++++++++++++ Chart/values.yaml | 3 +++ 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6ca137f..a742167 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ variables: - HELM_CHART_VERSION: "0.8.10" + HELM_CHART_VERSION: "0.8.11" stages: - deploy diff --git a/Chart/Chart.yaml b/Chart/Chart.yaml index b8eb50d..7700ba7 100644 --- a/Chart/Chart.yaml +++ b/Chart/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: cloudypress description: Helm chart to deploy Wordpress backed by PHP-CLI and Nginx Unit type: application -version: "0.8.8" +version: "0.8.11" appVersion: "6.2.0" diff --git a/Chart/templates/configmap.yaml b/Chart/templates/configmap.yaml index 5cd33b9..6d28448 100644 --- a/Chart/templates/configmap.yaml +++ b/Chart/templates/configmap.yaml @@ -134,6 +134,28 @@ data: ] } }, + {{- if eq .Values.site.enableWebpRoute "true" }} + { + "match": { + "uri": [ + "*.jpg", + "*.jpeg", + "*.gif", + "*.png" + ] + }, + "action": { + "share": [ + "/app/web$uri.webp", + "/app/web$uri" + ], + "fallback": { + "pass": "applications/php/index" + } + + } + }, + {{- end }} { "action": { "share": "/app/web$uri", diff --git a/Chart/values.yaml b/Chart/values.yaml index 7bf5ee0..a9ddd71 100644 --- a/Chart/values.yaml +++ b/Chart/values.yaml @@ -44,6 +44,9 @@ site: additional_env: {} # MY_ENV_VAR: "value" + # Whether to enable the webp route + # enableWebpRoute: "false" + # Override the environment. Valid values are production, staging and development # overrideEnvironment: "staging"