Commit edc5841b authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Fixed Kafka K8s service name

parent bf9f7c11
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ kubectl create secret generic crdb-data --namespace ${TFS_K8S_NAMESPACE} --type=
printf "\n"

echo ">>> Create Secret with Apache Kafka..."
KFK_SERVER_PORT=$(kubectl --namespace ${KFK_NAMESPACE} get service kafka-public -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 ${TFS_K8S_NAMESPACE} --type='Opaque' \
    --from-literal=KFK_NAMESPACE=${KFK_NAMESPACE} \
    --from-literal=KFK_SERVER_PORT=${KFK_SERVER_PORT}
+3 −3
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
apiVersion: v1
kind: Service
metadata:
  name: kafka-public
  name: kafka-service
  labels:
    app.kubernetes.io/component: message-broker
    app.kubernetes.io/instance: kafka
@@ -50,7 +50,7 @@ spec:
      app.kubernetes.io/component: message-broker
      app.kubernetes.io/instance: kafka
      app.kubernetes.io/name: kafka
  serviceName: "kafka-public"
  serviceName: "kafka-service"
  replicas: 1
  minReadySeconds: 5
  template:
@@ -83,7 +83,7 @@ spec:
          - name: KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP
            value: "PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT"
          - name: KAFKA_CFG_ADVERTISED_LISTENERS
            value: "PLAINTEXT://kafka-public.kafka.svc.cluster.local:9092,EXTERNAL://localhost:9094"
            value: "PLAINTEXT://kafka-service.kafka.svc.cluster.local:9092,EXTERNAL://localhost:9094"
          - name: KAFKA_CFG_CONTROLLER_LISTENER_NAMES
            value: "CONTROLLER"
          - name: KAFKA_CFG_CONTROLLER_QUORUM_VOTERS
+1 −1
Original line number Diff line number Diff line
@@ -164,7 +164,7 @@ def telemetry_backend_service():
        # + Uncomment test_add_to_topology() in helper methods section to add a device.
    # - A KPI Descriptor must be added in KPI DB with correct device_id.
        # + Uncomment test_SetKpiDescriptor() in helper methods section to add a KPI Descriptor.
    # - Kafka should be exposed externally 'kubectl port-forward -n kafka service/kafka-public 9094:9094'.
    # - Kafka should be exposed externally 'kubectl port-forward -n kafka service/kafka-service 9094:9094'.
 
def test_helper_get_collector_by_kpi_id(kpi_manager_client, context_client):
    LOGGER.info("Testing get_collector_by_kpi_id...")