Skip to content

Commit

Permalink
update prometheus, grafana charts
Browse files Browse the repository at this point in the history
latest grafana chart has easier management of configuration via yaml

rather than requiring all grafana.ini in a single scalar field
  • Loading branch information
minrk committed Apr 30, 2018
1 parent 66ec5fb commit 4b1939a
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 83 deletions.
53 changes: 32 additions & 21 deletions config/prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,32 @@ binderhub:
googleAnalyticsDomain: "mybinder.org"

grafana:
server:
resources:
requests:
cpu: "0.2"
memory: 512Mi
limits:
cpu: "0.2"
memory: 512Mi
ingress:
hosts:
- grafana.mybinder.org
tls:
- hosts:
- grafana.mybinder.org
secretName: kubelego-tls-grafana
resources:
requests:
cpu: "0.2"
memory: 512Mi
limits:
cpu: "0.2"
memory: 512Mi
ingress:
hosts:
- grafana.mybinder.org
tls:
- hosts:
- grafana.mybinder.org
secretName: kubelego-tls-grafana
datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: prometheus
orgId: 1
type: prometheus
url: https://prometheus.staging.mybinder.org
access: direct
isDefault: true
editable: false


prometheus:
server:
Expand All @@ -95,12 +106,12 @@ prometheus:
storageClass: ssd
retention: 60d
ingress:
hosts:
- prometheus.mybinder.org
tls:
- hosts:
- prometheus.mybinder.org
secretName: kubelego-tls-prometheus
hosts:
- prometheus.mybinder.org
tls:
- hosts:
- prometheus.mybinder.org
secretName: kubelego-tls-prometheus

nginx-ingress:
controller:
Expand Down
36 changes: 23 additions & 13 deletions config/staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,34 @@ binderhub:
- hub.staging.mybinder.org

grafana:
ingress:
hosts:
- grafana.staging.mybinder.org
tls:
- hosts:
- grafana.staging.mybinder.org
secretName: kubelego-tls-grafana
datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: prometheus
orgId: 1
type: prometheus
url: https://prometheus.staging.mybinder.org
access: direct
isDefault: true
editable: false

prometheus:
server:
ingress:
hosts:
- grafana.staging.mybinder.org
- prometheus.staging.mybinder.org
tls:
- hosts:
- grafana.staging.mybinder.org
secretName: kubelego-tls-grafana

prometheus:
server:
ingress:
hosts:
- prometheus.staging.mybinder.org
tls:
- hosts:
- prometheus.staging.mybinder.org
secretName: kubelego-tls-prometheus
- prometheus.staging.mybinder.org
secretName: kubelego-tls-prometheus

nginx-ingress:
controller:
Expand Down
5 changes: 2 additions & 3 deletions mybinder/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ dependencies:
version: 0.8.13
repository: https://kubernetes-charts.storage.googleapis.com
- name: prometheus
# Pin to 5.2.x until https://github.com/kubernetes/charts/pull/3546#issuecomment-367542705 is sorted
version: 5.2.1
version: 6.2.1
repository: https://kubernetes-charts.storage.googleapis.com
- name: grafana
version: 0.6.1
version: 1.2.0
repository: https://kubernetes-charts.storage.googleapis.com
- name: kube-lego
version: 0.1.12
Expand Down
62 changes: 16 additions & 46 deletions mybinder/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,53 +162,23 @@ kube-lego:
create: true

grafana:
server:
image: "minrk/grafana:4.6.3-pr142"
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: "true"
serverConfigFile:
grafana.ini: |
; instance_name = ${HOSTNAME}
[paths]
data = /var/lib/grafana/data
logs = /var/log/grafana
plugins = /var/lib/grafana/plugins
[snapshots]
external_enabled = true
external_snapshot_url = https://snapshots-origin.raintank.io
external_snapshot_name = Publish to snapshot.raintank.io
[users]
;allow_sign_up = true
;allow_org_create = true
;auto_assign_org = true
;auto_assign_org_role = Viewer
;login_hint = email or username
;default_theme = dark
[auth.anonymous]
enabled = true
org_name = Main Org.
org_role = Viewer
[log]
mode = console
level = info
[dashboards.json]
enabled = true
path = /var/lib/grafana/dashboards
[grafana_net]
url = https://grafana.net
[smtp]
enabled = true
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: "true"
persistence:
enabled: true
accessModes:
- ReadWriteOnce

grafana.ini:
auth.anonymous:
enabled: true
org_name: Main Org.
org_role: Viewer
smtp:
enabled: true

prometheus:
nodeExporter:
Expand Down
Binary file modified secrets/config/prod.yaml
Binary file not shown.
Binary file modified secrets/config/staging.yaml
Binary file not shown.

0 comments on commit 4b1939a

Please sign in to comment.