| vijaynag | 8339ed2 | 2019-07-25 17:10:58 +0530 | [diff] [blame] | 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: |
| garciadeblas | cc9fc1c | 2022-02-22 00:04:09 +0100 | [diff] [blame] | 33 | securityContext: |
| 34 | runAsUser: 1000 |
| 35 | runAsGroup: 1000 |
| 36 | fsGroup: 1000 |
| vijaynag | 8339ed2 | 2019-07-25 17:10:58 +0530 | [diff] [blame] | 37 | initContainers: |
| 38 | - name: kafka-ro-mongo-test |
| 39 | image: alpine:latest |
| David Garcia | a137601 | 2020-10-19 15:42:42 +0200 | [diff] [blame] | 40 | command: ["sh", "-c", "until (nc -zvw1 kafka 9092 && nc -zvw1 ro 9090 && nc -zvw1 mongodb-k8s 27017 ); do sleep 3; done; exit 0"] |
| vijaynag | 8339ed2 | 2019-07-25 17:10:58 +0530 | [diff] [blame] | 41 | containers: |
| 42 | - name: lcm |
| garciadeblas | a345fc5 | 2021-05-26 16:54:05 +0200 | [diff] [blame] | 43 | image: opensourcemano/lcm:10 |
| vijaynag | 8339ed2 | 2019-07-25 17:10:58 +0530 | [diff] [blame] | 44 | env: |
| 45 | - name: OSMLCM_RO_HOST |
| 46 | value: ro |
| David Garcia | a137601 | 2020-10-19 15:42:42 +0200 | [diff] [blame] | 47 | - name: OSMLCM_DATABASE_URI |
| 48 | value: mongodb://mongodb-k8s:27017/?replicaSet=rs0 |
| vijaynag | 8339ed2 | 2019-07-25 17:10:58 +0530 | [diff] [blame] | 49 | - name: OSMLCM_MESSAGE_HOST |
| 50 | value: kafka |
| David Garcia | 1425183 | 2020-11-12 16:56:29 +0100 | [diff] [blame] | 51 | - name: OSMLCM_STORAGE_DRIVER |
| 52 | value: mongo |
| 53 | - name: OSMLCM_STORAGE_PATH |
| 54 | value: /app/storage |
| 55 | - name: OSMLCM_STORAGE_COLLECTION |
| 56 | value: files |
| 57 | - name: OSMLCM_STORAGE_URI |
| 58 | value: mongodb://mongodb-k8s:27017/?replicaSet=rs0 |
| vijaynag | 8339ed2 | 2019-07-25 17:10:58 +0530 | [diff] [blame] | 59 | envFrom: |
| 60 | - secretRef: |
| garciadeblas | cc9fc1c | 2022-02-22 00:04:09 +0100 | [diff] [blame] | 61 | name: lcm-secret |
| garciadeblas | 1456526 | 2022-02-22 00:00:32 +0100 | [diff] [blame] | 62 | volumeMounts: |
| garciadeblas | 1456526 | 2022-02-22 00:00:32 +0100 | [diff] [blame] | 63 | - name: prometheus-config |
| garciadeblas | 310805f | 2022-02-28 17:05:09 +0100 | [diff] [blame] | 64 | mountPath: /opt/prometheus |
| garciadeblas | 1456526 | 2022-02-22 00:00:32 +0100 | [diff] [blame] | 65 | volumes: |
| garciadeblas | 1456526 | 2022-02-22 00:00:32 +0100 | [diff] [blame] | 66 | - name: prometheus-config |
| 67 | hostPath: |
| 68 | path: /var/lib/osm/prometheus |
| garciadeblas | cc9fc1c | 2022-02-22 00:04:09 +0100 | [diff] [blame] | 69 | |