From 85d17422839841eccec37e6accd93f766e13de3d Mon Sep 17 00:00:00 2001 From: Mike Bryant Date: Thu, 5 Jul 2018 14:01:52 +0100 Subject: [PATCH] fix: Use the correct opentracing plugin for Jaeger Part of #2738 --- images/nginx/Makefile | 2 +- images/nginx/build.sh | 14 +++++++++++--- internal/ingress/controller/template/template.go | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/images/nginx/Makefile b/images/nginx/Makefile index 41035f6e1..b0b83db0f 100644 --- a/images/nginx/Makefile +++ b/images/nginx/Makefile @@ -13,7 +13,7 @@ # limitations under the License. # 0.0.0 shouldn't clobber any released builds -TAG ?= 0.53 +TAG ?= 0.54 REGISTRY ?= quay.io/kubernetes-ingress-controller ARCH ?= $(shell go env GOARCH) DOCKER ?= docker diff --git a/images/nginx/build.sh b/images/nginx/build.sh index 8d98cfb48..df3239eea 100755 --- a/images/nginx/build.sh +++ b/images/nginx/build.sh @@ -283,14 +283,22 @@ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF .. make make install -# build zipkin lib +# build jaeger lib cd "$BUILD_PATH/jaeger-client-cpp-$JAEGER_VERSION" sed -i 's/-Werror//' CMakeLists.txt mkdir .build cd .build -cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 -DBUILD_TESTING=OFF -DJAEGERTRACING_WITH_YAML_CPP=OFF -DJAEGERTRACING_BUILD_EXAMPLES=OFF .. +# Taken from https://github.com/jaegertracing/jaeger-client-cpp/blob/v0.4.1/scripts/build-plugin.sh +cat < export.map +{ + global: + OpenTracingMakeTracerFactory; + local: *; +}; +EOF +cmake -DCMAKE_BUILD_TYPE=Release -DJAEGERTRACING_PLUGIN=ON -DBUILD_TESTING=OFF -DJAEGERTRACING_BUILD_EXAMPLES=OFF -DHUNTER_CONFIGURATION_TYPES=Release .. make -make install +mv libjaegertracing_plugin.so /usr/local/lib/libjaegertracing_plugin.so export HUNTER_INSTALL_DIR=$(cat _3rdParty/Hunter/install-root-dir) echo "HUNTER_INSTALL_DIR: ${HUNTER_INSTALL_DIR}" diff --git a/internal/ingress/controller/template/template.go b/internal/ingress/controller/template/template.go index b4babf9e3..1e69a0077 100644 --- a/internal/ingress/controller/template/template.go +++ b/internal/ingress/controller/template/template.go @@ -855,7 +855,7 @@ func buildOpentracing(input interface{}) string { if cfg.ZipkinCollectorHost != "" { buf.WriteString("opentracing_load_tracer /usr/local/lib/libzipkin_opentracing.so /etc/nginx/opentracing.json;") } else if cfg.JaegerCollectorHost != "" { - buf.WriteString("opentracing_load_tracer /usr/local/lib/libjaegertracing.so /etc/nginx/opentracing.json;") + buf.WriteString("opentracing_load_tracer /usr/local/lib/libjaegertracing_plugin.so /etc/nginx/opentracing.json;") } buf.WriteString("\r\n")