Skip to content

Commit ed5eb27

Browse files
fix: ui templates
1 parent 33ccc17 commit ed5eb27

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

charts/splunk-connect-for-snmp/templates/ui/_helpers.tpl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ spec:
3434
- name: CONFIG_PATH
3535
value: /app/config/config.yaml
3636
{{ include "splunk-connect-for-snmp.redis-env" . | nindent 10 }}
37+
{{ include "splunk-connect-for-snmp.mongodb-env" . | nindent 10 }}
3738
- name: INVENTORY_PATH
3839
value: /app/inventory/inventory.csv
39-
- name: MONGO_URI
40-
value: {{ include "splunk-connect-for-snmp.mongo_uri" . }}
4140
- name: MIB_SOURCES
4241
value: "http://{{ printf "%s-%s" .Release.Name "mibserver" }}/asn1/@mib@"
4342
- name: MIB_INDEX

charts/splunk-connect-for-snmp/templates/ui/deployment-backend-worker.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ spec:
2323
imagePullPolicy: {{ .Values.UI.backEnd.pullPolicy }}
2424
command: ["sh","-c","/celery_start.sh"]
2525
env:
26-
- name: MONGO_URI
27-
value: {{ include "splunk-connect-for-snmp.mongo_uri" . }}
2826
{{ include "splunk-connect-for-snmp.redis-env" . | nindent 8 }}
27+
{{ include "splunk-connect-for-snmp.mongodb-env" . | nindent 8 }}
2928
- name: JOB_CONFIG_PATH
3029
value: /config/job_config.yaml
3130
- name: JOB_NAMESPACE

charts/splunk-connect-for-snmp/templates/ui/deployment-backend.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ spec:
4545
imagePullPolicy: {{ .Values.UI.backEnd.pullPolicy }}
4646
command: ["sh","-c","/flask_start.sh"]
4747
env:
48-
- name: MONGO_URI
49-
value: {{ include "splunk-connect-for-snmp.mongo_uri" . }}
5048
{{ include "splunk-connect-for-snmp.redis-env" . | nindent 8 }}
49+
{{ include "splunk-connect-for-snmp.mongodb-env" . | nindent 8 }}
5150
- name: JOB_CONFIG_PATH
5251
value: /config/job_config.yaml
5352
- name: JOB_NAMESPACE

splunk_connect_for_snmp/common/hummanbool.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def wait_for_mongodb_replicaset(logger, max_retries=120, retry_interval=5):
8383
mongo_uri = os.getenv("MONGO_URI")
8484

8585
if not mongo_uri:
86-
logger.warning("⚠️ MONGO_URI not set, exiting application")
86+
logger.warning("MONGO_URI not set, exiting application")
8787
sys.exit(1)
8888

8989
logger.info(f"Waiting for MongoDB ReplicaSet to be ready and elect the primary...")
@@ -102,16 +102,16 @@ def wait_for_mongodb_replicaset(logger, max_retries=120, retry_interval=5):
102102
if "replicaSet=" in mongo_uri:
103103
if client.primary is None:
104104
raise Exception("No PRIMARY elected yet")
105-
logger.info(f"PRIMARY found: {client.primary}")
105+
logger.info(f"PRIMARY found: {client.primary}")
106106

107107
client.close()
108-
logger.info("MongoDB is ready")
108+
logger.info("MongoDB is ready")
109109
return
110110

111111
except (ServerSelectionTimeoutError, ConnectionFailure, Exception) as e:
112112
if attempt >= max_retries:
113113
logger.info(
114-
f"MongoDB not ready after {max_retries * retry_interval}s"
114+
f"MongoDB not ready after {max_retries * retry_interval}s"
115115
)
116116
logger.info(f" Error: {e}")
117117
sys.exit(1)

0 commit comments

Comments
 (0)