From 644c81f653befa6620b6fe16e6ed4dd68b52109c Mon Sep 17 00:00:00 2001 From: Koenraad Verheyden Date: Mon, 21 Jun 2021 17:14:41 +0200 Subject: [PATCH] Jsonnet: replace null with {} (#780) Converting `null` or `{}` to YAML both result in `null`. But null in Jsonnnet can trip someone up that expects the value to be there. For instance when extending tempo_config they might do something like this: ``` tempo_config+:: { distributor+: { // ... } } ``` Using +: is generally preferred because it doesn't overwrite previous values, but would not work if tempo_config.distributor is null. --- operations/jsonnet/microservices/configmap.libsonnet | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/operations/jsonnet/microservices/configmap.libsonnet b/operations/jsonnet/microservices/configmap.libsonnet index 35ca2640993..25431dafdb4 100644 --- a/operations/jsonnet/microservices/configmap.libsonnet +++ b/operations/jsonnet/microservices/configmap.libsonnet @@ -5,7 +5,7 @@ server: { http_listen_port: $._config.port, }, - distributor: null, + distributor: {}, ingester: { lifecycler: { ring: { @@ -13,7 +13,7 @@ }, }, }, - compactor: null, + compactor: {}, storage: { trace: { blocklist_poll: '0',