Hi, I am trying to get this to work with kube-prometheus customization but am unable to do so. To narrow the issue, I started with a fresh workspace and then modified their all-namespaces.jsonnet to include coredns mixin as follows:
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') +
(import 'kube-prometheus/kube-prometheus-all-namespaces.libsonnet') +
(import 'coredns-mixin/mixin.libsonnet') +{
_config+:: {
namespace: 'monitoring',
prometheus+:: {
namespaces: [],
},
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
I get the below error:
jsonnet -J vendor -m manifests example1.jsonnet
xargs '-I{}' sh -c 'cat {} | gojsontoyaml > {}.yaml' -- '{}'
RUNTIME ERROR: Field does not exist: config
vendor/grafana/grafana.libsonnet:47:20-44 thunk from <object >
vendor/grafana/grafana.libsonnet:47:9-45 object
example1.jsonnet:19:70-80 thunk from <$>
:1293:24-25 thunk from >
:1293:5-33 function
example1.jsonnet:19:53-81 $
During evaluation
I tried by adding config for Grafana as follows in the _config section
xargs '-I{}' sh -c 'cat {} | gojsontoyaml > {}.yaml' -- '{}'
RUNTIME ERROR: Field does not exist: ldap
vendor/grafana/grafana.libsonnet:50:32-54 thunk from <object >
vendor/grafana/grafana.libsonnet:51:36-49 thunk from <object >
vendor/ksonnet/ksonnet.beta.4/k8s.libsonnet:9656:82-86
vendor/ksonnet/ksonnet.beta.4/k8s.libsonnet:9658:41-45 object
During manifestation
I ended up providing entire grafana configuration. Below is my final _config+::
Hi, I am trying to get this to work with kube-prometheus customization but am unable to do so. To narrow the issue, I started with a fresh workspace and then modified their all-namespaces.jsonnet to include coredns mixin as follows:
I tried by adding config for Grafana as follows in the _config section
This results in the below error:
I ended up providing entire grafana configuration. Below is my final _config+::