Skip to content

Commit

Permalink
remove the 'enabled' variable from the compactor, index-gateway, quer…
Browse files Browse the repository at this point in the history
…ier, query-scheduler, and ruler

Signed-off-by: Edward Welch <edward.welch@grafana.com>
  • Loading branch information
slim-bean committed Feb 28, 2024
1 parent b6d7813 commit b658b43
Show file tree
Hide file tree
Showing 19 changed files with 15 additions and 241 deletions.
8 changes: 0 additions & 8 deletions production/helm/loki/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,10 @@ Installed components:
* backend
{{- end }}
{{- else }}
{{- if .Values.compactor.enabled }}
* compactor
{{- end }}
{{- if .Values.indexGateway.enabled }}
* index gateway
{{- end }}
{{- if .Values.queryScheduler.enabled }}
* query scheduler
{{- end }}
{{- if .Values.ruler.enabled }}
* ruler
{{- end }}
* distributor
* ingester
* querier
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
{{- if and $isDistributed .Values.compactor.enabled }}
{{- if $isDistributed }}
apiVersion: v1
kind: Service
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
{{- if and $isDistributed .Values.compactor.enabled }}
{{- if $isDistributed }}
apiVersion: apps/v1
kind: StatefulSet
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
{{- if and $isDistributed .Values.indexGateway.enabled (gt (int .Values.indexGateway.replicas) 1) }}
{{- if and $isDistributed (gt (int .Values.indexGateway.replicas) 1) }}
{{- if kindIs "invalid" .Values.indexGateway.maxUnavailable }}
{{- fail "`.Values.indexGateway.maxUnavailable` must be set when `.Values.indexGateway.replicas` is greater than 1." }}
{{- else }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
{{- if and $isDistributed .Values.indexGateway.enabled }}
{{- if $isDistributed }}
apiVersion: v1
kind: Service
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
{{- if and $isDistributed .Values.indexGateway.enabled }}
{{- if $isDistributed }}
apiVersion: v1
kind: Service
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
{{- if and $isDistributed .Values.indexGateway.enabled }}
{{- if $isDistributed }}
apiVersion: apps/v1
kind: StatefulSet
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
{{- if and $isDistributed .Values.indexGateway.enabled }}
{{- if $isDistributed }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/templates/querier/hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
{{- if and $isDistributed .Values.indexGateway.enabled .Values.querier.autoscaling.enabled }}
{{- if and $isDistributed .Values.querier.autoscaling.enabled }}
{{- $apiVersion := include "loki.hpa.apiVersion" . -}}
apiVersion: {{ $apiVersion }}
kind: HorizontalPodAutoscaler
Expand Down

This file was deleted.

182 changes: 0 additions & 182 deletions production/helm/loki/templates/querier/statefulset-querier.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
{{- if and $isDistributed .Values.queryScheduler.enabled }}
{{- if $isDistributed }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
{{- if and $isDistributed .Values.queryScheduler.enabled (gt (int .Values.queryScheduler.replicas) 1) }}
{{- if and $isDistributed (gt (int .Values.queryScheduler.replicas) 1) }}
{{- if kindIs "invalid" .Values.queryScheduler.maxUnavailable }}
{{- fail "`.Values.queryScheduler.maxUnavailable` must be set when `.Values.queryScheduler.replicas` is greater than 1." }}
{{- else }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
{{- if and $isDistributed .Values.queryScheduler.enabled }}
{{- if $isDistributed }}
apiVersion: v1
kind: Service
metadata:
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/templates/ruler/configmap-ruler.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
{{- if and $isDistributed .Values.ruler.enabled }}
{{- if $isDistributed }}
{{- range $dir, $files := .Values.ruler.directories }}
---
apiVersion: v1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
{{- if and $isDistributed .Values.ruler.enabled (gt (int .Values.ruler.replicas) 1) }}
{{- if and $isDistributed (gt (int .Values.ruler.replicas) 1) }}
{{- if kindIs "invalid" .Values.ruler.maxUnavailable }}
{{- fail "`.Values.ruler.maxUnavailable` must be set when `.Values.ruler.replicas` is greater than 1." }}
{{- else }}
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/templates/ruler/service-ruler.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
{{- if and $isDistributed .Values.ruler.enabled }}
{{- if $isDistributed }}
apiVersion: v1
kind: Service
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
{{- if and $isDistributed .Values.ruler.enabled }}
{{- if $isDistributed }}
apiVersion: apps/v1
kind: StatefulSet
metadata:
Expand Down
8 changes: 0 additions & 8 deletions production/helm/loki/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1899,8 +1899,6 @@ queryFrontend:

# -- Configuration for the query-scheduler
queryScheduler:
# -- Specifies whether the query-scheduler should be decoupled from the query-frontend
enabled: false
# -- Number of replicas for the query-scheduler.
# It should be lower than `-querier.max-concurrent` to avoid generating back-pressure in queriers;
# it's also recommended that this value evenly divides the latter
Expand Down Expand Up @@ -1969,8 +1967,6 @@ queryScheduler:

# -- Configuration for the index-gateway
indexGateway:
# -- Specifies whether the index-gateway should be enabled
enabled: false
# -- Number of replicas for the index-gateway
replicas: 0
# -- Whether the index gateway should join the memberlist hashring
Expand Down Expand Up @@ -2062,8 +2058,6 @@ indexGateway:
compactor:
# -- Number of replicas for the compactor
replicas: 0
# -- Specifies whether compactor should be enabled
enabled: false
# -- hostAliases to add
hostAliases: []
# - ip: 1.2.3.4
Expand Down Expand Up @@ -2177,8 +2171,6 @@ compactor:

# -- Configuration for the ruler
ruler:
# -- Specifies whether the ruler should be enabled
enabled: false
# -- Number of replicas for the ruler
replicas: 0
# -- hostAliases to add
Expand Down

0 comments on commit b658b43

Please sign in to comment.