Support utf8 in external file alertmanager config

This could have been achieved either by switching to stringData, or doing
`std.base64(std.encodeUTF8($._config.alertmanager.config))` as per
google/jsonnet#575

I went with the former, because it's:
1. Easier to read existing config
2. Consistent with the way jsonnet object-based config is written just above
This commit is contained in:
Michał Łazowik
2020-08-28 01:42:30 +02:00
parent 4f872f1e31
commit 28b717a984
2 changed files with 17 additions and 1 deletions

View File

@@ -81,7 +81,8 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
.withStringData({ 'alertmanager.yaml': std.manifestYamlDoc($._config.alertmanager.config) }) +
secret.mixin.metadata.withNamespace($._config.namespace)
else
secret.new('alertmanager-' + $._config.alertmanager.name, { 'alertmanager.yaml': std.base64($._config.alertmanager.config) }) +
secret.new('alertmanager-' + $._config.alertmanager.name, {})
.withStringData({ 'alertmanager.yaml': $._config.alertmanager.config }) +
secret.mixin.metadata.withNamespace($._config.namespace),
serviceAccount: