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

Support deployment of agent as a DaemonSet #52

Merged
merged 1 commit into from
Oct 10, 2018

Conversation

jpkrohling
Copy link
Contributor

@jpkrohling jpkrohling commented Oct 9, 2018

This PR adds support for deploying the agent as DaemonSet.

Note that this PR includes an e2e test that makes use of the Docker image jaegertracing/vertx-create-span:operator-e2e-tests, whose source can be found here: https://gitlab.com/jpkroehling/vertx-create-span/blob/master/deployment.yaml . I'm not sure how to best proceed with those sources. A suggestion is to make a simple Go application that is similar to that vertx one and build it as part of this project's.

Closes #46
Signed-off-by: Juraci Paixão Kröhling [email protected]

@jpkrohling jpkrohling requested a review from objectiser October 9, 2018 13:01
@jpkrohling
Copy link
Contributor Author

This change is Reviewable

@codecov
Copy link

codecov bot commented Oct 9, 2018

Codecov Report

Merging #52 into master will increase coverage by 0.09%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #52      +/-   ##
==========================================
+ Coverage   99.17%   99.26%   +0.09%     
==========================================
  Files          16       16              
  Lines         603      684      +81     
==========================================
+ Hits          598      679      +81     
  Misses          5        5
Impacted Files Coverage Δ
pkg/deployment/query.go 100% <100%> (ø) ⬆️
pkg/deployment/all-in-one.go 100% <100%> (ø) ⬆️
pkg/controller/production.go 100% <100%> (ø) ⬆️
pkg/deployment/agent.go 100% <100%> (ø) ⬆️
pkg/controller/all-in-one.go 100% <100%> (ø) ⬆️
pkg/deployment/collector.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 d68e5de...895f552. Read the comment docs.

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.

Reviewable status: 0 of 17 files reviewed, 1 unresolved discussion (waiting on @jpkrohling and @objectiser)


pkg/deployment/all-in-one.go, line 125 at r1 (raw file):

								},
							},
							InitialDelaySeconds: 1,

Just curious why reducing to 1? Should this be a global config option on the CR?

@objectiser
Copy link
Contributor

objectiser commented Oct 9, 2018

@jpkrohling LGTM, but would probably be a good idea to get someone with more Go experience to review.

In terms of the test - it would be good if such a test could be available in a more general location so that it could be shared - but if no obvious place at the moment then I guess it could be placed in this repo for now.

Copy link
Contributor Author

@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: 0 of 17 files reviewed, 1 unresolved discussion (waiting on @jpkrohling)


pkg/deployment/all-in-one.go, line 125 at r1 (raw file):

Previously, objectiser (Gary Brown) wrote…

Just curious why reducing to 1? Should this be a global config option on the CR?

This is meant to reflect the startup time of the application. Jaeger is really fast to start, so, it would show up as "not ready yet" for 5 seconds, when it's really ready for some seconds already.

@jpkrohling jpkrohling force-pushed the 46-Agent-as-DaemonSet branch from 5a507fc to 3f277ed Compare October 10, 2018 07:52
@jpkrohling
Copy link
Contributor Author

but if no obvious place at the moment then I guess it could be placed in this repo for now.

I'll create an issue to create such test here in this repo as a temporary measure, but I would like to do that in a follow-up PR.

@jpkrohling
Copy link
Contributor Author

@objectiser said:

LGTM, but would probably be a good idea to get someone with more Go experience to review.

@pavolloffay , would you like to review this one?

{
ContainerPort: 5775,
HostPort: 5775,
Name: "zk-compact-trft",
Copy link
Member

Choose a reason for hiding this comment

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

Is this populated to k8s objects? If so I would like to see the full names I had to think that means zk-

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is, but unfortunately, there's a limit of 15 chars for this name. This is the best I could do with 15 chars while keeping it reasonably meaningful.

Copy link
Member

Choose a reason for hiding this comment

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

that is weird IIRC in resource files we were using full names

Copy link
Contributor Author

@jpkrohling jpkrohling Oct 10, 2018

Choose a reason for hiding this comment

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

For Container ports? Or for service names? For the ContainerPort object, this is what I see in Kubernetes docs:

If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.

Where IANA_SVC_NAME is:

at most 15 characters, matching regex a-z0-9* and it must containts at least one letter [a-z], hypens cannot be adjacent to other hyphens): e.g. "http"

Perhaps you are talking about the "name" directive for the "service" object? Those are DNS_LABELS, which can be longer.

Copy link
Member

Choose a reason for hiding this comment

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

@pavolloffay
Copy link
Member

the vertx app looks very simple I guess it only creates a span. We could have it here as a simple go service or even or job (no need for server).

@jpkrohling
Copy link
Contributor Author

We could have it here as a simple go service or even or job (no need for server).

Will be done as part of #57 . For now, I just used what I already had.

Signed-off-by: Juraci Paixão Kröhling <[email protected]>
@jpkrohling jpkrohling force-pushed the 46-Agent-as-DaemonSet branch from 3f277ed to 895f552 Compare October 10, 2018 12:09
@jpkrohling jpkrohling merged commit d5f8144 into jaegertracing:master Oct 10, 2018
dt-cloner bot pushed a commit to IshwarKanse/jaeger-operator that referenced this pull request Dec 18, 2024
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.

3 participants