Closed vyas-n closed 1 year ago
There doesn't seem to be a way to set it.
Here is how it's set in k0sctl
:
https://github.com/k0sproject/k0sctl/blob/04a76d8461934b92ed77d89bebb2cc90a5afce89/cmd/apply.go#L60
I guess this is where it should be set in terraform-provider-k0s
but it's not:
https://github.com/alessiodionisi/terraform-provider-k0s/blob/ad2915553e310d532205aaae0287a651c284f184/internal/provider/cluster_resource.go#L310-L344
I opened a PR https://github.com/alessiodionisi/terraform-provider-k0s/pull/61 that adds the feature, I still have to test it :D
PR https://github.com/alessiodionisi/terraform-provider-k0s/pull/61 has been merged, release coming soon
Is there a workaround for this until the fix is released?
@andyrue at the moment, nothing native with terraform.
For the time being I've been:
k0sctl.yaml
file using terraform's yamlencode function.k0sctl apply --kubeconfig-out kubeconfig.yaml --no-wait
manually in the terminal (you could replace this with a null_resource and a local-exec provisioner)kubeconfig.yaml
file using the file & yamldecode functions, then passing that data to the kubernetes & helm terraform providers.Thanks @alessiodionisi, I was able to successfully setup the k0s cluster using the new no_wait
flag!
Thanks for creating this terraform provider!
I'm currently using k0s with a custom CNI and to install I usually use
k0sctl apply --no-wait
because by default k0sctl waits for all the worker nodes to be in a Ready state before exiting. This flag--no-wait
overrides this behavior and lets the installer succeed after installing k0s without waiting for the worker nodes to enter a Ready state.Is there a way to do the same with this terraform provider?