struct Kubernetes::LeaseSpec

Overview

LeaseSpec is a specification of a Lease.

Included Modules

Defined in:

generated/models/io_k8s_api_coordination_v1.cr

Constructors

Macro Summary

Instance Method Summary

Constructor Detail

def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

def self.new(pull : ::JSON::PullParser) #

def self.new(*, __pull_for_json_serializable pull : ::JSON::PullParser) #

def self.new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node) #

Macro Detail

macro field(name, type = nil, **options, &block) #

Helper macro for defining fields with automatic camelCase conversion


Instance Method Detail

def acquire_time : MicroTime | Nil #

acquireTime is a time when the current lease was acquired.


def acquire_time=(acquire_time : MicroTime | Nil) #

acquireTime is a time when the current lease was acquired.


def holder_identity : String | Nil #

holderIdentity contains the identity of the holder of a current lease. If Coordinated Leader Election is used, the holder identity must be equal to the elected LeaseCandidate.metadata.name field.


def holder_identity=(holder_identity : String | Nil) #

holderIdentity contains the identity of the holder of a current lease. If Coordinated Leader Election is used, the holder identity must be equal to the elected LeaseCandidate.metadata.name field.


def lease_duration_seconds : Int32 | Nil #

leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measured against the time of last observed renewTime.


def lease_duration_seconds=(lease_duration_seconds : Int32 | Nil) #

leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measured against the time of last observed renewTime.


def lease_transitions : Int32 | Nil #

leaseTransitions is the number of transitions of a lease between holders.


def lease_transitions=(lease_transitions : Int32 | Nil) #

leaseTransitions is the number of transitions of a lease between holders.


def preferred_holder : String | Nil #

PreferredHolder signals to a lease holder that the lease has a more optimal holder and should be given up. This field can only be set if Strategy is also set.


def preferred_holder=(preferred_holder : String | Nil) #

PreferredHolder signals to a lease holder that the lease has a more optimal holder and should be given up. This field can only be set if Strategy is also set.


def renew_time : MicroTime | Nil #

renewTime is a time when the current holder of a lease has last updated the lease.


def renew_time=(renew_time : MicroTime | Nil) #

renewTime is a time when the current holder of a lease has last updated the lease.


def strategy : String | Nil #

Strategy indicates the strategy for picking the leader for coordinated leader election. If the field is not specified, there is no active coordination for this lease. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.


def strategy=(strategy : String | Nil) #

Strategy indicates the strategy for picking the leader for coordinated leader election. If the field is not specified, there is no active coordination for this lease. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.