Refactor performance scripts
[dcaegen2/collectors/hv-ves.git] / tools / performance / cloud / producer-deployment.yaml
1 # ============LICENSE_START=======================================================
2 # dcaegen2-collectors-veshv
3 # ================================================================================
4 # Copyright (C) 2020 NOKIA
5 # ================================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 #      http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 # ============LICENSE_END=========================================================
18
19 apiVersion: apps/v1
20 kind: Deployment
21 metadata:
22   name: hv-collector-producer-deployment
23   namespace: onap
24   labels:
25     app: hv-collector-producer
26 spec:
27   replicas: 1
28   selector:
29     matchLabels:
30       app: hv-collector-producer
31   template:
32     metadata:
33       labels:
34         app: hv-collector-producer
35     spec:
36       containers:
37         - name: hv-collector-producer
38           imagePullPolicy: Always
39           image: onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-go-client:latest
40           volumeMounts:
41             - name: ssl-certs
42               mountPath: /ssl
43               readOnly: true
44           env:
45             - name: HV_VES_ADDRESS
46               valueFrom:
47                 configMapKeyRef:
48                   name: performance-test-config
49                   key: producer.hvVesAddress
50             - name: CERT_FILE
51               valueFrom:
52                 configMapKeyRef:
53                   name: performance-test-config
54                   key: client.cert.path
55             - name: CERT_PASS_FILE
56               valueFrom:
57                 configMapKeyRef:
58                   name: performance-test-config
59                   key: client.cert.pass.path
60           args: ["--address", "$(HV_VES_ADDRESS)",
61                  "--certfile", "$(CERT_FILE)",
62                  "--certpass", "$(CERT_PASS_FILE)"]
63       volumes:
64         - name: ssl-certs
65           secret:
66             secretName: cert
67
68
69 ---
70
71 apiVersion: v1
72 kind: Service
73 metadata:
74   name: hv-collector-producer
75   namespace: onap
76   labels:
77     app: hv-collector-producer
78   annotations:
79     prometheus.io/scrape: 'hv-ves-producer'
80     prometheus.io/path: '/monitoring/prometheus'
81 spec:
82   selector:
83     app: hv-collector-producer
84   type: NodePort
85   ports:
86     - protocol: TCP
87       port: 8080
88       targetPort: 8080
89       nodePort: 30002