blob: 9b3763e0153cf09f2676439841a1fb0420fba4f7 [file] [log] [blame]
mc8b31c582019-09-03 21:55:21 +00001---
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 Scandolo5628d4b2021-01-11 11:46:12 -080016apiVersion: apps/v1
mc8b31c582019-09-03 21:55:21 +000017kind: Deployment
18metadata:
19 name: device-management
20 labels:
21 release: {{ .Release.Name }}
22spec:
23 replicas: {{ .Values.device_management_replicas }}
Matteo Scandolo5628d4b2021-01-11 11:46:12 -080024 selector:
25 matchLabels:
26 name: device-management
27 release: {{ .Release.Name }}
mc8b31c582019-09-03 21:55:21 +000028 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---
61apiVersion: v1
62kind: PersistentVolumeClaim
63metadata:
64 name: {{ .Values.pvClaimName }}
65spec:
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 }}