apiVersion: v1
kind: ReplicationController
metadata:
  labels:
    name: monitoring-grafana
  name: monitoring-grafana
  namespace: kube-system
spec:
  replicas: 1
  selector:
    name: monitoring-grafana
  template:
    metadata:
      labels:
        name: monitoring-grafana
    spec:
      hostNetwork: true
      containers:
      - name: monitoring-grafana
        image: master:5000/grafana
        env:
          - name: INFLUXDB_SERVICE_URL
            value: http://master:8086
          - name: GF_AUTH_BASIC_ENABLED
            value: "false"
          - name: GF_AUTH_ANONYMOUS_ENABLED
            value: "true"
          - name: GF_AUTH_ANONYMOUS_ORG_ROLE
            value: Admin
          #- name: GF_SERVER_ROOT_URL
          #  value: /api/v1/proxy/namespaces/default/services/grafana-monitoring/
        volumeMounts:
        - mountPath: /var
          name: grafana-storage
      volumes:
      - name: grafana-storage
        emptyDir: {}
