2017-05-18 21:09:54 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# Copyright © 2016-2017 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.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 16:31:48 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								---
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								apiVersion: v1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								kind: Service
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								metadata:
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-10 21:34:49 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  name: tb-service
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 16:31:48 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  labels:
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-10 21:34:49 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    app: tb-service
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 16:31:48 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								spec:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ports:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  - port: 8080
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-10 21:01:06 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    name: ui
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 16:31:48 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  - port: 1883
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-10 21:01:06 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    name: mqtt
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 16:31:48 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  - port: 5683
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-10 21:01:06 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    name: coap
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 16:31:48 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  selector:
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 23:38:42 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    app: tb
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 16:31:48 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  type: LoadBalancer
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								---
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 23:38:42 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								apiVersion: policy/v1beta1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								kind: PodDisruptionBudget
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								metadata:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  name: tb-budget
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								spec:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  selector:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    matchLabels:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      app: tb
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-19 11:46:15 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  minAvailable: 3
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 23:38:42 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								---
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 16:31:48 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								apiVersion: v1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								kind: ConfigMap
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								metadata:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  name: tb-config
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								data:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  zookeeper.enabled: "true"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  zookeeper.url: "zk-headless"
							 | 
						
					
						
							
								
									
										
										
										
											2017-07-27 20:37:00 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  cassandra.host: "cassandra-headless"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  cassandra.port: "9042"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  database.type: "cassandra"
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 16:31:48 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								---
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								apiVersion: apps/v1beta1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								kind: StatefulSet
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								metadata:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  name: tb
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								spec:
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-10 21:34:49 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  serviceName: "tb-service"
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-19 11:46:15 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  replicas: 3
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 16:31:48 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  template:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    metadata:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      labels:
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 23:38:42 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        app: tb
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 16:31:48 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    spec:
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-19 11:46:15 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      nodeSelector:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        machinetype: tb
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 16:31:48 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      affinity:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        podAntiAffinity:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          requiredDuringSchedulingIgnoredDuringExecution:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            - labelSelector:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                matchExpressions:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                  - key: "app"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    operator: In
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    values:
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-10 21:34:49 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    - tb-service
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 16:31:48 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								              topologyKey: "kubernetes.io/hostname"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      containers:
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 23:38:42 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      - name: tb
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        imagePullPolicy: Always
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-24 16:40:19 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        image: thingsboard/application:1.2.4
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 16:31:48 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        ports:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        - containerPort: 8080
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-10 21:01:06 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          name: ui
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 16:31:48 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        - containerPort: 1883
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-10 21:01:06 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          name: mqtt
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 16:31:48 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        - containerPort: 5683
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-10 21:01:06 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          name: coap
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 16:31:48 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        - containerPort: 9001
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-10 21:01:06 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          name: rpc
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 16:31:48 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        env:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        - name: ZOOKEEPER_ENABLED
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          valueFrom:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            configMapKeyRef:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								              name: tb-config
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								              key: zookeeper.enabled
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        - name: ZOOKEEPER_URL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          valueFrom:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            configMapKeyRef:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								              name: tb-config
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								              key: zookeeper.url
							 | 
						
					
						
							
								
									
										
										
										
											2017-07-27 20:37:00 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        - name : CASSANDRA_HOST
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 16:31:48 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          valueFrom:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            configMapKeyRef:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								              name: tb-config
							 | 
						
					
						
							
								
									
										
										
										
											2017-07-27 20:37:00 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								              key: cassandra.host
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        - name : CASSANDRA_PORT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          valueFrom:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            configMapKeyRef:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								              name: tb-config
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								              key: cassandra.port
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        - name: DATABASE_TYPE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          valueFrom:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            configMapKeyRef:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								              name: tb-config
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								              key: database.type
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-10 21:34:49 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        - name : RPC_HOST
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          valueFrom:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            fieldRef:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								              fieldPath: status.podIP
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 16:31:48 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        command:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        - sh
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        - -c
							 | 
						
					
						
							
								
									
										
										
										
											2017-06-27 16:51:15 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        - /run-application.sh
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-09 23:38:42 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        livenessProbe:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          httpGet:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            path: /login
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            port: ui-port
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-10 21:34:49 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          initialDelaySeconds: 120
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          timeoutSeconds: 10
							 |