-
Our config looks a little like: local kp =
(import 'kube-prometheus/kube-prometheus.libsonnet') +
(import 'kube-prometheus/kube-prometheus-managed-cluster.libsonnet') +
{
grafana+:: {
config: {
sections: {
server: {
root_url: 'https://grafana',
enable_gzip: true,
}
}
}
}
} When we build this it modifies the grafana+:: {
config: { // http://docs.grafana.org/installation/configuration/
sections: {
"auth.anonymous": {enabled: true},
},
},
}, Deletes our custom settings but leaves the file in the same format: But Grafana does not seem to load this custom config. Looking in the grafana library I noticed: grafana+: {
[if std.length($._config.grafana.config) > 0 then 'config']:
{
apiVersion: 'v1',
kind: 'Secret',
metadata: {
name: 'grafana-config',
namespace: $._config.namespace,
},
type: 'Opaque',
data: {
'grafana.ini': std.base64(std.encodeUTF8(std.manifestIni($._config.grafana.config))),
} +
if $._config.grafana.ldap != null then { 'ldap.toml': std.base64(std.encodeUTF8($._config.grafana.ldap)) } else {},
}, So is the README in this repo out of date? Or am I missing something on our config that's causing the file not to get loaded? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
What is it that you are trying to do exactly, as in what was the expected result that didn't happen? Off the top of my head, I'm guess you probably want to merge configuration instead of overriding, which you can do by using grafana+:: {
config+: {
sections+: {
"auth.anonymous": {enabled: true},
},
},
}, |
Beta Was this translation helpful? Give feedback.
-
Grafana config wasn't scoped correctly, should have been in _config, troubleshooted by using std.trace |
Beta Was this translation helpful? Give feedback.
Grafana config wasn't scoped correctly, should have been in _config, troubleshooted by using std.trace