-
Notifications
You must be signed in to change notification settings - Fork 710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pod: Submit an event when the user specifies the restartpolicy for pod template #648
Conversation
pkg/controller.v2/controller_pod.go
Outdated
// Submit a warning event if the user specifies restart policy for | ||
// the pod template. We recommend to set it from the replica level. | ||
if podTemplate.Spec.RestartPolicy != v1.RestartPolicy("") { | ||
errMsg := "Restart policy in pod template may be override by restart policy in replica spec" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we say definitively whether or not the Restart policy will be overwritten?
Also grammer issue
"may be override" -> "may be overwritten"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could say something like "User defined Pod RestartPolicy will be ignored; pod RestartPolicy will be set as necessary based on Replica RestartPolicy. To avoid this warning don't set RestartPolicy for the pod."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could say that Restart policy in pod template will be overwritten by restart policy in replica spec
. There is only one case that the policy will not be overwritten, it is triggered when the policy defined in pod template is the same as replica spec. And it means the policy is overwritten by the same policy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will update it now.
Updated |
Signed-off-by: Ce Gao <[email protected]>
Signed-off-by: Ce Gao <[email protected]>
Signed-off-by: Ce Gao <[email protected]>
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jlewi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…d template (kubeflow#648) * event: Add Signed-off-by: Ce Gao <[email protected]> * pod: Add test for restart policy Signed-off-by: Ce Gao <[email protected]> * pod: Update error message Signed-off-by: Ce Gao <[email protected]>
…d template (kubeflow#648) * event: Add Signed-off-by: Ce Gao <[email protected]> * pod: Add test for restart policy Signed-off-by: Ce Gao <[email protected]> * pod: Update error message Signed-off-by: Ce Gao <[email protected]>
/assign @jlewi
Signed-off-by: Ce Gao [email protected]
This change is