Skip to content

Fix TerminationGracePeriodSeconds is negative  #103476

@wzshiming

Description

@wzshiming
  • Firstly release 1.22 Fix TerminationGracePeriodSeconds is negative (part 1) #98866:
    • Treat negative as 1 in delete path (pod/strategy.go, apiserver delete.go)
    • Allow delete with grace period 0 even if metadata period is negative (apiserver delete.go). This allows kubelet to delete pods.
    • Relax validation of immutable fields to allow it to be set to 1 if it was previously negative. This allows us to update read path in the next release. All consumers would also need to be able to handle this change in a sane manner.
  • Secondly release 1.27 pod.spec.terminationGracePeriodSeconds is a negative then convert to 1 #115606:
    • Treat negative as 1 (defaulting or conversion)
  • Thirdly:
    • Returning an error on Pod create could break things like Deployment updates. But if we update defaulting, then I think we won't hit this issue.

What would you like to be added:

#98866 (comment)

Why is this needed:

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.sig/nodeCategorizes an issue or PR as relevant to SIG Node.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions