v1alpha1

package
v0.32.2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package,register +groupName=migration.kcp.io +k8s:openapi-gen=true +k8s:openapi-model-package=com.github.kcp-dev.sdk.apis.migration.v1alpha1

Index

Constants

View Source
const (
	// LCMigrationOriginPreparing indicates the origin shard is preparing for migration.
	LCMigrationOriginPreparing conditionsv1alpha1.ConditionType = "OriginPreparing"

	// LCMigrationOriginReady indicates the origin shard has completed preparation
	// and the destination shard can start copying data.
	LCMigrationOriginReady conditionsv1alpha1.ConditionType = "OriginReady"

	// LCMigrationStarted indicates the destination shard has started copying data
	// from the origin.
	LCMigrationStarted conditionsv1alpha1.ConditionType = "MigrationStarted"

	// LCMigrationDataCopied indicates the destination shard has finished copying
	// and verifying all data.
	LCMigrationDataCopied conditionsv1alpha1.ConditionType = "DataCopied"

	// LCMigrationOriginCleaned indicates the origin shard has deleted all objects
	// belonging to the migration logical cluster.
	LCMigrationOriginCleaned conditionsv1alpha1.ConditionType = "OriginCleaned"

	// LCMigrationCompleted indicates the migration has fully completed and the
	// logical cluster is available on the destination shard.
	LCMigrationCompleted conditionsv1alpha1.ConditionType = "Completed"
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: migration.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects.

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource.

Types

type EtcdEntry

type EtcdEntry struct {
	// key is the etcd key with the origin shard's storage prefix stripped.
	// The destination shard prepends its own storage prefix before writing.
	Key string `json:"key"`

	// value is the raw etcd value bytes. JSON-encoded as base64 on the wire.
	Value []byte `json:"value"`
}

EtcdEntry is a single etcd key/value pair from the origin shard.

func (*EtcdEntry) DeepCopy

func (in *EtcdEntry) DeepCopy() *EtcdEntry

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

func (*EtcdEntry) DeepCopyInto

func (in *EtcdEntry) DeepCopyInto(out *EtcdEntry)

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

func (EtcdEntry) OpenAPIModelName

func (in EtcdEntry) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

type LogicalClusterDump

type LogicalClusterDump struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +optional
	Spec LogicalClusterDumpSpec `json:"spec,omitempty"`
	// +optional
	Status LogicalClusterDumpStatus `json:"status,omitempty"`
}

LogicalClusterDump is an ephemeral request/response type used by the destination shard during a logical cluster migration to fetch the raw etcd contents of the migration logical cluster from the origin shard.

The server populates Status.Entries on Create. The object is not persisted.

+genclient +genclient:nonNamespaced +genclient:onlyVerbs=create +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*LogicalClusterDump) DeepCopy

func (in *LogicalClusterDump) DeepCopy() *LogicalClusterDump

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

func (*LogicalClusterDump) DeepCopyInto

func (in *LogicalClusterDump) DeepCopyInto(out *LogicalClusterDump)

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

func (*LogicalClusterDump) DeepCopyObject

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

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

func (LogicalClusterDump) OpenAPIModelName

func (in LogicalClusterDump) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

type LogicalClusterDumpSpec

type LogicalClusterDumpSpec struct{}

LogicalClusterDumpSpec is the desired state for a dump request.

The logical cluster to dump is taken from the request's cluster context (i.e. the URL the request arrived on). No fields are required today.

TODO: add Continue string for pagination.

func (*LogicalClusterDumpSpec) DeepCopy

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

func (*LogicalClusterDumpSpec) DeepCopyInto

func (in *LogicalClusterDumpSpec) DeepCopyInto(out *LogicalClusterDumpSpec)

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

func (LogicalClusterDumpSpec) OpenAPIModelName

func (in LogicalClusterDumpSpec) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

type LogicalClusterDumpStatus

type LogicalClusterDumpStatus struct {
	// entries is the full set of etcd key/value pairs belonging to the
	// logical cluster, in the origin shard's etcd encoding (proto for
	// built-ins, JSON for CRs).
	//
	// TODO: support pagination via a Continue token on Spec/Status.
	// TODO: switch to NDJSON streaming once entry count or total size
	// becomes a concern.
	//
	// +optional
	Entries []EtcdEntry `json:"entries,omitempty"`
}

LogicalClusterDumpStatus carries the dump payload populated by the server.

func (*LogicalClusterDumpStatus) DeepCopy

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

func (*LogicalClusterDumpStatus) DeepCopyInto

func (in *LogicalClusterDumpStatus) DeepCopyInto(out *LogicalClusterDumpStatus)

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

