-
Notifications
You must be signed in to change notification settings - Fork 339
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 service annotations #1526
Add service annotations #1526
Conversation
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.
I didn't alter the jaeger's type , just use the Annotation field. Before, it's just use to the component deployment, now I add the code to use it to the component service .
@@ -48,6 +48,7 @@ func collectorService(jaeger *v1.Jaeger, selector map[string]string) *corev1.Ser | |||
Name: GetNameForCollectorService(jaeger), | |||
Namespace: jaeger.Namespace, | |||
Labels: util.Labels(GetNameForCollectorService(jaeger), "service-collector", *jaeger), | |||
Annotations: jaeger.Spec.Collector.Annotations, |
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.
Add the Collector service Annotations
@@ -143,3 +143,13 @@ func TestCollectorServiceLoadBalancer(t *testing.T) { | |||
// Only the non-headless service will receive the type | |||
assert.Equal(t, svc[1].Spec.Type, corev1.ServiceTypeLoadBalancer) | |||
} | |||
func TestCollectorServiceAnnotations(t *testing.T) { |
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.
The test case of collector
pkg/service/query.go
Outdated
@@ -14,6 +14,9 @@ func NewQueryService(jaeger *v1.Jaeger, selector map[string]string) *corev1.Serv | |||
trueVar := true | |||
|
|||
annotations := map[string]string{} | |||
if jaeger.Spec.Query.Annotations !=nil{ |
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.
Add the Query service Annotations
@@ -109,3 +109,20 @@ func TestQueryServiceSpecifiedNodePortWithIngress(t *testing.T) { | |||
assert.Equal(t, intstr.FromInt(16686), svc.Spec.Ports[0].TargetPort) | |||
assert.Equal(t, svc.Spec.Type, corev1.ServiceTypeNodePort) | |||
} | |||
|
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.
The test case of query
Signed-off-by: herbguo <herbguo@163.com>
@rubenvp8510 could you please take a look and review the PR. |
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.
Is that still a thing? if yes, @herbguo could you try to go fmt
your changes? Seems they are not formated.
Ahh the ci thing was also failing. calling |
Signed-off-by: herbguo <herbguo@gmail.com>
I have performed the fix operation, waiting for the review. |
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.
LGTM, @rubenvp8510 can we go ahead?
Codecov Report
@@ Coverage Diff @@
## main #1526 +/- ##
=======================================
Coverage 88.21% 88.21%
=======================================
Files 100 100
Lines 6372 6375 +3
=======================================
+ Hits 5621 5624 +3
Misses 553 553
Partials 198 198
Continue to review full report at Codecov.
|
Which problem is this PR solving?
When I use the jaeger operator, I need to add the annotations of the jaeger-query or jaeger-collector service. But the jaeger-operator do not supply the function. So I alter the code to supply this.
Short description of the changes
For the issue
Closes #1534
Closes #1096