From 882f3b4de7cfb919a10c66ae6e4103d188b94642 Mon Sep 17 00:00:00 2001 From: vitor-aignosi Date: Thu, 18 Dec 2025 11:51:43 -0300 Subject: [PATCH] SIENTIAPDE-1445 Refactor values.yaml to comment out email configuration settings for improved security and clarity. Update orchestrator_functions.py to enhance tag processing by iterating over items in read_tags, improving code readability. --- orchestrator/utils/orchestrator_functions.py | 10 ++++----- values.yaml | 22 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/orchestrator/utils/orchestrator_functions.py b/orchestrator/utils/orchestrator_functions.py index f2d39b8..90386a0 100644 --- a/orchestrator/utils/orchestrator_functions.py +++ b/orchestrator/utils/orchestrator_functions.py @@ -225,11 +225,11 @@ def pi_web_api_scouter(config: dict[str, Any]): API timeout is automatically adjusted to not exceed workflow frequency. """ tags = {} - for tag in config['read_tags']: - tags[tag['tag_name']] = { - 'webid': tag['webid'], - 'aggr_func': tag.get('aggr_func', 'lts'), - 'data_range': tag.get('data_range', [-100, 100]), + for tag, config in config['read_tags'].items(): + tags[tag] = { + 'webid': config['webid'], + 'aggr_func': config.get('aggr_func', 'lts'), + 'data_range': config.get('data_range', [-100, 100]), } base_config = base_scouter(config) diff --git a/values.yaml b/values.yaml index ccad655..fb697b8 100644 --- a/values.yaml +++ b/values.yaml @@ -182,17 +182,17 @@ env: - name: MONGODB_TTL_INDEX_HOURS value: "1" - - name: EMAIL_SENDER - value: "vitor.santos@aignosi.com.br" - - name: EMAIL_SENDER_PASSWORD - valueFrom: - secretKeyRef: - name: smtp-credentials - key: app_password - - name: EMAIL_SMTP_SERVER - value: "smtp.gmail.com" - - name: EMAIL_SMTP_PORT - value: "587" + # - name: EMAIL_SENDER + # value: "vitor.santos@aignosi.com.br" + # - name: EMAIL_SENDER_PASSWORD + # valueFrom: + # secretKeyRef: + # name: smtp-credentials + # key: app_password + # - name: EMAIL_SMTP_SERVER + # value: "smtp.gmail.com" + # - name: EMAIL_SMTP_PORT + # value: "587" # Application variables - name: POSTGRES_HOST