-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (36 loc) · 1.09 KB
/
Makefile
File metadata and controls
44 lines (36 loc) · 1.09 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
CONTAINER_TAG ?= "test"
# Application arguments
ACTIVE_SERIES_MAX ?= 5
CONFIGMAP_NAME ?= thanos-receive-limits
CONFIGMAP_GENERATED_NAME ?= thanos-receive-limits-generated
STATEFULSET_LABEL ?= controller.limits.thanos.io="true"
# Metrics
METRICS_PORT ?= "9096"
METRICS_PATH ?= "/metrics"
export LOG_LEVEL=debug
export NAMESPACE=default
container-build:
docker build -t $(CONTAINER_TAG) .
container-run:
printenv
docker run \
--network=host \
-e LOG_LEVEL="debug" \
-v $$HOME/.kube:/app/.kube \
test \
./thanos-limits-controller \
-configmap-name=$(CONFIGMAP_NAME) \
-configmap-generated-name=$(CONFIGMAP_GENERATED_NAME) \
-statefulset-label $(STATEFULSET_LABEL) \
-active-series-max=$(ACTIVE_SERIES_MAX)
build:
CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o ./thanos-limits-controller .
run:
go run ./main.go \
-configmap-name $(CONFIGMAP_NAME) \
-configmap-generated-name $(CONFIGMAP_GENERATED_NAME) \
-statefulset-label $(STATEFULSET_LABEL) \
-active-series-max $(ACTIVE_SERIES_MAX) \
-interval 10s \
-metrics-port $(METRICS_PORT) \
-metrics-path $(METRICS_PATH)