diff --git a/charts/shopware/Chart.yaml b/charts/shopware/Chart.yaml index 0a8a051..10adc79 100644 --- a/charts/shopware/Chart.yaml +++ b/charts/shopware/Chart.yaml @@ -15,13 +15,13 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.0.3 +version: 2.0.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "1.0.3" +appVersion: "2.0.0" dependencies: - name: pxc-operator diff --git a/charts/shopware/templates/store.yaml b/charts/shopware/templates/store.yaml index 4e808cf..8ae6402 100644 --- a/charts/shopware/templates/store.yaml +++ b/charts/shopware/templates/store.yaml @@ -52,6 +52,18 @@ spec: adapter: builtin {{- end }} + # set lock redis to the session valkey for now + lock: + {{- if .Values.valkeysessionSentinel.enabled }} + adapter: redis + redisDsn: 'redis:?host[{{ .Values.valkeysessionSentinel.host }}:{{ .Values.valkeysessionSentinel.port | default 26379 }}]&redis_sentinel=mymaster&dbindex={{ .Values.valkeysessionSentinel.dbindex | default 0 }}' + {{- else if or .Values.valkeysession.enabled .Values.redissession.enabled }} + adapter: redis + redisHost: {{ template "getSessionCacheMasterService" . }} + {{- else }} + adapter: builtin + {{- end }} + appCache: {{- if or .Values.valkeyapp.enabled .Values.redisapp.enabled }} adapter: redis @@ -332,33 +344,9 @@ spec: {{- end }} {{- end }} - {{- if or .Values.store.container.extraContainers (and (hasKey .Values.store "fpm") (ne .Values.store.fpm.processManagement "dynamic")) }} + {{- with .Values.store.container.extraContainers }} extraContainers: - {{- with .Values.store.container.extraContainers }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if hasKey .Values.store "fpm" }} - {{- if ne .Values.store.fpm.processManagement "dynamic" }} - - name: php-fpm-exporter - env: - - name: PHP_FPM_SCRAPE_URI - value: {{ .Values.store.fpm.scrapeURI | default "tcp://127.0.0.1:9000/status" }} - image: hipages/php-fpm_exporter - imagePullPolicy: IfNotPresent - ports: - - containerPort: 9253 - protocol: TCP - resources: - limits: - cpu: 30m - memory: 32Mi - requests: - cpu: 10m - memory: 10Mi - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - {{- end }} - {{- end }} + {{- toYaml . | nindent 8 }} {{- end }} resources: diff --git a/charts/shopware/templates/store_caddy_config.yaml b/charts/shopware/templates/store_caddy_config.yaml index e625fde..770f888 100644 --- a/charts/shopware/templates/store_caddy_config.yaml +++ b/charts/shopware/templates/store_caddy_config.yaml @@ -13,7 +13,7 @@ data: } } } - :8000 + :8000 { {{- if hasKey .Values.store "sidecarLogging" }} log { output stdout @@ -47,4 +47,28 @@ data: } encode gzip file_server + } + } + + :8001 { + handle /-/fpm/status { + # Prometheus encodes query strings in scrape paths. PHP-FPM requires + # openmetrics format, so append query here instead. + rewrite * /-/fpm/status?openmetrics + reverse_proxy unix//tmp/php-fpm.sock { + transport fastcgi { + env SCRIPT_NAME /-/fpm/status + } + } + } + # php-fpm ping, answered by the fpm master (no app bootstrap, no DB). Used + # by the operator storefront liveness/startup probes so DB slowness never + # restarts pods. + handle /-/fpm/ping { + reverse_proxy unix//tmp/php-fpm.sock { + transport fastcgi { + env SCRIPT_NAME /-/fpm/ping + } + } + } } diff --git a/charts/shopware/values.yaml b/charts/shopware/values.yaml index d563f66..f65d4f9 100644 --- a/charts/shopware/values.yaml +++ b/charts/shopware/values.yaml @@ -227,8 +227,8 @@ store: # cpu: 1000m # - # You can add side-car containers as you wish. Note that the PHP fpm exporter is - # already attached, if you are not using `dynamic` in the fpm configuration. + # You can add side-car containers as you wish. php-fpm metrics are exposed natively + # in OpenMetrics format via the Caddy status endpoint, so no exporter side-car is needed. # extraContainers: # - name: some-side-pod # env: