-
Notifications
You must be signed in to change notification settings - Fork 230
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
Add support to rke2 and k3s #737
Conversation
ffcae95
to
f550cc1
Compare
b79d74f
to
7097e25
Compare
@rawmind0
Same error occurs also when trying to generate the Kubeconfig at https://rancher/v3/clusters:
This error makes it impossible to run the registration node_commands on the nodes with Terraform as its execution gets aborted. |
@revog , thanks for the feedback, that's still WIP |
I know ;-) - just wanted to let you know |
Anyway, i didn't get this error anytime on all my tests. Are you getting it consistently?? It seems something related with the Rancher API availability |
Tested k3s and rke2 clusters deployments for custom and amazonec2:
|
Yes we got this error all the time. The main difference to your deployments is, that we are using Rancher and RKE2 on-premise NOT in the cloud. I could imagine that the behavior in these 2 contexts could be different? We temporarily fixed it in file
|
I've tested both scenarios, on premise and in the cloud, not getting this error anytime. It should be related with a race condition. Same issue has been reported here, #742
Thanks for the fix proposal but i think a retry option should fit better as here the |
@revog , updated PR adding a fix for the kube-config issue, https://github.com/rancher/terraform-provider-rancher2/pull/737/files#diff-035d1bb527d3ce1fde79a8bf6a191e1c441f7e2074f17caa106ba35a66fefa0bR576 Could you please test it as i'm not able to reproduce it?? Thanks! |
Great, with the fix the error is gone. Thank you! |
Hi @rawmind0
What's the correct way for passing custom parameters to the K8s components like apiserver, controllermanger or kube-scheduler? |
Hi @revog , yes, this is expected as tf map type is a |
Updated PR to use |
Hi @rawmind0
Were there again changes regarding this function? |
Hi @revog , the function didn't changed. You are getting a timeout. It seems something related to your Rancher installation. The timeout is configurable, have you tried to increase it?? https://registry.terraform.io/providers/rancher/rancher2/latest/docs#timeout |
I did some further investigation and found the cause. As long as I disable ACE the cluster get created in Rancher and kubeconfig is avaiilable. But when I enable ACE (by setting For testing I took the former build (without the So my assumption is still, that something changed in the code? |
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.
Reviewed for new attributes, resources, and data source matches with the changelog. Are any of these files generated by Rancher? How would I know if they are?
Thanks for the review @annablender. The provider is using Rancher API to work, but none of these files are generated by Rancher. For generated files, we use to use special prefix as |
As mentioned, the |
Hmm that's strange. When I take the latest build and disable ACE (
If I take the former build (without the change related to Sorry, but I don't get it why this behavior occurs?! // UPDATE |
@revog thanks for the further investigation on this. I've done some testing just using the rancher API (outside tfp), and getting same 503 result when ACE is enabled.
I've added another fix to the tf provider, just logging a warn instead of error on |
…mand and insecure_windows_node_command
…ntial_config.default_region
Great, it works now as expected. Thank you. |
Requires #711