| 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: v1 |
| 18 | kind: Service |
| 19 | metadata: |
| 20 | name: nbi |
| 21 | spec: |
| 22 | ports: |
| 23 | - nodePort: 9999 |
| 24 | port: 9999 |
| 25 | protocol: TCP |
| 26 | targetPort: 9999 |
| 27 | selector: |
| 28 | app: nbi |
| 29 | type: NodePort |
| 30 | --- |
| 31 | apiVersion: apps/v1 |
| 32 | kind: Deployment |
| 33 | metadata: |
| 34 | name: nbi |
| 35 | labels: |
| 36 | app: nbi |
| 37 | spec: |
| 38 | replicas: 1 |
| 39 | selector: |
| 40 | matchLabels: |
| 41 | app: nbi |
| 42 | template: |
| 43 | metadata: |
| 44 | labels: |
| 45 | app: nbi |
| 46 | spec: |
| sousaedu | a8e75d0 | 2021-09-30 14:07:57 +0100 | [diff] [blame] | 47 | securityContext: |
| 48 | runAsUser: 1000 |
| 49 | runAsGroup: 1000 |
| 50 | fsGroup: 1000 |
| vijaynag | 8339ed2 | 2019-07-25 17:10:58 +0530 | [diff] [blame] | 51 | initContainers: |
| 52 | - name: kafka-mongo-test |
| 53 | image: alpine:latest |
| David Garcia | a137601 | 2020-10-19 15:42:42 +0200 | [diff] [blame] | 54 | command: ["sh", "-c", "until (nc -zvw1 kafka 9092 && nc -zvw1 mongodb-k8s 27017); do sleep 3; done; exit 0"] |
| vijaynag | 8339ed2 | 2019-07-25 17:10:58 +0530 | [diff] [blame] | 55 | containers: |
| 56 | - name: nbi |
| garciadeblas | 89c5f55 | 2022-11-24 20:16:57 +0100 | [diff] [blame] | 57 | image: opensourcemano/nbi:13 |
| vijaynag | 8339ed2 | 2019-07-25 17:10:58 +0530 | [diff] [blame] | 58 | ports: |
| 59 | - containerPort: 9999 |
| 60 | protocol: TCP |
| 61 | env: |
| David Garcia | a137601 | 2020-10-19 15:42:42 +0200 | [diff] [blame] | 62 | - name: OSMNBI_DATABASE_URI |
| 63 | value: mongodb://mongodb-k8s:27017/?replicaSet=rs0 |
| vijaynag | 8339ed2 | 2019-07-25 17:10:58 +0530 | [diff] [blame] | 64 | - name: OSMNBI_MESSAGE_HOST |
| 65 | value: kafka |
| David Garcia | 1425183 | 2020-11-12 16:56:29 +0100 | [diff] [blame] | 66 | - name: OSMNBI_STORAGE_DRIVER |
| 67 | value: mongo |
| 68 | - name: OSMNBI_STORAGE_PATH |
| 69 | value: /app/storage |
| 70 | - name: OSMNBI_STORAGE_COLLECTION |
| 71 | value: files |
| 72 | - name: OSMNBI_STORAGE_URI |
| 73 | value: mongodb://mongodb-k8s:27017/?replicaSet=rs0 |
| vijaynag | 8339ed2 | 2019-07-25 17:10:58 +0530 | [diff] [blame] | 74 | envFrom: |
| 75 | - secretRef: |
| 76 | name: nbi-secret |