Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • tfs/controller
1 result
Show changes
Commits on Source (1)
Showing
with 661 additions and 531 deletions
...@@ -40,6 +40,21 @@ export TFS_GRAFANA_PASSWORD=${TFS_GRAFANA_PASSWORD:-"admin123+"} ...@@ -40,6 +40,21 @@ export TFS_GRAFANA_PASSWORD=${TFS_GRAFANA_PASSWORD:-"admin123+"}
# Automated steps start here # Automated steps start here
######################################################################################################################## ########################################################################################################################
DOCKER_BUILD="docker build"
DOCKER_MAJOR_VERSION=$(docker --version | grep -o -E "Docker version [0-9]+\." | grep -o -E "[0-9]+" | cut -c 1-3)
if [[ $DOCKER_MAJOR_VERSION -ge 23 ]]; then
# If Docker version >= 23, build command was migrated to docker-buildx
# In Ubuntu, in practice, means to install package docker-buildx together with docker.io
# Check if docker-buildx plugin is installed
docker buildx version 1>/dev/null 2>/dev/null
if [[ $? -ne 0 ]]; then
echo "Docker buildx command is not installed. Check: https://docs.docker.com/build/architecture/#install-buildx"
echo "If you installed docker through APT package docker.io, consider installing also package docker-buildx"
exit 1;
fi
DOCKER_BUILD="docker buildx build"
fi
# Constants # Constants
GITLAB_REPO_URL="labs.etsi.org:5050/tfs/controller" GITLAB_REPO_URL="labs.etsi.org:5050/tfs/controller"
TMP_FOLDER="./tmp" TMP_FOLDER="./tmp"
...@@ -60,17 +75,17 @@ for COMPONENT in $TFS_COMPONENTS; do ...@@ -60,17 +75,17 @@ for COMPONENT in $TFS_COMPONENTS; do
BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}.log" BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}.log"
if [ "$COMPONENT" == "ztp" ] || [ "$COMPONENT" == "policy" ]; then if [ "$COMPONENT" == "ztp" ] || [ "$COMPONENT" == "policy" ]; then
docker build -t "$IMAGE_NAME" -f ./src/"$COMPONENT"/Dockerfile ./src/"$COMPONENT"/ > "$BUILD_LOG" $DOCKER_BUILD -t "$IMAGE_NAME" -f ./src/"$COMPONENT"/Dockerfile ./src/"$COMPONENT"/ > "$BUILD_LOG"
elif [ "$COMPONENT" == "pathcomp" ]; then elif [ "$COMPONENT" == "pathcomp" ]; then
BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}-frontend.log" BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}-frontend.log"
docker build -t "$COMPONENT-frontend:$TFS_IMAGE_TAG" -f ./src/"$COMPONENT"/frontend/Dockerfile . >> "$BUILD_LOG" $DOCKER_BUILD -t "$COMPONENT-frontend:$TFS_IMAGE_TAG" -f ./src/"$COMPONENT"/frontend/Dockerfile . >> "$BUILD_LOG"
BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}-backend.log" BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}-backend.log"
docker build -t "$COMPONENT-backend:$TFS_IMAGE_TAG" -f ./src/"$COMPONENT"/backend/Dockerfile . >> "$BUILD_LOG" $DOCKER_BUILD -t "$COMPONENT-backend:$TFS_IMAGE_TAG" -f ./src/"$COMPONENT"/backend/Dockerfile . >> "$BUILD_LOG"
# next command is redundant, but helpful to keep cache updated between rebuilds # next command is redundant, but helpful to keep cache updated between rebuilds
docker build -t "$COMPONENT-backend:$TFS_IMAGE_TAG-builder" --target builder -f ./src/"$COMPONENT"/backend/Dockerfile . >> "$BUILD_LOG" $DOCKER_BUILD -t "$COMPONENT-backend:$TFS_IMAGE_TAG-builder" --target builder -f ./src/"$COMPONENT"/backend/Dockerfile . >> "$BUILD_LOG"
else else
docker build -t "$IMAGE_NAME" -f ./src/"$COMPONENT"/Dockerfile . > "$BUILD_LOG" $DOCKER_BUILD -t "$IMAGE_NAME" -f ./src/"$COMPONENT"/Dockerfile . > "$BUILD_LOG"
fi fi
if [ -n "$TFS_REGISTRY_IMAGES" ]; then if [ -n "$TFS_REGISTRY_IMAGES" ]; then
......
...@@ -158,9 +158,19 @@ function crdb_undeploy_single() { ...@@ -158,9 +158,19 @@ function crdb_undeploy_single() {
function crdb_drop_database_single() { function crdb_drop_database_single() {
echo "Drop database if exists" echo "Drop database if exists"
CRDB_PORT_SQL=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}')
CRDB_CLIENT_URL="postgresql://${CRDB_USERNAME}:${CRDB_PASSWORD}@cockroachdb-0:${CRDB_PORT_SQL}/defaultdb?sslmode=require" if [[ -z "${GITLAB_CI}" ]]; then
kubectl exec -it --namespace ${CRDB_NAMESPACE} cockroachdb-0 -- \ #kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o yaml
CRDB_HOST=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.clusterIP}')
CRDB_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}')
else
CRDB_HOST="127.0.0.1"
CRDB_PORT=${CRDB_EXT_PORT_SQL}
fi
CRDB_CLIENT_URL="postgresql://${CRDB_USERNAME}:${CRDB_PASSWORD}@${CRDB_HOST}:${CRDB_PORT}/defaultdb?sslmode=require"
echo "CRDB_CLIENT_URL=${CRDB_CLIENT_URL}"
kubectl exec -i --namespace ${CRDB_NAMESPACE} cockroachdb-0 -- \
./cockroach sql --certs-dir=/cockroach/cockroach-certs --url=${CRDB_CLIENT_URL} \ ./cockroach sql --certs-dir=/cockroach/cockroach-certs --url=${CRDB_CLIENT_URL} \
--execute "DROP DATABASE IF EXISTS ${CRDB_DATABASE};" --execute "DROP DATABASE IF EXISTS ${CRDB_DATABASE};"
echo echo
...@@ -343,7 +353,7 @@ function crdb_undeploy_cluster() { ...@@ -343,7 +353,7 @@ function crdb_undeploy_cluster() {
function crdb_drop_database_cluster() { function crdb_drop_database_cluster() {
echo "Drop database if exists" echo "Drop database if exists"
kubectl exec -it --namespace ${CRDB_NAMESPACE} cockroachdb-client-secure -- \ kubectl exec -i --namespace ${CRDB_NAMESPACE} cockroachdb-client-secure -- \
./cockroach sql --certs-dir=/cockroach/cockroach-certs --host=cockroachdb-public --execute \ ./cockroach sql --certs-dir=/cockroach/cockroach-certs --host=cockroachdb-public --execute \
"DROP DATABASE IF EXISTS ${CRDB_DATABASE};" "DROP DATABASE IF EXISTS ${CRDB_DATABASE};"
echo echo
......
...@@ -58,9 +58,24 @@ echo "Processing '$COMPONENT' component..." ...@@ -58,9 +58,24 @@ echo "Processing '$COMPONENT' component..."
IMAGE_NAME="$COMPONENT:$IMAGE_TAG" IMAGE_NAME="$COMPONENT:$IMAGE_TAG"
IMAGE_URL=$(echo "$REGISTRY_IMAGE/$IMAGE_NAME" | sed 's,//,/,g' | sed 's,http:/,,g') IMAGE_URL=$(echo "$REGISTRY_IMAGE/$IMAGE_NAME" | sed 's,//,/,g' | sed 's,http:/,,g')
DOCKER_BUILD="docker build"
DOCKER_MAJOR_VERSION=$(docker --version | grep -o -E "Docker version [0-9]+\." | grep -o -E "[0-9]+" | cut -c 1-3)
if [[ $DOCKER_MAJOR_VERSION -ge 23 ]]; then
# If Docker version >= 23, build command was migrated to docker-buildx
# In Ubuntu, in practice, means to install package docker-buildx together with docker.io
# Check if docker-buildx plugin is installed
docker buildx version 1>/dev/null 2>/dev/null
if [[ $? -ne 0 ]]; then
echo "Docker buildx command is not installed. Check: https://docs.docker.com/build/architecture/#install-buildx"
echo "If you installed docker through APT package docker.io, consider installing also package docker-buildx"
exit 1;
fi
DOCKER_BUILD="docker buildx build"
fi
echo " Building Docker image..." echo " Building Docker image..."
BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}.log" BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}.log"
docker build -t "$IMAGE_NAME" -f ./src/dlt/mock_blockchain/Dockerfile . > "$BUILD_LOG" $DOCKER_BUILD -t "$IMAGE_NAME" -f ./src/dlt/mock_blockchain/Dockerfile . > "$BUILD_LOG"
if [ -n "$REGISTRY_IMAGE" ]; then if [ -n "$REGISTRY_IMAGE" ]; then
echo " Pushing Docker image to '$REGISTRY_IMAGE'..." echo " Pushing Docker image to '$REGISTRY_IMAGE'..."
......
...@@ -160,10 +160,17 @@ function qdb_undeploy() { ...@@ -160,10 +160,17 @@ function qdb_undeploy() {
} }
function qdb_drop_tables() { function qdb_drop_tables() {
QDB_HOST=$(kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o 'jsonpath={.spec.clusterIP}')
QDB_PORT=$(kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o 'jsonpath={.spec.ports[?(@.name=="http")].port}')
echo "Drop tables, if exist" echo "Drop tables, if exist"
if [[ -z "${GITLAB_CI}" ]]; then
#kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o yaml
QDB_HOST=$(kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o 'jsonpath={.spec.clusterIP}')
QDB_PORT=$(kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o 'jsonpath={.spec.ports[?(@.name=="http")].port}')
else
QDB_HOST="127.0.0.1"
QDB_PORT=${QDB_EXT_PORT_HTTP}
fi
curl "http://${QDB_HOST}:${QDB_PORT}/exec?fmt=json&query=DROP+TABLE+IF+EXISTS+${QDB_TABLE_MONITORING_KPIS}+;" curl "http://${QDB_HOST}:${QDB_PORT}/exec?fmt=json&query=DROP+TABLE+IF+EXISTS+${QDB_TABLE_MONITORING_KPIS}+;"
echo echo
curl "http://${QDB_HOST}:${QDB_PORT}/exec?fmt=json&query=DROP+TABLE+IF+EXISTS+${QDB_TABLE_SLICE_GROUPS}+;" curl "http://${QDB_HOST}:${QDB_PORT}/exec?fmt=json&query=DROP+TABLE+IF+EXISTS+${QDB_TABLE_SLICE_GROUPS}+;"
......
...@@ -299,8 +299,13 @@ for COMPONENT in $TFS_COMPONENTS; do ...@@ -299,8 +299,13 @@ for COMPONENT in $TFS_COMPONENTS; do
VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}-gateway:" "$MANIFEST" | cut -d ":" -f4) VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}-gateway:" "$MANIFEST" | cut -d ":" -f4)
sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT-gateway:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST" sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT-gateway:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST"
else else
IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g') if [ "$TFS_SKIP_BUILD" != "YES" ]; then
VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}:" "$MANIFEST" | cut -d ":" -f4) IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}:" "$MANIFEST" | cut -d ":" -f4)
else
VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}:" "$MANIFEST" | cut -d ":" -f4)
IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT:$VERSION" | sed 's,//,/,g' | sed 's,http:/,,g')
fi
sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST" sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST"
fi fi
...@@ -364,7 +369,13 @@ for COMPONENT in $TFS_COMPONENTS; do ...@@ -364,7 +369,13 @@ for COMPONENT in $TFS_COMPONENTS; do
echo "Waiting for '$COMPONENT' component..." echo "Waiting for '$COMPONENT' component..."
COMPONENT_OBJNAME=$(echo "${COMPONENT}" | sed "s/\_/-/") COMPONENT_OBJNAME=$(echo "${COMPONENT}" | sed "s/\_/-/")
kubectl wait --namespace $TFS_K8S_NAMESPACE \ kubectl wait --namespace $TFS_K8S_NAMESPACE \
--for='condition=available' --timeout=300s deployment/${COMPONENT_OBJNAME}service --for='condition=available' --timeout=90s deployment/${COMPONENT_OBJNAME}service
WAIT_EXIT_CODE=$?
if [[ $WAIT_EXIT_CODE != 0 ]]; then
echo " Failed to deploy '${COMPONENT}' component, exit code '${WAIT_EXIT_CODE}', exiting..."
kubectl logs --namespace $TFS_K8S_NAMESPACE deployment/${COMPONENT_OBJNAME}service --all-containers=true
exit $WAIT_EXIT_CODE
fi
printf "\n" printf "\n"
done done
......
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (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.
apiVersion: apps/v1
kind: Deployment
metadata:
name: bgpls-speakerservice
spec:
selector:
matchLabels:
app: bgpls-speakerservice
replicas: 1
template:
metadata:
labels:
app: bgpls-speakerservice
spec:
terminationGracePeriodSeconds: 5
containers:
- name: server
image: localhost:32000/tfs/bgpls_speaker:dev
imagePullPolicy: Always
ports:
- containerPort: 20030
- containerPort: 9192
env:
- name: LOG_LEVEL
value: "INFO"
readinessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:20030"]
livenessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:20030"]
resources:
requests:
cpu: 250m
memory: 128Mi
limits:
cpu: 1000m
memory: 1024Mi
---
apiVersion: v1
kind: Service
metadata:
name: bgpls-speakerservice
labels:
app: bgpls-speakerservice
spec:
type: ClusterIP
selector:
app: bgpls-speakerservice
ports:
- name: grpc
protocol: TCP
port: 20030
targetPort: 20030
- name: metrics
protocol: TCP
port: 9192
targetPort: 9192
...@@ -27,28 +27,28 @@ spec: ...@@ -27,28 +27,28 @@ spec:
app: cachingservice app: cachingservice
spec: spec:
containers: containers:
- name: redis - name: redis
image: redis:7.0-alpine image: redis:7.0-alpine
env: env:
- name: REDIS_PASSWORD - name: REDIS_PASSWORD
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: redis-secrets name: redis-secrets
key: REDIS_PASSWORD key: REDIS_PASSWORD
ports: ports:
- containerPort: 6379 - containerPort: 6379
name: client name: client
command: ["redis-server"] command: ["redis-server"]
args: args:
- --requirepass - --requirepass
- $(REDIS_PASSWORD) - $(REDIS_PASSWORD)
resources: resources:
requests: requests:
cpu: 50m cpu: 50m
memory: 64Mi memory: 64Mi
limits: limits:
cpu: 500m cpu: 500m
memory: 512Mi memory: 512Mi
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
...@@ -59,6 +59,6 @@ spec: ...@@ -59,6 +59,6 @@ spec:
selector: selector:
app: cachingservice app: cachingservice
ports: ports:
- name: redis - name: redis
port: 6379 port: 6379
targetPort: 6379 targetPort: 6379
...@@ -30,39 +30,39 @@ spec: ...@@ -30,39 +30,39 @@ spec:
spec: spec:
terminationGracePeriodSeconds: 5 terminationGracePeriodSeconds: 5
containers: containers:
- name: server - name: server
image: labs.etsi.org:5050/tfs/controller/context:latest image: labs.etsi.org:5050/tfs/controller/context:latest
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 1010 - containerPort: 1010
- containerPort: 9192 - containerPort: 9192
env: env:
- name: MB_BACKEND - name: MB_BACKEND
value: "nats" value: "nats"
- name: LOG_LEVEL - name: LOG_LEVEL
value: "INFO" value: "INFO"
- name: ALLOW_EXPLICIT_ADD_DEVICE_TO_TOPOLOGY - name: ALLOW_EXPLICIT_ADD_DEVICE_TO_TOPOLOGY
value: "FALSE" value: "FALSE"
- name: ALLOW_EXPLICIT_ADD_LINK_TO_TOPOLOGY - name: ALLOW_EXPLICIT_ADD_LINK_TO_TOPOLOGY
value: "FALSE" value: "FALSE"
envFrom: envFrom:
- secretRef: - secretRef:
name: crdb-data name: crdb-data
- secretRef: - secretRef:
name: nats-data name: nats-data
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:1010"] command: ["/bin/grpc_health_probe", "-addr=:1010"]
livenessProbe: livenessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:1010"] command: ["/bin/grpc_health_probe", "-addr=:1010"]
resources: resources:
requests: requests:
cpu: 250m cpu: 250m
memory: 128Mi memory: 128Mi
limits: limits:
cpu: 1000m cpu: 1000m
memory: 1024Mi memory: 1024Mi
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
...@@ -75,14 +75,14 @@ spec: ...@@ -75,14 +75,14 @@ spec:
selector: selector:
app: contextservice app: contextservice
ports: ports:
- name: grpc - name: grpc
protocol: TCP protocol: TCP
port: 1010 port: 1010
targetPort: 1010 targetPort: 1010
- name: metrics - name: metrics
protocol: TCP protocol: TCP
port: 9192 port: 9192
targetPort: 9192 targetPort: 9192
--- ---
apiVersion: autoscaling/v2 apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler kind: HorizontalPodAutoscaler
...@@ -96,12 +96,12 @@ spec: ...@@ -96,12 +96,12 @@ spec:
minReplicas: 1 minReplicas: 1
maxReplicas: 20 maxReplicas: 20
metrics: metrics:
- type: Resource - type: Resource
resource: resource:
name: cpu name: cpu
target: target:
type: Utilization type: Utilization
averageUtilization: 80 averageUtilization: 80
#behavior: #behavior:
# scaleDown: # scaleDown:
# stabilizationWindowSeconds: 30 # stabilizationWindowSeconds: 30
...@@ -27,28 +27,28 @@ spec: ...@@ -27,28 +27,28 @@ spec:
spec: spec:
terminationGracePeriodSeconds: 5 terminationGracePeriodSeconds: 5
containers: containers:
- name: server - name: server
image: labs.etsi.org:5050/tfs/controller/dbscanserving:latest image: labs.etsi.org:5050/tfs/controller/dbscanserving:latest
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 10008 - containerPort: 10008
- containerPort: 9192 - containerPort: 9192
env: env:
- name: LOG_LEVEL - name: LOG_LEVEL
value: "INFO" value: "INFO"
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:10008"] command: ["/bin/grpc_health_probe", "-addr=:10008"]
livenessProbe: livenessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:10008"] command: ["/bin/grpc_health_probe", "-addr=:10008"]
resources: resources:
requests: requests:
cpu: 250m cpu: 250m
memory: 128Mi memory: 128Mi
limits: limits:
cpu: 1000m cpu: 1000m
memory: 1024Mi memory: 1024Mi
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
...@@ -61,12 +61,12 @@ spec: ...@@ -61,12 +61,12 @@ spec:
selector: selector:
app: dbscanservingservice app: dbscanservingservice
ports: ports:
- name: grpc - name: grpc
port: 10008 port: 10008
targetPort: 10008 targetPort: 10008
- name: metrics - name: metrics
port: 9192 port: 9192
targetPort: 9192 targetPort: 9192
--- ---
apiVersion: autoscaling/v2 apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler kind: HorizontalPodAutoscaler
...@@ -80,12 +80,12 @@ spec: ...@@ -80,12 +80,12 @@ spec:
minReplicas: 1 minReplicas: 1
maxReplicas: 20 maxReplicas: 20
metrics: metrics:
- type: Resource - type: Resource
resource: resource:
name: cpu name: cpu
target: target:
type: Utilization type: Utilization
averageUtilization: 80 averageUtilization: 80
#behavior: #behavior:
# scaleDown: # scaleDown:
# stabilizationWindowSeconds: 30 # stabilizationWindowSeconds: 30
...@@ -31,33 +31,33 @@ spec: ...@@ -31,33 +31,33 @@ spec:
spec: spec:
terminationGracePeriodSeconds: 5 terminationGracePeriodSeconds: 5
containers: containers:
- name: server - name: server
image: labs.etsi.org:5050/tfs/controller/device:latest image: labs.etsi.org:5050/tfs/controller/device:latest
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 2020 - containerPort: 2020
- containerPort: 9192 - containerPort: 9192
env: env:
- name: LOG_LEVEL - name: LOG_LEVEL
value: "INFO" value: "INFO"
startupProbe: startupProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:2020"] command: ["/bin/grpc_health_probe", "-addr=:2020"]
failureThreshold: 30 failureThreshold: 30
periodSeconds: 1 periodSeconds: 1
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:2020"] command: ["/bin/grpc_health_probe", "-addr=:2020"]
livenessProbe: livenessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:2020"] command: ["/bin/grpc_health_probe", "-addr=:2020"]
resources: resources:
requests: requests:
cpu: 250m cpu: 250m
memory: 128Mi memory: 128Mi
limits: limits:
cpu: 1000m cpu: 1000m
memory: 1024Mi memory: 1024Mi
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
...@@ -70,11 +70,11 @@ spec: ...@@ -70,11 +70,11 @@ spec:
selector: selector:
app: deviceservice app: deviceservice
ports: ports:
- name: grpc - name: grpc
protocol: TCP protocol: TCP
port: 2020 port: 2020
targetPort: 2020 targetPort: 2020
- name: metrics - name: metrics
protocol: TCP protocol: TCP
port: 9192 port: 9192
targetPort: 9192 targetPort: 9192
...@@ -27,57 +27,57 @@ spec: ...@@ -27,57 +27,57 @@ spec:
spec: spec:
terminationGracePeriodSeconds: 5 terminationGracePeriodSeconds: 5
containers: containers:
- name: connector - name: connector
image: labs.etsi.org:5050/tfs/controller/dlt-connector:latest image: labs.etsi.org:5050/tfs/controller/dlt-connector:latest
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 8080 - containerPort: 8080
- containerPort: 9192 - containerPort: 9192
env: env:
- name: LOG_LEVEL - name: LOG_LEVEL
value: "INFO" value: "INFO"
## for debug purposes ## for debug purposes
#- name: DLT_GATEWAY_HOST #- name: DLT_GATEWAY_HOST
# value: "mock-blockchain.tfs-bchain.svc.cluster.local" # value: "mock-blockchain.tfs-bchain.svc.cluster.local"
#- name: DLT_GATEWAY_PORT #- name: DLT_GATEWAY_PORT
# value: "50051" # value: "50051"
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:8080"] command: ["/bin/grpc_health_probe", "-addr=:8080"]
livenessProbe: livenessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:8080"] command: ["/bin/grpc_health_probe", "-addr=:8080"]
resources: resources:
requests: requests:
cpu: 50m cpu: 50m
memory: 64Mi memory: 64Mi
limits: limits:
cpu: 500m cpu: 500m
memory: 512Mi memory: 512Mi
- name: gateway - name: gateway
image: labs.etsi.org:5050/tfs/controller/dlt-gateway:latest image: labs.etsi.org:5050/tfs/controller/dlt-gateway:latest
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 50051 - containerPort: 50051
#readinessProbe: #readinessProbe:
# httpGet: # httpGet:
# path: /health # path: /health
# port: 8081 # port: 8081
# initialDelaySeconds: 5 # initialDelaySeconds: 5
# timeoutSeconds: 5 # timeoutSeconds: 5
#livenessProbe: #livenessProbe:
# httpGet: # httpGet:
# path: /health # path: /health
# port: 8081 # port: 8081
# initialDelaySeconds: 5 # initialDelaySeconds: 5
# timeoutSeconds: 5 # timeoutSeconds: 5
resources: resources:
requests: requests:
cpu: 200m cpu: 200m
memory: 512Mi memory: 512Mi
limits: limits:
cpu: 700m cpu: 700m
memory: 1024Mi memory: 1024Mi
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
...@@ -90,11 +90,11 @@ spec: ...@@ -90,11 +90,11 @@ spec:
selector: selector:
app: dltservice app: dltservice
ports: ports:
- name: grpc - name: grpc
protocol: TCP protocol: TCP
port: 8080 port: 8080
targetPort: 8080 targetPort: 8080
- name: metrics - name: metrics
protocol: TCP protocol: TCP
port: 9192 port: 9192
targetPort: 9192 targetPort: 9192
...@@ -27,28 +27,28 @@ spec: ...@@ -27,28 +27,28 @@ spec:
spec: spec:
terminationGracePeriodSeconds: 5 terminationGracePeriodSeconds: 5
containers: containers:
- name: server - name: server
image: labs.etsi.org:5050/tfs/controller/e2e_orchestrator:latest image: labs.etsi.org:5050/tfs/controller/e2e_orchestrator:latest
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 10050 - containerPort: 10050
- containerPort: 9192 - containerPort: 9192
env: env:
- name: LOG_LEVEL - name: LOG_LEVEL
value: "INFO" value: "INFO"
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:10050"] command: ["/bin/grpc_health_probe", "-addr=:10050"]
livenessProbe: livenessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:10050"] command: ["/bin/grpc_health_probe", "-addr=:10050"]
resources: resources:
requests: requests:
cpu: 250m cpu: 250m
memory: 128Mi memory: 128Mi
limits: limits:
cpu: 1000m cpu: 1000m
memory: 1024Mi memory: 1024Mi
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
...@@ -61,12 +61,12 @@ spec: ...@@ -61,12 +61,12 @@ spec:
selector: selector:
app: e2e-orchestratorservice app: e2e-orchestratorservice
ports: ports:
- name: grpc - name: grpc
port: 10050 port: 10050
targetPort: 10050 targetPort: 10050
- name: metrics - name: metrics
port: 9192 port: 9192
targetPort: 9192 targetPort: 9192
--- ---
apiVersion: autoscaling/v2 apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler kind: HorizontalPodAutoscaler
...@@ -80,12 +80,12 @@ spec: ...@@ -80,12 +80,12 @@ spec:
minReplicas: 1 minReplicas: 1
maxReplicas: 20 maxReplicas: 20
metrics: metrics:
- type: Resource - type: Resource
resource: resource:
name: cpu name: cpu
target: target:
type: Utilization type: Utilization
averageUtilization: 80 averageUtilization: 80
#behavior: #behavior:
# scaleDown: # scaleDown:
# stabilizationWindowSeconds: 30 # stabilizationWindowSeconds: 30
...@@ -28,35 +28,35 @@ spec: ...@@ -28,35 +28,35 @@ spec:
spec: spec:
terminationGracePeriodSeconds: 5 terminationGracePeriodSeconds: 5
containers: containers:
- name: server - name: server
image: labs.etsi.org:5050/tfs/controller/forecaster:latest image: labs.etsi.org:5050/tfs/controller/forecaster:latest
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 10040 - containerPort: 10040
- containerPort: 9192 - containerPort: 9192
env: env:
- name: LOG_LEVEL - name: LOG_LEVEL
value: "INFO" value: "INFO"
- name: FORECAST_TO_HISTORY_RATIO - name: FORECAST_TO_HISTORY_RATIO
value: "10" value: "10"
startupProbe: startupProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:10040"] command: ["/bin/grpc_health_probe", "-addr=:10040"]
failureThreshold: 30 failureThreshold: 30
periodSeconds: 1 periodSeconds: 1
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:10040"] command: ["/bin/grpc_health_probe", "-addr=:10040"]
livenessProbe: livenessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:10040"] command: ["/bin/grpc_health_probe", "-addr=:10040"]
resources: resources:
requests: requests:
cpu: 250m cpu: 250m
memory: 128Mi memory: 128Mi
limits: limits:
cpu: 1000m cpu: 1000m
memory: 1024Mi memory: 1024Mi
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
...@@ -69,14 +69,14 @@ spec: ...@@ -69,14 +69,14 @@ spec:
selector: selector:
app: forecasterservice app: forecasterservice
ports: ports:
- name: grpc - name: grpc
protocol: TCP protocol: TCP
port: 10040 port: 10040
targetPort: 10040 targetPort: 10040
- name: metrics - name: metrics
protocol: TCP protocol: TCP
port: 9192 port: 9192
targetPort: 9192 targetPort: 9192
--- ---
apiVersion: autoscaling/v2 apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler kind: HorizontalPodAutoscaler
...@@ -90,12 +90,12 @@ spec: ...@@ -90,12 +90,12 @@ spec:
minReplicas: 1 minReplicas: 1
maxReplicas: 20 maxReplicas: 20
metrics: metrics:
- type: Resource - type: Resource
resource: resource:
name: cpu name: cpu
target: target:
type: Utilization type: Utilization
averageUtilization: 80 averageUtilization: 80
#behavior: #behavior:
# scaleDown: # scaleDown:
# stabilizationWindowSeconds: 30 # stabilizationWindowSeconds: 30
...@@ -27,30 +27,30 @@ spec: ...@@ -27,30 +27,30 @@ spec:
spec: spec:
terminationGracePeriodSeconds: 5 terminationGracePeriodSeconds: 5
containers: containers:
- name: server - name: server
image: labs.etsi.org:5050/tfs/controller/interdomain:latest image: labs.etsi.org:5050/tfs/controller/interdomain:latest
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 10010 - containerPort: 10010
- containerPort: 9192 - containerPort: 9192
env: env:
- name: LOG_LEVEL - name: LOG_LEVEL
value: "INFO" value: "INFO"
- name: TOPOLOGY_ABSTRACTOR - name: TOPOLOGY_ABSTRACTOR
value: "DISABLE" value: "DISABLE"
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:10010"] command: ["/bin/grpc_health_probe", "-addr=:10010"]
livenessProbe: livenessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:10010"] command: ["/bin/grpc_health_probe", "-addr=:10010"]
resources: resources:
requests: requests:
cpu: 250m cpu: 250m
memory: 64Mi memory: 64Mi
limits: limits:
cpu: 1000m cpu: 1000m
memory: 1024Mi memory: 1024Mi
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
...@@ -63,11 +63,11 @@ spec: ...@@ -63,11 +63,11 @@ spec:
selector: selector:
app: interdomainservice app: interdomainservice
ports: ports:
- name: grpc - name: grpc
protocol: TCP protocol: TCP
port: 10010 port: 10010
targetPort: 10010 targetPort: 10010
- name: metrics - name: metrics
protocol: TCP protocol: TCP
port: 9192 port: 9192
targetPort: 9192 targetPort: 9192
...@@ -27,28 +27,28 @@ spec: ...@@ -27,28 +27,28 @@ spec:
spec: spec:
terminationGracePeriodSeconds: 5 terminationGracePeriodSeconds: 5
containers: containers:
- name: server - name: server
image: labs.etsi.org:5050/tfs/controller/l3_attackmitigator:latest image: labs.etsi.org:5050/tfs/controller/l3_attackmitigator:latest
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 10002 - containerPort: 10002
- containerPort: 9192 - containerPort: 9192
env: env:
- name: LOG_LEVEL - name: LOG_LEVEL
value: "DEBUG" value: "INFO"
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:10002"] command: ["/bin/grpc_health_probe", "-addr=:10002"]
livenessProbe: livenessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:10002"] command: ["/bin/grpc_health_probe", "-addr=:10002"]
resources: resources:
requests: requests:
cpu: 250m cpu: 250m
memory: 512Mi memory: 512Mi
limits: limits:
cpu: 700m cpu: 700m
memory: 1024Mi memory: 1024Mi
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
...@@ -61,13 +61,13 @@ spec: ...@@ -61,13 +61,13 @@ spec:
selector: selector:
app: l3-attackmitigatorservice app: l3-attackmitigatorservice
ports: ports:
- name: metrics - name: metrics
protocol: TCP protocol: TCP
port: 9192 port: 9192
targetPort: 9192 targetPort: 9192
- name: grpc - name: grpc
port: 10002 port: 10002
targetPort: 10002 targetPort: 10002
--- ---
apiVersion: autoscaling/v2 apiVersion: autoscaling/v2
...@@ -82,12 +82,12 @@ spec: ...@@ -82,12 +82,12 @@ spec:
minReplicas: 1 minReplicas: 1
maxReplicas: 10 maxReplicas: 10
metrics: metrics:
- type: Resource - type: Resource
resource: resource:
name: cpu name: cpu
target: target:
type: Utilization type: Utilization
averageUtilization: 80 averageUtilization: 80
behavior: behavior:
scaleDown: scaleDown:
stabilizationWindowSeconds: 120 stabilizationWindowSeconds: 120
...@@ -100,9 +100,9 @@ metadata: ...@@ -100,9 +100,9 @@ metadata:
labels: labels:
app: l3-attackmitigatorservice app: l3-attackmitigatorservice
#release: prometheus #release: prometheus
#release: prom # name of the release #release: prom # name of the release
# ( VERY IMPORTANT: You need to know the correct release name by viewing # ( VERY IMPORTANT: You need to know the correct release name by viewing
# the servicemonitor of Prometheus itself: Without the correct name, # the servicemonitor of Prometheus itself: Without the correct name,
# Prometheus cannot identify the metrics of the Flask app as the target.) # Prometheus cannot identify the metrics of the Flask app as the target.)
spec: spec:
selector: selector:
...@@ -112,11 +112,11 @@ spec: ...@@ -112,11 +112,11 @@ spec:
app: l3-attackmitigatorservice # same as above app: l3-attackmitigatorservice # same as above
#release: prometheus # same as above #release: prometheus # same as above
endpoints: endpoints:
- port: metrics # named port in target app - port: metrics # named port in target app
scheme: http scheme: http
path: /metrics # path to scrape path: /metrics # path to scrape
interval: 5s # scrape interval interval: 5s # scrape interval
namespaceSelector: namespaceSelector:
any: false any: false
matchNames: matchNames:
- tfs # namespace where the app is running - tfs # namespace where the app is running
...@@ -27,36 +27,36 @@ spec: ...@@ -27,36 +27,36 @@ spec:
spec: spec:
terminationGracePeriodSeconds: 5 terminationGracePeriodSeconds: 5
containers: containers:
- name: server - name: server
image: labs.etsi.org:5050/tfs/controller/l3_centralizedattackdetector:latest image: labs.etsi.org:5050/tfs/controller/l3_centralizedattackdetector:latest
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 10001 - containerPort: 10001
- containerPort: 9192 - containerPort: 9192
env: env:
- name: LOG_LEVEL - name: LOG_LEVEL
value: "DEBUG" value: "INFO"
- name: BATCH_SIZE - name: BATCH_SIZE
value: "256" value: "256"
- name: CAD_CLASSIFICATION_THRESHOLD - name: CAD_CLASSIFICATION_THRESHOLD
value: "0.5" value: "0.5"
- name: MONITORED_KPIS_TIME_INTERVAL_AGG - name: MONITORED_KPIS_TIME_INTERVAL_AGG
value: "60" value: "60"
- name: TEST_ML_MODEL - name: TEST_ML_MODEL
value: "0" value: "0"
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:10001"] command: ["/bin/grpc_health_probe", "-addr=:10001"]
livenessProbe: livenessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:10001"] command: ["/bin/grpc_health_probe", "-addr=:10001"]
resources: resources:
requests: requests:
cpu: 250m cpu: 250m
memory: 512Mi memory: 512Mi
limits: limits:
cpu: 700m cpu: 700m
memory: 1024Mi memory: 1024Mi
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
...@@ -69,13 +69,13 @@ spec: ...@@ -69,13 +69,13 @@ spec:
selector: selector:
app: l3-centralizedattackdetectorservice app: l3-centralizedattackdetectorservice
ports: ports:
- name: metrics - name: metrics
protocol: TCP protocol: TCP
port: 9192 port: 9192
targetPort: 9192 targetPort: 9192
- name: grpc - name: grpc
port: 10001 port: 10001
targetPort: 10001 targetPort: 10001
--- ---
apiVersion: autoscaling/v2 apiVersion: autoscaling/v2
...@@ -90,12 +90,12 @@ spec: ...@@ -90,12 +90,12 @@ spec:
minReplicas: 1 minReplicas: 1
maxReplicas: 10 maxReplicas: 10
metrics: metrics:
- type: Resource - type: Resource
resource: resource:
name: cpu name: cpu
target: target:
type: Utilization type: Utilization
averageUtilization: 80 averageUtilization: 80
behavior: behavior:
scaleDown: scaleDown:
stabilizationWindowSeconds: 120 stabilizationWindowSeconds: 120
...@@ -107,9 +107,9 @@ metadata: ...@@ -107,9 +107,9 @@ metadata:
labels: labels:
app: l3-centralizedattackdetectorservice app: l3-centralizedattackdetectorservice
#release: prometheus #release: prometheus
#release: prom # name of the release #release: prom # name of the release
# ( VERY IMPORTANT: You need to know the correct release name by viewing # ( VERY IMPORTANT: You need to know the correct release name by viewing
# the servicemonitor of Prometheus itself: Without the correct name, # the servicemonitor of Prometheus itself: Without the correct name,
# Prometheus cannot identify the metrics of the Flask app as the target.) # Prometheus cannot identify the metrics of the Flask app as the target.)
spec: spec:
selector: selector:
...@@ -119,11 +119,11 @@ spec: ...@@ -119,11 +119,11 @@ spec:
app: l3-centralizedattackdetectorservice # same as above app: l3-centralizedattackdetectorservice # same as above
#release: prometheus # same as above #release: prometheus # same as above
endpoints: endpoints:
- port: metrics # named port in target app - port: metrics # named port in target app
scheme: http scheme: http
path: /metrics # path to scrape path: /metrics # path to scrape
interval: 5s # scrape interval interval: 5s # scrape interval
namespaceSelector: namespaceSelector:
any: false any: false
matchNames: matchNames:
- tfs # namespace where the app is running - tfs # namespace where the app is running
...@@ -27,27 +27,27 @@ spec: ...@@ -27,27 +27,27 @@ spec:
spec: spec:
terminationGracePeriodSeconds: 5 terminationGracePeriodSeconds: 5
containers: containers:
- name: server - name: server
image: labs.etsi.org:5050/tfs/controller/l3_distributedattackdetector:latest image: labs.etsi.org:5050/tfs/controller/l3_distributedattackdetector:latest
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 10000 - containerPort: 10000
env: env:
- name: LOG_LEVEL - name: LOG_LEVEL
value: "DEBUG" value: "INFO"
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:10000"] command: ["/bin/grpc_health_probe", "-addr=:10000"]
livenessProbe: livenessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:10000"] command: ["/bin/grpc_health_probe", "-addr=:10000"]
resources: resources:
requests: requests:
cpu: 250m cpu: 250m
memory: 512Mi memory: 512Mi
limits: limits:
cpu: 700m cpu: 700m
memory: 1024Mi memory: 1024Mi
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
...@@ -58,6 +58,6 @@ spec: ...@@ -58,6 +58,6 @@ spec:
selector: selector:
app: l3-distributedattackdetectorservice app: l3-distributedattackdetectorservice
ports: ports:
- name: grpc - name: grpc
port: 10000 port: 10000
targetPort: 10000 targetPort: 10000
...@@ -28,28 +28,28 @@ spec: ...@@ -28,28 +28,28 @@ spec:
spec: spec:
terminationGracePeriodSeconds: 5 terminationGracePeriodSeconds: 5
containers: containers:
- name: server - name: server
image: labs.etsi.org:5050/tfs/controller/load_generator:latest image: labs.etsi.org:5050/tfs/controller/load_generator:latest
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 50052 - containerPort: 50052
- containerPort: 9192 - containerPort: 9192
env: env:
- name: LOG_LEVEL - name: LOG_LEVEL
value: "INFO" value: "INFO"
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:50052"] command: ["/bin/grpc_health_probe", "-addr=:50052"]
livenessProbe: livenessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:50052"] command: ["/bin/grpc_health_probe", "-addr=:50052"]
resources: resources:
requests: requests:
cpu: 256m cpu: 256m
memory: 64Mi memory: 64Mi
limits: limits:
cpu: 512m cpu: 512m
memory: 128Mi memory: 128Mi
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
...@@ -62,11 +62,11 @@ spec: ...@@ -62,11 +62,11 @@ spec:
selector: selector:
app: load-generatorservice app: load-generatorservice
ports: ports:
- name: grpc - name: grpc
protocol: TCP protocol: TCP
port: 50052 port: 50052
targetPort: 50052 targetPort: 50052
- name: metrics - name: metrics
protocol: TCP protocol: TCP
port: 9192 port: 9192
targetPort: 9192 targetPort: 9192
...@@ -27,27 +27,27 @@ spec: ...@@ -27,27 +27,27 @@ spec:
spec: spec:
terminationGracePeriodSeconds: 5 terminationGracePeriodSeconds: 5
containers: containers:
- name: server - name: server
image: labs.etsi.org:5050/tfs/controller/mock_blockchain:latest image: labs.etsi.org:5050/tfs/controller/mock_blockchain:latest
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 50051 - containerPort: 50051
env: env:
- name: LOG_LEVEL - name: LOG_LEVEL
value: "INFO" value: "INFO"
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:50051"] command: ["/bin/grpc_health_probe", "-addr=:50051"]
livenessProbe: livenessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:50051"] command: ["/bin/grpc_health_probe", "-addr=:50051"]
resources: resources:
requests: requests:
cpu: 100m cpu: 100m
memory: 512Mi memory: 512Mi
limits: limits:
cpu: 700m cpu: 700m
memory: 1024Mi memory: 1024Mi
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
...@@ -58,7 +58,7 @@ spec: ...@@ -58,7 +58,7 @@ spec:
selector: selector:
app: mock-blockchain app: mock-blockchain
ports: ports:
- name: grpc - name: grpc
protocol: TCP protocol: TCP
port: 50051 port: 50051
targetPort: 50051 targetPort: 50051
...@@ -28,31 +28,31 @@ spec: ...@@ -28,31 +28,31 @@ spec:
spec: spec:
terminationGracePeriodSeconds: 5 terminationGracePeriodSeconds: 5
containers: containers:
- name: server - name: server
image: labs.etsi.org:5050/tfs/controller/monitoring:latest image: labs.etsi.org:5050/tfs/controller/monitoring:latest
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 7070 - containerPort: 7070
- containerPort: 9192 - containerPort: 9192
env: env:
- name: LOG_LEVEL - name: LOG_LEVEL
value: "INFO" value: "INFO"
envFrom: envFrom:
- secretRef: - secretRef:
name: qdb-data name: qdb-data
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:7070"] command: ["/bin/grpc_health_probe", "-addr=:7070"]
livenessProbe: livenessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:7070"] command: ["/bin/grpc_health_probe", "-addr=:7070"]
resources: resources:
requests: requests:
cpu: 250m cpu: 250m
memory: 256Mi memory: 256Mi
limits: limits:
cpu: 1000m cpu: 1000m
memory: 1024Mi memory: 1024Mi
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
...@@ -65,11 +65,11 @@ spec: ...@@ -65,11 +65,11 @@ spec:
selector: selector:
app: monitoringservice app: monitoringservice
ports: ports:
- name: grpc - name: grpc
protocol: TCP protocol: TCP
port: 7070 port: 7070
targetPort: 7070 targetPort: 7070
- name: metrics - name: metrics
protocol: TCP protocol: TCP
port: 9192 port: 9192
targetPort: 9192 targetPort: 9192