feat(lcm-prometheus interconnection): allows lcm to modify prometheus config in order...
[osm/devops.git] / installers / docker / osm_pods / lcm.yaml
1 # 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
17 apiVersion: apps/v1
18 kind: Deployment
19 metadata:
20   name: lcm
21   labels:
22     app: lcm
23 spec:
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
36          command: ["sh", "-c", "until (nc -zvw1 kafka 9092 && nc -zvw1 ro 9090 && nc -zvw1 mongo 27017 ); do sleep 3; done; exit 0"]
37       containers:
38       - name: lcm
39         image: opensourcemano/lcm:7
40         env:
41         - name: OSMLCM_RO_HOST
42           value: ro
43         - name: OSMLCM_DATABASE_HOST
44           value: mongo
45         - name: OSMLCM_MESSAGE_HOST
46           value: kafka
47         envFrom:
48         - secretRef:
49            name: lcm-secret
50         volumeMounts:
51         - name: osm-packages
52           mountPath: /app/storage
53         - name: prometheus-config
54           mountPath: /etc/prometheus
55       volumes:
56       - name: osm-packages
57         hostPath:
58          path: /var/lib/osm/osm_osm_packages/_data
59       - name: prometheus-config
60         hostPath:
61           path: /var/lib/osm/prometheus