Skip to content

Fix attempting Kubernetes docker registry secret cleanup on failed creation

What does this MR do?

Prevents attempting to delete a Kubernetes resource (docker registry secret) as a result of a failure to create the resource in question.

Why was this MR needed?

#26996 (closed)

It adds an additional error to the log which distracts from the real problem.

What's the best way to test this MR?

I'm not sure we need at test for this. It's clear that the code expected s.credentials to be nil. The problem is mainly the additional error log.

To test manually, the bearer_token can be set to something invalid.

What are the relevant issue numbers?

Closes #26996 (closed)

Edited by Arran Walker

Merge request reports