Refactor ves performance test
[dcaegen2/collectors/ves.git] / performanceTests / environment / k8s / prometheus / deployment.yaml
1 # ============LICENSE_START=======================================================
2 # dcaegen2-collectors-ves
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: v1
20 kind: Service
21 metadata:
22   name: ves-prometheus
23   namespace: onap
24   labels:
25     app: ves-prometheus
26   annotations:
27     prometheus.io/scrape: 'true'
28     prometheus.io/port:   '9090'
29 spec:
30   selector:
31     app: ves-prometheus
32   type: NodePort
33   ports:
34     - port: 8080
35       targetPort: 9090
36       nodePort: 30069
37 ---
38 apiVersion: extensions/v1beta1
39 kind: Deployment
40 metadata:
41   name: ves-prometheus
42   namespace: onap
43   labels:
44     app: ves-prometheus
45 spec:
46   replicas: 1
47   selector:
48     matchLabels:
49       app: ves-prometheus
50   template:
51     metadata:
52       labels:
53         app: ves-prometheus
54     spec:
55       containers:
56         - name: ves-prometheus
57           image: prom/prometheus
58           args:
59             - "--config.file=/etc/prometheus/prometheus.yml"
60             - "--storage.tsdb.path=/prometheus/"
61             - "--web.enable-admin-api"
62           ports:
63             - containerPort: 9090
64           volumeMounts:
65             - name: ves-prometheus-config
66               mountPath: /etc/prometheus/
67             - name: ves-prometheus-storage
68               mountPath: /prometheus/
69       volumes:
70         - name: ves-prometheus-config
71           configMap:
72             defaultMode: 420
73             name: ves-prometheus-config
74         - name: ves-prometheus-storage
75           emptyDir: {}