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

Kafka secret added to kpi_value_api/kpi_value_writer

 - improvements to accuratly read the env variables
parent ecea8dac
No related branches found
No related tags found
2 merge requests!294Release TeraFlowSDN 4.0,!255Resolve "KPI Management Enhancements"
...@@ -81,7 +81,7 @@ echo ">>> Checking if Apache Kafka is deployed ... " ...@@ -81,7 +81,7 @@ echo ">>> Checking if Apache Kafka is deployed ... "
if [ "$KFK_REDEPLOY" == "YES" ]; then if [ "$KFK_REDEPLOY" == "YES" ]; then
kafka_deploy kafka_deploy
elif kubectl get --namespace ${KFK_NAMESPACE} deployments.apps &> /dev/null; then elif kubectl get --namespace ${KFK_NAMESPACE} deployments.apps &> /dev/null; then
echo ">>> Apache Kafka already present; skipping step..." echo ">>> Apache Kafka already present; skipping step."
else else
kafka_deploy kafka_deploy
fi fi
......
...@@ -172,9 +172,9 @@ printf "\n" ...@@ -172,9 +172,9 @@ printf "\n"
echo "Create secret with Apache Kafka kfk-kpi-data for KPI and Telemetry microservices" echo "Create secret with Apache Kafka kfk-kpi-data for KPI and Telemetry microservices"
KFK_SERVER_PORT=$(kubectl --namespace ${KFK_NAMESPACE} get service kafka-service -o 'jsonpath={.spec.ports[0].port}') KFK_SERVER_PORT=$(kubectl --namespace ${KFK_NAMESPACE} get service kafka-service -o 'jsonpath={.spec.ports[0].port}')
kubectl create secret generic kfk-kpi-data --namespace ${KFK_NAMESPACE} --type='Opaque' \ kubectl create secret generic kfk-kpi-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \
--from-literal=KFK_NAMESPACE=${KFK_NAMESPACE} \ --from-literal=KFK_NAMESPACE=${KFK_NAMESPACE} \
--from-literal=KFK_SERVER_PORT=${KFK_NAMESPACE} --from-literal=KFK_SERVER_PORT=${KFK_SERVER_PORT}
printf "\n" printf "\n"
echo "Create secret with NATS data" echo "Create secret with NATS data"
......
...@@ -39,6 +39,9 @@ spec: ...@@ -39,6 +39,9 @@ spec:
env: env:
- name: LOG_LEVEL - name: LOG_LEVEL
value: "INFO" value: "INFO"
envFrom:
- secretRef:
name: kfk-kpi-data
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:30020"] command: ["/bin/grpc_health_probe", "-addr=:30020"]
......
...@@ -39,6 +39,9 @@ spec: ...@@ -39,6 +39,9 @@ spec:
env: env:
- name: LOG_LEVEL - name: LOG_LEVEL
value: "INFO" value: "INFO"
envFrom:
- secretRef:
name: kfk-kpi-data
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:30030"] command: ["/bin/grpc_health_probe", "-addr=:30030"]
......
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