carlosedp / cluster-monitoring

Cluster monitoring stack for clusters based on Prometheus Operator
MIT License
740 stars 200 forks source link

Error on "make" - UNTIME ERROR: Unexpected type string, expected array #23

Closed NicklasWallgren closed 4 years ago

NicklasWallgren commented 4 years ago
make
rm -rf manifests
./scripts/build.sh main.jsonnet /root/go/bin/jsonnet
using jsonnet from arg
+ set -o pipefail
+ rm -rf manifests
+ mkdir manifests
+ /root/go/bin/jsonnet -J vendor -m manifests main.jsonnet
+ xargs '-I{}' sh -c 'cat {} | gojsontoyaml > {}.yaml; rm -f {}' -- '{}'
RUNTIME ERROR: Unexpected type string, expected array
        builtin function <flatMap>
    vendor/ksonnet/ksonnet.beta.4/k8s.libsonnet:23134:57-66 thunk from <function <anonymous>>
    vendor/ksonnet/ksonnet.beta.4/k8s.libsonnet:23134:48-67 function <anonymous>
    utils.libsonnet:(80:23)-(83:24) thunk <subset> from <function <anonymous>>
    utils.libsonnet:89:31-37    thunk from <function <anonymous>>
    vendor/ksonnet/ksonnet.beta.4/k8s.libsonnet:7427:51-58  thunk from <function <anonymous>>
    vendor/ksonnet/ksonnet.beta.4/k8s.libsonnet:7427:42-59  function <anonymous>
    utils.libsonnet:89:9-38 function <anonymous>
    k3s-overrides.jsonnet:8:7-130   object <anonymous>
    main.jsonnet:25:27-46   object <anonymous>
    During manifestation
carlosedp commented 4 years ago

I've just checked-out a clean repo and built it successfully. Maybe try updating jb with GO111MODULE="on" go get -u github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb and then running make update.

NicklasWallgren commented 4 years ago

Ah, k3s.master_ip has changed type to an array in vars.jsonnet.

My mistake, thanks :)

carlosedp commented 4 years ago

Yep, since you can have multiple machines, I've changed the jsonnet so it would create the endpoints to all of them.