From cbe0787ca4bd37138de291db486bd9cbc80bc556 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Mon, 24 Oct 2016 21:47:38 -0400 Subject: [PATCH] Describe graceful deletion in more detail --- pkg/api/types.go | 20 ++++++++++++++------ pkg/api/v1/types.go | 13 ++++++++----- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/pkg/api/types.go b/pkg/api/types.go index ee44868ae5f..aae02d0d7a9 100644 --- a/pkg/api/types.go +++ b/pkg/api/types.go @@ -114,15 +114,23 @@ type ObjectMeta struct { // +optional CreationTimestamp unversioned.Time `json:"creationTimestamp,omitempty"` - // DeletionTimestamp is the time after which this resource will be deleted. This + // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This // field is set by the server when a graceful deletion is requested by the user, and is not - // directly settable by a client. The resource will be deleted (no longer visible from - // resource lists, and not reachable by name) after the time in this field. Once set, this - // value may not be unset or be set further into the future, although it may be shortened + // directly settable by a client. The resource is expected to be deleted (no longer visible + // from resource lists, and not reachable by name) after the time in this field. Once set, + // this value may not be unset or be set further into the future, although it may be shortened // or the resource may be deleted prior to this time. For example, a user may request that // a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination - // signal to the containers in the pod. Once the resource is deleted in the API, the Kubelet - // will send a hard termination signal to the container. + // signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard + // termination signal (SIGKILL) to the container and after cleanup, remove the pod from the + // API. In the presence of network partitions, this object may still exist after this + // timestamp, until an administrator or automated process can determine the resource is + // fully terminated. + // If not set, graceful deletion of the object has not been requested. + // + // Populated by the system when a graceful deletion is requested. + // Read-only. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional DeletionTimestamp *unversioned.Time `json:"deletionTimestamp,omitempty"` diff --git a/pkg/api/v1/types.go b/pkg/api/v1/types.go index 7958bafdf58..02eff456a6b 100644 --- a/pkg/api/v1/types.go +++ b/pkg/api/v1/types.go @@ -151,13 +151,16 @@ type ObjectMeta struct { // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This // field is set by the server when a graceful deletion is requested by the user, and is not - // directly settable by a client. The resource will be deleted (no longer visible from - // resource lists, and not reachable by name) after the time in this field. Once set, this - // value may not be unset or be set further into the future, although it may be shortened + // directly settable by a client. The resource is expected to be deleted (no longer visible + // from resource lists, and not reachable by name) after the time in this field. Once set, + // this value may not be unset or be set further into the future, although it may be shortened // or the resource may be deleted prior to this time. For example, a user may request that // a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination - // signal to the containers in the pod. Once the resource is deleted in the API, the Kubelet - // will send a hard termination signal to the container. + // signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard + // termination signal (SIGKILL) to the container and after cleanup, remove the pod from the + // API. In the presence of network partitions, this object may still exist after this + // timestamp, until an administrator or automated process can determine the resource is + // fully terminated. // If not set, graceful deletion of the object has not been requested. // // Populated by the system when a graceful deletion is requested.