-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: Add make nuke
; speed-up make start
#5583
Conversation
Signed-off-by: Alex Collins <alex_collins@intuit.com>
Codecov Report
@@ Coverage Diff @@
## master #5583 +/- ##
==========================================
+ Coverage 47.01% 47.10% +0.08%
==========================================
Files 240 240
Lines 15002 15002
==========================================
+ Hits 7053 7066 +13
+ Misses 7048 7038 -10
+ Partials 901 898 -3
Continue to review full report at Codecov.
|
@@ -444,7 +460,7 @@ $(GOPATH)/bin/goreman: | |||
|
|||
.PHONY: start | |||
ifeq ($(RUN_MODE),local) | |||
start: install executor-image controller cli $(GOPATH)/bin/goreman | |||
start: install controller cli $(GOPATH)/bin/goreman |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change means that we don't wait for the executor to be built before starting up, useful for UI only work
controller: PNS_PRIVILEGED=true DEFAULT_REQUEUE_TIME=${DEFAULT_REQUEUE_TIME} LEADER_ELECTION_IDENTITY=local ALWAYS_OFFLOAD_NODE_STATUS=${ALWAYS_OFFLOAD_NODE_STATUS} OFFLOAD_NODE_STATUS_TTL=30s WORKFLOW_GC_PERIOD=30s UPPERIO_DB_DEBUG=${UPPERIO_DB_DEBUG} ARCHIVED_WORKFLOW_GC_PERIOD=30s ./dist/workflow-controller --executor-image ${IMAGE_NAMESPACE}/argoexec:${VERSION} --namespaced=${NAMESPACED} --namespace ${NAMESPACE} --loglevel ${LOG_LEVEL} | ||
argo-server: UPPERIO_DB_DEBUG=${UPPERIO_DB_DEBUG} ./dist/argo --loglevel ${LOG_LEVEL} server --namespaced=${NAMESPACED} --namespace ${NAMESPACE} --auth-mode ${AUTH_MODE} --secure=$SECURE --x-frame-options=SAMEORIGIN | ||
ui: yarn --cwd ui install && yarn --cwd ui start | ||
executor-image : make executor-image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we build it here instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have to wait to start workflows in this case? Is there a way to know when we are ready to do so? I guess Pods will just take longer to start up, although they could BackOff
make nuke
; speed up make start
make nuke
; speed-up make start
@@ -57,7 +55,9 @@ endif | |||
# * `local` run the workflow–controller and argo-server as single replicas on the local machine (default) | |||
# * `kubernetes` run the workflow-controller and argo-server on the Kubernetes cluster | |||
RUN_MODE := local | |||
K3D := $(shell if [[ "`which kubectl`" != '' ]] && [[ "`kubectl config current-context`" == "k3d-"* ]]; then echo true; else echo false; fi) | |||
KUBECTX := $(shell [[ "`which kubectl`" != '' ]] && kubectl config current-context || echo none) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you only get make nuke
for KUBECTX=docker-desktop OR KUBECTX=k3d-*
|
@@ -416,6 +420,18 @@ ifeq ($(RUN_MODE),kubernetes) | |||
kubectl -n $(KUBE_NAMESPACE) scale deploy/argo-server --replicas 1 | |||
endif | |||
|
|||
# nuke is like "clean" but attempts to return you to a state as if it had never been installed at all | |||
# this only available in "safe" local development | |||
ifeq (true,$(filter true, $(DOCKER_DESKTOP) $(K3D))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
k3d
is not guaranteed to be a dev env, but if you're using make nuke
you better know what you're doing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope that "nuke" help people be careful - but k3d should only be desktop - k3s might not
controller: PNS_PRIVILEGED=true DEFAULT_REQUEUE_TIME=${DEFAULT_REQUEUE_TIME} LEADER_ELECTION_IDENTITY=local ALWAYS_OFFLOAD_NODE_STATUS=${ALWAYS_OFFLOAD_NODE_STATUS} OFFLOAD_NODE_STATUS_TTL=30s WORKFLOW_GC_PERIOD=30s UPPERIO_DB_DEBUG=${UPPERIO_DB_DEBUG} ARCHIVED_WORKFLOW_GC_PERIOD=30s ./dist/workflow-controller --executor-image ${IMAGE_NAMESPACE}/argoexec:${VERSION} --namespaced=${NAMESPACED} --namespace ${NAMESPACE} --loglevel ${LOG_LEVEL} | ||
argo-server: UPPERIO_DB_DEBUG=${UPPERIO_DB_DEBUG} ./dist/argo --loglevel ${LOG_LEVEL} server --namespaced=${NAMESPACED} --namespace ${NAMESPACE} --auth-mode ${AUTH_MODE} --secure=$SECURE --x-frame-options=SAMEORIGIN | ||
ui: yarn --cwd ui install && yarn --cwd ui start | ||
executor-image : make executor-image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have to wait to start workflows in this case? Is there a way to know when we are ready to do so? I guess Pods will just take longer to start up, although they could BackOff
Yes. This will always be shorter than current. |
No description provided.