blob: ef9c5b74a9363fb342c3646779742220e4ab6417 [file] [log] [blame]
---
# Copyright 2018-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if .Values.grafana.enabled }}
apiVersion: v1
kind: ReplicationController
metadata:
name: grafana-cdn-rc
spec:
replicas: 1
selector:
app: grafana-cdn
template:
metadata:
name: grafana-cdn
labels:
app: grafana-cdn
spec:
nodeSelector:
kubernetes.io/hostname: {{ .Values.grafana.node_selector }}
containers:
- name: grafana
image: {{ .Values.grafana.image }}
env:
- name: ADMIN_USER
value: {{ .Values.grafana.adminUser }}
- name: ADMIN_PASS
value: {{ .Values.grafana.adminPassword }}
ports:
- containerPort: 3000
volumeMounts:
- mountPath: /etc/grafana/
name: grafana-volume
- mountPath: /etc/grafana/dashboards
name: grafana-dashboards
- mountPath: /etc/grafana/provisioning/dashboards
name: dashboards-provider
- mountPath: /etc/grafana/provisioning/datasources
name: datasources-provider
volumes:
- name: grafana-volume
configMap:
name: grafana-config
- name: grafana-dashboards
configMap:
name: grafana-dashs
- name: dashboards-provider
configMap:
name: grafana-dash-provider
- name: datasources-provider
configMap:
name: grafana-datasources-provider
{{- end }}