From f6c0791dc135fa497ea9b3fdb6c0d0505abd2b63 Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Thu, 25 Apr 2024 09:00:17 +0200 Subject: [PATCH] fix missing settings / typos: (#1748) - ensure max_crawler_memory_size is inited before it is set! - pass profile_browser_memory / profile_browser_cpu from chart values - map volume to /tmp/home to avoid persisting /tmp for profiles --- backend/btrixcloud/operator/baseoperator.py | 4 ++-- chart/app-templates/profilebrowser.yaml | 2 +- chart/templates/configmap.yaml | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/btrixcloud/operator/baseoperator.py b/backend/btrixcloud/operator/baseoperator.py index ad8cf4a1..f108b1b7 100644 --- a/backend/btrixcloud/operator/baseoperator.py +++ b/backend/btrixcloud/operator/baseoperator.py @@ -39,11 +39,11 @@ class K8sOpAPI(K8sAPI): self.shared_params = yaml.safe_load(fh_config) self.has_pod_metrics = False + self.max_crawler_memory_size = 0 + self.compute_crawler_resources() self.compute_profile_resources() - self.max_crawler_memory_size = 0 - def compute_crawler_resources(self): """compute memory / cpu resources for crawlers""" p = self.shared_params diff --git a/chart/app-templates/profilebrowser.yaml b/chart/app-templates/profilebrowser.yaml index 57e8c9b8..0f0c3d1b 100644 --- a/chart/app-templates/profilebrowser.yaml +++ b/chart/app-templates/profilebrowser.yaml @@ -75,7 +75,7 @@ spec: volumeMounts: - name: crawler-workdir - mountPath: /tmp + mountPath: /tmp/home envFrom: - secretRef: diff --git a/chart/templates/configmap.yaml b/chart/templates/configmap.yaml index ffde193e..6899dc8a 100644 --- a/chart/templates/configmap.yaml +++ b/chart/templates/configmap.yaml @@ -113,6 +113,9 @@ data: volume_storage_class: "{{ .Values.volume_storage_class }}" + profile_browser_cpu: "{{ .Values.profile_browser_cpu }}" + profile_browser_memory: "{{ .Values.profile_browser_memory }}" + crawler_liveness_port: "{{ .Values.crawler_liveness_port | default 0 }}" crawler_socks_proxy_host: "{{ .Values.crawler_socks_proxy_host }}"