Previously customizing kube-prometheus [1] failed with the following
error.
❯ ./build.sh example.jsonnet
+ set -o pipefail
+ rm -rf manifests
+ mkdir -p manifests/setup
+ jsonnet -J vendor -m manifests example.jsonnet
+ xargs '-I{}' sh -c 'cat {} | gojsontoyaml > {}.yaml' -- '{}'
RUNTIME ERROR: vendor/github.com/kubernetes/kube-state-metrics/jsonnet/kube-state-metrics/kube-state-metrics.libsonnet:392:21-22 Expected token OPERATOR but got "{"
vendor/kube-prometheus/components/kube-state-metrics.libsonnet:51:19-124 function <anonymous>
vendor/kube-prometheus/main.libsonnet:136:21-64 object <anonymous>
vendor/kube-prometheus/platforms/platforms.libsonnet:37:22-40 +:
example.jsonnet:33:90-109 thunk from <$>
<std>:1539:24-25 thunk from <function <anonymous>>
<std>:1539:5-33 function <anonymous>
example.jsonnet:33:73-110 $
example.jsonnet:33:1-112
example.jsonnet:33:1-112
During evaluation
With this patch, the build succeeds:
❯ bash build.sh example.jsonnet ; echo $?
+ set -o pipefail
+ rm -rf manifests
+ mkdir -p manifests/setup
+ jsonnet -J vendor -m manifests example.jsonnet
+ xargs '-I{}' sh -c 'cat {} | gojsontoyaml > {}.yaml' -- '{}'
+ find manifests -type f '!' -name '*.yaml' -delete
+ rm -f kustomization
0
[1]: https://github.com/prometheus-operator/kube-prometheus/blob/main/docs/customizing.md
|
||
|---|---|---|
| .. | ||
| autosharding | ||
| daemonsetsharding | ||
| prometheus-alerting-rules | ||
| standard | ||