capi-rancher-import cattle-agent Kustomization not cleaned up

As seen here, after the syva-units delete hook runs, a Kustomization remains: the cattle-agent-wc-1292186240-rke2-capo-oci Kustomization which is created by capi-rancher-import

Deleting the namespace can't cleanup this Kustomization, because it needs the kubeconfig.

We indeed have nothing to clean up this Kustomization:

  • the capi-rancher-controller should have code to remove this Kustomization whenever the Cluster.provisioning.cattle.io resource is deleted
  • in the meantime, we can hardcode in the sylva-units pre-delete hook something to delete it

/cc @feleouet

Edited May 16, 2024 by Thomas Morin
Assignee Loading
Time tracking Loading