v1alpha2

package
v0.32.0-rc.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const GroupName = "coordination.k8s.io"

GroupName is the group name use in this package

Variables

View Source
var (
	ErrInvalidLengthGenerated        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenerated          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"}

SchemeGroupVersion is group version used to register these objects

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type LeaseCandidate

type LeaseCandidate struct {
	metav1.TypeMeta `json:",inline"`
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// spec contains the specification of the Lease.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
	// +optional
	Spec LeaseCandidateSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}

LeaseCandidate defines a candidate for a Lease object. Candidates are created such that coordinated leader election will pick the best leader from the list of candidates.

func (*LeaseCandidate) APILifecycleDeprecated

func (in *LeaseCandidate) APILifecycleDeprecated() (major, minor int)

APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.

func (*LeaseCandidate) APILifecycleIntroduced

func (in *LeaseCandidate) APILifecycleIntroduced() (major, minor int)

APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.

func (*LeaseCandidate) APILifecycleRemoved

func (in *LeaseCandidate) APILifecycleRemoved() (major, minor int)

APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.

func (*LeaseCandidate) DeepCopy

func (in *LeaseCandidate) DeepCopy() *LeaseCandidate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaseCandidate.

func (*LeaseCandidate) DeepCopyInto

func (in *LeaseCandidate) DeepCopyInto(out *LeaseCandidate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*LeaseCandidate) DeepCopyObject

func (in *LeaseCandidate) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*LeaseCandidate) Descriptor

func (*LeaseCandidate) Descriptor() ([]byte, []int)

func (*LeaseCandidate) Marshal

func (m *LeaseCandidate) Marshal() (dAtA []byte, err error)

func (*LeaseCandidate) MarshalTo

func (m *LeaseCandidate) MarshalTo(dAtA []byte) (int, error)

func (*LeaseCandidate) MarshalToSizedBuffer

func (m *LeaseCandidate) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LeaseCandidate) ProtoMessage

func (*LeaseCandidate) ProtoMessage()

func (*LeaseCandidate) Reset

func (m *LeaseCandidate) Reset()

func (*LeaseCandidate) Size

func (m *LeaseCandidate) Size() (n int)

func (*LeaseCandidate) String

func (this *LeaseCandidate) String() string

func (LeaseCandidate) SwaggerDoc

func (LeaseCandidate) SwaggerDoc() map[string]string

func (*LeaseCandidate) Unmarshal

func (m *LeaseCandidate) Unmarshal(dAtA []byte) error

func (*LeaseCandidate) XXX_DiscardUnknown

func (m *LeaseCandidate) XXX_DiscardUnknown()

func (*LeaseCandidate) XXX_Marshal

func (m *LeaseCandidate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LeaseCandidate) XXX_Merge

func (m *LeaseCandidate) XXX_Merge(src proto.Message)

func (*LeaseCandidate) XXX_Size

func (m *LeaseCandidate) XXX_Size() int

func (*LeaseCandidate) XXX_Unmarshal

func (m *LeaseCandidate) XXX_Unmarshal(b []byte) error

type LeaseCandidateList

type LeaseCandidateList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// items is a list of schema objects.
	Items []LeaseCandidate `json:"items" protobuf:"bytes,2,rep,name=items"`
}

LeaseCandidateList is a list of Lease objects.

func (*LeaseCandidateList) APILifecycleDeprecated

func (in *LeaseCandidateList) APILifecycleDeprecated() (major, minor int)

APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.

func (*LeaseCandidateList) APILifecycleIntroduced

func (in *LeaseCandidateList) APILifecycleIntroduced() (major, minor int)

APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.

func (*LeaseCandidateList) APILifecycleRemoved

func (in *LeaseCandidateList) APILifecycleRemoved() (major, minor int)

APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.

func (*LeaseCandidateList) DeepCopy

func (in *LeaseCandidateList) DeepCopy() *LeaseCandidateList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaseCandidateList.

func (*LeaseCandidateList) DeepCopyInto

func (in *LeaseCandidateList) DeepCopyInto(out *LeaseCandidateList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*LeaseCandidateList) DeepCopyObject

func (in *LeaseCandidateList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*LeaseCandidateList) Descriptor

func (*LeaseCandidateList) Descriptor() ([]byte, []int)

func (*LeaseCandidateList) Marshal

func (m *LeaseCandidateList) Marshal() (dAtA []byte, err error)

func (*LeaseCandidateList) MarshalTo

func (m *LeaseCandidateList) MarshalTo(dAtA []byte) (int, error)

func (*LeaseCandidateList) MarshalToSizedBuffer

func (m *LeaseCandidateList) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LeaseCandidateList) ProtoMessage

func (*LeaseCandidateList) ProtoMessage()

func (*LeaseCandidateList) Reset

func (m *LeaseCandidateList) Reset()

func (*LeaseCandidateList) Size

func (m *LeaseCandidateList) Size() (n int)

func (*LeaseCandidateList) String

func (this *LeaseCandidateList) String() string

func (LeaseCandidateList) SwaggerDoc

func (LeaseCandidateList) SwaggerDoc() map[string]string

func (*LeaseCandidateList) Unmarshal

