blob: ef9c5b74a9363fb342c3646779742220e4ab6417 [file] [log] [blame]
Doyoung Lee8f30e152019-05-21 16:23:07 -07001---
2# Copyright 2018-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16{{- if .Values.grafana.enabled }}
17
18apiVersion: v1
19kind: ReplicationController
20metadata:
21 name: grafana-cdn-rc
22spec:
23 replicas: 1
24 selector:
25 app: grafana-cdn
26 template:
27 metadata:
28 name: grafana-cdn
29 labels:
30 app: grafana-cdn
31 spec:
32 nodeSelector:
33 kubernetes.io/hostname: {{ .Values.grafana.node_selector }}
34 containers:
35 - name: grafana
36 image: {{ .Values.grafana.image }}
37 env:
38 - name: ADMIN_USER
39 value: {{ .Values.grafana.adminUser }}
40 - name: ADMIN_PASS
41 value: {{ .Values.grafana.adminPassword }}
42 ports:
43 - containerPort: 3000
44 volumeMounts:
45 - mountPath: /etc/grafana/
46 name: grafana-volume
47 - mountPath: /etc/grafana/dashboards
48 name: grafana-dashboards
49 - mountPath: /etc/grafana/provisioning/dashboards
50 name: dashboards-provider
51 - mountPath: /etc/grafana/provisioning/datasources
52 name: datasources-provider
53 volumes:
54 - name: grafana-volume
55 configMap:
56 name: grafana-config
57 - name: grafana-dashboards
58 configMap:
59 name: grafana-dashs
60 - name: dashboards-provider
61 configMap:
62 name: grafana-dash-provider
63 - name: datasources-provider
64 configMap:
65 name: grafana-datasources-provider
66
67{{- end }}