Skip to content

Add headless service for distributor #148

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

Merged
merged 3 commits into from
Jun 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* [ENHANCEMENT] Expose `client_max_body_size` config for nginx max request body size #137
* [ENHANCEMENT] Adding option to add custom headers (ex. X-Scope-OrgID) to NGINX from values.yaml (key `nginx.config.setHeaders`). #127
* [ENHANCEMENT] Headless service for distributor to allow GRPC load balancing #148

## 0.4.1 / 2021-03-22

Expand Down
31 changes: 31 additions & 0 deletions templates/distributor-svc-headless.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "cortex.fullname" . }}-distributor-headless
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "cortex.name" . }}-distributor
chart: {{ template "cortex.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.distributor.service.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- toYaml .Values.distributor.service.annotations | nindent 4 }}
spec:
type: ClusterIP
clusterIP: None
publishNotReadyAddresses: true
ports:
- port: {{ .Values.config.server.http_listen_port }}
protocol: TCP
name: http-metrics
targetPort: http-metrics
- port: {{ .Values.config.server.grpc_listen_port }}
protocol: TCP
name: grpclb
targetPort: grpc
selector:
app: {{ template "cortex.name" . }}-distributor
release: {{ .Release.Name }}