Skip to content
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

Respect the termination grace period from the Kubernetes resource as a default value #1833

Conversation

scholzj
Copy link
Contributor

@scholzj scholzj commented Oct 27, 2019

As discussed in #1827, this PR sets the default grace period to -1 seconds as default. That should make the client not specify any grace period when deleting resources and this respect the grace period configured in the resource it self (e.g. terminationGracePeriod field in PodSpec) or the Kubernetes default which is IMHO the most natural default behavior. When you test it for example with Pod, you should see that:

  • If the Pod specifies its own grace period it is respected by default
  • If the Pod doesn't specify any grace period, the Kubernetes default 30 seconds are used
  • If the client specifies the grace period using withGracePeriod(...), the value from client is used.

…a default value

Signed-off-by: Jakub Scholz <www@scholzj.com>
@centos-ci
Copy link

Can one of the admins verify this patch?

@scholzj scholzj mentioned this pull request Oct 27, 2019
@rohanKanojia
Copy link
Member

ok to test

@rohanKanojia
Copy link
Member

[merge]

@fusesource-ci fusesource-ci merged commit 66f15c7 into fabric8io:master Nov 1, 2019
@scholzj scholzj deleted the repect-the-termination-grace-period-by-default branch November 1, 2019 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants