blob: f4716bbc8886052a3615a5a61d31de7d787d81f2 [file] [log] [blame]
Gopinath Tagete2dff4d2018-03-15 17:22:28 -07001# Copyright 2017-present Open Networking Foundation
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
15#
16# The grafana service
17#
18apiVersion: v1
19kind: Service
20metadata:
21 name: grafana
22 namespace: {{ .Values.global.namespace }}
23 serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
24spec:
25 clusterIP: None
26 selector:
27 app: grafana
28 ports:
29 - name: ui-port
30 protocol: TCP
31 port: 8883
32 targetPort: 80
33 - name: port-2003
34 protocol: TCP
35 port: 2003
36 targetPort: 2003
37 - name: port-2004
38 protocol: TCP
39 port: 2004
40 targetPort: 2004
41 - name: port-8126
42 protocol: TCP
43 port: 8126
44 targetPort: 8126
45 - name: port-8125
46 protocol: TCP
47 port: 8125
48 targetPort: 8125
49---
50apiVersion: apps/v1beta1
51kind: Deployment
52metadata:
53 name: grafana
54 namespace: {{ .Values.global.namespace }}
55 serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
56spec:
57 replicas: 1
58 template:
59 metadata:
60 labels:
61 app: grafana
62 spec:
63 serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
64 containers:
65 - name: grafana
Matteo Scandolof6c28df2018-05-08 11:44:05 -070066 image: {{ .Values.grafanaImage }}
67 imagePullPolicy: {{ .Values.imagePullPolicy }}
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070068 ports:
69 - containerPort: 80
70 - containerPort: 2003
71 - containerPort: 2004
72 - containerPort: 8126
73 - containerPort: 8125
74 env:
75 - name: GR_SERVER_ROOT_URL
76 value: "http://localhost:80/grafana/"