blob: f66b9d38eb88c2cc6ea169e73afa50f3d94d72d9 [file] [log] [blame]
vijaynag8339ed22019-07-25 17:10:58 +05301# Copyright 2019 TATA ELXSI
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12# implied.
13# See the License for the specific language governing permissions and
14# limitations under the License
15# Author: Vijay Nag B S (vijaynag.bs@tataelxsi.co.in)
16
17apiVersion: apps/v1
18kind: Deployment
19metadata:
20 name: lcm
21 labels:
22 app: lcm
23spec:
24 replicas: 1
25 selector:
26 matchLabels:
27 app: lcm
28 template:
29 metadata:
30 labels:
31 app: lcm
32 spec:
33 initContainers:
34 - name: kafka-ro-mongo-test
35 image: alpine:latest
David Garciaa1376012020-10-19 15:42:42 +020036 command: ["sh", "-c", "until (nc -zvw1 kafka 9092 && nc -zvw1 ro 9090 && nc -zvw1 mongodb-k8s 27017 ); do sleep 3; done; exit 0"]
vijaynag8339ed22019-07-25 17:10:58 +053037 containers:
38 - name: lcm
garciadeblas7b3ed792020-12-21 11:50:36 +000039 image: opensourcemano/lcm:9
vijaynag8339ed22019-07-25 17:10:58 +053040 env:
41 - name: OSMLCM_RO_HOST
42 value: ro
David Garciaa1376012020-10-19 15:42:42 +020043 - name: OSMLCM_DATABASE_URI
44 value: mongodb://mongodb-k8s:27017/?replicaSet=rs0
vijaynag8339ed22019-07-25 17:10:58 +053045 - name: OSMLCM_MESSAGE_HOST
46 value: kafka
David Garcia14251832020-11-12 16:56:29 +010047 - name: OSMLCM_STORAGE_DRIVER
48 value: mongo
49 - name: OSMLCM_STORAGE_PATH
50 value: /app/storage
51 - name: OSMLCM_STORAGE_COLLECTION
52 value: files
53 - name: OSMLCM_STORAGE_URI
54 value: mongodb://mongodb-k8s:27017/?replicaSet=rs0
vijaynag8339ed22019-07-25 17:10:58 +053055 envFrom:
56 - secretRef:
57 name: lcm-secret
58 volumeMounts:
59 - name: osm-packages
60 mountPath: /app/storage
bravof1e0297e2020-07-01 15:11:57 -040061 - name: prometheus-config
62 mountPath: /etc/prometheus
vijaynag8339ed22019-07-25 17:10:58 +053063 volumes:
64 - name: osm-packages
65 hostPath:
66 path: /var/lib/osm/osm_osm_packages/_data
bravof1e0297e2020-07-01 15:11:57 -040067 - name: prometheus-config
68 hostPath:
69 path: /var/lib/osm/prometheus