Skip to content
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

Add OTEL config to Jaeger CR #1056

Merged
merged 7 commits into from
May 12, 2020

Conversation

pavolloffay
Copy link
Member

@pavolloffay pavolloffay commented May 8, 2020

Resolves #1004

Notes:

  • If the OTEL config is used with legacy Jaeger images it will cause errors - unknown flag.

A simple CR to test this PR. The collector should successfully deploy and it should use 14269 as HC port.

# setup an elasticsearch with `make es`
apiVersion: jaegertracing.io/v1
kind: Jaeger
metadata:
  name: simple-prod
spec:
  strategy: production
  collector:
    image: jaegertracing/jaeger-opentelemetry-collector:latest
    config:
      processors:
        queued_retry: {}
      extensions:
        health_check:
          port: 14269
      service:
        pipelines:
          traces:
            processors: [queued_retry]
  storage:
    type: elasticsearch
    options:
      es:
        server-urls: http://elasticsearch:9200

@codecov
Copy link

codecov bot commented May 8, 2020

Codecov Report

Merging #1056 into master will decrease coverage by 0.09%.
The diff coverage is 59.58%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1056      +/-   ##
==========================================
- Coverage   64.61%   64.51%   -0.10%     
==========================================
  Files          84       85       +1     
  Lines        6721     6860     +139     
==========================================
+ Hits         4343     4426      +83     
- Misses       2236     2277      +41     
- Partials      142      157      +15     
Impacted Files Coverage Δ
pkg/apis/jaegertracing/v1/jaeger_types.go 100.00% <ø> (ø)
pkg/apis/jaegertracing/v1/zz_generated.openapi.go 0.00% <0.00%> (ø)
pkg/strategy/all_in_one.go 90.69% <0.00%> (-4.43%) ⬇️
pkg/strategy/production.go 97.14% <0.00%> (-2.86%) ⬇️
pkg/strategy/streaming.go 96.96% <0.00%> (-1.50%) ⬇️
pkg/deployment/collector.go 96.77% <28.57%> (-3.23%) ⬇️
pkg/deployment/ingester.go 96.24% <28.57%> (-3.76%) ⬇️
pkg/deployment/agent.go 96.18% <50.00%> (-3.82%) ⬇️
pkg/inject/sidecar.go 94.17% <54.54%> (-2.47%) ⬇️
pkg/config/otelconfig/otelconfig.go 82.35% <82.35%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7b52f53...e4755b0. Read the comment docs.

pkg/config/otelconfig/otelconfig_test.go Show resolved Hide resolved
pkg/config/otelconfig/otelconfig.go Show resolved Hide resolved
expected: false,
opts: v1.NewOptions(map[string]interface{}{"config": "/etc/config.yaml"}),
},
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another like this, but with config - and expected: false.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what you mean. I have added some case, I think there are all the combinations now.

pkg/deployment/agent.go Outdated Show resolved Hide resolved
pkg/deployment/collector.go Show resolved Hide resolved
Copy link
Member Author

@pavolloffay pavolloffay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@objectiser could you please have a look again.

I have added the volumes and volume mounts to the agent from the common spec. Alternatively, we can only add the volumes and mounts for the otelconfig.

// ensure we have a consistent order of the arguments
// see https://github.com/jaegertracing/jaeger-operator/issues/334
sort.Strings(args)

dep.Spec.Template.Spec.Volumes = append(dep.Spec.Template.Spec.Volumes, commonSpec.Volumes...)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to add volumes to the pod spec and mounts to agent sidecar container

}},
Volumes: commonSpec.Volumes,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same as for sidecar, I had to add volumes and mounts to the agent container.

Copy link
Contributor

@objectiser objectiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - although e2e test failure needs checking.

Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
@pavolloffay
Copy link
Member Author

All tests passed, the coverage is red, however when I dig in into codecov UI I cannot find the uncovered lines.

@pavolloffay pavolloffay merged commit 911f3e6 into jaegertracing:master May 12, 2020
@romilpunetha
Copy link

@pavolloffay
Any documentation on what all key-values does config and service section accept?

@pavolloffay
Copy link
Member Author

It's OTEL config you can find it in https://github.com/open-telemetry/opentelemetry-collector

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Jaeger-OTEL collector in jaeger-operator
4 participants