mc | 8b31c58 | 2019-09-03 21:55:21 +0000 | [diff] [blame] | 1 | --- |
| 2 | # Copyright 2017-present Open Networking Foundation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
Matteo Scandolo | 5628d4b | 2021-01-11 11:46:12 -0800 | [diff] [blame] | 16 | apiVersion: apps/v1 |
mc | 8b31c58 | 2019-09-03 21:55:21 +0000 | [diff] [blame] | 17 | kind: Deployment |
| 18 | metadata: |
| 19 | name: device-management |
| 20 | labels: |
| 21 | release: {{ .Release.Name }} |
| 22 | spec: |
| 23 | replicas: {{ .Values.device_management_replicas }} |
Matteo Scandolo | 5628d4b | 2021-01-11 11:46:12 -0800 | [diff] [blame] | 24 | selector: |
| 25 | matchLabels: |
| 26 | name: device-management |
| 27 | release: {{ .Release.Name }} |
mc | 8b31c58 | 2019-09-03 21:55:21 +0000 | [diff] [blame] | 28 | template: |
| 29 | metadata: |
| 30 | labels: |
| 31 | app: device-management |
| 32 | release: {{ .Release.Name }} |
| 33 | spec: |
| 34 | containers: |
| 35 | - name: device-management |
| 36 | image: "{{ .Values.global.registry }}{{ .Values.images.device_management.repository }}:{{ tpl .Values.images.device_management.tag . }}" |
| 37 | imagePullPolicy: "{{ .Values.images.device_management.pullPolicy }}" |
| 38 | ports: |
| 39 | - containerPort: 8080 |
| 40 | port: 8080 |
| 41 | protocol: TCP |
| 42 | - containerPort: 50051 |
| 43 | port: 50051 |
| 44 | protocol: TCP |
| 45 | env: |
| 46 | - name: EVENT_NOTIFICATION_DESTIP |
| 47 | value: "{{ .Values.event_destip }}" |
| 48 | - name: DEVICE_MANAGEMENT_DESTPORT |
| 49 | value: "{{ .Values.device_management_httpPort }}" |
| 50 | {{- if .Values.needPersistence }} |
| 51 | - name: DEVICE_MANAGEMENT_PVMOUNT |
| 52 | value: {{ .Values.device_management_pv_mount | quote }} |
| 53 | volumeMounts: |
| 54 | - name: device-management-persistent-storage |
| 55 | mountPath: {{ .Values.device_management_pv_mount | quote }} |
| 56 | volumes: |
| 57 | - name: device-management-persistent-storage |
| 58 | persistentVolumeClaim: |
| 59 | claimName: {{ .Values.pvClaimName }} |
| 60 | --- |
| 61 | apiVersion: v1 |
| 62 | kind: PersistentVolumeClaim |
| 63 | metadata: |
| 64 | name: {{ .Values.pvClaimName }} |
| 65 | spec: |
| 66 | {{- if .Values.useCeph }} |
| 67 | storageClassName: {{ .Values.storageCephClassName }} |
| 68 | {{- else }} |
| 69 | storageClassName: {{ .Values.storageLDClassName }} |
| 70 | {{- end }} |
| 71 | accessModes: |
| 72 | - ReadWriteOnce |
| 73 | resources: |
| 74 | requests: |
| 75 | storage: 1Gi |
| 76 | {{- end }} |