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

Enable annotations to be specified with the deployable components #86

Merged
merged 2 commits into from
Nov 6, 2018
Merged

Enable annotations to be specified with the deployable components #86

merged 2 commits into from
Nov 6, 2018

Conversation

objectiser
Copy link
Contributor

Provides a more general way to define annotations, instead of specific approach used in #81.

Signed-off-by: Gary Brown [email protected]

@jpkrohling
Copy link
Contributor

This change is Reviewable

@objectiser
Copy link
Contributor Author

Was also going to add to ingress - but the code that creates the Ingress doesn't know whether it was called from all-in-one or query - so would not know which part of the supplied JaegerSpec to look at.

Think the ingress definition (spec) needs to be pulled out from the all-in-one and query and made a separate part of the spec, as it is independent on the deployment strategy used.

@codecov
Copy link

codecov bot commented Nov 5, 2018

Codecov Report

Merging #86 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #86      +/-   ##
==========================================
+ Coverage   99.34%   99.35%   +<.01%     
==========================================
  Files          18       18              
  Lines         769      777       +8     
==========================================
+ Hits          764      772       +8     
  Misses          5        5
Impacted Files Coverage Δ
pkg/deployment/query.go 100% <100%> (ø) ⬆️
pkg/deployment/all-in-one.go 100% <100%> (ø) ⬆️
pkg/deployment/collector.go 100% <100%> (ø) ⬆️
pkg/deployment/agent.go 100% <100%> (ø) ⬆️

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 ef89b39...92927b4. Read the comment docs.

Copy link
Contributor

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

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

LGTM. It can be merged as is, but I'd prefer to have one small change to the tests, where the test overrides an annotation that is implicitly added (like, prometheus.io/scrape).


assert.Equal(t, "false", ds.Spec.Template.Annotations["sidecar.istio.io/inject"])
assert.Equal(t, "false", dep.Spec.Template.ObjectMeta.Annotations["sidecar.istio.io/inject"])
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: ObjectMeta is embedded into the Template, you don't need to reference it explicitly.


assert.Equal(t, "false", ds.Spec.Template.Annotations["sidecar.istio.io/inject"])
assert.Equal(t, "false", dep.Spec.Template.ObjectMeta.Annotations["sidecar.istio.io/inject"])
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you also add a test where you override an annotation that we set implicitly, like prometheus.io/scrape? The code in this PR makes me believe that a user is able to set this to false, so, having a test that explicitly tests this behavior would also serve as documentation.

Copy link
Contributor

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

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

Reviewed 9 of 9 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jpkrohling)

Signed-off-by: Gary Brown <[email protected]>
Copy link
Contributor

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 4 files at r2.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jpkrohling)

Copy link
Contributor

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@jpkrohling jpkrohling merged commit ad7e99c into jaegertracing:master Nov 6, 2018
@objectiser objectiser deleted the annotations branch November 8, 2018 11:24
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.

2 participants