Mostly integration test work:
[ric-plt/a1.git] / integration_tests / testreceiver / templates / deployment.yaml
1 apiVersion: apps/v1
2 kind: Deployment
3 metadata:
4   name: {{ include "testreceiver.fullname" . }}
5   labels:
6 {{ include "testreceiver.labels" . | indent 4 }}
7 spec:
8   replicas: 1
9   selector:
10     matchLabels:
11       app.kubernetes.io/name: {{ include "testreceiver.name" . }}
12       app.kubernetes.io/instance: {{ .Release.Name }}
13   template:
14     metadata:
15       labels:
16         app.kubernetes.io/name: {{ include "testreceiver.name" . }}
17         app.kubernetes.io/instance: {{ .Release.Name }}
18     spec:
19       containers:
20         #query receiver
21         - name: queryreceiver
22           image: queryreceiver:latest
23           imagePullPolicy: Never
24           resources:
25             {{- toYaml .Values.resources | nindent 12 }}
26           volumeMounts:
27             - name: queryreceiverconf
28               mountPath: /opt/route/local.rt
29               subPath: local.rt
30           env:
31             # tells the test xapp to do a query
32             - name: DO_QUERY
33               value: "YES"
34             # this sets the source field in messages from a1 to point back to a1s service name, rather than it's random pod name
35             - name: RMR_SRC_ID
36               value: {{ .Values.queryrmrservice.name }}
37             - name: HANDLER_ID
38               value: "query_tester"
39             # the xapp framework requires this to work, even if SDL isn't used.
40             # it does an SDL healthcheck before it starts up properly
41             # moreover, the db config section doesn't appear to be honored; with that set, but not this, it doesn't find SDL
42             # so we need this here for the test receiver which uses the xapp framework to work
43             - name: DBAAS_SERVICE_HOST
44               value: "dbaas"
45             - name: DBAAS_SERVICE_PORT
46               value: "6379"
47
48         # test receiver
49         - name: testreceiver
50           image: testreceiver:latest
51           imagePullPolicy: Never
52           resources:
53             {{- toYaml .Values.resources | nindent 12 }}
54           volumeMounts:
55             - name: testreceiverconf
56               mountPath: /opt/route/local.rt
57               subPath: local.rt
58           env:
59             - name: DBAAS_SERVICE_HOST
60               value: "dbaas"
61             - name: DBAAS_SERVICE_PORT
62               value: "6379"
63
64         # test receiver that delays until sending
65         - name: delayreceiver
66           image: delayreceiver:latest
67           imagePullPolicy: Never
68           resources:
69             {{- toYaml .Values.resources | nindent 12 }}
70           volumeMounts:
71             - name: delayreceiverconf
72               mountPath: /opt/route/local.rt
73               subPath: local.rt
74           env:
75             - name: TEST_RCV_SEC_DELAY
76               value: "5"
77             - name: HANDLER_ID
78               value: "delay_receiver"
79             - name: DBAAS_SERVICE_HOST
80               value: "dbaas"
81             - name: DBAAS_SERVICE_PORT
82               value: "6379"
83
84       volumes:
85         - name: "testreceiverconf"
86           configMap:
87             name: "testreceiverconf"
88         - name: "delayreceiverconf"
89           configMap:
90             name: "delayreceiverconf"
91         - name: "queryreceiverconf"
92           configMap:
93             name: "queryreceiverconf"