Woojoong Kim | d3c132c | 2020-08-26 14:46:47 -0700 | [diff] [blame] | 1 | {{- /* |
| 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 | --- |
| 11 | apiVersion: apps/v1 |
| 12 | kind: Deployment |
| 13 | metadata: |
| 14 | name: zookeeper |
| 15 | spec: |
| 16 | selector: |
| 17 | matchLabels: |
| 18 | app: zookeeper |
| 19 | template: |
| 20 | metadata: |
| 21 | labels: |
| 22 | app: zookeeper |
| 23 | spec: |
| 24 | serviceAccountName: thingsboard |
| 25 | initContainers: |
| 26 | - name: zookeeper-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.zookeeper }} |
| 58 | ports: |
| 59 | - containerPort: {{ .Values.config.zookeeper.port }} |
| 60 | readinessProbe: |
| 61 | periodSeconds: 5 |
| 62 | tcpSocket: |
| 63 | port: {{ .Values.config.zookeeper.port }} |
| 64 | livenessProbe: |
| 65 | initialDelaySeconds: 15 |
| 66 | periodSeconds: 5 |
| 67 | tcpSocket: |
| 68 | port: {{ .Values.config.zookeeper.port }} |
| 69 | env: |
| 70 | - name: ZOO_MY_ID |
| 71 | value: "1" |
| 72 | - name: ZOO_SERVERS |
| 73 | value: "server.1=0.0.0.0:2888:3888;0.0.0.0:2181" |
| 74 | restartPolicy: Always |