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

add dns discovery method for query-scheduler address #338

Merged
merged 3 commits into from Mar 15, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions CHANGELOG.md
Expand Up @@ -2,9 +2,10 @@

## master / unreleased

* [ENHANCEMENT] Allow StoreGateway podManagementPolicy to be changed #332
* [BUGFIX] Correct a typo in enabling distribtuor HPA #334
* [FEATURE] Add Query-Scheduler #268
* [ENHANCEMENT] Allow StoreGateway podManagementPolicy to be changed #332
* [BUGFIX] Correct a typo in enabling distributor HPA #334
* [BUGFIX] Add service discovery method for query-scheduler addresses #338

## 1.4.0 / 2022-03-08

Expand Down
6 changes: 0 additions & 6 deletions ci/test-deployment-values.yaml
Expand Up @@ -48,12 +48,6 @@ config:
join_members:
- '{{ include "cortex.fullname" $ }}-memberlist'

frontend:
scheduler_address: 'dns+{{ include "cortex.querySchedulerFullname" $ }}-headless:9095'

frontend_worker:
scheduler_address: 'dns+{{ include "cortex.querySchedulerFullname" $ }}-headless:9095'

Comment on lines -51 to -56
Copy link
Collaborator Author

@nschad nschad Mar 15, 2022

Choose a reason for hiding this comment

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

Was already set via cli @kd7lxl . CLI args should take precedence over the config file also, therefore safe to remove

ingester:
replicas: 1
autoscaling:
Expand Down
7 changes: 4 additions & 3 deletions templates/querier/querier-dep.yaml
Expand Up @@ -53,9 +53,10 @@ spec:
- "-target=querier"
- "-config.file=/etc/cortex/cortex.yaml"
{{- if .Values.query_scheduler.enabled }}
- "-querier.scheduler-address={{ template "cortex.fullname" . }}-query-scheduler-headless.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:{{ .Values.config.server.grpc_listen_port }}"
{{- else }}
- "-querier.frontend-address={{ template "cortex.fullname" . }}-query-frontend-headless.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:{{ .Values.config.server.grpc_listen_port }}"
- "-querier.scheduler-address={{ template "cortex.querySchedulerFullname" . }}-headless.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:{{ .Values.config.server.grpc_listen_port }}"
{{- end }}
{{- if and .Values.query_frontend.enabled (not .Values.query_scheduler.enabled) }}
- "-querier.frontend-address={{ template "cortex.queryFrontendFullname" . }}-headless.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:{{ .Values.config.server.grpc_listen_port }}"
{{- end }}
{{- include "cortex.memcached" . | nindent 12}}
{{- range $key, $value := .Values.querier.extraArgs }}
Expand Down
4 changes: 2 additions & 2 deletions templates/query-frontend/query-frontend-dep.yaml
Expand Up @@ -52,7 +52,7 @@ spec:
- "-config.file=/etc/cortex/cortex.yaml"
{{- include "cortex.frontend-memcached" . | nindent 12 }}
{{- if .Values.query_scheduler.enabled }}
- "-frontend.scheduler-address={{ template "cortex.fullname" . }}-query-scheduler-headless.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:{{ .Values.config.server.grpc_listen_port }}"
- "-frontend.scheduler-address=dns+{{ template "cortex.querySchedulerFullname" . }}-headless.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:{{ .Values.config.server.grpc_listen_port }}"
{{- end }}
{{- range $key, $value := .Values.query_frontend.extraArgs }}
- "-{{ $key }}={{ $value }}"
Expand Down Expand Up @@ -109,4 +109,4 @@ spec:
{{- if .Values.query_frontend.extraVolumes }}
{{- toYaml .Values.query_frontend.extraVolumes | nindent 8}}
{{- end }}
{{- end -}}
{{- end -}}