#!/usr/bin/env python3 #!/usr/bin/env python3
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) # Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
......
#!/usr/bin/env python3 #!/usr/bin/env python3
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) # Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
......
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) # Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
......
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) # Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
......
#!/bin/bash #!/bin/bash
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) # Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
......
#!/usr/bin/python #!/usr/bin/python
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) # Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
......
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) # Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
......
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) # Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
......
<!-- <!--
Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
......
src/tests/hackfest3/
\ No newline at end of file
#!/bin/bash #!/bin/bash
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) # Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
...@@ -16,14 +16,35 @@ ...@@ -16,14 +16,35 @@
# If not already set, set the list of components you want to install dependencies for. # If not already set, set the list of components you want to install dependencies for.
# By default, dependencies for all components are installed. # By default, dependencies for all components are installed.
# Components still not supported by this script: # Components still not supported by this script:
# automation & policy : implemented in Java # ztp & policy : implemented in Java
# dlt : under design # dlt : under design
# pathcomp : under design # pathcomp : under design
ALL_COMPONENTS="context device service compute monitoring webui interdomain slice" ALL_COMPONENTS="context device service nbi monitoring webui interdomain slice"
ALL_COMPONENTS="${ALL_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector" ALL_COMPONENTS="${ALL_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector"
ALL_COMPONENTS="${ALL_COMPONENTS} l3_attackmitigator l3_centralizedattackdetector l3_distributedattackdetector" ALL_COMPONENTS="${ALL_COMPONENTS} l3_attackmitigator l3_centralizedattackdetector l3_distributedattackdetector"
TFS_COMPONENTS=${TFS_COMPONENTS:-$ALL_COMPONENTS} TFS_COMPONENTS=${TFS_COMPONENTS:-$ALL_COMPONENTS}
# Some components require libyang built from source code
# - Ref: https://github.com/CESNET/libyang
# - Ref: https://github.com/CESNET/libyang-python/
echo "Installing libyang..."
sudo apt-get --yes --quiet --quiet update
sudo apt-get --yes --quiet --quiet install build-essential cmake libpcre2-dev python3-dev python3-cffi
mkdir libyang
git clone https://github.com/CESNET/libyang.git libyang
cd libyang
git fetch
git checkout v2.1.148
cd ..
mkdir libyang/build
cd libyang/build
echo "*" > .gitignore
cmake -D CMAKE_BUILD_TYPE:String="Release" ..
make
sudo make install
sudo ldconfig
cd ../..
echo "Updating PIP, SetupTools and Wheel..." echo "Updating PIP, SetupTools and Wheel..."
pip install --upgrade pip # ensure next packages get the latest versions pip install --upgrade pip # ensure next packages get the latest versions
pip install --upgrade setuptools wheel # bring basic tooling for other requirements pip install --upgrade setuptools wheel # bring basic tooling for other requirements
...@@ -38,7 +59,7 @@ printf "\n" ...@@ -38,7 +59,7 @@ printf "\n"
echo "Collecting requirements from components..." echo "Collecting requirements from components..."
for COMPONENT in $TFS_COMPONENTS for COMPONENT in $TFS_COMPONENTS
do do
if [ "$COMPONENT" == "automation" ] || [ "$COMPONENT" == "policy" ]; then continue; fi if [ "$COMPONENT" == "ztp" ] || [ "$COMPONENT" == "policy" ]; then continue; fi
diff requirements.in src/$COMPONENT/requirements.in | grep '^>' | sed 's/^>\ //' >> requirements.in diff requirements.in src/$COMPONENT/requirements.in | grep '^>' | sed 's/^>\ //' >> requirements.in
done done
printf "\n" printf "\n"
......
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) # Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
......
# 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: v1
kind: Service
metadata:
annotations:
app.quarkus.io/build-timestamp: 2022-09-19 - 10:48:18 +0000
labels:
app.kubernetes.io/name: automationservice
app: automationservice
name: automationservice
spec:
ports:
- name: grpc
port: 5050
targetPort: 5050
- name: metrics
protocol: TCP
port: 9192
targetPort: 8080
selector:
app.kubernetes.io/name: automationservice
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
app.quarkus.io/build-timestamp: 2022-09-19 - 10:48:18 +0000
labels:
app: automationservice
app.kubernetes.io/name: automationservice
name: automationservice
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: automationservice
template:
metadata:
annotations:
app.quarkus.io/build-timestamp: 2022-09-19 - 10:48:18 +0000
labels:
app: automationservice
app.kubernetes.io/name: automationservice
spec:
containers:
- env:
- name: KUBERNETES_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: CONTEXT_SERVICE_HOST
value: contextservice
- name: DEVICE_SERVICE_HOST
value: deviceservice
image: labs.etsi.org:5050/tfs/controller/automation:0.2.0
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
httpGet:
path: /q/health/live
port: 8080
scheme: HTTP
initialDelaySeconds: 2
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10
name: automationservice
ports:
- containerPort: 5050
name: grpc
protocol: TCP
- containerPort: 8080
name: metrics
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /q/health/ready
port: 8080
scheme: HTTP
initialDelaySeconds: 2
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10
resources:
requests:
cpu: 50m
memory: 512Mi
limits:
cpu: 2000m
memory: 2048Mi
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: automationservice-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: automationservice
minReplicas: 1
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 80
# 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.
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
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) # Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
...@@ -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
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) # Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
......
# 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: computeservice
spec:
selector:
matchLabels:
app: computeservice
replicas: 1
template:
metadata:
labels:
app: computeservice
spec:
terminationGracePeriodSeconds: 5
containers:
- name: server
image: labs.etsi.org:5050/tfs/controller/compute:latest
imagePullPolicy: Always
ports:
- containerPort: 8080
- containerPort: 9090
- containerPort: 9192
env:
- name: LOG_LEVEL
value: "INFO"
readinessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:9090"]
livenessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:9090"]
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 500m
memory: 512Mi
---
apiVersion: v1
kind: Service
metadata:
name: computeservice
labels:
app: computeservice
spec:
type: ClusterIP
selector:
app: computeservice
ports:
- name: http
protocol: TCP
port: 8080
targetPort: 8080
- name: grpc
protocol: TCP
port: 9090
targetPort: 9090
- name: metrics
protocol: TCP
port: 9192
targetPort: 9192
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) # Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
...@@ -30,35 +30,39 @@ spec: ...@@ -30,35 +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"
envFrom: - name: ALLOW_EXPLICIT_ADD_DEVICE_TO_TOPOLOGY
- secretRef: value: "FALSE"
name: crdb-data - name: ALLOW_EXPLICIT_ADD_LINK_TO_TOPOLOGY
- secretRef: value: "FALSE"
name: nats-data envFrom:
readinessProbe: - secretRef:
exec: name: crdb-data
command: ["/bin/grpc_health_probe", "-addr=:1010"] - secretRef:
livenessProbe: name: nats-data
exec: readinessProbe:
command: ["/bin/grpc_health_probe", "-addr=:1010"] exec:
resources: command: ["/bin/grpc_health_probe", "-addr=:1010"]
requests: livenessProbe:
cpu: 250m exec:
memory: 128Mi command: ["/bin/grpc_health_probe", "-addr=:1010"]
limits: resources:
cpu: 1000m requests:
memory: 1024Mi cpu: 250m
memory: 128Mi
limits:
cpu: 1000m
memory: 1024Mi
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
...@@ -71,14 +75,14 @@ spec: ...@@ -71,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
...@@ -92,12 +96,12 @@ spec: ...@@ -92,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
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) # Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
...@@ -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
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) # Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
...@@ -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: 10 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