blob: 517c069562602b16d4ed561883faa5e0a2e04a4a [file] [log] [blame]
vijaynag8339ed22019-07-25 17:10:58 +05301# Copyright 2019 TATA ELXSI
bravofc973b572020-10-21 16:58:50 -03002# Copyright 2020 Whitestack
vijaynag8339ed22019-07-25 17:10:58 +05303#
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
13# implied.
14# See the License for the specific language governing permissions and
15# limitations under the License
bravofc973b572020-10-21 16:58:50 -030016# Author: Vijay Nag B S (vijaynag.bs@tataelxsi.co.in), Fabián Bravo(fbravo@whitestack.com)
vijaynag8339ed22019-07-25 17:10:58 +053017
18apiVersion: apps/v1
19kind: Deployment
20metadata:
21 name: lcm
22 labels:
23 app: lcm
24spec:
25 replicas: 1
26 selector:
27 matchLabels:
28 app: lcm
29 template:
30 metadata:
31 labels:
32 app: lcm
33 spec:
34 initContainers:
35 - name: kafka-ro-mongo-test
36 image: alpine:latest
David Garciaa1376012020-10-19 15:42:42 +020037 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 +053038 containers:
39 - name: lcm
garciadeblas375b2702021-11-08 12:40:18 +010040 image: opensourcemano/lcm:11
vijaynag8339ed22019-07-25 17:10:58 +053041 env:
42 - name: OSMLCM_RO_HOST
43 value: ro
David Garciaa1376012020-10-19 15:42:42 +020044 - name: OSMLCM_DATABASE_URI
45 value: mongodb://mongodb-k8s:27017/?replicaSet=rs0
vijaynag8339ed22019-07-25 17:10:58 +053046 - name: OSMLCM_MESSAGE_HOST
47 value: kafka
David Garcia14251832020-11-12 16:56:29 +010048 - name: OSMLCM_STORAGE_DRIVER
49 value: mongo
50 - name: OSMLCM_STORAGE_PATH
51 value: /app/storage
52 - name: OSMLCM_STORAGE_COLLECTION
53 value: files
54 - name: OSMLCM_STORAGE_URI
55 value: mongodb://mongodb-k8s:27017/?replicaSet=rs0
vijaynag8339ed22019-07-25 17:10:58 +053056 envFrom:
57 - secretRef:
58 name: lcm-secret
59 volumeMounts:
60 - name: osm-packages
61 mountPath: /app/storage
62 volumes:
63 - name: osm-packages
64 hostPath:
65 path: /var/lib/osm/osm_osm_packages/_data