-
Notifications
You must be signed in to change notification settings - Fork 805
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(clouddriver): make fetching properties file more resilient for k…
…8s jobs If a k8s run job is marked as succeeded, and property file is defined in the stage context, then it can so happen that multiple pods are created for that job. See https://kubernetes.io/docs/concepts/workloads/controllers/job/#handling-pod-and-container-failures In extreme edge cases, the first pod may be around before the second one succeeds. That leads to kubectl logs job/ command failing as seen below: kubectl -n test logs job/test-run-job-5j2vl -c parser Found 2 pods, using pod/test-run-job-5j2vl-fj8hd Error from server (BadRequest): container "parser" in pod "test-run-job-5j2vl-fj8hd" is terminated or Found 2 pods, using pod/test-run-job-5j2vl-fj8hd Error from server (BadRequest): container "parser" in pod "test-run-job-5j2vl-fj8hd" is waiting to start: PodInitializing where that commands defaults to using one of the two pods. To fix this issue, if we encounter an error from the kubectl logs job/ command, we find a successful pod in the job and directly query it for logs.
- Loading branch information
1 parent
4cef464
commit 7b27660
Showing
7 changed files
with
1,142 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.