Armada raises an exception for the 404 response from the Kubernetes
API if the resource was not found. However, some resources, like
jobs, are "volatile" they may disappear after some minutes. The
armada may send a DELETE request to the Kubernetes API after the job
finished its lifecycle. In this situation the job will not be found
in the cluster and the armada will break some application reapply due
to this behavior. Therefore, a possible solution may be check, at
least for the job resource type, whether the response returned from
the Kubernetes API is 404, if it is then just log the API response
error reason and continue trying to delete the remaining jobs in the
list, otherwise we raise the exception.
Partial-Bug: 1948850
Signed-off-by: Iago Estrela <IagoFilipe.EstrelaBarros@windriver.com>
Change-Id: I12ee8cef869e4443920d7f2e1899556e8940a977