Skip to content

Commit 105cb07

Browse files
committed
feat: allow configuration of service trafficDistribution parameter
Fixes: #19557
1 parent 679738d commit 105cb07

File tree

11 files changed

+52
-3
lines changed

11 files changed

+52
-3
lines changed

production/helm/loki/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Entries should include a reference to the pull request that introduced the chang
1313

1414
## Unreleased
1515

16+
- [ENHANCEMENT] Added `trafficDistribution` configuration option to backend, compactor, distributor, gateway, index-gateway, ingester, querier, query-frontend, query-scheduler,read and write services to enable same-zone traffic routing. #19557
17+
1618
## 6.43.0
1719

1820
- [BREAKING] **Loki UI has been completely removed from the Helm chart.** The experimental Loki UI has been moved to a [Grafana Plugin] (https://github.com/grafana/loki-operational-ui). Enabling the UI in the Helm chart will now only enable the APIs needed by the plugin, and will host them on the querier. The gateway will now forward all UI requests to the queriers. Users who previously had `loki.ui.enabled: true` should remove this configuration and migrate to the Grafana Loki plugin for UI functionality. [#19390](https://github.com/grafana/loki/pull/19390)

production/helm/loki/templates/backend/service-backend.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,7 @@ spec:
3434
protocol: TCP
3535
selector:
3636
{{- include "loki.backendSelectorLabels" . | nindent 4 }}
37+
{{- if .Values.backend.service.trafficDistribution }}
38+
trafficDistribution: {{ .Values.backend.service.trafficDistribution }}
39+
{{- end }}
3740
{{- end }}

production/helm/loki/templates/gateway/service-gateway.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,7 @@ spec:
4040
protocol: TCP
4141
selector:
4242
{{- include "loki.gatewaySelectorLabels" . | nindent 4 }}
43+
{{- if .Values.gateway.service.trafficDistribution }}
44+
trafficDistribution: {{ .Values.gateway.service.trafficDistribution }}
45+
{{- end }}
4346
{{- end }}

production/helm/loki/templates/index-gateway/service-index-gateway.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,7 @@ spec:
3333
{{- end }}
3434
selector:
3535
{{- include "loki.indexGatewaySelectorLabels" . | nindent 4 }}
36+
{{- if .Values.indexGateway.trafficDistribution }}
37+
trafficDistribution: {{ .Values.indexGateway.trafficDistribution }}
38+
{{- end }}
3639
{{- end }}

production/helm/loki/templates/ingester/service-ingester.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,7 @@ spec:
3333
{{- end }}
3434
selector:
3535
{{- include "loki.ingesterSelectorLabels" . | nindent 4 }}
36+
{{- if .Values.ingester.trafficDistribution }}
37+
trafficDistribution: {{ .Values.ingester.trafficDistribution }}
38+
{{- end }}
3639
{{- end -}}

production/helm/loki/templates/querier/service-querier.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,7 @@ spec:
3333
{{- end }}
3434
selector:
3535
{{- include "loki.querierSelectorLabels" . | nindent 4 }}
36+
{{- if .Values.querier.trafficDistribution }}
37+
trafficDistribution: {{ .Values.querier.trafficDistribution }}
38+
{{- end }}
3639
{{- end -}}

production/helm/loki/templates/query-frontend/service-query-frontend.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,7 @@ spec:
4141
{{- end }}
4242
selector:
4343
{{- include "loki.queryFrontendSelectorLabels" . | nindent 4 }}
44+
{{- if .Values.queryFrontend.trafficDistribution }}
45+
trafficDistribution: {{ .Values.queryFrontend.trafficDistribution }}
46+
{{- end }}
4447
{{- end -}}

production/helm/loki/templates/query-scheduler/service-query-scheduler.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,7 @@ spec:
3535
{{- end }}
3636
selector:
3737
{{- include "loki.querySchedulerSelectorLabels" . | nindent 4 }}
38+
{{- if .Values.queryScheduler.trafficDistribution }}
39+
trafficDistribution: {{ .Values.queryScheduler.trafficDistribution }}
40+
{{- end }}
3841
{{- end }}

production/helm/loki/templates/read/service-read.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,7 @@ spec:
3434
protocol: TCP
3535
selector:
3636
{{- include "loki.readSelectorLabels" . | nindent 4 }}
37+
{{- if .Values.read.service.trafficDistribution }}
38+
trafficDistribution: {{ .Values.read.service.trafficDistribution }}
39+
{{- end }}
3740
{{- end }}

production/helm/loki/templates/write/service-write.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,7 @@ spec:
3434
protocol: TCP
3535
selector:
3636
{{- include "loki.writeSelectorLabels" . | nindent 4 }}
37+
{{- if .Values.write.service.trafficDistribution }}
38+
trafficDistribution: {{ .Values.write.service.trafficDistribution }}
39+
{{- end }}
3740
{{- end }}

0 commit comments

Comments
 (0)