Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ git-ask-pass.sh
/go-diagrams/
/.run/
pprof
__debug_bin
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ K3D := $(shell if [[ "`which kubectl`" != '' ]] && [[ "`kubect
LOG_LEVEL := debug
UPPERIO_DB_DEBUG := 0
NAMESPACED := true
PROCFILE := $(shell EXCLUDE=$(EXCLUDE) ./hack/prepare-procfile.sh)

ifeq ($(PROFILE),prometheus)
RUN_MODE := kubernetes
Expand Down Expand Up @@ -426,7 +427,8 @@ test-images:
$(call docker_pull,python:alpine3.6)

$(GOPATH)/bin/goreman:
go get github.com/mattn/goreman
# use GO111MODULE=off so it won't add this to go.mod
GO111MODULE=off go get github.com/mattn/goreman

.PHONY: start
ifeq ($(RUN_MODE),kubernetes)
Expand Down Expand Up @@ -455,7 +457,7 @@ endif
sleep 10s
./hack/port-forward.sh
ifeq ($(RUN_MODE),local)
env DEFAULT_REQUEUE_TIME=$(DEFAULT_REQUEUE_TIME) SECURE=$(SECURE) ALWAYS_OFFLOAD_NODE_STATUS=$(ALWAYS_OFFLOAD_NODE_STATUS) LOG_LEVEL=$(LOG_LEVEL) UPPERIO_DB_DEBUG=$(UPPERIO_DB_DEBUG) VERSION=$(VERSION) AUTH_MODE=$(AUTH_MODE) NAMESPACED=$(NAMESPACED) NAMESPACE=$(KUBE_NAMESPACE) $(GOPATH)/bin/goreman -set-ports=false -logtime=false start
env DEFAULT_REQUEUE_TIME=$(DEFAULT_REQUEUE_TIME) SECURE=$(SECURE) ALWAYS_OFFLOAD_NODE_STATUS=$(ALWAYS_OFFLOAD_NODE_STATUS) LOG_LEVEL=$(LOG_LEVEL) UPPERIO_DB_DEBUG=$(UPPERIO_DB_DEBUG) VERSION=$(VERSION) AUTH_MODE=$(AUTH_MODE) NAMESPACED=$(NAMESPACED) NAMESPACE=$(KUBE_NAMESPACE) $(GOPATH)/bin/goreman -f $(PROCFILE) -set-ports=false -logtime=false start
endif

.PHONY: wait
Expand Down
23 changes: 23 additions & 0 deletions hack/prepare-procfile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
set -eu -o pipefail -o nounset

exclude=${EXCLUDE:-}

if [[ -z ${exclude} ]]; then
echo "$PWD/Procfile"
exit 0
fi

tempfile=$(mktemp)
cat ./Procfile > $tempfile

IFS=', ' read -r -a excluded <<< "$exclude"

for PROC in "${excluded[@]}"
do
sed -i "" "/^$PROC/d" $tempfile
#cat $tempfile
#echo $filtered > $tempfile
done

echo $tempfile