-
Notifications
You must be signed in to change notification settings - Fork 85
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
Enable receiving a rest config on TestSuite #348
Conversation
interesting @alifelan and thank you! Apologies for missing the submitted issue which provided some of the context. let's continue a conversation on the issue and return here. It's a fairly small PR.. just need to understand the consequences of it. Does this PR resolve the env issue for you? |
Hey @kensipe! No problem, hope it makes more sense with the context in the issue, the PR is actually really small. But yeah, by doing this we can have KUTTL connect to the cluster using the rest config. |
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.
@alifelan ok... enough thinking... more doing (on my part). I can't think of an issue here... it is an optional element. As noted below, I have a preference to have config selection fall into the same logic.. additionally this will not immediately return but will create a kubeconfig
file which is used for some of the commands if included in the kuttl tests.
It would be great to have a test for this need feature as well.
This change + a test for the new configuration and we can land this.
Is that something you are up for? or should I merge and create a PR to cover it?
pkg/test/harness.go
Outdated
@@ -236,6 +236,11 @@ func (h *Harness) Config() (*rest.Config, error) { | |||
return h.config, nil | |||
} | |||
|
|||
if h.TestSuite.Config != nil { |
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.
while this looks similar to the quick exit above... it isn't the same IMO. I would rather the switch
below be the ways in which the h.config
is configured... more importantly we should h.T.Log
this.
Signed-off-by: Ali Felan <alifelan@google.com>
Sounds great! I updated it, now the check is in the switch, and also added a test. I'm looking for feedback on that, since I tried creating a test environment using |
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
Thanks so much!
the CI doesn't seem to run for non-committers... I don't remember the details around this... all standard CI activities tested good. Ready to merge. Adding a todo to enable CI for all PRs |
For awareness.. this broken main on merge... I should have caught it on review... but I blame the lack of CI builds for non-committers as the issue. The |
:( well @alifelan I need to revert this PR. It would be get to support this if it helps... but the generated deepcopy code fails. We need a solution to that in order to move forward.
and the builds fail
|
@alifelan any thoughts on re-attempting this PR? I hated reverting it.. but need main to be buildable. |
Hey @kensipe! I've been taking a look, though I don't have a solution yet. Seems like |
Adds to the options for kuttl start-up. Now a Rest Config can be provided as part of the kuttl.config for connectivity to a cluster. Signed-off-by: Ali Felan <alifelan@google.com> Signed-off-by: Israel Blancas <iblancasa@gmail.com>
kudobuilder#359) This reverts commit 769fd23. Signed-off-by: Israel Blancas <iblancasa@gmail.com>
Signed-off-by: Ali Felan alifelan@google.com
What this PR does / why we need it:
This adds an extra option to TestSuite, which allows KUTTL to run with a rest config, opening possibilities for customization on Go.
This is still missing testing and documentation, but wanted to share it to get feedback. My first try was making the config an exported name in harness, but that required a lot of changes in names (config to Config and Config() to GetConfig()). Adding it to TestSuite was easier, but it's the only non primitive type there.
Fixes #347