-
Notifications
You must be signed in to change notification settings - Fork 159
Export kubectl path to test #370
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
Export kubectl path to test #370
Conversation
test/k8s-integration/cluster.go
Outdated
@@ -193,5 +194,14 @@ func getGKEKubeTestArgs() ([]string, error) { | |||
fmt.Sprintf("--gcp-project=%s", project[:len(project)-1]), | |||
} | |||
|
|||
out, err := exec.Command("which", "kubectl").Output() |
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.
where does kubectl come from? The test container image binary? kubectl has interesting compatibility behavior with Kubernetes versions. The kubectl version from the container image may get stale. How do our regular gke tests get kubectl?
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.
It comes from the test image. There really isnt a way to make sure kubectl version is compatible with GKE version unless we build the exact version of kubectl for our GKE cluster version. We can get close by using kubectl built in the testing directory, so at least as long as were using the latest k8s e2e tests then kubectl version >= gke version.
I updated the code to do 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.
Is this what normal gke tests do? We should follow closely what is done for the regular tests.
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 you mean other tests not owned by sig storage that run on GKE? They do t try to boot their own gke cluster. They let kubetest do the cluster up. And thus they dont have to worry about kubectl as kubetest will manage that for them.
9d4b3f6
to
309d74a
Compare
309d74a
to
bb96f88
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hantaowang, msau42 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 |
/retest |
What type of PR is this?
/kind failing-test
What this PR does / why we need it:
We previous had a PR to export the kubectl path #352 that was closed in favor of another PR #358, but oddly the kubectl path fix was never actually included in that second PR. This adds the fix.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: