Commit b8e0480a authored by Waleed Akbar's avatar Waleed Akbar
Browse files

cleanup for merge

parent 12d224a1
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -146,6 +146,17 @@ kubectl create secret generic crdb-data --namespace ${TFS_K8S_NAMESPACE} --type=
    --from-literal=CRDB_SSLMODE=require
printf "\n"

echo "Create secret with CockroachDB data for KPI Management"
CRDB_SQL_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}')
kubectl create secret generic crdb-kpi-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \
    --from-literal=CRDB_NAMESPACE=${CRDB_NAMESPACE} \
    --from-literal=CRDB_SQL_PORT=${CRDB_SQL_PORT} \
    --from-literal=CRDB_DATABASE=${CRDB_DATABASE} \
    --from-literal=CRDB_USERNAME=${CRDB_USERNAME} \
    --from-literal=CRDB_PASSWORD=${CRDB_PASSWORD} \
    --from-literal=CRDB_SSLMODE=require
printf "\n"

echo "Create secret with NATS data"
NATS_CLIENT_PORT=$(kubectl --namespace ${NATS_NAMESPACE} get service ${NATS_NAMESPACE} -o 'jsonpath={.spec.ports[?(@.name=="client")].port}')
if [ -z "$NATS_CLIENT_PORT" ]; then
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ spec:
              value: "INFO"
          envFrom:
            - secretRef:
                name: crdb-data
                name: crdb-kpi-data
          readinessProbe:
            exec:
              command: ["/bin/grpc_health_probe", "-addr=:30010"]
+27 −0
Original line number Diff line number Diff line
#!/bin/bash
# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

########################################################################################################################
# Define your deployment settings here
########################################################################################################################

# If not already set, set the name of the Kubernetes namespace to deploy to.
export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"}

########################################################################################################################
# Automated steps start here
########################################################################################################################

kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/kpi-value-apiservice -c server
+27 −0
Original line number Diff line number Diff line
#!/bin/bash
# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

########################################################################################################################
# Define your deployment settings here
########################################################################################################################

# If not already set, set the name of the Kubernetes namespace to deploy to.
export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"}

########################################################################################################################
# Automated steps start here
########################################################################################################################

kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/kpi-value-writerservice -c server
+2 −1
Original line number Diff line number Diff line
@@ -21,7 +21,8 @@ from confluent_kafka.admin import AdminClient, NewTopic
LOGGER = logging.getLogger(__name__)

class KafkaConfig(Enum):
    SERVER_IP    = "127.0.0.1:9092"
    # SERVER_IP    = "127.0.0.1:9092"
    SERVER_IP    = "kafka-service:9092"
    ADMIN_CLIENT =  AdminClient({'bootstrap.servers': SERVER_IP})

class KafkaTopic(Enum):
Loading