siderolabs / terraform-provider-talos

Mozilla Public License 2.0
123 stars 17 forks source link

Replacement for `wait` param in `talos_cluster_kubeconfig` #148

Closed braska closed 3 months ago

braska commented 8 months ago

Since wait in talos_cluster_kubeconfig was deprecated there is no way to await for Kubernetes API to be available.

I have a use case when I deploy Talos cluster with cluster.network.cni.name = "none". So talos_cluster_health never resolves until I deploy CNI (it is actually even crushing on a first tf apply with rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 10.40.0.10:50000: connect: connection refused", but that's a different issue). My plan was to use Helm Terraform provider to deploy CNI immediately after Kubernetes API becomes available. But there is no way to do it with latest version.

As a workaround, I will use null_resource and custom script to check Kubernetes API availability, but what to you think about un-deprecating wait param in talos_cluster_kubeconfig? Or maybe better to introduce changes to talos_cluster_health and make it return detailed health report with bunch of true/false values related to health of individual components?

smira commented 7 months ago

Should be addressed with configurable health checks.

michaelbeaumont commented 5 months ago

Also wait wasn't deprecated, it was just broken immediately. https://github.com/siderolabs/terraform-provider-talos/pull/105 removed the logic but left the parameter. That's not really deprecation and it's actually kind of worse than just removing the parameter. Deprecation would leave it working with a clear alternative but mark that it's going to be removed.

michaelbeaumont commented 5 months ago

@smira is there any information about configurable health checks? I can't find anything here or on https://github.com/siderolabs/talos

smira commented 5 months ago

@smira is there any information about configurable health checks? I can't find anything here or on siderolabs/talos

There are no configurable health checks, my message was a planning note on how to implement a better way.