From 35038dc19a0d001e877d03a6a81f476b3f728d81 Mon Sep 17 00:00:00 2001 From: Jon Langemak Date: Sun, 22 Mar 2015 21:22:38 -0500 Subject: [PATCH] Added ES ENV variables so Kibana can be access in other ways --- .../fluentd-elasticsearch/kibana-controller.yaml | 5 +++++ .../kibana-image/run_kibana_nginx.sh | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/cluster/addons/fluentd-elasticsearch/kibana-controller.yaml b/cluster/addons/fluentd-elasticsearch/kibana-controller.yaml index 315df7a06d9cd..4ac54c643c6ee 100644 --- a/cluster/addons/fluentd-elasticsearch/kibana-controller.yaml +++ b/cluster/addons/fluentd-elasticsearch/kibana-controller.yaml @@ -13,6 +13,11 @@ desiredState: containers: - name: kibana-logging image: gcr.io/google_containers/kibana:1.1 + env: + - name: "ES_SCHEME" + value: "https" + - name: "ES_HOST" + value: "\"+window.location.hostname+\"/api/v1beta1/proxy/services/elasticsearch-logging" ports: - name: kibana-port containerPort: 80 diff --git a/cluster/addons/fluentd-elasticsearch/kibana-image/run_kibana_nginx.sh b/cluster/addons/fluentd-elasticsearch/kibana-image/run_kibana_nginx.sh index d66642507b82d..6c003603ebcb6 100755 --- a/cluster/addons/fluentd-elasticsearch/kibana-image/run_kibana_nginx.sh +++ b/cluster/addons/fluentd-elasticsearch/kibana-image/run_kibana_nginx.sh @@ -43,6 +43,11 @@ set -o errexit set -o nounset set -o pipefail +#Report all environment variables containing 'elasticsearch' and ES related +set | grep -i elasticsearch +set | grep -i ES_SCHEME +set | grep -i ES_HOST + cat << EOF > /usr/share/nginx/html/config.js /** @scratch /configuration/config.js/1 * @@ -75,11 +80,7 @@ function (Settings) { * +elasticsearch: {server: "http://localhost:9200", withCredentials: true}+ * */ - - - elasticsearch: "https://"+window.location.hostname+"/api/v1beta1/proxy/services/elasticsearch-logging", - - + elasticsearch: "${ES_SCHEME}://${ES_HOST}", /** @scratch /configuration/config.js/5 * * ==== default_route