-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
deploy: set gracePeriod on deployer creation rather than when deleting #9854
deploy: set gracePeriod on deployer creation rather than when deleting #9854
Conversation
@@ -275,6 +275,8 @@ func (c *DeploymentController) makeDeployerPod(deployment *kapi.ReplicationContr | |||
// Assigning to a variable since its address is required | |||
maxDeploymentDurationSeconds := deployapi.MaxDeploymentDurationSeconds | |||
|
|||
gracePeriod := int64(10) |
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.
Does the deployer have to wait for child pod hooks to finish?
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.
On deletion I wouldn't think so.
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.
So the controllers will delete those hook pods?
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.
Yes, the deployment controller is deleting all hooks and the deployer for the deployment it is reconciling:
selector := deployutil.DeployerPodSelector(deployment.Name) |
We also test this in unit tests, eg:
func TestHandle_cleanupPodOkTest(t *testing.T) { |
LGTM [merge] |
[Test]ing while waiting on the merge queue |
Evaluated for origin test up to 5312b9b |
Evaluated for origin merge up to 5312b9b |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/6317/) |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/6316/) |
@smarterclayton