-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
28 lines (21 loc) · 767 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
GOPATH?=$(HOME)/go
BIN_DIR=$(GOPATH)/bin
export PATH:=$(BIN_DIR):$(PATH)
init: jb
cd prometheus-pushgateway && jb install
jb:
@echo -e "\033[1m>> Ensuring jb (jsonnet-bundler) is installed\033[0m"
go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb
gojsontoyaml:
@echo -e "\033[1m>> Ensuring gojsontoyaml is installed\033[0m"
go get github.com/brancz/gojsontoyaml
createFolders:
rm -rf manifests
mkdir manifests
generateJson: init
jsonnet -J prometheus-pushgateway/vendor -J . example.jsonnet
generateYaml: init gojsontoyaml createFolders
jsonnet -J prometheus-pushgateway/vendor -m manifests example.jsonnet | xargs -I{} sh -c 'cat {} | gojsontoyaml > {}.yaml; rm -f {}' -- {}
cat manifests/*
deploy: generateYaml
kubectl apply -f manifests/