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: tb-web-ui |
| 15 | spec: |
| 16 | replicas: 1 |
| 17 | selector: |
| 18 | matchLabels: |
| 19 | app: tb-web-ui |
| 20 | template: |
| 21 | metadata: |
| 22 | labels: |
| 23 | app: tb-web-ui |
| 24 | spec: |
| 25 | serviceAccountName: thingsboard |
| 26 | initContainers: |
| 27 | - name: tb-web-ui-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.webUi }} |
| 55 | ports: |
| 56 | - containerPort: {{ .Values.config.webUi.port }} |
| 57 | name: http |
| 58 | env: |
| 59 | - name: HTTP_BIND_ADDRESS |
| 60 | value: {{ .Values.config.webUi.bindAddr | quote }} |
| 61 | - name: HTTP_BIND_PORT |
| 62 | value: {{ .Values.config.webUi.port | quote }} |
| 63 | - name: TB_ENABLE_PROXY |
| 64 | value: {{ .Values.config.webUi.proxy.enabled | quote }} |
| 65 | - name: LOGGER_LEVEL |
| 66 | value: {{ .Values.config.webUi.logger.level | quote}} |
| 67 | - name: LOG_FOLDER |
| 68 | value: {{ .Values.config.webUi.logger.dir | quote }} |
| 69 | - name: LOGGER_FILENAME |
| 70 | value: {{ .Values.config.webUi.logger.fileName }} |
| 71 | - name: DOCKER_MODE |
| 72 | value: "true" |
| 73 | livenessProbe: |
| 74 | httpGet: |
| 75 | path: /index.html |
| 76 | port: http |
| 77 | initialDelaySeconds: 120 |
| 78 | timeoutSeconds: 10 |
| 79 | restartPolicy: Always |