equinix-labs / terraform-equinix-kubernetes-cluster

Kubernetes cluster deployment on Equinix Metal
https://registry.terraform.io/modules/equinix-labs/kubernetes-cluster/equinix/latest
Apache License 2.0
1 stars 5 forks source link

feat: enable other modules to wait until the cluster is created before running #27

Closed ctreatma closed 11 months ago

ctreatma commented 12 months ago

We've seen intermittent integration test failures both locally and in CI (running examples/cpem-add-on) due to TCP timeouts in the addons module. I suspect this is happening because the CPEM example doesn't have a way to ensure that the addons module doesn't start running until after the cluster is ready.

This updates the cluster module to output the IDs of the null_resources that are used to wait for cloud-init and to copy the kubeconfig from the cluster; the idea is that these should roughly be indicators of cluster readiness. The examples/cpem-add-on module has been updated to show how to use these outputs to delay execution of terraform modules that require a running cluster.