blob: 84733162740620c89c8eae5669bc6538dabe44bc [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-redis
15spec:
16 selector:
17 matchLabels:
18 app: tb-redis
19 template:
20 metadata:
21 labels:
22 app: tb-redis
23 spec:
24 serviceAccountName: thingsboard
25 initContainers:
26 - name: redis-dep-check
27 imagePullPolicy: {{ .Values.images.pullPolicy }}
28 image: {{ .Values.images.tags.depCheck }}
29 securityContext:
30 allowPrivilegeEscalation: false
31 readOnlyRootFilesystem: false
32 runAsUser: 0
33 env:
34 - name: POD_NAME
35 valueFrom:
36 fieldRef:
37 apiVersion: v1
38 fieldPath: metadata.name
39 - name: NAMESPACE
40 valueFrom:
41 fieldRef:
42 apiVersion: v1
43 fieldPath: metadata.namespace
44 - name: PATH
45 value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
46 - name: COMMAND
47 value: "echo done"
48 - name: DEPENDENCY_JOBS
49 value: job-tb-db-setup
50 command:
51 - kubernetes-entrypoint
52 volumeMounts:
53 []
54 containers:
55 - name: server
56 imagePullPolicy: {{ .Values.images.pullPolicy }}
57 image: {{ .Values.images.tags.redis }}
58 ports:
59 - containerPort: {{ .Values.config.redis.port }}
60 readinessProbe:
61 periodSeconds: 5
62 tcpSocket:
63 port: {{ .Values.config.redis.port }}
64 livenessProbe:
65 periodSeconds: 5
66 tcpSocket:
67 port: {{ .Values.config.redis.port }}
68 volumeMounts:
69 - mountPath: /data
70 name: redis-data
71 volumes:
72 - name: redis-data
73 emptyDir: {}
74 restartPolicy: Always