Skip to content

Commit

Permalink
Added antiaffinity and scoped config hashes (#550)
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Elliott <number101010@gmail.com>
  • Loading branch information
joe-elliott authored Feb 24, 2021
1 parent 6456fb9 commit f44fb72
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion operations/jsonnet/microservices/compactor.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
deployment.mixin.spec.strategy.rollingUpdate.withMaxSurge(0) +
deployment.mixin.spec.strategy.rollingUpdate.withMaxUnavailable(1) +
deployment.mixin.spec.template.metadata.withAnnotations({
config_hash: std.md5(std.toString($.tempo_compactor_configmap)),
config_hash: std.md5(std.toString($.tempo_compactor_configmap.data['tempo.yaml'])),
}) +
deployment.mixin.spec.template.spec.withVolumes([
volume.fromConfigMap(tempo_config_volume, $.tempo_compactor_configmap.metadata.name),
Expand Down
2 changes: 1 addition & 1 deletion operations/jsonnet/microservices/distributor.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
[$._config.gossip_member_label]: 'true',
}) +
deployment.mixin.spec.template.metadata.withAnnotations({
config_hash: std.md5(std.toString($.tempo_configmap)),
config_hash: std.md5(std.toString($.tempo_configmap.data['tempo.yaml'])),
}) +
deployment.mixin.spec.template.spec.withVolumes([
volume.fromConfigMap(tempo_config_volume, $.tempo_configmap.metadata.name),
Expand Down
2 changes: 1 addition & 1 deletion operations/jsonnet/microservices/frontend.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
deployment.mixin.spec.strategy.rollingUpdate.withMaxSurge(0) +
deployment.mixin.spec.strategy.rollingUpdate.withMaxUnavailable(1) +
deployment.mixin.spec.template.metadata.withAnnotations({
config_hash: std.md5(std.toString($.tempo_query_frontend_configmap)),
config_hash: std.md5(std.toString($.tempo_query_frontend_configmap.data['tempo.yaml'])),
}) +
deployment.mixin.spec.template.spec.withVolumes([
volume.fromConfigMap(tempo_query_config_volume, $.tempo_query_configmap.metadata.name),
Expand Down
1 change: 1 addition & 0 deletions operations/jsonnet/microservices/ingester.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
[$._config.gossip_member_label]: 'true',
},
)
+ $.util.antiAffinity
+ statefulset.mixin.spec.withServiceName(target_name)
+ statefulset.mixin.spec.template.spec.withVolumes([
volume.fromConfigMap(tempo_config_volume, $.tempo_configmap.metadata.name),
Expand Down
2 changes: 1 addition & 1 deletion operations/jsonnet/microservices/querier.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
deployment.mixin.spec.strategy.rollingUpdate.withMaxSurge(0) +
deployment.mixin.spec.strategy.rollingUpdate.withMaxUnavailable(1) +
deployment.mixin.spec.template.metadata.withAnnotations({
config_hash: std.md5(std.toString($.tempo_querier_configmap)),
config_hash: std.md5(std.toString($.tempo_querier_configmap.data['tempo.yaml'])),
}) +
deployment.mixin.spec.template.spec.withVolumes([
volume.fromConfigMap(tempo_config_volume, $.tempo_querier_configmap.metadata.name),
Expand Down
2 changes: 1 addition & 1 deletion operations/jsonnet/single-binary/tempo.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
{ app: 'tempo' }) +
statefulset.mixin.spec.withServiceName('tempo') +
statefulset.mixin.spec.template.metadata.withAnnotations({
config_hash: std.md5(std.toString($.tempo_configmap)),
config_hash: std.md5(std.toString($.tempo_configmap.data['tempo.yaml'])),
}) +
statefulset.mixin.spec.template.spec.withVolumes([
volume.fromConfigMap(tempo_query_config_volume, $.tempo_query_configmap.metadata.name),
Expand Down

0 comments on commit f44fb72

Please sign in to comment.