Add k8s yml file for oru application
[nonrtric.git] / test / usecases / oruclosedlooprecovery / scriptversion / k8s / linkfailure.yml
1 #  Copyright (C) 2021 Nordix Foundation. All rights reserved.
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 implied.
12 #  See the License for the specific language governing permissions and
13 #  limitations under the License.
14 #  ============LICENSE_END=================================================
15 #
16 apiVersion: v1
17 kind: Namespace
18 metadata:
19   name: nonrtric
20 ---
21 apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
22 kind: Deployment
23 metadata:
24   name: dmaap-mr
25   namespace: nonrtric
26   labels:
27     app: dmaap-mr
28 spec:
29   selector:
30     matchLabels:
31       app: dmaap-mr
32   replicas: 1
33   template:
34     metadata:
35       labels:
36         app: dmaap-mr
37     spec:
38       containers:
39       - name: dmaap-mr
40         image: mrstub
41         imagePullPolicy: IfNotPresent
42         ports:
43         - name: http
44           containerPort: 3904
45         - name: https
46           containerPort: 3905
47 ---
48 apiVersion: v1
49 kind: Service
50 metadata:
51   name: dmaap-mr
52   namespace: nonrtric
53   labels:
54     app: dmaap-mr
55 spec:
56   type: ClusterIP
57   ports:
58     - name: http
59       protocol: TCP
60       port: 3904
61     - name: https
62       protocol: TCP
63       port: 3905
64   selector:
65     app: dmaap-mr
66 ---
67 apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
68 kind: Deployment
69 metadata:
70   name: message-generator
71   namespace: nonrtric
72   labels:
73     app: message-generator
74 spec:
75   selector:
76     matchLabels:
77       app: message-generator
78   replicas: 1
79   template:
80     metadata:
81       labels:
82         app: message-generator
83     spec:
84       containers:
85       - name: message-generator
86         image: message-generator
87         imagePullPolicy: IfNotPresent
88         env:
89         - name: MR-HOST
90           value: http://dmaap-mr
91         - name: MR-PORT
92           value: "3904"
93 ---
94 apiVersion: v1
95 kind: Service
96 metadata:
97   name: message-generator
98   namespace: nonrtric
99   labels:
100     app: message-generator
101 spec:
102   # type: ClusterIP
103   ports:
104     - protocol: TCP
105       port: 80
106   selector:
107     app: message-generator
108 ---
109 apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
110 kind: Deployment
111 metadata:
112   name: sdnr-simulator
113   namespace: nonrtric
114   labels:
115     app: sdnr-simulator
116 spec:
117   selector:
118     matchLabels:
119       app: sdnr-simulator
120   replicas: 1
121   template:
122     metadata:
123       labels:
124         app: sdnr-simulator
125     spec:
126       containers:
127       - name: sdnr-simulator
128         image: sdnr-simulator
129         imagePullPolicy: IfNotPresent
130         ports:
131         - name: tcp
132           containerPort: 9990
133         env:
134         - name: MR-HOST
135           value: http://dmaap-mr
136         - name: MR-PORT
137           value: "3904"
138 ---
139 apiVersion: v1
140 kind: Service
141 metadata:
142   name: sdnr-simulator
143   namespace: nonrtric
144   labels:
145     app: sdnr-simulator
146 spec:
147   type: ClusterIP
148   ports:
149     - protocol: TCP
150       port: 9990
151   selector:
152     app: sdnr-simulator
153 ---
154 apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
155 kind: Deployment
156 metadata:
157   name: oru-app
158   namespace: nonrtric
159   labels:
160     app: oru-app
161 spec:
162   selector:
163     matchLabels:
164       app: oru-app
165   replicas: 1
166   template:
167     metadata:
168       labels:
169         app: oru-app
170     spec:
171       containers:
172       - name: oru-app
173         image: oru-app
174         imagePullPolicy: IfNotPresent
175         env:
176         - name: MR-HOST
177           value: http://dmaap-mr
178         - name: MR-PORT
179           value: "3904"
180         - name: SDNR-HOST
181           value: http://sdnr-simulator
182         - name: SDNR-PORT
183           value: "9990"
184         - name: VERBOSE
185           value: "on"
186 ---
187 apiVersion: v1
188 kind: Service
189 metadata:
190   name: oru-app
191   namespace: nonrtric
192   labels:
193     app: oru-app
194 spec:
195   # type: ClusterIP
196   ports:
197     - protocol: TCP
198       port: 80
199   selector:
200     app: oru-app