terraform-provider-k0s
terraform-provider-k0s copied to clipboard
Raw SSH key support, k0sctl.yaml config output, read phase retries
This is only a draft, but I wanted to let the community know that it's soon to be completed :)
Scope:
- add other option to pass SSH key - as raw PEM-encoded string #94
- add k0sctlconfig as output, so it can be used with k0sctl CLI #76
- handle situation, where k0s leader is not available - attempt to validate cluster on Read phase using all controllers
- investigate ways of actual node removal #95
It can be tested with https://registry.terraform.io/providers/danielskowronski/k0s/
Thanks for the PR! I'll do a review within the next week.
It won't be easy to implement https://github.com/alessiodionisi/terraform-provider-k0s/issues/95 as issue seems to reside in k0sctl itself (https://github.com/k0sproject/k0sctl/issues/603) plus some features were added but are not yet released with version number.
I'll try to figure out if some quick fix can be applied, e.g. by setting Reset flag dynamically on Read phase based upon detected need to rebuild the controller. But most likely it'll need to go out of scope of this PR and the relevant issue would wait for k0sctl implementation.
I prefer to wait k0sctl implementation, can you please rebase the PR? I can't do it because I can't commit to your branch.
I prefer to wait k0sctl implementation
We'll need to wait for https://github.com/k0sproject/k0sctl/issues/603 and I assume it'd "just work". Otherwise, some logic would need to be applied as described previously.
Basically, k0sctl/k0s currently does not provide anything that a typical Terraform provider could use as a source of truth it can read at any given moment - for example, import operation can't be implemented from live cluster without any k0sctl.yaml file.
can you please rebase the PR? I can't do it because I can't commit to your branch.
Done
@alessiodionisi Any change you can merge this in an release it?
Can you merge this?