Skip to content

Commit

Permalink
fix(config): fix config to use local best as possible
Browse files Browse the repository at this point in the history
update health check
  • Loading branch information
Umaaz committed Mar 19, 2024
1 parent 410f104 commit 314c8b5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
7 changes: 7 additions & 0 deletions charts/mimir-singleton/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,10 @@ Create the name of the service account to use
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Calculate the config from structured and unstructured text input
*/}}
{{- define "mimir-singleton.calculatedConfig" -}}
{{ tpl (mergeOverwrite (tpl .Values.config . | fromYaml) .Values.structuredConfig | toYaml) . }}
{{- end -}}
3 changes: 1 addition & 2 deletions charts/mimir-singleton/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
namespace: {{ .Release.Namespace | quote }}
name: {{ include "mimir-singleton.fullname" . }}
data:
mimir.yaml: |
{{ .Values.config | nindent 4 }}
{{- include "mimir-singleton.calculatedConfig" . | nindent 4 }}
4 changes: 2 additions & 2 deletions charts/mimir-singleton/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ spec:
protocol: TCP
livenessProbe:
httpGet:
path: /
path: /ready
port: http
readinessProbe:
httpGet:
path: /
path: /ready
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
Expand Down
8 changes: 7 additions & 1 deletion charts/mimir-singleton/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ tolerations: []

affinity: {}

config:
config: |
multitenancy_enabled: true
target: all,alertmanager,compactor
Expand All @@ -113,6 +113,8 @@ config:
ruler_storage:
backend: local
local:
directory: /tmp/ruler
blocks_storage:
backend: local
Expand All @@ -121,6 +123,8 @@ config:
alertmanager_storage:
backend: local
local:
path: /tmp/mimir/alertmanager
ingester:
ring:
Expand All @@ -133,6 +137,8 @@ config:
enable_api: true
alertmanager_url: http://localhost:9009/alertmanager/
structuredConfig: {}

monitoring:
enabled: false
# The config for the service monitor
Expand Down

0 comments on commit 314c8b5

Please sign in to comment.