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

Add support for stop_grace_period #608

Merged
merged 1 commit into from
May 23, 2017

Conversation

gitlawr
Copy link
Contributor

@gitlawr gitlawr commented May 18, 2017

To solve #440
This commit Add support for stop_grace_period which maps to
Pod.Spec.TerminationGracePeriodSeconds
Updated conversion.md on support for the key

in string
out *int64
}{
"5s": {in: "5s", out: &[]int64{5}[0]},
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add test case for only number like,

stop_grace_period: 2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. Stop_grace_period is stirng type so quotes are needed.
And fromSpecifying durations

stop_grace_period: '2'

should be invalid and has no effect.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 18, 2017
@surajnarwade
Copy link
Contributor

surajnarwade commented May 18, 2017

@gitlawr , LGTM 👍 , let's wait for one more lgtm

Copy link
Member

@kadel kadel left a comment

Choose a reason for hiding this comment

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

lgtm

}
duration, err := time.ParseDuration(s)
if err != nil {
log.Warningf("Failed to parse duration:%v", s)
Copy link
Member

Choose a reason for hiding this comment

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

nit: it would be great if this returns error, and at the place this function is called we emit log.Warningf since there we will also have info of which service has this problem.

The only problem with current approach is that we won't know which service is giving this particular warning!

@surajssd
Copy link
Member

@gitlawr thanks for this PR really appreciate it, apart from the above comment everything else LGTM!

This commit Add support for stop_grace_period which maps to
Pod.Spec.TerminationGracePeriodSeconds
Updated conversion.md on support for the key
@gitlawr
Copy link
Contributor Author

gitlawr commented May 23, 2017

Updated and rebased. Thanks for the reviews!

@cdrage
Copy link
Member

cdrage commented May 23, 2017

@gitlawr Thanks again for your contribution! We're inching closer and closer to full key coverage thanks to you! 👍

@cdrage cdrage merged commit 8938fa1 into kubernetes:master May 23, 2017
@cdrage
Copy link
Member

cdrage commented May 23, 2017

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants