Skip to content

Conversation

@drew-viles
Copy link

Which problem is this PR solving?

As it stands, we can pass annotations down to the query service using spec.query.annotations but any labels reflected in the spec.query.labels field only get passed to the deployment. This feels like it may have just been an oversight and to be honest, it's something I actually need as I'm sure some others do.
For my purposes, I need to be able to filter services based on their labels and the labels need to be custom ones such as environment, service, region and more. A long story short, it's for application discovery when using Teleport. so I can ensure certain people can only see certain services.

Description of the changes

This change sets a new variable called labels which gets the original labels values of util.Labels(GetNameForQueryService(jaeger), "service-query", *jaeger)` set as the default.
It then checsk to see if any additional labels have been passed and merges them into the map.

How was this change tested?

  • I've run make test to ensure my tests work as expected.
  • I'm running it in my production server right now. I've built and image and pused it to my repo here. I've then used this image to launch the operator with and without custom labels and in both cases it has worked as expected.

With no custom label

image

With custom label

image

Checklist

Copy link
Member

@frzifus frzifus left a comment

Choose a reason for hiding this comment

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

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