Repository: kubernetes/ingress-nginx (go)

Issue:
Ingress v0.35.0 - Failed to load tracing library
<!--

Welcome to ingress-nginx!  For a smooth issue process, try to answer the following questions.
Don't worry if they're not all applicable; just try to include what you can :-)

If you need to include code snippets or logs, please put them in fenced code
blocks.  If they're super-long, please use the details tag like
<details><summary>super-long log</summary> lots of stuff </details>

-->

<!--

IMPORTANT!!!

Please complete the next sections or the issue will be closed.
This questions are the first thing we need to know to understand the context.

-->

**NGINX Ingress controller version**: v0.35.0

**Kubernetes version** (use `kubectl version`):v1.16.2

**Environment**:

- **Cloud provider or hardware configuration**:
- **OS** (e.g. from /etc/os-release):
- **Kernel** (e.g. `uname -a`):
- **Install tools**:
- **Others**:

**What happened**:
I have ingress controller installed via helm chart 2.13.0 with enabled opentracing and with sidecars jaeger opentracing agent
In ingress configmap:
```
  enable-opentracing: "true"
  jaeger-collector-host: localhost
  jaeger-service-name: nginx-ingress
```
In my ingress pod i have this /etc/nginx/opentracing.json:
```
{
  "service_name": "nginx-ingress",
  "sampler": {
	"type": "const",
	"param": 1,
	"samplingServerURL": "http://127.0.0.1:5778/sampling"
  },
  "reporter": {
	"localAgentHostPort": "localhost:6831"
  },
  "headers": {
	"TraceContextHeaderName": "",
	"jaegerDebugHeader": "",
	"jaegerBaggageHeader": "",
	"traceBaggageHeaderPrefix": ""
  },
}
```
I have updated ingress from v0.34.1 to v0.35.0 and now i have a crashed ingress with this error:
```
E0831 15:10:37.993504       8 controller.go:153] Unexpected failure reloading the backend:

-------------------------------------------------------------------------------
Error: exit status 1
2020/08/31 15:10:37 [error] 57#57: Failed to load tracing library /usr/local/lib/libjaegertracing_plugin.so: Error relocating /usr/local/lib/libjaegertracing_plugin.so: _ZN4YAML6detail9node_data12empty_scalarB5cxx11E: symbol not found
nginx: [error] Failed to load tracing library /usr/local/lib/libjaegertracing_plugin.so: Error relocating /usr/local/lib/libjaegertracing_plugin.so: _ZN4YAML6detail9node_data12empty_scalarB5cxx11E: symbol not found
nginx: configuration file /tmp/nginx-cfg335013150 test failed

-------------------------------------------------------------------------------
W0831 15:10:37.993534       8 queue.go:130] requeuing clustersecret/cluster.local-nfs-provisioner-nfs-client-provisioner, err
-------------------------------------------------------------------------------
Error: exit status 1
2020/08/31 15:10:37 [error] 57#57: Failed to load tracing library /usr/local/lib/libjaegertracing_plugin.so: Error relocating /usr/local/lib/libjaegertracing_plugin.so: _ZN4YAML6detail9node_data12empty_scalarB5cxx11E: symbol not found
nginx: [error] Failed to load tracing library /usr/local/lib/libjaegertracing_plugin.so: Error relocating /usr/local/lib/libjaegertracing_plugin.so: _ZN4YAML6detail9node_data12empty_scalarB5cxx11E: symbol not found
nginx: configuration file /tmp/nginx-cfg335013150 test failed
```
conf file 
[nginx-cfg335013150.txt](https://github.com/kubernetes/ingress-nginx/files/5151130/nginx-cfg335013150.txt)


<!-- (please include exact error messages if you can) -->

**What you expected to happen**:

working ingress

<!-- What do you think went wrong? -->

**How to reproduce it**:
<!---

As minimally and precisely as possible. Keep in mind we do not have access to your cluster or application.
Help up us (if possible) reproducing the issue using minikube or kind.

## Install minikube/kind

- Minikube https://minikube.sigs.k8s.io/docs/start/
- Kind https://kind.sigs.k8s.io/docs/user/quick-start/

## Install the ingress controller

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/baremetal/deploy.yaml

## Install an application that will act as default backend (is just an echo app)

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/http-svc.yaml

## Create an ingress (please add any additional annotation required)

echo "
  apiVersion: networking.k8s.io/v1beta1
  kind: Ingress
  metadata:
    name: foo-bar
  spec:
    rules:
    - host: foo.bar
      http:
        paths:
        - backend:
            serviceName: http-svc
            servicePort: 80
          path: /
" | kubectl apply -f -

## make a request

POD_NAME=$(k get pods -n ingress-nginx -l app.kubernetes.io/name=ingress-nginx -o NAME)
kubectl exec -it -n ingress-nginx $POD_NAME -- curl -H 'Host: foo.bar' localhost

--->

install ingress-nginx with configmap:
```
apiVersion: v1
data:
  client-body-buffer-size: 32k
  client-header-buffer-size: 256k
  enable-opentracing: "true"
  http-snippet: proxy_cache_path /tmp/nginx-cache-mp4 levels=1:2 keys_zone=mp4:50m
    max_size=256m inactive=30m use_temp_path=off;
  jaeger-collector-host: localhost
  jaeger-service-name: nginx-ingress
  large-client-header-buffers: 4 256k
  log-format-escape-json: "true"
  log-format-upstream: '{"time":"$time_iso8601","proxy_protocol_addr":"$proxy_protocol_addr","remote_addr":"$remote_addr","x-forward-for":"$proxy_add_x_forwarded_for","request_id":"$req_id","request":"$request","remote_user":"$remote_user","bytes_sent":"$bytes_sent","body_bytes_sent":"$body_bytes_sent","request_time":"$request_time","status":"$status","vhost":"$host","request_proto":"$server_protocol","path":"$uri","request_query":"$args","request_length":"$request_length","method":"$request_method","http_referrer":"$http_referer","http_user_agent":"$http_user_agent","upstream":"$proxy_upstream_name","upstream_ip":"$upstream_addr","upstream_latency":"$upstream_response_time","upstream_status":"$upstream_status"}'
  proxy-set-headers: ingress-nginx/ingress-ingress-nginx-custom-proxy-headers
  ssl-ciphers: ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA
  ssl-protocols: TLSv1 TLSv1.1 TLSv1.2
kind: ConfigMap
metadata:
  creationTimestamp: "2020-08-31T15:07:52Z"
  labels:
    app.kubernetes.io/component: controller
    app.kubernetes.io/instance: ingress
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: ingress-nginx
    app.kubernetes.io/version: 0.35.0
    helm.sh/chart: ingress-nginx-2.13.0
  name: ingress-ingress-nginx-controller
  namespace: ingress-nginx
```

**Anything else we need to know**:

<!-- If this is actually about documentation, add `/kind documentation` below -->

/kind bug


Pull request description:
Add e2e tests to verify opentracing libraries
<!--- Provide a general summary of your changes in the Title above --->
<!--- Please don't @-mention people in PR or commit messages (do so in an additional comment). --->

## What this PR does / why we need it:
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Which issue/s this PR fixes

fixes #6103

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I've read the [CONTRIBUTION](https://github.com/kubernetes/ingress-nginx/blob/master/CONTRIBUTING.md) guide
- [x] I have added tests to cover my changes.
- [ ] All new and existing tests passed.


Patch:
diff --git a/Makefile b/Makefile
index 8259e6194..9d9bb8ac9 100644
--- a/Makefile
+++ b/Makefile
@@ -51,7 +51,7 @@ endif
 
 REGISTRY ?= gcr.io/k8s-staging-ingress-nginx
 
-BASE_IMAGE ?= k8s.gcr.io/ingress-nginx/nginx:v20200812-g0673e5e17@sha256:3bafc6840f2477c05eb029580fa8ecf4bd33b0f0765e3cd9cc82ad91f817ccf3
+BASE_IMAGE ?= k8s.gcr.io/ingress-nginx/nginx:v20200903-g333288e75@sha256:ef38aa45e7ae82b311f3287e53c4e0b3f1c000b6394ffe5cdb74d25aa149c567
 
 GOARCH=$(ARCH)
 
diff --git a/build/run-in-docker.sh b/build/run-in-docker.sh
index 643f7ef16..0662f2fe8 100755
--- a/build/run-in-docker.sh
+++ b/build/run-in-docker.sh
@@ -34,7 +34,7 @@ function cleanup {
 }
 trap cleanup EXIT
 
-E2E_IMAGE=${E2E_IMAGE:-k8s.gcr.io/ingress-nginx/e2e-test-runner:v20200902-gf3d80b2c2@sha256:ff2936f75777c436f81181b5da717ea8f82e64ddd0634296ec864389d2e30dca}
+E2E_IMAGE=${E2E_IMAGE:-k8s.gcr.io/ingress-nginx/e2e-test-runner:v20200904-gc2884a3da@sha256:f2de204dafb3951b974a53f7a4e9cc43b62b93c99b95edcb7a65afdc1d4f0bf4}
 
 DOCKER_OPTS=${DOCKER_OPTS:-}
 DOCKER_IN_DOCKER_ENABLED=${DOCKER_IN_DOCKER_ENABLED:-}
diff --git a/docs/deploy/index.md b/docs/deploy/index.md
index 2cc2d9d10..d2dba3084 100644
--- a/docs/deploy/index.md
+++ b/docs/deploy/index.md
@@ -17,7 +17,7 @@
     The first time the ingress controller starts, two [Jobs](https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/) create the SSL Certificate used by the admission webhook.
     For this reason, there is an initial delay of up to two minutes until it is possible to create and validate Ingress definitions.
 
-    You can wait until is ready to running the next command:
+    You can wait until it is ready to run the next command:
 
     ```yaml
     kubectl wait --namespace ingress-nginx \
@@ -100,13 +100,13 @@ kubectl apply -f deploy-tls-termination.yaml
 
 ##### NLB Idle Timeouts
 
-Idle timeout values for TCP flows is 350 seconds and [cannot be modified](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#connection-idle-timeout).
+Idle timeout value for TCP flows is 350 seconds and [cannot be modified](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#connection-idle-timeout).
 
-For this reason, you need to ensure the [keepalive_timeout](http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout) configured value is less than 350 seconds to work as expected.
+For this reason, you need to ensure the [keepalive_timeout](http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout) value is configured less than 350 seconds to work as expected.
 
 By default NGINX `keepalive_timeout` is set to `75s`.
 
-More information with regards to timeouts for can be found in the [official AWS documentation](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#connection-idle-timeout)
+More information with regards to timeouts can be found in the [official AWS documentation](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#connection-idle-timeout)
 
 #### GCE-GKE
 
@@ -119,7 +119,7 @@ More information with regards to timeouts for can be found in the [official AWS
     ```
 
 !!! danger
-    For private clusters, you will need to either add an additional firewall rule that allows master nodes access port `8443/tcp` on worker nodes, or change the existing rule that allows access to ports `80/tcp`, `443/tcp` and `10254/tcp` to also allow access to port `8443/tcp`.
+    For private clusters, you will need to either add an additional firewall rule that allows master nodes access to port `8443/tcp` on worker nodes, or change the existing rule that allows access to ports `80/tcp`, `443/tcp` and `10254/tcp` to also allow access to port `8443/tcp`.
 
     See the [GKE documentation](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#add_firewall_rules) on adding rules and the [Kubernetes issue](https://github.com/kubernetes/kubernetes/issues/79739) for more detail.
 
diff --git a/internal/ingress/controller/template/template.go b/internal/ingress/controller/template/template.go
index 696447442..18da4f0f4 100644
--- a/internal/ingress/controller/template/template.go
+++ b/internal/ingress/controller/template/template.go
@@ -31,7 +31,6 @@ import (
 	"os/exec"
 	"reflect"
 	"regexp"
-	"runtime"
 	"sort"
 	"strings"
 	text_template "text/template"
@@ -956,16 +955,13 @@ func buildOpentracing(c interface{}, s interface{}) string {
 	}
 
 	buf := bytes.NewBufferString("")
-	if cfg.ZipkinCollectorHost != "" {
-		buf.WriteString("opentracing_load_tracer /usr/local/lib/libzipkin_opentracing.so /etc/nginx/opentracing.json;")
-	} else if cfg.JaegerCollectorHost != "" {
-		if runtime.GOARCH == "arm" {
-			buf.WriteString("# Jaeger tracer is not available for ARM https://github.com/jaegertracing/jaeger-client-cpp/issues/151")
-		} else {
-			buf.WriteString("opentracing_load_tracer /usr/local/lib/libjaegertracing_plugin.so /etc/nginx/opentracing.json;")
-		}
-	} else if cfg.DatadogCollectorHost != "" {
+
+	if cfg.DatadogCollectorHost != "" {
 		buf.WriteString("opentracing_load_tracer /usr/local/lib64/libdd_opentracing.so /etc/nginx/opentracing.json;")
+	} else if cfg.ZipkinCollectorHost != "" {
+		buf.WriteString("opentracing_load_tracer /usr/local/lib/libzipkin_opentracing_plugin.so /etc/nginx/opentracing.json;")
+	} else if cfg.JaegerCollectorHost != "" {
+		buf.WriteString("opentracing_load_tracer /usr/local/lib/libjaegertracing_plugin.so /etc/nginx/opentracing.json;")
 	}
 
 	buf.WriteString("\r\n")


Test patch:
diff --git a/images/test-runner/Makefile b/images/test-runner/Makefile
index 3fbc99d24..e76a76608 100644
--- a/images/test-runner/Makefile
+++ b/images/test-runner/Makefile
@@ -36,7 +36,7 @@ build: ensure-buildx
 		--platform=${PLATFORMS} $(OUTPUT) \
 		--progress=$(PROGRESS) \
 		--pull \
-		--build-arg BASE_IMAGE=k8s.gcr.io/ingress-nginx/nginx:v20200812-g0673e5e17@sha256:3bafc6840f2477c05eb029580fa8ecf4bd33b0f0765e3cd9cc82ad91f817ccf3 \
+		--build-arg BASE_IMAGE=k8s.gcr.io/ingress-nginx/nginx:v20200903-g333288e75@sha256:ef38aa45e7ae82b311f3287e53c4e0b3f1c000b6394ffe5cdb74d25aa149c567 \
 		--build-arg GOLANG_VERSION=1.15.1 \
 		--build-arg ETCD_VERSION=3.4.3-0 \
 		--build-arg K8S_RELEASE=v1.18.6 \
diff --git a/internal/ingress/controller/template/template_test.go b/internal/ingress/controller/template/template_test.go
index 488636653..b5c85c1ec 100644
--- a/internal/ingress/controller/template/template_test.go
+++ b/internal/ingress/controller/template/template_test.go
@@ -1175,7 +1175,7 @@ func TestBuildOpenTracing(t *testing.T) {
 		EnableOpentracing:   true,
 		ZipkinCollectorHost: "zipkin-host.com",
 	}
-	expected = "opentracing_load_tracer /usr/local/lib/libzipkin_opentracing.so /etc/nginx/opentracing.json;\r\n"
+	expected = "opentracing_load_tracer /usr/local/lib/libzipkin_opentracing_plugin.so /etc/nginx/opentracing.json;\r\n"
 	actual = buildOpentracing(cfgZipkin, []*ingress.Server{})
 
 	if expected != actual {
diff --git a/test/e2e-image/Dockerfile b/test/e2e-image/Dockerfile
index 816ce58f4..5aacd7b3e 100644
--- a/test/e2e-image/Dockerfile
+++ b/test/e2e-image/Dockerfile
@@ -1,4 +1,4 @@
-FROM k8s.gcr.io/ingress-nginx/e2e-test-runner:v20200902-gf3d80b2c2@sha256:ff2936f75777c436f81181b5da717ea8f82e64ddd0634296ec864389d2e30dca AS BASE
+FROM k8s.gcr.io/ingress-nginx/e2e-test-runner:v20200904-gc2884a3da@sha256:f2de204dafb3951b974a53f7a4e9cc43b62b93c99b95edcb7a65afdc1d4f0bf4 AS BASE
 
 FROM alpine:3.12
 
diff --git a/test/e2e/settings/opentracing.go b/test/e2e/settings/opentracing.go
index 7367ccdbb..923010294 100644
--- a/test/e2e/settings/opentracing.go
+++ b/test/e2e/settings/opentracing.go
@@ -18,18 +18,30 @@ package settings
 
 import (
 	"strings"
+	"time"
 
 	"github.com/onsi/ginkgo"
+	"github.com/stretchr/testify/assert"
 
 	"k8s.io/ingress-nginx/test/e2e/framework"
 )
 
+const (
+	enableOpentracing = "enable-opentracing"
+
+	zipkinCollectorHost = "zipkin-collector-host"
+
+	jaegerCollectorHost = "jaeger-collector-host"
+	jaegerSamplerHost   = "jaeger-sampler-host"
+
+	datadogCollectorHost = "datadog-collector-host"
+
+	opentracingOperationName         = "opentracing-operation-name"
+	opentracingLocationOperationName = "opentracing-location-operation-name"
+)
+
 var _ = framework.IngressNginxDescribe("Configure OpenTracing", func() {
 	f := framework.NewDefaultFramework("enable-opentracing")
-	enableOpentracing := "enable-opentracing"
-	zipkinCollectorHost := "zipkin-collector-host"
-	opentracingOperationName := "opentracing-operation-name"
-	opentracingLocationOperationName := "opentracing-location-operation-name"
 
 	ginkgo.BeforeEach(func() {
 		f.NewEchoDeployment()
@@ -39,7 +51,9 @@ var _ = framework.IngressNginxDescribe("Configure OpenTracing", func() {
 	})
 
 	ginkgo.It("should not exists opentracing directive", func() {
-		f.UpdateNginxConfigMapData(enableOpentracing, "false")
+		config := map[string]string{}
+		config[enableOpentracing] = "false"
+		f.SetNginxConfigMapData(config)
 
 		f.EnsureIngress(framework.NewSingleIngress(enableOpentracing, "/", enableOpentracing, f.Namespace, "http-svc", 80, nil))
 
@@ -50,8 +64,10 @@ var _ = framework.IngressNginxDescribe("Configure OpenTracing", func() {
 	})
 
 	ginkgo.It("should exists opentracing directive when is enabled", func() {
-		f.UpdateNginxConfigMapData(enableOpentracing, "true")
-		f.UpdateNginxConfigMapData(zipkinCollectorHost, "127.0.0.1")
+		config := map[string]string{}
+		config[enableOpentracing] = "true"
+		config[zipkinCollectorHost] = "127.0.0.1"
+		f.SetNginxConfigMapData(config)
 
 		f.EnsureIngress(framework.NewSingleIngress(enableOpentracing, "/", enableOpentracing, f.Namespace, "http-svc", 80, nil))
 
@@ -62,9 +78,11 @@ var _ = framework.IngressNginxDescribe("Configure OpenTracing", func() {
 	})
 
 	ginkgo.It("should not exists opentracing_operation_name directive when is empty", func() {
-		f.UpdateNginxConfigMapData(enableOpentracing, "true")
-		f.UpdateNginxConfigMapData(zipkinCollectorHost, "127.0.0.1")
-		f.UpdateNginxConfigMapData(opentracingOperationName, "")
+		config := map[string]string{}
+		config[enableOpentracing] = "true"
+		config[zipkinCollectorHost] = "127.0.0.1"
+		config[opentracingOperationName] = ""
+		f.SetNginxConfigMapData(config)
 
 		f.EnsureIngress(framework.NewSingleIngress(enableOpentracing, "/", enableOpentracing, f.Namespace, "http-svc", 80, nil))
 
@@ -75,22 +93,26 @@ var _ = framework.IngressNginxDescribe("Configure OpenTracing", func() {
 	})
 
 	ginkgo.It("should exists opentracing_operation_name directive when is configured", func() {
-		f.UpdateNginxConfigMapData(enableOpentracing, "true")
-		f.UpdateNginxConfigMapData(zipkinCollectorHost, "127.0.0.1")
-		f.UpdateNginxConfigMapData(opentracingOperationName, "HTTP $request_method $uri")
+		config := map[string]string{}
+		config[enableOpentracing] = "true"
+		config[zipkinCollectorHost] = "127.0.0.1"
+		config[opentracingOperationName] = "HTTP $request_method $uri"
+		f.SetNginxConfigMapData(config)
 
 		f.EnsureIngress(framework.NewSingleIngress(enableOpentracing, "/", enableOpentracing, f.Namespace, "http-svc", 80, nil))
 
 		f.WaitForNginxConfiguration(
 			func(cfg string) bool {
-				return strings.Contains(cfg, "opentracing_operation_name \"HTTP $request_method $uri\"")
+				return strings.Contains(cfg, `opentracing_operation_name "HTTP $request_method $uri"`)
 			})
 	})
 
 	ginkgo.It("should not exists opentracing_location_operation_name directive when is empty", func() {
-		f.UpdateNginxConfigMapData(enableOpentracing, "true")
-		f.UpdateNginxConfigMapData(zipkinCollectorHost, "127.0.0.1")
-		f.UpdateNginxConfigMapData(opentracingLocationOperationName, "")
+		config := map[string]string{}
+		config[enableOpentracing] = "true"
+		config[zipkinCollectorHost] = "127.0.0.1"
+		config[opentracingLocationOperationName] = ""
+		f.SetNginxConfigMapData(config)
 
 		f.EnsureIngress(framework.NewSingleIngress(enableOpentracing, "/", enableOpentracing, f.Namespace, "http-svc", 80, nil))
 
@@ -101,9 +123,11 @@ var _ = framework.IngressNginxDescribe("Configure OpenTracing", func() {
 	})
 
 	ginkgo.It("should exists opentracing_location_operation_name directive when is configured", func() {
-		f.UpdateNginxConfigMapData(enableOpentracing, "true")
-		f.UpdateNginxConfigMapData(zipkinCollectorHost, "127.0.0.1")
-		f.UpdateNginxConfigMapData(opentracingLocationOperationName, "HTTP $request_method $uri")
+		config := map[string]string{}
+		config[enableOpentracing] = "true"
+		config[zipkinCollectorHost] = "127.0.0.1"
+		config[opentracingLocationOperationName] = "HTTP $request_method $uri"
+		f.SetNginxConfigMapData(config)
 
 		f.EnsureIngress(framework.NewSingleIngress(enableOpentracing, "/", enableOpentracing, f.Namespace, "http-svc", 80, nil))
 
@@ -112,4 +136,53 @@ var _ = framework.IngressNginxDescribe("Configure OpenTracing", func() {
 				return strings.Contains(cfg, "opentracing_location_operation_name \"HTTP $request_method $uri\"")
 			})
 	})
+
+	ginkgo.It("should enable opentracing using zipkin", func() {
+		config := map[string]string{}
+		config[enableOpentracing] = "true"
+		config[zipkinCollectorHost] = "127.0.0.1"
+		f.SetNginxConfigMapData(config)
+
+		framework.Sleep(10 * time.Second)
+		log, err := f.NginxLogs()
+		assert.Nil(ginkgo.GinkgoT(), err, "obtaining nginx logs")
+		assert.NotContains(ginkgo.GinkgoT(), log, "Unexpected failure reloading the backend", "reloading nginx after a configmap change")
+	})
+
+	ginkgo.It("should enable opentracing using jaeger", func() {
+		config := map[string]string{}
+		config[enableOpentracing] = "true"
+		config[jaegerCollectorHost] = "127.0.0.1"
+		f.SetNginxConfigMapData(config)
+
+		framework.Sleep(10 * time.Second)
+		log, err := f.NginxLogs()
+		assert.Nil(ginkgo.GinkgoT(), err, "obtaining nginx logs")
+		assert.NotContains(ginkgo.GinkgoT(), log, "Unexpected failure reloading the backend", "reloading nginx after a configmap change")
+	})
+
+	ginkgo.It("should enable opentracing using jaeger with sampler host", func() {
+		config := map[string]string{}
+		config[enableOpentracing] = "true"
+		config[jaegerCollectorHost] = "127.0.0.1"
+		config[jaegerSamplerHost] = "127.0.0.1"
+		f.SetNginxConfigMapData(config)
+
+		framework.Sleep(10 * time.Second)
+		log, err := f.NginxLogs()
+		assert.Nil(ginkgo.GinkgoT(), err, "obtaining nginx logs")
+		assert.NotContains(ginkgo.GinkgoT(), log, "Unexpected failure reloading the backend", "reloading nginx after a configmap change")
+	})
+
+	ginkgo.It("should enable opentracing using datadog", func() {
+		config := map[string]string{}
+		config[enableOpentracing] = "true"
+		config[datadogCollectorHost] = "http://127.0.0.1"
+		f.SetNginxConfigMapData(config)
+
+		framework.Sleep(10 * time.Second)
+		log, err := f.NginxLogs()
+		assert.Nil(ginkgo.GinkgoT(), err, "obtaining nginx logs")
+		assert.NotContains(ginkgo.GinkgoT(), log, "Unexpected failure reloading the backend", "reloading nginx after a configmap change")
+	})
 })