Skip to content
Snippets Groups Projects
Commit aca1fe1b authored by Waleed Akbar's avatar Waleed Akbar
Browse files

Temporarly defines the static value of env variables to test the working of microservice.

- KFK_NAMESPACE and KFK_PORT
parent 494b4cd7
No related branches found
No related tags found
2 merge requests!294Release TeraFlowSDN 4.0,!255Resolve "KPI Management Enhancements"
......@@ -23,8 +23,10 @@ LOGGER = logging.getLogger(__name__)
class KafkaConfig(Enum):
KFK_SERVER_ADDRESS_TEMPLATE = 'kafka-service.{:s}.svc.cluster.local:{:s}'
KFK_NAMESPACE = get_setting('KFK_NAMESPACE')
KFK_PORT = get_setting('KFK_SERVER_PORT')
KFK_NAMESPACE = 'kafka'
# KFK_NAMESPACE = get_setting('KFK_NAMESPACE')
KFK_PORT = '9092'
# KFK_PORT = get_setting('KFK_SERVER_PORT')
# SERVER_ADDRESS = "127.0.0.1:9092"
SERVER_ADDRESS = KFK_SERVER_ADDRESS_TEMPLATE.format(KFK_NAMESPACE, KFK_PORT)
ADMIN_CLIENT = AdminClient({'bootstrap.servers': SERVER_ADDRESS })
......
......@@ -94,3 +94,4 @@ class MetricWriterToPrometheus:
else:
LOGGER.error("Error while pushing metric: {}".format(e))
raise
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment