Recognize AlreadyExists conflicts beyond generateName collisions

Fixes intermittent failures in testKubernetesFailingToPullImageTwiceFeatureFlag and its Helper/ServiceImage siblings by widening the k8s pod-create conflict check to cover a case beyond generateName collisions.

  • isConflict() only matched the "server was not able to generate a unique name" message (generateName collisions).
  • A fixed-Name pod create retried while the previous same-named pod is still terminating returns a different message ("object is being deleted: ... already exists") with the same AlreadyExists reason, and was falling through as an unhandled error instead of requestPodCreation's intended GET-existing-resource fallback.
  • Switched to kubeerrors.IsAlreadyExists(err), which matches on the standard Reason field rather than a single hardcoded message substring, covering both cases.
  • Added TestIsConflict covering both message variants plus unrelated-conflict, non-status-error, and nil-error cases.

Closes #39692 (closed)

Merge request reports

Loading
Loading