func (m *LeaseCandidateList) Unmarshal(dAtA []byte) error

func (*LeaseCandidateList) XXX_DiscardUnknown

func (m *LeaseCandidateList) XXX_DiscardUnknown()

func (*LeaseCandidateList) XXX_Marshal

func (m *LeaseCandidateList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LeaseCandidateList) XXX_Merge

func (m *LeaseCandidateList) XXX_Merge(src proto.Message)

func (*LeaseCandidateList) XXX_Size

func (m *LeaseCandidateList) XXX_Size() int

func (*LeaseCandidateList) XXX_Unmarshal

func (m *LeaseCandidateList) XXX_Unmarshal(b []byte) error

type LeaseCandidateSpec

type LeaseCandidateSpec struct {
	// LeaseName is the name of the lease for which this candidate is contending.
	// This field is immutable.
	// +required
	LeaseName string `json:"leaseName" protobuf:"bytes,1,name=leaseName"`
	// PingTime is the last time that the server has requested the LeaseCandidate
	// to renew. It is only done during leader election to check if any
	// LeaseCandidates have become ineligible. When PingTime is updated, the
	// LeaseCandidate will respond by updating RenewTime.
	// +optional
	PingTime *metav1.MicroTime `json:"pingTime,omitempty" protobuf:"bytes,2,opt,name=pingTime"`
	// RenewTime is the time that the LeaseCandidate was last updated.
	// Any time a Lease needs to do leader election, the PingTime field
	// is updated to signal to the LeaseCandidate that they should update
	// the RenewTime.
	// Old LeaseCandidate objects are also garbage collected if it has been hours
	// since the last renew. The PingTime field is updated regularly to prevent
	// garbage collection for still active LeaseCandidates.
	// +optional
	RenewTime *metav1.MicroTime `json:"renewTime,omitempty" protobuf:"bytes,3,opt,name=renewTime"`
	// BinaryVersion is the binary version. It must be in a semver format without leading `v`.
	// This field is required.
	// +required
	BinaryVersion string `json:"binaryVersion" protobuf:"bytes,4,name=binaryVersion"`
	// EmulationVersion is the emulation version. It must be in a semver format without leading `v`.
	// EmulationVersion must be less than or equal to BinaryVersion.
	// This field is required when strategy is "OldestEmulationVersion"
	// +optional
	EmulationVersion string `json:"emulationVersion,omitempty" protobuf:"bytes,5,opt,name=emulationVersion"`
	// Strategy is the strategy that coordinated leader election will use for picking the leader.
	// If multiple candidates for the same Lease return different strategies, the strategy provided
	// by the candidate with the latest BinaryVersion will be used. If there is still conflict,
	// this is a user error and coordinated leader election will not operate the Lease until resolved.
	// (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.
	// +featureGate=CoordinatedLeaderElection
	// +required
	Strategy v1.CoordinatedLeaseStrategy `json:"strategy,omitempty" protobuf:"bytes,6,opt,name=strategy"`
}

LeaseCandidateSpec is a specification of a Lease.

func (*LeaseCandidateSpec) DeepCopy

func (in *LeaseCandidateSpec) DeepCopy() *LeaseCandidateSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaseCandidateSpec.

func (*LeaseCandidateSpec) DeepCopyInto

func (in *LeaseCandidateSpec) DeepCopyInto(out *LeaseCandidateSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*LeaseCandidateSpec) Descriptor

func (*LeaseCandidateSpec) Descriptor() ([]byte, []int)

func (*LeaseCandidateSpec) Marshal

func (m *LeaseCandidateSpec) Marshal() (dAtA []byte, err error)

func (*LeaseCandidateSpec) MarshalTo

func (m *LeaseCandidateSpec) MarshalTo(dAtA []byte) (int, error)

func (*LeaseCandidateSpec) MarshalToSizedBuffer

func (m *LeaseCandidateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LeaseCandidateSpec) ProtoMessage

func (*LeaseCandidateSpec) ProtoMessage()

func (*LeaseCandidateSpec) Reset

func (m *LeaseCandidateSpec) Reset()

func (*LeaseCandidateSpec) Size

func (m *LeaseCandidateSpec) Size() (n int)

func (*LeaseCandidateSpec) String

func (this *LeaseCandidateSpec) String() string

func (LeaseCandidateSpec) SwaggerDoc

func (LeaseCandidateSpec) SwaggerDoc() map[string]string

func (*LeaseCandidateSpec) Unmarshal

func (m *LeaseCandidateSpec) Unmarshal(dAtA []byte) error

func (*LeaseCandidateSpec) XXX_DiscardUnknown

func (m *LeaseCandidateSpec) XXX_DiscardUnknown()

func (*LeaseCandidateSpec) XXX_Marshal

func (m *LeaseCandidateSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LeaseCandidateSpec) XXX_Merge

func (m *LeaseCandidateSpec) XXX_Merge(src proto.Message)

func (*LeaseCandidateSpec) XXX_Size

func (m *LeaseCandidateSpec) XXX_Size() int

func (*LeaseCandidateSpec) XXX_Unmarshal

func (m *LeaseCandidateSpec) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL