-
Notifications
You must be signed in to change notification settings - Fork 202
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
e2e scenario test: Build with workspace #478
Conversation
Assuming we are in ~/testit/cloud-provider-gcp, and k8s is checked out into ~/testit/kubernetes ...
|
lovely |
6beafc8
to
341cb2a
Compare
341cb2a
to
421f3e2
Compare
@@ -86,7 +86,9 @@ if [[ -z "${ADMIN_ACCESS}" ]]; then | |||
fi | |||
echo "ADMIN_ACCESS=${ADMIN_ACCESS}" | |||
|
|||
create_args="--networking gce" | |||
# cilium does not yet pass conformance tests (shared hostport test) |
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.
Not sure how we're getting around this elsewhere... this is the seemingly well-known cilium/cilium#14287
@@ -103,13 +105,21 @@ echo "KOPS_FEATURE_FLAGS=${KOPS_FEATURE_FLAGS}" | |||
# Note that these arguments for kubetest2 and kOps, not (for example) the arguments passed to the cloud-provider-gcp | |||
KUBETEST2_ARGS="kops --kops-binary-path=${BINDIR}/kops" | |||
KUBETEST2_ARGS="${KUBETEST2_ARGS} -v=2 --cloud-provider=${CLOUD_PROVIDER}" | |||
KUBETEST2_ARGS="${KUBETEST2_ARGS} --cluster-name=${CLUSTER_NAME:-} --kops-root=${REPO_ROOT}" | |||
KUBETEST2_ARGS="${KUBETEST2_ARGS} --cluster-name=${CLUSTER_NAME:-} --kops-root=${WORKSPACE}/kops" |
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.
(Fixing an error in the original script)
KUBETEST2_ARGS="${KUBETEST2_ARGS} --admin-access=${ADMIN_ACCESS:-} --env=KOPS_FEATURE_FLAGS=${KOPS_FEATURE_FLAGS}" | ||
|
||
if [[ -n "${GCP_PROJECT:-}" ]]; then | ||
KUBETEST2_ARGS="${KUBETEST2_ARGS} --gcp-project=${GCP_PROJECT}" | ||
fi | ||
|
||
if [[ -n "${STAGE_LOCATION:-}" ]]; then |
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.
These are useful when debugging locally.
I'm using a command like
export KUBE_SSH_USER=${USER}; SSH_PRIVATE_KEY=~/.ssh/google_compute_engine STAGE_LOCATION=gs://kops-dev-$(gcloud config get project)-${USER}/ e2e/scenarios/kops-simple 2>&1 | tee log
@@ -125,18 +135,17 @@ fi | |||
|
|||
kubetest2 ${KUBETEST2_ARGS} \ | |||
--up \ | |||
\ | |||
--build \ |
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.
(--build will build kOps, which is needed because otherwise we can be mixing versions here, between the binary we built above and supporting binaries like the on-node agent)
kubetest2 ${KUBETEST2_ARGS} \ | ||
--test=kops \ | ||
-- \ | ||
--test-package-version="${K8S_VERSION}" \ | ||
--parallel=25 \ | ||
--parallel=30 \ |
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.
Just to match what you did in your example :-)
e2e/setup-kops.sh
Outdated
@@ -0,0 +1,29 @@ | |||
#!/usr/bin/env bash |
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 file isn't strictly necessary, but included for homogeneity with setup-kube.sh
e2e/setup-kube.sh
Outdated
# Clone kubernetes into ${WORKSPACE}/kubernetes | ||
cd "${WORKSPACE}" | ||
KUBE_VERSION=${KUBE_VERSION:-master} | ||
git clone --depth 1 --branch ${KUBE_VERSION} https://github.com/kubernetes/kubernetes kubernetes |
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.
Maybe we should assume this has already been done, either by prow with extra_refs
, or by a user that is developing and setting up a local development workspace.
In the local-development scenario, I imagine we want the go work...
commands (and workarounds for go.mod), but maybe these don't belong under e2e
?
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.
Maybe we should assume this has already been done, either by prow with extra_refs, or by a user that is developing and setting up a local development workspace.
yes, I think that is the best approach
/assign @aojea |
We tweak the scenarios and make it easier to run with a go workspace, including building with the latest k/k. Co-authored-by: Antonio Ojea <aojea@google.com>
421f3e2
to
0110c88
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aojea, justinsb The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
We tweak the scenarios and make it easier to run with a go workspace, including building with the latest k/k.