-
Notifications
You must be signed in to change notification settings - Fork 23
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
Sandbox debugging #89
Changes from 3 commits
211fc93
8574900
16ebb1d
8ebcd60
1307457
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
MYGOBIN := $(shell go env GOPATH)/bin | ||
BUILDDIR=$(CURDIR)/.build | ||
CACHEDIR=$(CURDIR)/.cache | ||
export DEFAULTPORCHCONFIGDIR ?= /tmp/kpt-pkg/nephio/core/porch | ||
export DEPLOYPORCHCONFIGDIR ?= $(BUILDDIR)/deploy | ||
DEPLOYKPTCONFIGDIR=$(BUILDDIR)/kpt_pkgs | ||
PORCHDIR=$(abspath $(CURDIR)) | ||
|
@@ -256,6 +257,26 @@ run-in-kind-no-controller: IMAGE_TAG=test | |
run-in-kind-no-controller: SKIP_CONTROLLER_BUILD=true | ||
run-in-kind-no-controller: load-images-to-kind deployment-config-no-controller deploy-current-config ## Build and deploy porch without the controllers into a kind cluster | ||
|
||
.PHONY: run-default | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Couldn't we achieve the same effect by something similar to the following process:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. but the simplest solution IMO is to undeploy the porch instance that was deployed by the ansible playbook (call There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The problem there is that if you uninstall, it undefines all the package variants and packagerevisions that are put in place by the Nephio install. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The problem I had was that I couldn't get There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
OK, I will try this out There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By the way a tiny opinion, is it possible to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is all changed int he new version of the PR. |
||
run-default: undeploy-config deploy-default-config ## Run the default deployment in $(DEFAULTPORCHCONFIGDIR) in kind | ||
|
||
.PHONY: run-override-in-kind | ||
run-override-in-kind: IMAGE_REPO=porch-kind | ||
run-override-in-kind: IMAGE_TAG=test | ||
run-override-in-kind: undeploy-config load-images-to-kind deployment-config deploy-override-config ## Run the override deployment in $(DEPLOYPORCHCONFIGDIR) in kind | ||
|
||
.PHONY: run-override-in-kind-no-server | ||
run-override-in-kind-no-server: IMAGE_REPO=porch-kind | ||
run-override-in-kind-no-server: IMAGE_TAG=test | ||
run-override-in-kind-no-server: SKIP_PORCHSERVER_BUILD=true | ||
run-override-in-kind-no-server: undeploy-config load-images-to-kind deployment-config-no-server deploy-override-config ## Run the override deployment in $(DEPLOYPORCHCONFIGDIR) in kind without the porch server | ||
|
||
.PHONY: run-override-in-kind-no-controller | ||
run-override-in-kind-no-controller: IMAGE_REPO=porch-kind | ||
run-override-in-kind-no-controller: IMAGE_TAG=test | ||
run-override-in-kind-no-controller: SKIP_CONTROLLER_BUILD=true | ||
run-override-in-kind-no-controller: undeploy-config load-images-to-kind deployment-config-no-controller deploy-override-config ## Run the override deployment in $(DEPLOYPORCHCONFIGDIR) in kind without the porch controller | ||
|
||
.PHONY: destroy | ||
destroy: ## Deletes all porch resources installed by the last run-in-kind-* command | ||
kpt live destroy $(DEPLOYPORCHCONFIGDIR) | ||
|
@@ -329,6 +350,31 @@ deploy-current-config: ## Deploy the configuration that is currently in $(DEPLOY | |
@kubectl rollout status deployment porch-server --namespace porch-system 2>/dev/null || true | ||
@echo "Done." | ||
|
||
.PHONY: deploy-default-config | ||
deploy-default-config: ## Deploy or redeploy the default Porch deployments in $(DEFAULTPORCHCONFIGDIR) | ||
kubectl apply -f $(DEFAULTPORCHCONFIGDIR)/2-function-runner.yaml | ||
kubectl apply -f $(DEFAULTPORCHCONFIGDIR)/3-porch-server.yaml | ||
kubectl apply -f $(DEFAULTPORCHCONFIGDIR)/9-controllers.yaml | ||
|
||
.PHONY: deploy-override-config | ||
deploy-override-config: ## Deploy the override Porch deployments in $(DEPLOYPORCHCONFIGDIR) | ||
kubectl apply -f $(DEPLOYPORCHCONFIGDIR)/9-controllers.yaml | ||
kubectl apply -f $(DEPLOYPORCHCONFIGDIR)/3-porch-server.yaml | ||
kubectl apply -f $(DEPLOYPORCHCONFIGDIR)/3-porch-server-endpoints.yaml || true | ||
kubectl apply -f $(DEPLOYPORCHCONFIGDIR)/2-function-runner.yaml | ||
kubectl expose svc -n porch-system function-runner --name=xfunction-runner --type=LoadBalancer --load-balancer-ip='172.18.0.202' | ||
|
||
.PHONY: undeploy-config | ||
undeploy-config: ## Undeploy the default Porch deployments in $(DEFAULTPORCHCONFIGDIR) and $(DEPLOYPORCHCONFIGDIR) | ||
kubectl delete -f $(DEFAULTPORCHCONFIGDIR)/9-controllers.yaml || true | ||
kubectl delete -f $(DEFAULTPORCHCONFIGDIR)/3-porch-server.yaml || true | ||
kubectl delete -f $(DEFAULTPORCHCONFIGDIR)/2-function-runner.yaml || true | ||
kubectl delete -f $(DEPLOYPORCHCONFIGDIR)/9-controllers.yaml || true | ||
kubectl delete -f $(DEPLOYPORCHCONFIGDIR)/3-porch-server-endpoints.yaml || true | ||
kubectl delete -f $(DEPLOYPORCHCONFIGDIR)/3-porch-server.yaml || true | ||
kubectl delete -f $(DEPLOYPORCHCONFIGDIR)/2-function-runner.yaml || true | ||
kubectl delete svc -n porch-system xfunction-runner || true | ||
|
||
PKG=gitea-dev | ||
.PHONY: deploy-gitea-dev-pkg | ||
deploy-gitea-dev-pkg: | ||
|
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.
Is the IP of the function-runner the only difference between "Launch Server" and "Launch Override Server"? If yes, could we avoid copy-pasting here by using e.g. environment variables?
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.
Or even better can we use the same IP in both setups? What prevents this?
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 would vote for the environmental variable approach.
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 is fixed in the latest PR.