diff --git a/cluster/addons/fluentd-gcp/event-exporter.yaml b/cluster/addons/fluentd-gcp/event-exporter.yaml index 527994ae3a1..538a872fbb9 100644 --- a/cluster/addons/fluentd-gcp/event-exporter.yaml +++ b/cluster/addons/fluentd-gcp/event-exporter.yaml @@ -49,7 +49,8 @@ spec: - name: event-exporter image: k8s.gcr.io/event-exporter:v0.1.8 command: - - '/event-exporter' + - /event-exporter + - -sink-opts="-location={{ event_exporter_zone }}" # BEGIN_PROMETHEUS_TO_SD - name: prometheus-to-sd-exporter image: k8s.gcr.io/prometheus-to-sd:v0.2.4 diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index 5c200490d6e..677c1bc8568 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -2080,6 +2080,11 @@ function update-prometheus-to-sd-parameters { fi } +# Updates parameters in yaml file for event-exporter configuration +function update-event-exporter { + sed -i -e "s@{{ *event_exporter_zone *}}@${ZONE:-}@g" "$1" +} + # Sets up the manifests of coreDNS for k8s addons. function setup-coredns-manifest { local -r coredns_file="${dst_dir}/dns/coredns.yaml" @@ -2229,6 +2234,7 @@ EOF local -r event_exporter_yaml="${dst_dir}/fluentd-gcp/event-exporter.yaml" local -r fluentd_gcp_yaml="${dst_dir}/fluentd-gcp/fluentd-gcp-ds.yaml" local -r fluentd_gcp_configmap_yaml="${dst_dir}/fluentd-gcp/fluentd-gcp-configmap.yaml" + update-event-exporter ${event_exporter_yaml} update-prometheus-to-sd-parameters ${event_exporter_yaml} update-prometheus-to-sd-parameters ${fluentd_gcp_yaml} start-fluentd-resource-update ${fluentd_gcp_yaml} diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index a04662bbbf5..c462c7895c7 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -621,6 +621,7 @@ CONTAINER_RUNTIME_ENDPOINT: $(yaml-quote ${CONTAINER_RUNTIME_ENDPOINT:-}) CONTAINER_RUNTIME_NAME: $(yaml-quote ${CONTAINER_RUNTIME_NAME:-}) NODE_LOCAL_SSDS_EXT: $(yaml-quote ${NODE_LOCAL_SSDS_EXT:-}) LOAD_IMAGE_COMMAND: $(yaml-quote ${LOAD_IMAGE_COMMAND:-}) +ZONE: $(yaml-quote ${ZONE}) EOF if [ -n "${KUBELET_PORT:-}" ]; then cat >>$file <>$file <