Browse Source

Merge pull request #8806 from mrsiano/bump_grafan

Bump grafana version
Vadim Rutkovsky 6 years ago
parent
commit
210311cfe5

+ 4 - 2
roles/openshift_grafana/defaults/main.yaml

@@ -1,6 +1,6 @@
 ---
 # We should probably use something more official here.
-openshift_grafana_image: "docker.io/mrsiano/grafana-ocp:latest"
+openshift_grafana_image: "docker.io/grafana/grafana:master"
 openshift_grafana_proxy_image: "{{ l2_os_logging_proxy_image }}"
 
 openshift_grafana_state: present
@@ -55,4 +55,6 @@ openshift_grafana_datasource_payload:
   withCredentials: false
   jsonData:
     tlsSkipVerify: true
-    token: satoken
+    httpHeaderName1: Authorization
+  secureJsonData:
+    httpHeaderValue1: Bearer

+ 1 - 1
roles/openshift_grafana/tasks/install_grafana.yaml

@@ -164,7 +164,7 @@
 
 - name: set facts
   set_fact:
-    payload_data: "{{ grafana_datasource_json | regex_replace('grafana_name', grafana_datasource_name ) | regex_replace('prometheus_url', prometheus_route.results[0].spec.host ) | regex_replace('satoken',  prometheus_sa_token.stdout ) }}"
+    payload_data: "{{ grafana_datasource_json | regex_replace('grafana_name', grafana_datasource_name ) | regex_replace('prometheus_url', prometheus_route.results[0].spec.host ) | regex_replace('Bearer',  'Bearer ' + prometheus_sa_token.stdout) }}"
     grafana_route: "https://{{ grafana_route.results[0].spec.host }}"
 
 - name: Add new datasource to grafana

+ 1 - 3
roles/openshift_grafana/templates/grafana.yml.j2

@@ -90,14 +90,12 @@ spec:
         volumeMounts:
         - mountPath: "/root/go/src/github.com/grafana/grafana/data"
           name: grafana-data
-        - mountPath: "/root/go/src/github.com/grafana/grafana/conf"
+        - mountPath: "/usr/share/grafana/conf"
           name: grafana-config
         - mountPath: /etc/tls/private
           name: grafana-tls-secret
         - mountPath: /etc/proxy/secrets
           name: grafana-proxy-secrets
-        command:
-         - "./bin/grafana-server"
 
       volumes:
       - name: grafana-config