blob: d79e0faf0855bff50c75885e1c296774772c45c2 [file] [log] [blame]
Woojoong Kimd3c132c2020-08-26 14:46:47 -07001{{- /*
2
3# Copyright 2020-present Open Networking Foundation
4#
5# SPDX-License-Identifier: Apache-2.0
6# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
7
8*/ -}}
9
10---
11apiVersion: apps/v1
12kind: Deployment
13metadata:
14 name: tb-js-executor
15spec:
16 replicas: 1
17 selector:
18 matchLabels:
19 app: tb-js-executor
20 template:
21 metadata:
22 labels:
23 app: tb-js-executor
24 spec:
25 serviceAccountName: thingsboard
26 initContainers:
27 - name: js-executor-dep-check
28 image: {{ .Values.images.tags.depCheck }}
29 imagePullPolicy: {{ .Values.images.pullPolicy }}
30 env:
31 - name: POD_NAME
32 valueFrom:
33 fieldRef:
34 apiVersion: v1
35 fieldPath: metadata.name
36 - name: NAMESPACE
37 valueFrom:
38 fieldRef:
39 apiVersion: v1
40 fieldPath: metadata.namespace
41 - name: PATH
42 value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
43 - name: COMMAND
44 value: "echo done"
45 - name: DEPENDENCY_POD_JSON
46 value: '[{"labels": {"app": "tb-kafka"}, "requireSameNode": false}]'
47 command:
48 - kubernetes-entrypoint
49 volumeMounts:
50 []
51 containers:
52 - name: server
53 imagePullPolicy: {{ .Values.images.pullPolicy }}
54 image: {{ .Values.images.tags.jsExecutor }}
55 env:
56 - name: REMOTE_JS_EVAL_REQUEST_TOPIC
57 value: "js_eval.requests"
58 - name: TB_KAFKA_SERVERS
59 value: "tb-kafka:{{ .Values.config.kafka.ports.outPort}}"
60 - name: LOGGER_LEVEL
61 value: "info"
62 - name: LOG_FOLDER
63 value: "logs"
64 - name: LOGGER_FILENAME
65 value: "tb-js-executor-%DATE%.log"
66 - name: DOCKER_MODE
67 value: "true"
68 - name: SCRIPT_BODY_TRACE_FREQUENCY
69 value: "1000"
70 restartPolicy: Always