Upgrade Grafana to v6.0.0-beta2 and enable Explore UI

* Upgrade Grafana from v5.4.3 to v6.0.0-beta2
* Enable Grafana Explore UI while still using only the Viewer
role (inspect/edit without saving)
* http://docs.grafana.org/guides/whats-new-in-v6-0/
This commit is contained in:
Dalton Hubble 2019-02-17 12:36:40 -08:00
parent ac95e83249
commit 6fa3b8a13f
5 changed files with 63 additions and 21 deletions

View File

@ -19,6 +19,9 @@ Notable changes between versions.
* Improve Prometheus metrics labels and drop extraneous metrics ([#397](https://github.com/poseidon/typhoon/pull/397))
* Add `pod` name label to metrics discovered via service endpoints
* Rename `kubernetes_namespace` label to `namespace`
* Revamp the Grafana addon ([#403](https://github.com/poseidon/typhoon/pull/403))
* Upgrade Grafana from v5.4.3 to 6.0.0-beta2
* Enable Grafana [Explore](http://docs.grafana.org/guides/whats-new-in-v6-0/#explore) UI as a Viewer (inspect/edit without saving)
## v1.13.3

View File

@ -0,0 +1,36 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-config
namespace: monitoring
data:
custom.ini: |+
[server]
http_port = 8080
[paths]
data = /var/lib/grafana
plugins = /var/lib/grafana/plugins
provisioning = /etc/grafana/provisioning
[users]
allow_sign_up = false
allow_org_create = false
# viewers can edit/inspect, but not save
viewers_can_edit = true
# Disable login form, since Grafana always creates an admin user
[auth]
disable_login_form = true
# Disable the user/pass login system
[auth.basic]
enabled = false
# Allow anonymous authentication with view-only authorization
[auth.anonymous]
enabled = true
org_role = Viewer
[analytics]
reporting_enabled = false

View File

@ -10,7 +10,15 @@ data:
- name: prometheus
type: prometheus
access: proxy
orgId: 1
url: http://prometheus.monitoring.svc.cluster.local
version: 1
editable: false
loki.yaml: |+
apiVersion: 1
datasources:
- name: loki
type: loki
access: proxy
url: http://loki.monitoring.svc.cluster.local
version: 1
editable: false

View File

@ -23,20 +23,10 @@ spec:
spec:
containers:
- name: grafana
image: grafana/grafana:5.4.3
image: grafana/grafana:6.0.0-beta2
env:
- name: GF_SERVER_HTTP_PORT
value: "8080"
- name: GF_AUTH_BASIC_ENABLED
value: "false"
- name: GF_AUTH_DISABLE_LOGIN_FORM
value: "true"
- name: GF_AUTH_ANONYMOUS_ENABLED
value: "true"
- name: GF_AUTH_ANONYMOUS_ORG_ROLE
value: Viewer
- name: GF_ANALYTICS_REPORTING_ENABLED
value: "false"
- name: GF_PATHS_CONFIG
value: "/etc/grafana/custom.ini"
ports:
- name: http
containerPort: 8080
@ -48,19 +38,24 @@ spec:
memory: 200Mi
cpu: 200m
volumeMounts:
- name: config
mountPath: /etc/grafana
- name: datasources
mountPath: /etc/grafana/provisioning/datasources
- name: dashboard-providers
- name: providers
mountPath: /etc/grafana/provisioning/dashboards
- name: dashboards
mountPath: /var/lib/grafana/dashboards
mountPath: /etc/grafana/dashboards
volumes:
- name: config
configMap:
name: grafana-config
- name: datasources
configMap:
name: grafana-datasources
- name: dashboard-providers
- name: providers
configMap:
name: grafana-dashboard-providers
name: grafana-providers
- name: dashboards
configMap:
name: grafana-dashboards

View File

@ -1,10 +1,10 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-dashboard-providers
name: grafana-providers
namespace: monitoring
data:
dashboard-providers.yaml: |+
providers.yaml: |+
apiVersion: 1
providers:
- name: 'default'
@ -12,4 +12,4 @@ data:
folder: ''
type: file
options:
path: /var/lib/grafana/dashboards
path: /etc/grafana/dashboards