blob: 5f562c24920e839c523c576c89d917c36d524fba [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: pol
21 labels:
22 app: pol
23spec:
24 replicas: 1
25 selector:
26 matchLabels:
27 app: pol
28 template:
29 metadata:
30 labels:
31 app: pol
32 spec:
sousaeduce5d7042021-10-14 15:16:59 +010033 securityContext:
34 runAsUser: 1000
35 runAsGroup: 1000
36 fsGroup: 1000
vijaynag8339ed22019-07-25 17:10:58 +053037 initContainers:
38 - name: kafka-mongo-test
39 image: alpine:latest
David Garciaa1376012020-10-19 15:42:42 +020040 command: ["sh", "-c", "until (nc -zvw1 kafka 9092 && nc -zvw1 mongodb-k8s 27017); do sleep 3; done; exit 0"]
vijaynag8339ed22019-07-25 17:10:58 +053041 containers:
42 - name: pol
garciadeblas375b2702021-11-08 12:40:18 +010043 image: opensourcemano/pol:11
vijaynag8339ed22019-07-25 17:10:58 +053044 env:
45 - name: OSMPOL_MESSAGE_HOST
46 value: kafka
47 - name: OSMPOL_MESSAGE_PORT
48 value: "9092"
David Garciaa1376012020-10-19 15:42:42 +020049 - name: OSMPOL_DATABASE_URI
50 value: mongodb://mongodb-k8s:27017/?replicaSet=rs0
vijaynag8339ed22019-07-25 17:10:58 +053051 envFrom:
52 - secretRef:
53 name: pol-secret