func (LogicalClusterDumpStatus) OpenAPIModelName

func (in LogicalClusterDumpStatus) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

type LogicalClusterMigration

type LogicalClusterMigration struct {
	v1.TypeMeta `json:",inline"`
	// +optional
	v1.ObjectMeta `json:"metadata,omitempty"`
	// +optional
	Spec LogicalClusterMigrationSpec `json:"spec,omitempty"`
	// +optional
	Status LogicalClusterMigrationStatus `json:"status,omitempty"`
}

LogicalClusterMigration describes a migration of a logical cluster from one shard to another.

+crd +genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster,categories=kcp +kubebuilder:printcolumn:name="Logical Cluster",type=string,JSONPath=`.spec.logicalCluster`,description="The logical cluster being migrated" +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="The current phase of the migration" +kubebuilder:printcolumn:name="Destination",type=string,JSONPath=`.spec.destinationShard`,description="The destination shard"

func (*LogicalClusterMigration) DeepCopy

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

func (*LogicalClusterMigration) DeepCopyInto

func (in *LogicalClusterMigration) DeepCopyInto(out *LogicalClusterMigration)

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

func (*LogicalClusterMigration) DeepCopyObject

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

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

func (*LogicalClusterMigration) GetConditions

func (LogicalClusterMigration) OpenAPIModelName

func (in LogicalClusterMigration) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*LogicalClusterMigration) SetConditions

type LogicalClusterMigrationList

type LogicalClusterMigrationList struct {
	v1.TypeMeta `json:",inline"`
	v1.ListMeta `json:"metadata"`

	Items []LogicalClusterMigration `json:"items"`
}

LogicalClusterMigrationList is a list of LogicalClusterMigration resources.

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*LogicalClusterMigrationList) DeepCopy

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

func (*LogicalClusterMigrationList) DeepCopyInto

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

func (*LogicalClusterMigrationList) DeepCopyObject

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

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

func (LogicalClusterMigrationList) OpenAPIModelName

func (in LogicalClusterMigrationList) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

type LogicalClusterMigrationPhaseType

type LogicalClusterMigrationPhaseType string

LogicalClusterMigrationPhaseType is the type of the current phase of the migration.

+kubebuilder:validation:Enum=Preparing;Migrating;OriginCleanup;DestinationFinalize;Completed;Failed

const (
	LogicalClusterMigrationPhasePreparing           LogicalClusterMigrationPhaseType = "Preparing"
	LogicalClusterMigrationPhaseMigrating           LogicalClusterMigrationPhaseType = "Migrating"
	LogicalClusterMigrationPhaseOriginCleanup       LogicalClusterMigrationPhaseType = "OriginCleanup"
	LogicalClusterMigrationPhaseDestinationFinalize LogicalClusterMigrationPhaseType = "DestinationFinalize"
	LogicalClusterMigrationPhaseCompleted           LogicalClusterMigrationPhaseType = "Completed"
	LogicalClusterMigrationPhaseFailed              LogicalClusterMigrationPhaseType = "Failed"
)

type LogicalClusterMigrationSpec

type LogicalClusterMigrationSpec struct {
	// logicalCluster is the name of the logical cluster to migrate.
	//
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	LogicalCluster string `json:"logicalCluster"`

	// destinationShard is the name of the shard to migrate the logical cluster to.
	//
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	DestinationShard string `json:"destinationShard"`
}

LogicalClusterMigrationSpec holds the desired state of the migration.

func (*LogicalClusterMigrationSpec) DeepCopy

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

func (*LogicalClusterMigrationSpec) DeepCopyInto

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

func (LogicalClusterMigrationSpec) OpenAPIModelName

func (in LogicalClusterMigrationSpec) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

type LogicalClusterMigrationStatus

type LogicalClusterMigrationStatus struct {
	// phase is the current phase of the migration.
	//
	// +optional
	// +kubebuilder:default=Preparing
	Phase LogicalClusterMigrationPhaseType `json:"phase,omitempty"`

	// originShard is the name of the shard to migrate the logical cluster from.
	// Set by the origin shard controller during preparation.
	//
	// +optional
	OriginShard string `json:"originShard,omitempty"`

	// Current processing state of the migration.
	// +optional
	Conditions conditionsv1alpha1.Conditions `json:"conditions,omitempty"`
}

LogicalClusterMigrationStatus communicates the observed state of the migration.

func (*LogicalClusterMigrationStatus) DeepCopy

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

func (*LogicalClusterMigrationStatus) DeepCopyInto

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

func (LogicalClusterMigrationStatus) OpenAPIModelName

func (in LogicalClusterMigrationStatus) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

Jump to

Keyboard shortcuts

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