-
Notifications
You must be signed in to change notification settings - Fork 500
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
Support running stability test out of cluster #397
Conversation
Signed-off-by: Aylei <rayingecho@gmail.com>
Signed-off-by: Aylei <rayingecho@gmail.com>
@cofyc @onlymellb @xiaojingchen PTAL again |
Signed-off-by: Aylei <rayingecho@gmail.com>
I've updated the docs too |
Signed-off-by: Aylei <rayingecho@gmail.com>
Signed-off-by: Aylei <rayingecho@gmail.com>
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.
LGTM
func checkoutTag(tagName string) error { | ||
cmd := fmt.Sprintf(`cd /tidb-operator && | ||
func (oa *operatorActions) checkoutTag(tagName string) error { | ||
cmd := fmt.Sprintf(`cd %s && | ||
git stash -u && | ||
git checkout %s && | ||
mkdir -p /charts/%s && | ||
cp -rf charts/tidb-operator /charts/%s/tidb-operator && | ||
cp -rf charts/tidb-cluster /charts/%s/tidb-cluster && | ||
cp -rf charts/tidb-backup /charts/%s/tidb-backup`, |
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 not block this PR) Is it possible to copy them to temporary directories which are always writable in the future? I guess the path does not matter here. Then we can simplify the workflow (do not need to prepare /charts
).
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.
Agreed for future work, I've tried but found that /charts
is hard coded in many places😅
…y provided Signed-off-by: Aylei <rayingecho@gmail.com>
@cofyc @xiaojingchen @weekface @onlymellb I've updated the doc, PTAL again. |
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.
LGTM
/run-e2e-tests |
1 similar comment
/run-e2e-tests |
Deploy & witness flow can be tedious when developing stability-test, this PR introduce the ability to run stability-test out of the cluster(your local machine, usually) while still operating the remote cluster.
How-to: generally we have three problems to solve:
TL;DR:
Explained
kubeconfig
command line option provided, use itKUBECONFIG
env variable set, use itInClusterConfig()
InClusterConfig()
provided, try loading kubeconfig file from default location (~/.kube/config
)so typically you will get right client configs if you have proper
~/.kube/config
in your local environment.--git-repo-dir=xxxx
, but helm dir must be created manually.telepresence
helps with that, it creates a proxy pod in the cluster and open a vpn connection to kubernetes cluster via this pod. Just run (full documentations):$ brew cask install osxfuse $ brew install datawire/blackbird/telepresence $ telepresence --new-deployment ${POD_NAME}
PS: If you cannot resolve cluster dns names after set up, try clear DNS cache.
PSS: Typically you can't use telepresence VPN mode with other VPNs (of course SSR is ok).
Signed-off-by: Aylei rayingecho@gmail.com