carlosedp / cluster-monitoring

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

build error #64

Closed simonspg closed 4 years ago

simonspg commented 4 years ago

First of all, I add my thanks for this project. Here are the steps I just performed:

$ git clone https://github.com/carlosedp/cluster-monitoring.git
Cloning into 'cluster-monitoring'...
remote: Enumerating objects: 1256, done.
remote: Total 1256 (delta 0), reused 0 (delta 0), pack-reused 1256
Receiving objects: 100% (1256/1256), 921.68 KiB | 3.48 MiB/s, done.
Resolving deltas: 100% (878/878), done.

Modified vars.jsonnet, which is attached as vars.txt

$ make vendor
rm -rf vendor
/root/go/bin/jb install
GET https://github.com/coreos/kube-prometheus/archive/17989b42aa10b1c6afa07043cb05bcd5ae492284.tar.gz 200
GET https://github.com/brancz/kubernetes-grafana/archive/57b4365eacda291b82e0d55ba7eec573a8198dda.tar.gz 200
GET https://github.com/ksonnet/ksonnet-lib/archive/0d2f82676817bbf9e4acf6495b2090205f323b9f.tar.gz 200
GET https://github.com/kubernetes-monitoring/kubernetes-mixin/archive/b61c5a34051f8f57284a08fe78ad8a45b430252b.tar.gz 200
GET https://github.com/prometheus/prometheus/archive/74207c04655e1fd93eea0e9a5d2f31b1cbc4d3d0.tar.gz 200
GET https://github.com/coreos/etcd/archive/d8c8f903eee10b8391abaef7758c38b2cd393c55.tar.gz 200
GET https://github.com/coreos/prometheus-operator/archive/e31c69f9b5c6555e0f4a5c1f39d0f03182dd6b41.tar.gz 200
GET https://github.com/kubernetes/kube-state-metrics/archive/d667979ed55ad1c4db44d331b51d646f5b903aa7.tar.gz 200
GET https://github.com/kubernetes/kube-state-metrics/archive/d667979ed55ad1c4db44d331b51d646f5b903aa7.tar.gz 200
GET https://github.com/prometheus/node_exporter/archive/08ce3c6dd430deb51798826701a395e460620d60.tar.gz 200
GET https://github.com/grafana/grafonnet-lib/archive/8fb95bd89990e493a8534205ee636bfcb8db67bd.tar.gz 200
GET https://github.com/grafana/jsonnet-libs/archive/881db2241f0c5007c3e831caf34b0c645202b4ab.tar.gz 200
$ make
Installing jsonnet
go: found github.com/google/go-jsonnet/cmd/jsonnet in github.com/google/go-jsonnet v0.16.0
go: github.com/mattn/go-isatty upgrade => v0.0.12
go: github.com/mattn/go-colorable upgrade => v0.1.6
go: golang.org/x/sys upgrade => v0.0.0-20200620081246-981b61492c35
go: found github.com/google/go-jsonnet/cmd/jsonnetfmt in github.com/google/go-jsonnet v0.16.0
go: github.com/mattn/go-colorable upgrade => v0.1.6
go: github.com/mattn/go-isatty upgrade => v0.0.12
go: golang.org/x/sys upgrade => v0.0.0-20200620081246-981b61492c35
go: github.com/brancz/gojsontoyaml upgrade => v0.0.0-20200602132005-3697ded27e8c
rm -rf manifests
./scripts/build.sh main.jsonnet /root/go/bin/jsonnet
using jsonnet from path
+ set -o pipefail
+ rm -rf manifests
+ mkdir -p manifests/setup
+ jsonnet -J vendor -m manifests main.jsonnet
+ xargs '-I{}' sh -c 'cat {} | $(go env GOPATH)/bin/gojsontoyaml > {}.yaml; rm -f {}' -- '{}'
RUNTIME ERROR: Unexpected type null, expected object
        base_operator_stack.jsonnet:(123:7)-(128:119)   object <anonymous>
        main.jsonnet:31:24-40   object <anonymous>
        During manifestation

make: *** [Makefile:19: manifests] Error 1

vars.txt

Gory19 commented 4 years ago

I also get the same mistake. I suppose it depends on: prometheusPV: ", grafanaPV: " , If you try to write something inside the quotes you no longer get the error.

carlosedp commented 4 years ago

Fixed on https://github.com/carlosedp/cluster-monitoring/commit/71e9e55f4ce0445227cb85ce03f058c1a23f52e0. Please confirm.

simonspg commented 4 years ago

I confirm that 71e9e55 does allow for blank volumeName fields, and completes as designed.