blob: f3d605c60c473ffdae2070236e6a800de0e43c1a [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*/ -}}
9apiVersion: v1
10kind: ConfigMap
11metadata:
12 name: postgres-conf
13 labels:
14 name: postgres-conf
15data:
16 config: |
17 listen_addresses = '*'
18 huge_pages = off
19
20
21---
22apiVersion: v1
23kind: ConfigMap
24metadata:
25 name: tb-node-db-config
26 labels:
27 name: tb-node-db-config
28data:
29 DATABASE_TS_TYPE: sql
30 SPRING_JPA_DATABASE_PLATFORM: org.hibernate.dialect.PostgreSQLDialect
31 SPRING_DRIVER_CLASS_NAME: org.postgresql.Driver
32 SPRING_DATASOURCE_URL: jdbc:postgresql://tb-database:5432/thingsboard
33 SPRING_DATASOURCE_USERNAME: postgres
34 SPRING_DATASOURCE_PASSWORD: postgres
35
36---
37apiVersion: v1
38kind: ConfigMap
39metadata:
40 name: tb-node-config
41 labels:
42 name: tb-node-config
43data:
44 conf: |
45 export JAVA_OPTS="$JAVA_OPTS -Dplatform=deb -Dinstall.data_dir=/usr/share/thingsboard/data"
46 export JAVA_OPTS="$JAVA_OPTS -Xloggc:/var/log/thingsboard/${TB_SERVICE_ID}/gc.log -XX:+IgnoreUnrecognizedVMOptions -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/thingsboard/${TB_SERVICE_ID}/heapdump.bin -XX:+PrintGCDetails -XX:+PrintGCDateStamps"
47 export JAVA_OPTS="$JAVA_OPTS -XX:+PrintHeapAtGC -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10"
48 export JAVA_OPTS="$JAVA_OPTS -XX:GCLogFileSize=10M -XX:-UseBiasedLocking -XX:+UseTLAB -XX:+ResizeTLAB -XX:+PerfDisableSharedMem -XX:+UseCondCardMark"
49 export JAVA_OPTS="$JAVA_OPTS -XX:CMSWaitDuration=10000 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+CMSParallelInitialMarkEnabled"
50 export JAVA_OPTS="$JAVA_OPTS -XX:+CMSEdenChunksRecordAlways -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+ExitOnOutOfMemoryError"
51 export LOG_FILENAME=thingsboard.out
52 export LOADER_PATH=/usr/share/thingsboard/conf,/usr/share/thingsboard/extensions
53 logback: |
54 <!DOCTYPE configuration>
55 <configuration scan="true" scanPeriod="10 seconds">
56
57 <appender name="fileLogAppender"
58 class="ch.qos.logback.core.rolling.RollingFileAppender">
59 <file>/var/log/thingsboard/${TB_SERVICE_ID}/thingsboard.log</file>
60 <rollingPolicy
61 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
62 <fileNamePattern>/var/log/thingsboard/${TB_SERVICE_ID}/thingsboard.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
63 <maxFileSize>100MB</maxFileSize>
64 <maxHistory>30</maxHistory>
65 <totalSizeCap>3GB</totalSizeCap>
66 </rollingPolicy>
67 <encoder>
68 <pattern>%d{ISO8601} [%thread] %-5level %logger{36} - %msg%n</pattern>
69 </encoder>
70 </appender>
71
72 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
73 <encoder>
74 <pattern>%d{ISO8601} [%thread] %-5level %logger{36} - %msg%n</pattern>
75 </encoder>
76 </appender>
77
78 <logger name="org.thingsboard.server" level="INFO" />
79 <logger name="com.google.common.util.concurrent.AggregateFuture" level="OFF" />
80
81 <root level="INFO">
82 <appender-ref ref="fileLogAppender"/>
83 <appender-ref ref="STDOUT"/>
84 </root>
85
86 </configuration>