Commit 76ed75d9 authored by Carlos Natalino's avatar Carlos Natalino
Browse files

Updating script to work with the new monitoring terminology.

parent a4520ecd
Loading
Loading
Loading
Loading
+2 −12
Original line number Diff line number Diff line
@@ -58,18 +58,6 @@ kubectl delete namespace $TFS_K8S_NAMESPACE
kubectl create namespace $TFS_K8S_NAMESPACE
printf "\n"

# if [[ "$TFS_COMPONENTS" == *"monitoring"* ]]; then
#     echo "Creating secrets for InfluxDB..."
#     #TODO: make sure to change this when having a production deployment
#     kubectl create secret generic influxdb-secrets --namespace=$TFS_K8S_NAMESPACE \
#         --from-literal=INFLUXDB_DB="monitoring" --from-literal=INFLUXDB_ADMIN_USER="teraflow" \
#         --from-literal=INFLUXDB_ADMIN_PASSWORD="teraflow" --from-literal=INFLUXDB_HTTP_AUTH_ENABLED="True"
#     kubectl create secret generic monitoring-secrets --namespace=$TFS_K8S_NAMESPACE \
#         --from-literal=INFLUXDB_DATABASE="monitoring" --from-literal=INFLUXDB_USER="teraflow" \
#         --from-literal=INFLUXDB_PASSWORD="teraflow" --from-literal=INFLUXDB_HOSTNAME="localhost"
#     printf "\n"
# fi

echo "Deploying components and collecting environment variables..."
ENV_VARS_SCRIPT=tfs_runtime_env_vars.sh
echo "# Environment variables for TeraFlowSDN deployment" > $ENV_VARS_SCRIPT
@@ -115,6 +103,8 @@ for COMPONENT in $TFS_COMPONENTS; do
        sed -E -i "s#imagePullPolicy: .*#imagePullPolicy: Never#g" "$MANIFEST"        
    fi

    # TODO: harmonize names of the monitoring component

    echo "  Deploying '$COMPONENT' component to Kubernetes..."
    DEPLOY_LOG="$TMP_LOGS_FOLDER/deploy_${COMPONENT}.log"
    kubectl --namespace $TFS_K8S_NAMESPACE apply -f "$MANIFEST" > "$DEPLOY_LOG"
+2 −10
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ spec:
apiVersion: apps/v1
kind: Deployment
metadata:
  name: monitoringservice
  name: monitoringserver
spec:
  selector:
    matchLabels:
@@ -89,14 +89,6 @@ spec:
        livenessProbe:
          exec:
            command: ["/bin/grpc_health_probe", "-addr=:7070"]
        # readinessProbe:
        #   grpc:
        #     port: 7070
        #   initialDelaySeconds: 5
        # livenessProbe:
        #   grpc:
        #     port: 7070
        #   initialDelaySeconds: 10
---
apiVersion: v1
kind: Service