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
Showing
with 176 additions and 63 deletions
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# Copyright 2022-2025 ETSI 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.
......@@ -31,8 +31,10 @@ container:
config:
cluster:
enabled: true
replicas: 3
#enabled: true
enabled: false
#replicas: 3
replicas: 1
jetstream:
enabled: true
fileStore:
......
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# Copyright 2022-2025 ETSI 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.
......@@ -23,9 +23,6 @@ spec:
replicas: 1
template:
metadata:
annotations:
config.linkerd.io/skip-inbound-ports: "8762"
config.linkerd.io/skip-outbound-ports: "8762"
labels:
app: nbiservice
spec:
......@@ -36,29 +33,41 @@ spec:
imagePullPolicy: Always
ports:
- containerPort: 8080
- containerPort: 9090
- containerPort: 9192
- containerPort: 8762
# Metrics disabled for now. No NBI endpoint uses it and
# causes "address already in use" when deploying multiple
# gunicorn workers.
#- containerPort: 9192
env:
- name: LOG_LEVEL
value: "INFO"
- name: FLASK_ENV
value: "production" # change to "development" if developing
- name: IETF_NETWORK_RENDERER
value: "LIBYANG"
- name: WS_E2E_PORT
value: "8762"
envFrom:
- secretRef:
name: kfk-kpi-data
readinessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:9090"]
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 50 # NBI's gunicorn takes 30~40 seconds to bootstrap
periodSeconds: 10
failureThreshold: 10
livenessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:9090"]
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 50 # NBI's gunicorn takes 30~40 seconds to bootstrap
periodSeconds: 10
failureThreshold: 10
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 500m
cpu: 150m
memory: 512Mi
limits:
cpu: 1000m
memory: 2048Mi
---
apiVersion: v1
kind: Service
......@@ -75,15 +84,10 @@ spec:
protocol: TCP
port: 8080
targetPort: 8080
- name: grpc
protocol: TCP
port: 9090
targetPort: 9090
- name: metrics
protocol: TCP
port: 9192
targetPort: 9192
- name: ws
protocol: TCP
port: 8762
targetPort: 8762
# Metrics disabled for now. No NBI endpoint uses it and
# causes "address already in use" when deploying multiple
# gunicorn workers.
#- name: metrics
# protocol: TCP
# port: 9192
# targetPort: 9192
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# Copyright 2022-2025 ETSI 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.
......@@ -17,12 +17,28 @@ kind: Ingress
metadata:
name: tfs-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/limit-rps: "50"
nginx.ingress.kubernetes.io/limit-connections: "50"
nginx.ingress.kubernetes.io/proxy-connect-timeout: "50"
nginx.ingress.kubernetes.io/proxy-send-timeout: "50"
nginx.ingress.kubernetes.io/proxy-read-timeout: "50"
nginx.ingress.kubernetes.io/rewrite-target: "/$2"
# Enable websocket services and configure sticky cookies (seems not to work)
#nginx.org/websocket-services: "nbiservice"
#nginx.org/sticky-cookie-services: "serviceName=nbiservice tfs-nbi-session expires=1h path=/socket.io"
# Enable sticky sessions (use same backend for all connections
# originated by a specific client, identified through its cookie)
nginx.ingress.kubernetes.io/affinity: "cookie"
nginx.ingress.kubernetes.io/affinity-mode: "persistent"
nginx.ingress.kubernetes.io/session-cookie-name: "tfs-nbi-session"
nginx.ingress.kubernetes.io/session-cookie-path: "/socket.io"
nginx.ingress.kubernetes.io/session-cookie-expires: "3600"
nginx.ingress.kubernetes.io/session-cookie-change-on-failure: "true"
nginx.ingress.kubernetes.io/limit-rps: "50" # max requests per second per source IP
nginx.ingress.kubernetes.io/limit-connections: "50" # max concurrent connections per source IP
nginx.ingress.kubernetes.io/proxy-connect-timeout: "60" # max timeout for connecting to server
# Enable long-lived connections, required for websocket/socket.io streams
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600" # max timeout between two successive read operations
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" # max timeout between two successive write operations
spec:
rules:
- http:
......@@ -48,6 +64,13 @@ spec:
name: nbiservice
port:
number: 8080
- path: /()(socket.io/.*)
pathType: Prefix
backend:
service:
name: nbiservice
port:
number: 8080
- path: /()(tfs-api/.*)
pathType: Prefix
backend:
......@@ -69,3 +92,17 @@ spec:
name: nbiservice
port:
number: 8080
- path: /()(camara/.*)
pathType: Prefix
backend:
service:
name: nbiservice
port:
number: 8080
- path: /()(agent-probes/.*)
pathType: Prefix
backend:
service:
name: nbiservice
port:
number: 8080
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# Copyright 2022-2025 ETSI 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.
......
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# Copyright 2022-2025 ETSI 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.
......
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# Copyright 2022-2025 ETSI 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.
......
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# Copyright 2022-2025 ETSI 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.
......
# Copyright 2022-2025 ETSI 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: osm_clientservice
spec:
selector:
matchLabels:
app: osm_clientservice
#replicas: 1
template:
metadata:
labels:
app: osm_clientservice
spec:
terminationGracePeriodSeconds: 5
containers:
- name: server
image: labs.etsi.org:5050/tfs/controller/osm_client:latest
imagePullPolicy: Always
ports:
- containerPort: 30210
- containerPort: 9192
env:
- name: OSM_ADDRESS
value: "127.0.0.1"
- name: LOG_LEVEL
value: "INFO"
readinessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:30210"]
livenessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:30210"]
resources:
requests:
cpu: 250m
memory: 128Mi
limits:
cpu: 1000m
memory: 1024Mi
---
apiVersion: v1
kind: Service
metadata:
name: osm_clientservice
labels:
app: osm_clientservice
spec:
type: ClusterIP
selector:
app: osm_clientservice
ports:
- name: grpc
protocol: TCP
port: 30210
targetPort: 30210
- name: metrics
protocol: TCP
port: 9192
targetPort: 9192
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# Copyright 2022-2025 ETSI 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.
......
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# Copyright 2022-2025 ETSI 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.
......
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# Copyright 2022-2025 ETSI 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.
......
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# Copyright 2022-2025 ETSI 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.
......@@ -38,7 +38,7 @@ spec:
- name: LOG_LEVEL
value: "INFO"
- name: CRDB_DATABASE
value: "qkd_app"
value: "tfs_qkd_app"
envFrom:
- secretRef:
name: crdb-data
......
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# Copyright 2022-2025 ETSI 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.
......
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# Copyright 2022-2025 ETSI 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.
......
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# Copyright 2022-2025 ETSI 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.
......
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# Copyright 2022-2025 ETSI 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.
......
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# Copyright 2022-2025 ETSI 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.
......
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# Copyright 2022-2025 ETSI 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.
......
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# Copyright 2022-2025 ETSI 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.
......
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# Copyright 2022-2025 ETSI 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.
......@@ -23,9 +23,6 @@ spec:
replicas: 1
template:
metadata:
annotations:
config.linkerd.io/skip-outbound-ports: "8765"
config.linkerd.io/skip-inbound-ports: "8765"
labels:
app: vnt-managerservice
spec:
......@@ -40,10 +37,9 @@ spec:
env:
- name: LOG_LEVEL
value: "INFO"
- name: WS_IP_PORT
value: "8761"
- name: WS_E2E_PORT
value: "8762"
envFrom:
- secretRef:
name: kfk-kpi-data
readinessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:10080"]
......