Skip to content

coordination_v1

Lease

class lightkube.models.coordination_v1.Lease(apiVersion=None, kind=None, metadata=None, spec=None)

Lease defines a lease concept.

parameters

  • apiVersion Optional[str] - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info
  • kind Optional[str] - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info
  • metadata Optional[meta_v1.ObjectMeta] - More info
  • spec Optional[LeaseSpec] - spec contains the specification of the Lease. More info

LeaseList

class lightkube.models.coordination_v1.LeaseList(items, apiVersion=None, kind=None, metadata=None)

LeaseList is a list of Lease objects.

parameters

  • items List[Lease] - items is a list of schema objects.
  • apiVersion Optional[str] - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info
  • kind Optional[str] - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info
  • metadata Optional[meta_v1.ListMeta] - Standard list metadata. More info

LeaseSpec

class lightkube.models.coordination_v1.LeaseSpec(acquireTime=None, holderIdentity=None, leaseDurationSeconds=None, leaseTransitions=None, preferredHolder=None, renewTime=None, strategy=None)

LeaseSpec is a specification of a Lease.

parameters

  • acquireTime Optional[meta_v1.MicroTime] - acquireTime is a time when the current lease was acquired.
  • holderIdentity Optional[str] - 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.
  • leaseDurationSeconds Optional[int] - 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.
  • leaseTransitions Optional[int] - leaseTransitions is the number of transitions of a lease between holders.
  • preferredHolder Optional[str] - 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.
  • renewTime Optional[meta_v1.MicroTime] - renewTime is a time when the current holder of a lease has last updated the lease.
  • strategy Optional[str] - 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.