Skip to content

Conversation

daxroc
Copy link

@daxroc daxroc commented Jul 24, 2025

What this PR does / why we need it:

Creates headless querier service, updates tail_proxy_url configuration to use headless service

Which issue(s) this PR fixes:
Fixes #18482

Special notes for your reviewer:

loki, loki, ConfigMap (v1) has changed:
...
      frontend:
        scheduler_address: loki-query-scheduler.loki.svc.cluster.local:9095
-       tail_proxy_url: http://loki-querier.loki.svc.cluster.local:3100
+       tail_proxy_url: http://loki-querier-headless.loki.svc.cluster.local:3100
loki, loki-querier-headless, Service (v1) has been added:
-
+ apiVersion: v1
+ kind: Service
+ metadata:
+   annotations: null
+   labels:
+     app.kubernetes.io/component: querier
+     app.kubernetes.io/instance: loki
+     app.kubernetes.io/name: loki
+     app.kubernetes.io/version: 3.5.2
+     helm.sh/chart: loki-6.33.0
+   name: loki-querier-headless
+   namespace: loki
+ spec:
+   clusterIP: None
+   ports:
+   - name: http-metrics
+     port: 3100
+     protocol: TCP
+     targetPort: http-metrics
+   - name: grpc
+     port: 9095
+     protocol: TCP
+     targetPort: grpc
+   selector:
+     app.kubernetes.io/component: querier
+     app.kubernetes.io/instance: loki
+     app.kubernetes.io/name: loki

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

@daxroc daxroc requested a review from a team as a code owner July 24, 2025 15:16
@CLAassistant
Copy link

CLAassistant commented Jul 24, 2025

CLA assistant check
All committers have signed the CLA.

@daxroc daxroc changed the title #18482 Fix tail_proxy_url to use headless querier service fix(helm): add headless querier service update tail_proxy_url to use headless service Jul 24, 2025
@jkroepke
Copy link
Contributor

Copy link
Contributor

@jkroepke jkroepke left a comment

Choose a reason for hiding this comment

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

Hi, thanks for your PR. Please add a note to the CHANGELOG.

It would be great, if a internal Loki employee like @trevorwhitney could take a look here, since he may know what would be the best behavior in that context.

Comment on lines +10 to +12
{{- with .Values.querier.serviceLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{{- with .Values.querier.serviceLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.querier.serviceLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
variant: headless
prometheus.io/service-monitor: "false"

Similar to:

variant: headless
prometheus.io/service-monitor: "false"

@jkroepke
Copy link
Contributor

@daxroc WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Helm] Frontend loki.querierAddress should point to a headless service for correct operation
3 participants