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