Skip to content

Commit

Permalink
Merge pull request #581 from minrk/grafana-5
Browse files Browse the repository at this point in the history
[WIP] update prometheus, grafana charts
  • Loading branch information
minrk authored May 4, 2018
2 parents 950d4b0 + a2d2427 commit 92e4c46
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 83 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ before_deploy:
- |
# Stage 3, Step 2: Verify staging works
travis_retry py.test -n 2 --binder-url=https://staging.mybinder.org --hub-url=https://hub.staging.mybinder.org
- exit 0 # FIXME: abort before deploying to prod
- |
# Stage 4, Step 1: Post message to Grafana that deployment to production has started
source secrets/grafana-api-key
Expand Down
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 @@ -164,53 +164,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 92e4c46

Please sign in to comment.