Commit 1f8bac27 authored by prakash.raguri's avatar prakash.raguri

fix-16-05-2023

parent 14f387aa
......@@ -6,3 +6,7 @@ HELM_REPO = https://gitlab-pm.knowledgelens.com/KnowledgeLens/Products/iLens-2.0
GIT_USERNAME = harshavardhan.c
GIT_TOKEN = FEMA6PnP63fJCs6DrtZJ
GLOBAL_VARIABLES_FILE=ilens-env-spec-variables.yml
......@@ -25,6 +25,10 @@ deployment:
limits:
memory: <{ limit_memory | default("750Mi") }>
cpu: <{ limit_cpu | default("500Mi") }>
environmentConfig:
envFrom:
- configMapRef:
name: ilens-global-variables
environmentVar:
- name: MONGO_URI
......
......@@ -22,6 +22,11 @@ HELM_STORE_PATH = "./helm-charts"
global_configmap = EnvironmentVariables.global_configmap
helm_repo = EnvironmentVariables.helm_repo
mapping_json = {
"visualization-4": "visualization4.0",
"metadata-service": "metadata-services"
}
class HelmVersionUpgrade:
def __init__(self, arguments: dict, git_user_name: str, git_access_token: str):
......@@ -75,6 +80,7 @@ class HelmVersionUpgrade:
if not os.path.exists(template_path):
os.makedirs(template_path)
for _module in _module_names:
updated_module_name = mapping_json.get(_module, _module)
if _module == "data":
continue
helm_out_file_path = os.path.join(output_path, f'{_module}.yml')
......@@ -88,7 +94,7 @@ class HelmVersionUpgrade:
logging.debug(f"Helm Deployment File found for selected the module {_module}")
continue
variables_file_path = os.path.join(module_path, variables_file)
git_info = self.git_handler_obj.get_git_url_by_module_name(module_name=_module)
git_info = self.git_handler_obj.get_git_url_by_module_name(module_name=updated_module_name)
if not git_info:
logging.debug("Failed to fetch module info!! Skipping Helm File Preparation")
continue
......@@ -107,7 +113,7 @@ class HelmVersionUpgrade:
template_file = os.path.join(template_path, f'{_module}.yml')
session_obj = get_db_for_func()
module_info = self.db_handler.get_module_versions(
input_data=GetRequest(module_name=_module, client='iLens', ilens_version=_ilens_version,
input_data=GetRequest(module_name=updated_module_name, client='iLens', ilens_version=_ilens_version,
release_version=_release_version), db=session_obj)
session_obj.close()
image_url = module_info.get("image_url", '') if module_info else ''
......
This diff is collapsed.
......@@ -61,8 +61,10 @@ class EnvironmentVariables:
class _ModuleConstants(BaseSettings):
IOT_DATA_PROCESSOR: Optional[list] = ["mqtt-data-processor-worker", "iot-data-processor-worker"]
IOT_DATA_PROCESSOR: Optional[list] = ["mqtt-data-processor-worker", "iot-data-processor-worker", "data-processor-worker-iot-apollo", "data-processor-worker-iot-goodyear", "data-processor-worker-mqtt"]
IOT_DATA_PROCESSOR_MODULE: Optional[str] = "data-processor-worker"
# CORE_DATA_PROCESSOR: Optional[list] = ["", ""]
# CORE_DATA_PROCESSOR_MODULE: Optional[str] = "data-processor"
ModuleConstants = _ModuleConstants(_env_file=".env", _env_file_encoding="utf-8")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment