configmap: option to not trust incoming tracing spans (#7045)
* validate the sender of tracing spans * add location-specific setting
This commit is contained in:
parent
e4001df41e
commit
7d5452d00b
9 changed files with 124 additions and 34 deletions
|
|
@ -29,7 +29,8 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
enableOpentracing = "enable-opentracing"
|
||||
enableOpentracing = "enable-opentracing"
|
||||
opentracingTrustIncomingSpan = "opentracing-trust-incoming-span"
|
||||
|
||||
zipkinCollectorHost = "zipkin-collector-host"
|
||||
|
||||
|
|
@ -81,6 +82,21 @@ var _ = framework.IngressNginxDescribe("Configure OpenTracing", func() {
|
|||
})
|
||||
})
|
||||
|
||||
ginkgo.It("should include opentracing_trust_incoming_span off directive when disabled", func() {
|
||||
config := map[string]string{}
|
||||
config[enableOpentracing] = "true"
|
||||
config[opentracingTrustIncomingSpan] = "false"
|
||||
config[zipkinCollectorHost] = "127.0.0.1"
|
||||
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_trust_incoming_span off")
|
||||
})
|
||||
})
|
||||
|
||||
ginkgo.It("should not exists opentracing_operation_name directive when is empty", func() {
|
||||
config := map[string]string{}
|
||||
config[enableOpentracing] = "true"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue