Skip to content
Snippets Groups Projects
Unverified Commit f66d9e93 authored by Tom Wilkie's avatar Tom Wilkie Committed by GitHub
Browse files

Add annotation with hash of config, to trigger re-deployments when config changes. (#178)


Signed-off-by: default avatarTom Wilkie <tom.wilkie@gmail.com>
parent 211d4543
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@
// December 11 is when we first launched to the public.
// Assume we can ingest logs that are 5months old.
schema_start_date: '2018-07-11',
schema_start_date: '2018-07-11',
commonArgs: {
'config.file': '/etc/loki/config.yaml',
......@@ -84,4 +84,11 @@
configMap.withData({
'config.yaml': $.util.manifestYaml($._config.loki),
}),
local deployment = $.apps.v1beta1.deployment,
config_hash_mixin::
deployment.mixin.spec.template.metadata.withAnnotationsMixin({
config_hash: std.md5(std.toString($._config.loki)),
}),
}
......@@ -16,6 +16,7 @@
distributor_deployment:
deployment.new('distributor', 3, [$.distributor_container]) +
$.config_hash_mixin +
$.util.configVolumeMount('loki', '/etc/loki') +
$.util.antiAffinity,
......
......@@ -19,6 +19,7 @@
ingester_deployment:
deployment.new('ingester', 3, [$.ingester_container]) +
$.config_hash_mixin +
$.util.configVolumeMount('loki', '/etc/loki') +
$.util.antiAffinity +
deployment.mixin.spec.withMinReadySeconds(60) +
......
......@@ -15,6 +15,7 @@
querier_deployment:
deployment.new('querier', 3, [$.querier_container]) +
$.config_hash_mixin +
$.util.configVolumeMount('loki', '/etc/loki') +
$.util.antiAffinity,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment