// will send a hard termination signal to the container.
// will send a hard termination signal to the container.
DeletionTimestamp*util.Time`json:"deletionTimestamp,omitempty" description:"RFC 3339 date and time at which the object will be deleted; populated by the system when a graceful deletion is requested, read-only; if not set, graceful deletion of the object has not been requested"`
DeletionTimestamp*util.Time`json:"deletionTimestamp,omitempty" description:"RFC 3339 date and time at which the object will be deleted; populated by the system when a graceful deletion is requested, read-only; if not set, graceful deletion of the object has not been requested"`
// DeletionGracePeriodSeconds records the graceful deletion value set when graceful deletion
// was requested. Represents the most recent grace period, and may only be shortened once set.
DeletionGracePeriodSeconds*int64`json:"deletionGracePeriodSeconds,omitempty" description:"number of seconds allowed for this object to gracefully terminate before it will be removed from the system; only set when deletionTimestamp is also set, read-only; may only be shortened"`
// Labels are key value pairs that may be used to scope and select individual resources.
// Labels are key value pairs that may be used to scope and select individual resources.
// TODO: replace map[string]string with labels.LabelSet type
// TODO: replace map[string]string with labels.LabelSet type
Labelsmap[string]string`json:"labels,omitempty" description:"map of string keys and values that can be used to organize and categorize objects; may match selectors of replication controllers and services"`
Labelsmap[string]string`json:"labels,omitempty" description:"map of string keys and values that can be used to organize and categorize objects; may match selectors of replication controllers and services"`
...
@@ -842,8 +838,6 @@ const (
...
@@ -842,8 +838,6 @@ const (
// DNSDefault indicates that the pod should use the default (as
// DNSDefault indicates that the pod should use the default (as
// determined by kubelet) DNS settings.
// determined by kubelet) DNS settings.
DNSDefaultDNSPolicy="Default"
DNSDefaultDNSPolicy="Default"
DefaultTerminationGracePeriodSeconds=30
)
)
// PodSpec is a description of a pod
// PodSpec is a description of a pod
...
@@ -858,7 +852,7 @@ type PodSpec struct {
...
@@ -858,7 +852,7 @@ type PodSpec struct {
// The grace period is the duration in seconds after the processes running in the pod are sent
// The grace period is the duration in seconds after the processes running in the pod are sent
// a termination signal and the time when the processes are forcibly halted with a kill signal.
// a termination signal and the time when the processes are forcibly halted with a kill signal.
// Set this value longer than the expected cleanup time for your process.
// Set this value longer than the expected cleanup time for your process.
TerminationGracePeriodSeconds*int64`json:"terminationGracePeriodSeconds,omitempty" description:"optional duration in seconds the pod needs to terminate gracefully; may be decreased in delete request; value must be non-negative integer; the value zero indicates delete immediately; if this value is not set, the default grace period will be used instead; the grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal; set this value longer than the expected cleanup time for your process; defaults to 30 seconds"`
TerminationGracePeriodSeconds*int64`json:"terminationGracePeriodSeconds,omitempty" description:"optional duration in seconds the pod needs to terminate gracefully; may be decreased in delete request; value must be non-negative integer; the value zero indicates delete immediately; if this value is not set, the default grace period will be used instead; the grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal; set this value longer than the expected cleanup time for your process"`
ActiveDeadlineSeconds*int64`json:"activeDeadlineSeconds,omitempty" description:"optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers; value must be a positive integer`
ActiveDeadlineSeconds*int64`json:"activeDeadlineSeconds,omitempty" description:"optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers; value must be a positive integer`
// Optional: Set DNS policy. Defaults to "ClusterFirst"
// Optional: Set DNS policy. Defaults to "ClusterFirst"
DNSPolicyDNSPolicy`json:"dnsPolicy,omitempty" description:"DNS policy for containers within the pod; one of 'ClusterFirst' or 'Default'"`
DNSPolicyDNSPolicy`json:"dnsPolicy,omitempty" description:"DNS policy for containers within the pod; one of 'ClusterFirst' or 'Default'"`
// will send a hard termination signal to the container.
// will send a hard termination signal to the container.
DeletionTimestamp*util.Time`json:"deletionTimestamp,omitempty" description:"RFC 3339 date and time at which the object will be deleted; populated by the system when a graceful deletion is requested, read-only; if not set, graceful deletion of the object has not been requested"`
DeletionTimestamp*util.Time`json:"deletionTimestamp,omitempty" description:"RFC 3339 date and time at which the object will be deleted; populated by the system when a graceful deletion is requested, read-only; if not set, graceful deletion of the object has not been requested"`
// DeletionGracePeriodSeconds records the graceful deletion value set when graceful deletion
// was requested. Represents the most recent grace period, and may only be shortened once set.
DeletionGracePeriodSeconds*int64`json:"deletionGracePeriodSeconds,omitempty" description:"number of seconds allowed for this object to gracefully terminate before it will be removed from the system; only set when deletionTimestamp is also set, read-only; may only be shortened"`
// Labels are key value pairs that may be used to scope and select individual resources.
// Labels are key value pairs that may be used to scope and select individual resources.
// TODO: replace map[string]string with labels.LabelSet type
// TODO: replace map[string]string with labels.LabelSet type
Labelsmap[string]string`json:"labels,omitempty" description:"map of string keys and values that can be used to organize and categorize objects; may match selectors of replication controllers and services"`
Labelsmap[string]string`json:"labels,omitempty" description:"map of string keys and values that can be used to organize and categorize objects; may match selectors of replication controllers and services"`
...
@@ -846,8 +842,6 @@ const (
...
@@ -846,8 +842,6 @@ const (
// DNSDefault indicates that the pod should use the default (as
// DNSDefault indicates that the pod should use the default (as
// determined by kubelet) DNS settings.
// determined by kubelet) DNS settings.
DNSDefaultDNSPolicy="Default"
DNSDefaultDNSPolicy="Default"
DefaultTerminationGracePeriodSeconds=30
)
)
// PodSpec is a description of a pod
// PodSpec is a description of a pod
...
@@ -862,7 +856,7 @@ type PodSpec struct {
...
@@ -862,7 +856,7 @@ type PodSpec struct {
// The grace period is the duration in seconds after the processes running in the pod are sent
// The grace period is the duration in seconds after the processes running in the pod are sent
// a termination signal and the time when the processes are forcibly halted with a kill signal.
// a termination signal and the time when the processes are forcibly halted with a kill signal.
// Set this value longer than the expected cleanup time for your process.
// Set this value longer than the expected cleanup time for your process.
TerminationGracePeriodSeconds*int64`json:"terminationGracePeriodSeconds,omitempty" description:"optional duration in seconds the pod needs to terminate gracefully; may be decreased in delete request; value must be non-negative integer; the value zero indicates delete immediately; if this value is not set, the default grace period will be used instead; the grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal; set this value longer than the expected cleanup time for your process; defaults to 30 seconds"`
TerminationGracePeriodSeconds*int64`json:"terminationGracePeriodSeconds,omitempty" description:"optional duration in seconds the pod needs to terminate gracefully; may be decreased in delete request; value must be non-negative integer; the value zero indicates delete immediately; if this value is not set, the default grace period will be used instead; the grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal; set this value longer than the expected cleanup time for your process"`
ActiveDeadlineSeconds*int64`json:"activeDeadlineSeconds,omitempty" description:"optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers; value must be a positive integer`
ActiveDeadlineSeconds*int64`json:"activeDeadlineSeconds,omitempty" description:"optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers; value must be a positive integer`
// Optional: Set DNS policy. Defaults to "ClusterFirst"
// Optional: Set DNS policy. Defaults to "ClusterFirst"
DNSPolicyDNSPolicy`json:"dnsPolicy,omitempty" description:"DNS policy for containers within the pod; one of 'ClusterFirst' or 'Default'"`
DNSPolicyDNSPolicy`json:"dnsPolicy,omitempty" description:"DNS policy for containers within the pod; one of 'ClusterFirst' or 'Default'"`
allErrs=append(allErrs,errs.NewFieldInvalid("deletionGracePeriodSeconds",meta.DeletionGracePeriodSeconds,"field is immutable; may only be changed via deletion"))
}
// Reject updates that don't specify a resource version
// Reject updates that don't specify a resource version
Failf("Resources left running after stop:\n%s",resources)
Failf("Resources left running after stop:\n%s",resources)
}
}
pods:=runKubectl("get","pods","-l",selector,nsArg,"-t","{{ range .items }}{{ if not .metadata.deletionTimestamp }}{{ .metadata.name }}{{ \"\\n\" }}{{ end }}{{ end }}")
ifpods!=""{
Failf("Pods left unterminated after stop:\n%s",pods)