delete-workload-cluster job: provide information on Namespace status/conditions on failed deletion
In the context of #1632 (closed) I realized that it would be useful to have more information directly in the job output of why the namespace deletion did not complete.
This will allow have information like this in the job console log:
status:
conditions:
...
- lastTransitionTime: "2024-09-12T16:31:51Z"
message: 'Some resources are remaining: metal3datatemplates.infrastructure.cluster.x-k8s.io
has 2 resource instances'
reason: SomeResourcesRemain
status: "True"
type: NamespaceContentRemaining
- lastTransitionTime: "2024-09-12T16:31:51Z"
message: 'Some content in the namespace has finalizers remaining: metal3datatemplate.infrastructure.cluster.x-k8s.io
in 2 resource instances'
reason: SomeFinalizersRemain
status: "True"
type: NamespaceFinalizersRemaining
Example here: https://gitlab.com/sylva-projects/sylva-core/-/jobs/7884469511#L82
Edited by Thomas Morin