etcd/contrib/mixin/Makefile
Vitaly Zhuravlev e282e6c111 Fix typo in mixin Makefile
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-07-17 09:32:59 +00:00

28 lines
903 B
Makefile

.PHONY: tools manifests test clean jb_install
OS := linux
ARCH ?= amd64
PROMETHEUS_VERSION := 2.33.1
tools:
go install github.com/google/go-jsonnet/cmd/jsonnet@latest
go install github.com/brancz/gojsontoyaml@latest
go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest
wget -qO- "https://github.com/prometheus/prometheus/releases/download/v${PROMETHEUS_VERSION}/prometheus-${PROMETHEUS_VERSION}.${OS}-${ARCH}.tar.gz" |\
tar xvz --strip-components=1 -C "$$(go env GOPATH)/bin" prometheus-${PROMETHEUS_VERSION}.${OS}-${ARCH}/promtool
manifests: manifests/etcd-prometheusRules.yaml
manifests/etcd-prometheusRules.yaml:
mkdir -p manifests
jsonnet -e '(import "mixin.libsonnet").prometheusAlerts' | gojsontoyaml > manifests/etcd-prometheusRules.yaml
test: manifests/etcd-prometheusRules.yaml
promtool test rules test.yaml
jb_install:
jb install
clean:
rm -rf manifests/*.yaml