Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

[Rest Server] Update restart policy to avoid stuck pending pods #3856

Merged
merged 2 commits into from
Nov 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/rest-server/src/models/v2/job/k8s.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,9 @@ const generateTaskRole = (taskRole, labels, config) => {
},
spec: {
privileged: false,
restartPolicy: 'Never',
// workaround for pending pods due to no ready sandbox before the fix
// https://github.com/kubernetes/kubernetes/commit/3fac48f8
restartPolicy: gangAllocation === 'true' ? 'Never' : 'OnFailure',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comments for this? We should revert this change after we update k8s to 16.2 or above.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

serviceAccountName: 'frameworkbarrier-account',
initContainers: [
{
Expand Down