Add script for loading prometheus snapshots, improve grafana
[dcaegen2/collectors/hv-ves.git] / tools / performance / cloud / grafana-deployment.yaml
1 # ============LICENSE_START=======================================================\r
2 # dcaegen2-collectors-veshv\r
3 # ================================================================================\r
4 # Copyright (C) 2019 NOKIA\r
5 # ================================================================================\r
6 # Licensed under the Apache License, Version 2.0 (the "License");\r
7 # you may not use this file except in compliance with the License.\r
8 # You may obtain a copy of the License at\r
9 #\r
10 #      http://www.apache.org/licenses/LICENSE-2.0\r
11 #\r
12 # Unless required by applicable law or agreed to in writing, software\r
13 # distributed under the License is distributed on an "AS IS" BASIS,\r
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
15 # See the License for the specific language governing permissions and\r
16 # limitations under the License.\r
17 # ============LICENSE_END=========================================================\r
18 \r
19 apiVersion: extensions/v1beta1\r
20 kind: Deployment\r
21 metadata:\r
22   name: grafana-hv-ves-deployment\r
23   namespace: onap\r
24   labels:\r
25     app: hv-collector-grafana\r
26 spec:\r
27   replicas: 1\r
28   selector:\r
29     matchLabels:\r
30       app: hv-collector-grafana\r
31   template:\r
32     metadata:\r
33       labels:\r
34         app: hv-collector-grafana\r
35     spec:\r
36       containers:\r
37       - name: hv-collector-grafana\r
38         image: grafana/grafana\r
39         env:\r
40         - name: GF_AUTH_DISABLE_LOGIN_FORM\r
41           value: "true"\r
42         - name: GF_AUTH_DISABLE_SIGNOUT_MENU\r
43           value: "true"\r
44         - name: GF_AUTH_ANONYMOUS_ENABLED\r
45           value: "true"\r
46         - name: GF_AUTH_ANONYMOUS_ORG_ROLE\r
47           value: "Admin"\r
48         - name: FOLDER\r
49           value: "/tmp/dashboards"\r
50         volumeMounts:\r
51         - name: grafana-datasources\r
52           mountPath: /etc/grafana/provisioning/datasources\r
53         - name: grafana-dashboards-providers\r
54           mountPath: /etc/grafana/provisioning/dashboards\r
55         - name: grafana-dashboards\r
56           mountPath: /etc/grafana/dashboards/hv-ves\r
57       volumes:\r
58       - name: grafana-datasources\r
59         configMap:\r
60           name: grafana-datasources\r
61       - name: grafana-dashboards-providers\r
62         configMap:\r
63           name: grafana-dashboards-providers\r
64       - name: grafana-dashboards\r
65         configMap:\r
66           name: grafana-dashboards\r
67 ---\r
68 apiVersion: v1\r
69 kind: Service\r
70 metadata:\r
71   name: grafana-service\r
72   namespace: onap\r
73   labels:\r
74     app: hv-collector-grafana\r
75   annotations:\r
76     prometheus.io/scrape: 'true'\r
77     prometheus.io/port:   '3000'\r
78 spec:\r
79   selector:\r
80     app: hv-collector-grafana\r
81   type: NodePort\r
82   ports:\r
83   - port: 3000\r
84     targetPort: 3000\r
85     nodePort: 30001\r
86 \r