-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(kuma-cp) Generate tracing config in Bootstrap config #592
Conversation
ed8d010
to
cd4c738
Compare
96c2eff
to
11fdf80
Compare
if zipkin.ApiVersion != "" && zipkin.ApiVersion != "httpJson" && zipkin.ApiVersion != "httpProto" { | ||
verr.AddViolation("apiVersion", `has to be either "httpJson" or "httpProto"`) | ||
if zipkin.ApiVersion != "" && zipkin.ApiVersion != "httpJsonV1" && zipkin.ApiVersion != "httpJson" && zipkin.ApiVersion != "httpProto" { | ||
verr.AddViolation("apiVersion", `has to be one of the following values: "httpJsonV1", "httpJson" or "httpProto"`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we reuse AllowedValuesHint()
?
if zipkin.ApiVersion != "" && zipkin.ApiVersion != "httpJson" && zipkin.ApiVersion != "httpProto" { | ||
verr.AddViolation("apiVersion", `has to be either "httpJson" or "httpProto"`) | ||
if zipkin.ApiVersion != "" && zipkin.ApiVersion != "httpJsonV1" && zipkin.ApiVersion != "httpJson" && zipkin.ApiVersion != "httpProto" { | ||
verr.AddViolation("apiVersion", `has to be one of the following values: "httpJsonV1", "httpJson" or "httpProto"`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we update docs for Zipkin
proto type to mention httpJsonV1
value as well ?
And probably describe the difference or reference Envoy docs ?
const zipkinClusterTimeout = 10 * time.Second | ||
|
||
func zipkinCluster(backendName string, url *net_url.URL) (*envoy_api.Cluster, error) { | ||
port, err := strconv.Atoi(url.Port()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will result in the error if URL has no port.
If the port is absolutely mandatory, should we update Mesh
validator then ?
ae11c40
to
910a126
Compare
11fdf80
to
2ed5a5c
Compare
Summary
Generate tracing config in Bootstrap config.
When we generate snapshot, we do traffic trace matching and get proper backend from the mesh. Then we convert this to bootstrap config.
Note: There is some bug in Envoy - Zipkin V2 version of the API is not compatible with Jaeger, because timestamp field in JSON is string and Jeager expects int64 there. We can look for it as a separate task and just use V1 for now which works fine.