diff --git a/.gitlab/review-apps-values.yaml b/.gitlab/review-apps-values.yaml index ca75fb793f423cf9903119076af9b7cd4d35fff3..84803a4b2a3561e85447a38ea42ce805b25029bd 100644 --- a/.gitlab/review-apps-values.yaml +++ b/.gitlab/review-apps-values.yaml @@ -7,6 +7,7 @@ resources: limits: ingress: annotations: + kubernetes.io/tls-acme: "false" nginx.ingress.kubernetes.io/ssl-redirect: "false" nginx.ingress.kubernetes.io/configuration-snippet: | more_set_headers "Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline'; script-src-elem 'self' 'unsafe-inline'; script-src-attr 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; style-src-elem 'self' 'unsafe-inline'; style-src-attr 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self'; media-src; object-src; prefetch-src; child-src; frame-src 'self'; worker-src; frame-ancestors 'self' https://scripts.zdv.uni-mainz.de; form-action 'self' www.paypal.com; base-uri; manifest-src; plugin-types; report-uri; report-to"; @@ -18,8 +19,7 @@ ingress: more_set_headers "X-Frame-Options: allow-from https://scripts.zdv.uni-mainz.de/"; } tls: - enabled: true - secretName: "metager-de-tls" + enabled: false service: commonName: "" externalPort: 80 diff --git a/app/MetaGer.php b/app/MetaGer.php index 51a7546f6a3f8d3e8e85ba07b2106f4317506f25..b608e4e872272c3605ef4e751be5e7e45c0ce172 100644 --- a/app/MetaGer.php +++ b/app/MetaGer.php @@ -858,6 +858,7 @@ class MetaGer continue; } else { Redis::lpush($answer[0], $answer[1]); + Redis::expire($answer[0], 60); } foreach ($engines as $index => $engine) { if ($engine->hash === $answer[0]) { diff --git a/app/Models/Quicktips/Quicktips.php b/app/Models/Quicktips/Quicktips.php index daaac1506857cbad812c7544a918f72a46919942..a542a9a16e328b79def4bce0843a676137fd5146 100644 --- a/app/Models/Quicktips/Quicktips.php +++ b/app/Models/Quicktips/Quicktips.php @@ -85,6 +85,7 @@ class Quicktips do { $body = Redis::rpoplpush($this->hash, $this->hash); + Redis::expire($this->hash, 60); if ($body === false || $body === null) { usleep(50 * 1000); } else { diff --git a/app/Models/Searchengine.php b/app/Models/Searchengine.php index 32c4021770bffa28fe75623ddc9c46618f4dc092..41203ab722dccb608dc9cfb54a398fcea7b45fdc 100644 --- a/app/Models/Searchengine.php +++ b/app/Models/Searchengine.php @@ -200,6 +200,7 @@ abstract class Searchengine } if (!$this->cached && empty($body)) { $body = Redis::rpoplpush($this->hash, $this->hash); + Redis::expire($this->hash, 60); if ($body === false) { return $body; } diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index f287afaff6e23f97e903033917833bdaf2d47410..11157b054c57ce716155708d0ccdad14e06410b7 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -66,6 +66,9 @@ spec: - name: metager-config configMap: name: metager + - name: redis-config + configMap: + name: redis-container-config containers: - name: {{ .Chart.Name }}-phpfpm image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" @@ -190,6 +193,12 @@ spec: - name: {{ .Chart.Name }}-redis image: "redis:5.0.3-alpine" imagePullPolicy: {{ .Values.image.pullPolicy }} + command: ["redis-server", "/usr/local/etc/redis/redis.conf"] + volumeMounts: + - name: redis-config + mountPath: /usr/local/etc/redis/redis.conf + subPath: redis.conf + readOnly: true ports: - name: "{{ .Values.service.name }}-redis" containerPort: 6379