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

[tempo] bugfix: Service name is different from the Service name specified in … #3043

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tozastation
Copy link

#3042

Problem Detail:

  • StatefulSets resource defines serviceName as ${SERVICE_NAME}-headless
  • However service name is defined in ${SERVICE_NAME}.
  • So, name resolution with FQDN in Headless Service is not possible.

Resolution:

  • Assign a headless suffix to the Service resource name
  • or
  • Remove Headless prefix from Service Name in StatefulSet

Reference:

@CLAassistant
Copy link

CLAassistant commented Mar 26, 2024

CLA assistant check
All committers have signed the CLA.

@tozastation tozastation changed the title [WIP] bugfix: Service name is different from the Service name specified in … bugfix: Service name is different from the Service name specified in … Mar 26, 2024
Signed-off-by: tozastation <tozastation@gmail.com>
@tozastation
Copy link
Author

Comment: This is because Helm Values can be set even if the Service resource is not Headless.

@tozastation tozastation changed the title bugfix: Service name is different from the Service name specified in … [tempo] bugfix: Service name is different from the Service name specified in … Mar 26, 2024
@@ -17,7 +17,7 @@ spec:
selector:
matchLabels:
{{- include "tempo.selectorLabels" . | nindent 6 }}
serviceName: {{ template "tempo.fullname" . }}-headless
serviceName: {{ template "tempo.fullname" . }}

Choose a reason for hiding this comment

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

It would be better if serviceName refers to a headless service. Currently, {{ template "tempo.fullname" . }} is not referring to a headless service. Therefore, there might be some additional changes required. However, I completely agree that this should be cleaned up.

Copy link
Author

Choose a reason for hiding this comment

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

@dastrobu
thanks! I have changed the suffix to be consistent with headless.
I just want to confirm one point: do you think the cluster ip value needs to be changed to default to None?
ref: https://github.com/grafana/helm-charts/blob/main/charts/tempo/templates/service.yaml#L16

Choose a reason for hiding this comment

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

@tozastation note that I am not a maintainer of Grafana Tempo. I just ran into the same issue looking for a fix.

Personally, I'd keep the service name (to avoid a breaking change on updating the chart for users).

There are two potential alternatives to fix this from my point of view:

  1. add a headless service called {{ template "tempo.fullname" . }}-headless but keep the original service in addition. The headless service would then be used for member list joining, the other one for pushing traces from applications.
  2. change the current service to be headless (clusterIP: None) and refer to it from the stateful set. I am not sure what implications it will have on clients pushing traces if the services is headless - as they will see multiple DNS records for the service.

I think someone from the maintainers should comment on the direction to go.

tozastation and others added 2 commits April 22, 2024 21:50
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.

None yet

4 participants