Show / Hide Table of Contents

Class V1Lifecycle

Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.

Inheritance
object
V1Lifecycle
Implements
IEquatable<V1Lifecycle>
Inherited Members
object.GetType()
object.MemberwiseClone()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: k8s.Models
Assembly: KubernetesClient.dll
Syntax
public record V1Lifecycle : IEquatable<V1Lifecycle>

Constructors

View Source

V1Lifecycle()

Declaration
public V1Lifecycle()
View Source

V1Lifecycle(V1Lifecycle)

Declaration
protected V1Lifecycle(V1Lifecycle original)
Parameters
Type Name Description
V1Lifecycle original

Properties

View Source

EqualityContract

Declaration
protected virtual Type EqualityContract { get; }
Property Value
Type Description
Type
View Source

PostStart

PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks

Declaration
[JsonPropertyName("postStart")]
public V1LifecycleHandler PostStart { get; set; }
Property Value
Type Description
V1LifecycleHandler
View Source

PreStop

PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks

Declaration
[JsonPropertyName("preStop")]
public V1LifecycleHandler PreStop { get; set; }
Property Value
Type Description
V1LifecycleHandler
View Source

StopSignal

StopSignal defines which signal will be sent to a container when it is being stopped. If not specified, the default is defined by the container runtime in use. StopSignal can only be set for Pods with a non-empty .spec.os.name

Declaration
[JsonPropertyName("stopSignal")]
public string StopSignal { get; set; }
Property Value
Type Description
string

Methods

View Source

Equals(object?)

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool
Overrides
object.Equals(object)
View Source

Equals(V1Lifecycle?)

Declaration
public virtual bool Equals(V1Lifecycle? other)
Parameters
Type Name Description
V1Lifecycle other
Returns
Type Description
bool
View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
object.GetHashCode()
View Source

PrintMembers(StringBuilder)

Declaration
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
Type Name Description
StringBuilder builder
Returns
Type Description
bool
View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()

Operators

View Source

operator ==(V1Lifecycle?, V1Lifecycle?)

Declaration
public static bool operator ==(V1Lifecycle? left, V1Lifecycle? right)
Parameters
Type Name Description
V1Lifecycle left
V1Lifecycle right
Returns
Type Description
bool
View Source

operator !=(V1Lifecycle?, V1Lifecycle?)

Declaration
public static bool operator !=(V1Lifecycle? left, V1Lifecycle? right)
Parameters
Type Name Description
V1Lifecycle left
V1Lifecycle right
Returns
Type Description
bool

Implements

IEquatable<T>
  • View Source
In this article
Back to top Generated by DocFX