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

chore: add support for not setting replicas helm chart #6373

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 operations/helm/charts/mimir-distributed/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Entries should include a reference to the Pull Request that introduced the chang
* [CHANGE] Reduce `-server.grpc-max-concurrent-streams` from 1000 to 500 for ingester and to 100 for all components. #5666
* [CHANGE] Changed default `clusterDomain` from `cluster.local` to `cluster.local.` to reduce the number of DNS lookups made by Mimir. #6389
* [ENHANCEMENT] Update the `rollout-operator` subchart to `0.9.1`. #6022 #6110
* [ENHANCEMENT] Add support for not setting replicas for distributor, querier, and query-frontend. #6373
* [BUGFIX] Let the unified gatway/nginx config listen on IPv6 as well. Followup to #5948. #6204
* [BUGFIX] Quote `checksum/config` when using external config. This allows setting `externalConfigVersion` to numeric values. #6407

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ metadata:
{{- toYaml .Values.distributor.annotations | nindent 4 }}
namespace: {{ .Release.Namespace | quote }}
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
{{- if or (or (kindIs "int64" .Values.distributor.replicas) (kindIs "float64" .Values.distributor.replicas)) (.Values.distributor.replicas) }}
Copy link
Contributor

Choose a reason for hiding this comment

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

it would be better to have this in a named template, so we don't repeat ourselves, but I think I can address this in a follow-up PR

replicas: {{ .Values.distributor.replicas }}
{{- end }}
selector:
matchLabels:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "distributor" "memberlist" true) | nindent 6 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ metadata:
{{- toYaml .Values.querier.annotations | nindent 4 }}
namespace: {{ .Release.Namespace | quote }}
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
{{- if or (or (kindIs "int64" .Values.querier.replicas) (kindIs "float64" .Values.querier.replicas)) (.Values.querier.replicas) }}
replicas: {{ .Values.querier.replicas }}
{{- end }}
selector:
matchLabels:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "querier" "memberlist" true) | nindent 6 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ metadata:
{{- toYaml .Values.query_frontend.annotations | nindent 4 }}
namespace: {{ .Release.Namespace | quote }}
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
{{- if or (or (kindIs "int64" .Values.query_frontend.replicas) (kindIs "float64" .Values.query_frontend.replicas)) (.Values.query_frontend.replicas) }}
replicas: {{ .Values.query_frontend.replicas }}
{{- end }}
selector:
matchLabels:
{{- include "mimir.selectorLabels" (dict "ctx" . "component" "query-frontend") | nindent 6 }}
Expand Down
3 changes: 3 additions & 0 deletions operations/helm/charts/mimir-distributed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,7 @@ alertmanager:
storageClass: null

distributor:
# Setting it to null will produce a deployment without replicas set, allowing you to use autoscaling with the deployment
replicas: 1

service:
Expand Down Expand Up @@ -1201,6 +1202,7 @@ querier:
extraEnvFrom: []

query_frontend:
# Setting it to null will produce a deployment without replicas set, allowing you to use autoscaling with the deployment
replicas: 1

service:
Expand Down Expand Up @@ -3247,6 +3249,7 @@ graphite:
enabled: false

querier:
# Setting it to null will produce a deployment without replicas set, allowing you to use autoscaling with the deployment
replicas: 2

schemasConfiguration:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 2
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 2
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 2
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 2
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 12
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 4
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 3
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 2
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 2
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 2
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 2
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 2
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 2
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 2
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 2
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{}
namespace: "citestns"
spec:
# If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it
replicas: 2
selector:
matchLabels:
Expand Down
Loading
Loading