-
Notifications
You must be signed in to change notification settings - Fork 106
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 deployers passing additional information to testers #87
Comments
Yes, this was one of the objectives from the very start; to discourage non standard information being passed around. Can this information be computed after we have access to the cluster? in which case we should definitely do that inside the tester. If not, one workaround that was mentioned as part of the design is to generate well-known files under ARTIFACTS (which is also exposed to testers), but that comes at the risk of testers starting to rely on those existing. see: |
Inferring the information as much as possible is the right way to go /close can reopen if we run into more problems |
@amwat: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Currently a tester is invoked with only arguments provided from the kubetest2 invocation (
kubetest2 ... -- --tester-args-here
) along with some environment variables. The deployer can optionally provide a kubeconfig file to the tester via an interface:kubetest2/pkg/app/app.go
Lines 128 to 133 in d56fa28
As I build kubetest2 support for Kops I'm noticing that certain testers have flags whose values are only known by the deployer rather than the process invoking kubetest2.
For example a kubectl test relies on a Host flag, but the cluster's apiserver host name isn't known at the time that kubetest2 is invoked, so appending it to the end of the kubetest2 command isn't possible. Many of the
cloudConfig
flags intest_context.go
have values that aren't known until the deployer has deployed the cluster too.It would be nice to have a way for a deployer to provide a set of arguments and/or environment variables to the tester. One idea is to add a
DeployerWithTesterArgs
interface similar to theDeployerWithKubeconfig
interface:One concern I have with that is the deployer would need to know which tester is being used in order to provide it the necessary arguments. The tester interface doesn't provide any sort of identifier that we could pass into the new interface's function. We could add a
Name
toTester
:but this increasingly tight coupling feels contradictory to kubetest2's objectives.
Any thoughts or ideas on how to provide testers with additional info they need from deployers? I'm happy to implement something if we reach a consensus.
The text was updated successfully, but these errors were encountered: