provider-civo icon indicating copy to clipboard operation
provider-civo copied to clipboard

Update Kubernetes Cluster controller and add support for meta.externalName

Open vladfr opened this issue 1 year ago • 2 comments

I ran into this problem that cluster updates are never performed. While trying to debug I actually made good headway.

The problem is that the Kubernetes Civo API changed quite a bit, and now only works via Cluster ID (which makes a ton of sense). The current controller for clusters has two problems:

  • does not use the api properly
  • cannot remember the Civo ID of the cluster, so it never finds the clusters it creates

Changes:

  • it's now using the proper civo API client
  • the cluster k8s object now remembers the Civo ID via meta
  • the controller uses the Civo ID in every API operation
  • Updates work too!

Fixes #41

I have:

  • [x] Read and followed Crossplane's contribution process.
  • [x] Run make reviewable test to ensure this PR is ready for review.

Tests

  • [x] Added tests for create and update.

Open issues

  • currently, the API doesn't allow updating the firewall ID. The code handles this update, but the underlying resource doesn't actually get updated.
  • applications aren't updated or removed.

NOTE: I've bumped /build to latest, since I couldn't run make generate anymore.

vladfr avatar Feb 17 '23 17:02 vladfr