Skip to content

Commit

Permalink
[helm] use grpc round robin for distributor clients (#1991)
Browse files Browse the repository at this point in the history
* Use GRPC round-robin for gateway -> distributor requests

Fixes #1987
Update chart version and changelog
Use the headless distributor service for the nginx gateway

Signed-off-by: Patrick Oyarzun <patrick.oyarzun@grafana.com>
  • Loading branch information
Logiraptor committed Jun 2, 2022
1 parent 2c2c65d commit 8362bee
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 6 deletions.
5 changes: 5 additions & 0 deletions operations/helm/charts/mimir-distributed/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ Entries should be ordered as follows:

Entries should include a reference to the Pull Request that introduced the change.

## 2.1.0-beta.3

* [BUGFIX] Use grpc round-robin for distributor clients in GEM gateway and self-monitoring
- This utilizes an additional headless service for the distributor pods

## 2.1.0-beta.2

* [ENHANCEMENT] Version bump only for release tests.
Expand Down
2 changes: 1 addition & 1 deletion operations/helm/charts/mimir-distributed/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
version: 2.1.0-beta.2
version: 2.1.0-beta.3
appVersion: 2.0.0
description: "Grafana Mimir"
engine: gotpl
Expand Down
2 changes: 1 addition & 1 deletion operations/helm/charts/mimir-distributed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Helm chart for deploying [Grafana Mimir](https://grafana.com/docs/mimir/v2.0.x/)

# mimir-distributed

![Version: 2.1.0-beta.2](https://img.shields.io/badge/Version-2.1.0--beta.2-informational?style=flat-square) ![AppVersion: 2.0.0](https://img.shields.io/badge/AppVersion-2.0.0-informational?style=flat-square)
![Version: 2.1.0-beta.3](https://img.shields.io/badge/Version-2.1.0--beta.3-informational?style=flat-square) ![AppVersion: 2.0.0](https://img.shields.io/badge/AppVersion-2.0.0-informational?style=flat-square)

Grafana Mimir

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "mimir.resourceName" (dict "ctx" . "component" "distributor") }}-headless
labels:
{{- include "mimir.labels" (dict "ctx" . "component" "distributor" "memberlist" true) | nindent 4 }}
prometheus.io/service-monitor: "false"
{{- with .Values.distributor.service.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- toYaml .Values.distributor.service.annotations | nindent 4 }}
spec:
type: ClusterIP
clusterIP: None
ports:
- port: {{ include "mimir.serverGrpcListenPort" . }}
protocol: TCP
name: grpc
targetPort: grpc
selector:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "distributor" "memberlist" true) | nindent 4 }}
8 changes: 4 additions & 4 deletions operations/helm/charts/mimir-distributed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ mimir:
compactor:
url: http://{{ template "mimir.fullname" . }}-compactor.{{ .Release.Namespace }}.svc:{{ include "mimir.serverHttpListenPort" . }}
distributor:
url: http://{{ template "mimir.fullname" . }}-distributor.{{ .Release.Namespace }}.svc:{{ include "mimir.serverHttpListenPort" . }}
url: dns:///{{ template "mimir.fullname" . }}-distributor-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}:{{ include "mimir.serverGrpcListenPort" . }}
ingester:
url: http://{{ template "mimir.fullname" . }}-ingester.{{ .Release.Namespace }}.svc:{{ include "mimir.serverHttpListenPort" . }}
query_frontend:
Expand All @@ -215,7 +215,7 @@ mimir:
instrumentation:
enabled: true
distributor_client:
address: 'dns:///{{ template "mimir.fullname" . }}-distributor.{{ .Release.Namespace }}.svc:{{ include "mimir.serverGrpcListenPort" . }}'
address: 'dns:///{{ template "mimir.fullname" . }}-distributor-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}:{{ include "mimir.serverGrpcListenPort" . }}'
{{- end }}
Expand Down Expand Up @@ -1303,10 +1303,10 @@ nginx:
# Distributor endpoints
location /distributor {
proxy_pass http://{{ template "mimir.fullname" . }}-distributor.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}:{{ include "mimir.serverHttpListenPort" . }}$request_uri;
proxy_pass http://{{ template "mimir.fullname" . }}-distributor-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}:{{ include "mimir.serverHttpListenPort" . }}$request_uri;
}
location = /api/v1/push {
proxy_pass http://{{ template "mimir.fullname" . }}-distributor.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}:{{ include "mimir.serverHttpListenPort" . }}$request_uri;
proxy_pass http://{{ template "mimir.fullname" . }}-distributor-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}:{{ include "mimir.serverHttpListenPort" . }}$request_uri;
}
# Alertmanager endpoints
Expand Down

0 comments on commit 8362bee

Please sign in to comment.