fix(bootstraper): adding global variables support

Now we can declare "global" variables, in the "Globals" section the  the
configuration, this variables will be merged into the "Service"
variables and used in the templates. This how we share variables between
services.
This commit is contained in:
2022-07-01 14:56:41 +02:00
parent 9bb4e93d65
commit e9f8ff2506
8 changed files with 1447 additions and 30 deletions

View File

@ -1,18 +1,18 @@
{{ if .Vars.AuthEnabled }}
{{ if .AuthEnabled }}
auth_enabled: true
{{ else }}
auth_enabled: false
{{ end }}
server:
http_listen_port: {{ .Vars.HTTPPort }}
grpc_listen_port: {{ .Vars.GRPCPort }}
http_listen_port: {{ .HTTPPort }}
grpc_listen_port: {{ .GRPCPort }}
log_level: {{ .LogLevel }}
ingester:
wal:
enabled: true
dir: {{ .Vars.StorageRoot }}/wal
dir: {{ .StorageRoot }}/wal
flush_on_shutdown: true
lifecycler:
address: 127.0.0.1
@ -31,7 +31,7 @@ schema_config:
configs:
- from: 2020-05-15
store: boltdb-shipper
object_store: {{ .Vars.ObjectStore }}
object_store: {{ .ObjectStore }}
schema: v11
index:
prefix: index_
@ -39,23 +39,23 @@ schema_config:
storage_config:
boltdb_shipper:
active_index_directory: {{ .Vars.StorageRoot }}/index
shared_store: {{ .Vars.SharedStore }}
cache_location: {{ .Vars.StorageRoot }}/cache
active_index_directory: {{ .StorageRoot }}/index
shared_store: {{ .SharedStore }}
cache_location: {{ .StorageRoot }}/cache
cache_ttl: 168h
{{ if eq (.ObjectStore) ("filesystem") }}
filesystem:
directory: {{ .Vars.StorageRoot }}/chunks
directory: {{ .StorageRoot }}/chunks
{{ else }}
aws:
s3: s3://{{ .Vars.S3.APIKey }}:{{ .Vars.S3.APISecretKey}}@{{ .S3.URL}}/{{ .S3.BucketName}}
s3: s3://{{ .S3.APIKey }}:{{ .S3.APISecretKey}}@{{ .S3.URL}}/{{ .S3.BucketName}}
s3forcepathstyle: true
{{ end }}
compactor:
shared_store: {{ .Vars.SharedStore }}
working_directory: {{ .Vars.StorageRoot }}/compactor
shared_store: {{ .SharedStore }}
working_directory: {{ .StorageRoot }}/compactor
compaction_interval: 10m
limits_config:
@ -73,9 +73,9 @@ ruler:
storage:
type: local
local:
directory: {{ .Vars.StorageRoot }}/rules
rule_path: {{ .Vars.StorageRoot }}/rules
alertmanager_url: {{ .Vars.AlertManagerURL }}
directory: {{ .StorageRoot }}/rules
rule_path: {{ .StorageRoot }}/rules
alertmanager_url: {{ .AlertManagerURL }}
ring:
kvstore:
store: inmemory