thingsboard/k8s/common/thingsboard.yml

444 lines
10 KiB
YAML
Raw Normal View History

#
2021-01-11 13:42:16 +02:00
# Copyright © 2016-2021 The Thingsboard Authors
#
# 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.
#
2020-05-11 11:23:55 +03:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: tb-js-executor
namespace: thingsboard
spec:
replicas: 20
selector:
matchLabels:
app: tb-js-executor
template:
metadata:
labels:
app: tb-js-executor
spec:
containers:
- name: server
imagePullPolicy: Always
image: thingsboard/tb-js-executor:latest
env:
- name: REMOTE_JS_EVAL_REQUEST_TOPIC
value: "js_eval.requests"
- name: TB_KAFKA_SERVERS
value: "tb-kafka:9092"
- name: LOGGER_LEVEL
value: "info"
- name: LOG_FOLDER
value: "logs"
- name: LOGGER_FILENAME
value: "tb-js-executor-%DATE%.log"
- name: DOCKER_MODE
value: "true"
- name: SCRIPT_BODY_TRACE_FREQUENCY
value: "1000"
restartPolicy: Always
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tb-mqtt-transport
namespace: thingsboard
spec:
replicas: 2
selector:
matchLabels:
app: tb-mqtt-transport
template:
metadata:
labels:
app: tb-mqtt-transport
spec:
volumes:
- name: tb-mqtt-transport-config
configMap:
name: tb-mqtt-transport-config
items:
- key: conf
path: tb-mqtt-transport.conf
- key: logback
path: logback.xml
containers:
- name: server
imagePullPolicy: Always
image: thingsboard/tb-mqtt-transport:latest
ports:
- containerPort: 1883
name: mqtt
env:
2020-04-24 13:55:06 +03:00
- name: TB_SERVICE_ID
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: TB_QUEUE_TYPE
value: "kafka"
- name: MQTT_BIND_ADDRESS
value: "0.0.0.0"
- name: MQTT_BIND_PORT
value: "1883"
- name: MQTT_TIMEOUT
value: "10000"
- name: TB_KAFKA_SERVERS
value: "tb-kafka:9092"
volumeMounts:
- mountPath: /config
name: tb-mqtt-transport-config
readinessProbe:
periodSeconds: 20
tcpSocket:
port: 1883
livenessProbe:
initialDelaySeconds: 120
periodSeconds: 20
tcpSocket:
port: 1883
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
name: tb-mqtt-transport
namespace: thingsboard
spec:
type: LoadBalancer
selector:
app: tb-mqtt-transport
ports:
- port: 1883
targetPort: 1883
name: mqtt
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tb-http-transport
namespace: thingsboard
spec:
replicas: 2
selector:
matchLabels:
app: tb-http-transport
template:
metadata:
labels:
app: tb-http-transport
spec:
volumes:
- name: tb-http-transport-config
configMap:
name: tb-http-transport-config
items:
- key: conf
path: tb-http-transport.conf
- key: logback
path: logback.xml
containers:
- name: server
imagePullPolicy: Always
image: thingsboard/tb-http-transport:latest
ports:
- containerPort: 8080
name: http
env:
2020-04-24 13:55:06 +03:00
- name: TB_SERVICE_ID
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: TB_QUEUE_TYPE
value: "kafka"
- name: HTTP_BIND_ADDRESS
value: "0.0.0.0"
- name: HTTP_BIND_PORT
value: "8080"
- name: HTTP_REQUEST_TIMEOUT
value: "60000"
- name: TB_KAFKA_SERVERS
value: "tb-kafka:9092"
volumeMounts:
- mountPath: /config
name: tb-http-transport-config
readinessProbe:
periodSeconds: 20
tcpSocket:
port: 8080
livenessProbe:
initialDelaySeconds: 120
periodSeconds: 20
tcpSocket:
port: 8080
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
name: tb-http-transport
namespace: thingsboard
spec:
type: ClusterIP
selector:
app: tb-http-transport
ports:
- port: 8080
name: http
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tb-coap-transport
namespace: thingsboard
spec:
replicas: 2
selector:
matchLabels:
app: tb-coap-transport
template:
metadata:
labels:
app: tb-coap-transport
spec:
volumes:
- name: tb-coap-transport-config
configMap:
name: tb-coap-transport-config
items:
- key: conf
path: tb-coap-transport.conf
- key: logback
path: logback.xml
containers:
- name: server
imagePullPolicy: Always
image: thingsboard/tb-coap-transport:latest
ports:
- containerPort: 5683
name: coap
protocol: UDP
env:
2020-04-24 13:55:06 +03:00
- name: TB_SERVICE_ID
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: TB_QUEUE_TYPE
value: "kafka"
- name: COAP_BIND_ADDRESS
value: "0.0.0.0"
- name: COAP_BIND_PORT
value: "5683"
- name: COAP_TIMEOUT
value: "10000"
- name: TB_KAFKA_SERVERS
value: "tb-kafka:9092"
volumeMounts:
- mountPath: /config
name: tb-coap-transport-config
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
name: tb-coap-transport
namespace: thingsboard
spec:
type: LoadBalancer
selector:
app: tb-coap-transport
ports:
- port: 5683
name: coap
protocol: UDP
---
apiVersion: apps/v1
kind: Deployment
Develop/lwm2m (#3826) * LwM2M - Start transport * LwM2M - Test endpoint * LwM2M - Test endpoint * LwM2M - Test add xml * LwM2M device registration * LwM2M - add get from client, add attributes and telemetry upgrade from registration client * LwM2M - add get from client, add attributes and telemetry upgrade from registration client * LwM2M implementation * LwM2M - add to service telemetry and attribute * LwM2M add to service attribute and telemetry * LwM2M - add LWM2M_CREDENTIALS to DeviceCredentialsType * LwM2M - add LWM2M_CREDENTIALS to DeviceCredentialsType * LwM2M - add transport.process * LwM2M - delete from yml tenantid, PSK -ok * LwM2M - yml del tenantId * LwM2M - add RPK * LwM2M - add connect only x509 certificate. Crate certificates in serverKeyStore.jks and clientKeyStore.jks * LwM2M - add no_sec * LwM2M - add RPK & PSK integration test with app Client * LwM2M - add RPK & PSK integration test with app Client * LwM2M - add read JKS from file * LwM2M - add read JKS from file * LwM2M - add bootstrap cert * LwM2M - add bootstrap RPK * LwM2M - add bootstrap No_sec * LwM2M - cleaned the code * LwM2M - add to 3.0 in UI credentials lwm2m * LwM2M - add to 3.0 in UI credentials lwm2m * LwM2M - add to 3.0 in UI credentials lwm2m * LwM2M - fix bug CoAP transport * LwM2M: UI - add Json to credentials * LwM2M: Back - add command "/3/0/5" - trigger client * LwM2M: fix bug Json edit dialog * LwM2M: fix bug Json edit dialog * lwm2m: fix bug Json edit dialog: add validate * lwm2m: UI add tabs * lwm2m: UI add tabs (cleaner) * lwm2m: add interface SecurityConfigModels * lwm2m: add interface SecurityConfigModels2 * lwm2m: change html * lwm2m: UI add bootstrap component * lwm2m: UI add bootstrap component with FormControl * lwm2m: UI add start Observe * lwm2m: UI - correct * lwm2m: UI - correct * lwm2m: UI - add Validator: BS RPK, X509 * lwm2m: UI - add Observe * lwm2m: UI - finish Observe * lwm2m: UI - fix bug config-service update identity * lwm2m: Bootstarp&Sewrver All config secure * lwm2m: Bootstarp&Sewrver All config secure for new Front format * lwm2m: Bootstarp&Sewrver Different config secure for new Front format * lwm2m: Add attributes Gui and Backend * lwm2m: Add attributes Gui and Backend final * lwm2m: Add telemetrys to Gui * lwm2m: Add Attribute & telemetry in Gui to instance * lwm2m: Optimize Attr/Telemetry * lwm2m: Optimize Attr/Telemetry * lwm2m: Optimize Attr/Telemetry * lwm2m: Optimize Attr/Telemetry for mobile * lwm2m: Model folder * lwm2m: Ok on AWS: NoSec, PSK, X509 bad registration - RPK * lwm2m: KeyStore start only one * lwm2m: Server observe ok * lwm2m: Server fix bug finish session without remove * lwm2m: Server add function installValue * lwm2m: Server add function getAttrTelemetry to tingsboard * lwm2m: Server add function installValue * lwm2m: Server add function update Telemetry, Attr from observe * lwm2m: Server add comments * lwm2m: Server add session listener * lwm2m: Server add onGetChangeCredentials with analyze * lwm2m: Server add onGetChangeCredentials with analyze Onserve add * lwm2m: Server: updated algorithm for analyzing dynamic changes in attributes / telemetry / observation * lwm2m: fix bug: "ngx-flowchart" compile * lwm2m: get value resource OPAQUE - byte [] to HexString * lwm2m: change path to base * lwm2m: fix bug COAP & lwm2m * Lwm2m_3_2: back: cleaner, test bootstrap-ok front: restore * Lwm2m_3_2: back: del SynchronousRegistrationListener.java * Lwm2m_3_2: front: start profile lwm2m UI * Lwm2m_3_2: front&back: add to profile lwm2m (api, getModels...) * Lwm2m_3_2: back: fix bug from commented front: add update change observe/attribute/telemetry to config json * Lwm2m_3_2: back: fix bug from commented front: add update change observe/attribute/telemetry to config json (2) * Lwm2m_3_2: back: fix bug from commented front: add update change observe/attribute/telemetry to config json (3) * Lwm2m_3_2: back: fix bug from commented front: add update change observe/attribute/telemetry to config json (4) * Lwm2m_3_2: front: add update change bootstrapConfig and save to config json * Lwm2m_3_2: update after merge master * lwm2m: fix bug proto * lwm2m: fix bug in yml keyStore.jks * lwm2m: fix bug tests * lwm2m: front: add nameThingsboard * lwm2m: fix bug Autowired lwm2mContext, caseCamel * lwm2m: back-end^ start api /lwm2m/deviceProfile/bootstrap * lwm2m: back-end: add method read models from resources * lwm2m: back-end/front: add and finish api bootstrapConfig * lwm2m: back-end: add decode profile * lwm2m: back-end: add new bin in transport api * lwm2m: add microservice lwm2m and docker lwm2m. * lwm2m: add microservice lwm2m and docker lwm2m (fix bug) * lwm2m: front: start fix bug disabled resources * lwm2m: master to lwm2m merge, front add change attribute, telemetry * lwm2m: front PR * lwm2m: front add sort keyName to Json on the start * lwm2m: front add instances * lwm2m: front add/del instances FormGrp Value * lwm2m: Merge remote-tracking branch 'origin/master' into develop/lwm2m # Conflicts: # common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/MqttTransportHandler.java # common/transport/transport-api/src/main/java/org/thingsboard/server/common/transport/SessionMsgListener.java # ui-ngx/src/app/modules/home/components/home-components.module.ts * lwm2m: Merge remote-tracking branch 'origin/master' into develop/lwm2m * lwm2m: Front: del sort after add/del instance * lwm2m: Front: fix bug reindex FormArray after update * Lwm2m: Front fix bug add/del instans * Lwm2m: Front finish1 profile * Lwm2m: Back add profile to ModelClient * Lwm2m: Back add form profile sent thingsboard: attr/tel/observe * Lwm2m: Back -> fix bug: serverKeyStore.jks] Unable to load KeyStore files server * Lwm2m: Back -> fix bug: onRegistered an unReg * Lwm2m: Back -> add updateProfiles * Lwm2m: Back -> add updateDevice and updateProfile dynamic * Lwm2m: Back -> error if CoapCode not access * Lwm2m: Front -> clear credential * Lwm2m: Front -> credential fix bug button "save" * Lwm2m: Back -> add telemetry logLwm2m Co-authored-by: nickAS21 <nick@avalr.com.ua>
2020-12-09 17:13:11 +02:00
metadata:
name: tb-lwm2m-transport
namespace: thingsboard
spec:
replicas: 2
selector:
matchLabels:
app: tb-lwm2m-transport
template:
metadata:
labels:
app: tb-lwm2m-transport
spec:
volumes:
- name: tb-lwm2m-transport-config
configMap:
name: tb-lwm2m-transport-config
items:
- key: conf
path: tb-lwm2m-transport.conf
- key: logback
path: logback.xml
containers:
- name: server
imagePullPolicy: Always
image: thingsboard/tb-lwm2m-transport:latest
ports:
- containerPort: 5685
name: lwm2m
protocol: UDP
env:
- name: TB_SERVICE_ID
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: TB_QUEUE_TYPE
value: "kafka"
- name: LWM2M_BIND_ADDRESS
value: "0.0.0.0"
- name: LWM2M_BIND_PORT
value: "5685"
- name: LWM2M_TIMEOUT
value: "10000"
- name: TB_KAFKA_SERVERS
value: "tb-kafka:9092"
volumeMounts:
- mountPath: /config
name: tb-lwm2m-transport-config
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
name: tb-lwm2m-transport
namespace: thingsboard
spec:
type: LoadBalancer
selector:
app: tb-lwm2m-transport
ports:
- port: 5685
name: lwm2m
protocol: UDP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tb-web-ui
namespace: thingsboard
spec:
replicas: 2
selector:
matchLabels:
app: tb-web-ui
template:
metadata:
labels:
app: tb-web-ui
spec:
containers:
- name: server
imagePullPolicy: Always
image: thingsboard/tb-web-ui:latest
ports:
- containerPort: 8080
name: http
env:
- name: HTTP_BIND_ADDRESS
value: "0.0.0.0"
- name: HTTP_BIND_PORT
value: "8080"
- name: TB_ENABLE_PROXY
value: "false"
- name: LOGGER_LEVEL
value: "info"
- name: LOG_FOLDER
value: "logs"
- name: LOGGER_FILENAME
value: "tb-web-ui-%DATE%.log"
- name: DOCKER_MODE
value: "true"
livenessProbe:
httpGet:
path: /index.html
port: http
initialDelaySeconds: 120
timeoutSeconds: 10
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
name: tb-web-ui
namespace: thingsboard
spec:
type: ClusterIP
selector:
app: tb-web-ui
ports:
- port: 8080
name: http
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: tb-ingress
namespace: thingsboard
annotations:
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
spec:
rules:
- http:
paths:
- path: /api/v1/.*
backend:
serviceName: tb-http-transport
servicePort: 8080
2020-05-29 11:37:28 +03:00
- path: /api/.*
backend:
serviceName: tb-node
servicePort: 8080
- path: /swagger.*
backend:
serviceName: tb-node
servicePort: 8080
- path: /webjars.*
backend:
serviceName: tb-node
servicePort: 8080
- path: /v2/.*
backend:
serviceName: tb-node
servicePort: 8080
- path: /static/rulenode/.*
backend:
serviceName: tb-node
servicePort: 8080
2020-05-29 11:37:28 +03:00
- path: /oauth2/.*
backend:
2020-05-29 11:37:28 +03:00
serviceName: tb-node
servicePort: 8080
2020-05-29 11:37:28 +03:00
- path: /login/oauth2/.*
backend:
2020-05-29 11:37:28 +03:00
serviceName: tb-node
servicePort: 8080
- path: /
backend:
serviceName: tb-web-ui
servicePort: 8080
- path: /.*
backend:
2020-05-29 11:37:28 +03:00
serviceName: tb-web-ui
servicePort: 8080
2020-05-29 11:37:28 +03:00
---