v1

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the node v1 API group. +groupName=runtime.zeropod.ctrox.dev +versionName=v1

Index

Constants

View Source
const (
	Group   = "runtime.zeropod.ctrox.dev"
	Version = "v1"
)
View Source
const (
	RuntimeClassName = "zeropod"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: Group, Version: Version}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var (
	MigrationKind             = reflect.TypeOf(Migration{}).Name()
	MigrationGroupKind        = schema.GroupKind{Group: Group, Kind: MigrationKind}.String()
	MigrationKindAPIVersion   = MigrationKind + "." + GroupVersion.String()
	MigrationGroupVersionKind = GroupVersion.WithKind(MigrationKind)
)

Functions

This section is empty.

Types

type Migration

type Migration struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   MigrationSpec   `json:"spec,omitempty"`
	Status MigrationStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:storageversion +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.containers[*].condition.phase" +kubebuilder:printcolumn:name="Live",type="boolean",JSONPath=".spec.liveMigration" +kubebuilder:printcolumn:name="Duration",type="string",JSONPath=".status.containers[*].migrationDuration" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:scope=Namespaced Migration tracks container live migrations done by zeropod.

func (*Migration) DeepCopy

func (in *Migration) DeepCopy() *Migration

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

func (*Migration) DeepCopyInto

func (in *Migration) DeepCopyInto(out *Migration)

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

func (*Migration) DeepCopyObject

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

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

type MigrationCondition

type MigrationCondition struct {
	Phase MigrationPhase `json:"phase,omitempty"`
}

type MigrationContainer

type MigrationContainer struct {
	Name string `json:"name"`
	ID   string `json:"id"`
	// ImageServer to pull the CRIU checkpoint image from.
	// +optional
	ImageServer *MigrationServer `json:"imageServer,omitempty"`
	// PageServer to pull the memory pages from during lazy migration.
	// +optional
	PageServer *MigrationServer `json:"pageServer,omitempty"`

	Ports []int32 `json:"ports,omitempty"`
}

+kubebuilder:object:generate:=true

func (*MigrationContainer) DeepCopy

func (in *MigrationContainer) DeepCopy() *MigrationContainer

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

func (*MigrationContainer) DeepCopyInto

func (in *MigrationContainer) DeepCopyInto(out *MigrationContainer)

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

type MigrationContainerStatus

type MigrationContainerStatus struct {
	Name              string             `json:"name"`
	Condition         MigrationCondition `json:"condition"`
	PausedAt          metav1.MicroTime   `json:"pausedAt,omitempty"`
	RestoredAt        metav1.MicroTime   `json:"restoredAt,omitempty"`
	MigrationDuration metav1.Duration    `json:"migrationDuration,omitempty"`
}

+kubebuilder:object:generate:=true

func (*MigrationContainerStatus) DeepCopy

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

func (*MigrationContainerStatus) DeepCopyInto

func (in *MigrationContainerStatus) DeepCopyInto(out *MigrationContainerStatus)

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

type MigrationList

type MigrationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Migration `json:"items"`
}

MigrationList contains a list of Migration.

func (*MigrationList) DeepCopy

func (in *MigrationList) DeepCopy() *MigrationList

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

func (*MigrationList) DeepCopyInto

func (in *MigrationList) DeepCopyInto(out *MigrationList)

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

func (*MigrationList) DeepCopyObject

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

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

type MigrationPhase

type MigrationPhase string
const (
	MigrationPhasePending   MigrationPhase = "Pending"
	MigrationPhaseRunning   MigrationPhase = "Running"
	MigrationPhaseCompleted MigrationPhase = "Completed"
	MigrationPhaseFailed    MigrationPhase = "Failed"
	MigrationPhaseUnclaimed MigrationPhase = "Unclaimed"
)

type MigrationServer

type MigrationServer struct {
	Host string `json:"host"`
	Port int    `json:"port"`
}

func (MigrationServer) Address

func (ms MigrationServer) Address() string

type MigrationSpec

type MigrationSpec struct {
	// LiveMigration indicates if this migration is done live (lazy) or not. If
	// set, the source node will setup a page server to serve memory pages
	// during live migration. If false, the image copy will include all memory
	// pages, which might result in a slower migration.
	// +optional
	LiveMigration bool `json:"liveMigration"`
	// SourceNode of the pod to be migrated
	SourceNode string `json:"sourceNode"`
	// TargetNode of the pod to be migrated
	// +optional
	TargetNode string `json:"targetNode,omitempty"`
	// SourcePod of the migration
	// +optional
	SourcePod string `json:"sourcePod,omitempty"`
	// TargetPod of the migration
	// +optional
	TargetPod string `json:"targetPod,omitempty"`
	// PodTemplateHash of the source pod. This is used to find a suitable target
	// pod.
	PodTemplateHash string `json:"podTemplateHash"`
	// Containers to be migrated
	// +listType:=map
	// +listMapKey:=name
	Containers []MigrationContainer `json:"containers"`
}

+kubebuilder:object:generate:=true

func (*MigrationSpec) DeepCopy

func (in *MigrationSpec) DeepCopy() *MigrationSpec

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

func (*MigrationSpec) DeepCopyInto

func (in *MigrationSpec) DeepCopyInto(out *MigrationSpec)

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

type MigrationStatus

type MigrationStatus struct {
	// Containers indicates the status of the individual container migrations.
	// +listType:=map
	// +listMapKey:=name
	Containers []MigrationContainerStatus `json:"containers"`
}

+kubebuilder:object:generate:=true

func (*MigrationStatus) DeepCopy

func (in *MigrationStatus) DeepCopy() *MigrationStatus

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

func (*MigrationStatus) DeepCopyInto

func (in *MigrationStatus) DeepCopyInto(out *MigrationStatus)

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

Jump to

Keyboard shortcuts

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