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

chore: fix integration test workflow #21

Closed ctreatma closed 1 year ago

ctreatma commented 1 year ago

Configuration works now, so I think we could merge this as-is and follow up with the fix(es) to get it passing.

That said, for posterity and/or to give someone the opportunity to argue for fixing this now, whatever it takes, it's possible that getting the tests to pass is as simple as making sure BGP is enabled on the target project.

The integration workflow fails on this PR with Error: API Error HTTP 422 BGP is not enabled: https://github.com/equinix-labs/terraform-equinix-kubernetes-cluster/actions/runs/6053230258/job/16428277794?pr=21#step:12:168

We could either:

  1. Implement equinix-labs/metal-project-action#14 and update this workflow config to tell the action to enable BGP
  2. Create a dedicated, long-lived project for this repo's tests, enable BGP on that project, replace METAL_AUTH_TOKEN with a project token for that project, and make the necessary updates to this workflow config (remove project action, tell sweeper to keep the project, ..., ???)
ctreatma commented 1 year ago

Enabling BGP on the project got us a little closer, but not quite passing.

After enabling BGP on the temporary CI project, the workflow failed due to a nonexistent file (files/kubeconfig.yaml). I changed that path to ./kubernetes.yaml, and now get a TCP timeout.

ctreatma commented 1 year ago

The integration test workflow was re-run at some point and it passed: https://github.com/equinix-labs/terraform-equinix-kubernetes-cluster/actions/runs/6102322865/job/16689993342?pr=21

That indicates that, once equinix-labs/metal-project-action#36 is merged, this PR will be sufficient to get the integration test workflow (occasionally) passing. There will likely be some follow-up work to make the examples/cpem-add-on module more stable so that the test workflow is more likely to pass, but IMO that doesn't need to happen in this PR.