Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
cb6d3b8
Add ScopeableSharedIndexInformer.SetIgnoreFunc
ntnn May 15, 2026
c6b8893
Handle ignoreFunc in DDSIF and add DDSIF.PurgeCluster
ntnn Jun 2, 2026
3e55642
Add .ForceRelist
ntnn May 15, 2026
76cfd80
Add per cluster context cancellation integration test
ntnn May 15, 2026
c470fce
Add migration.kcp.io
ntnn Jun 4, 2026
75b2568
Add migration.kcp.io to codegen
ntnn Jun 4, 2026
ca23c51
codegen
ntnn Jun 4, 2026
46c5200
Bootstrap LogicalClusterMigration
ntnn Jun 4, 2026
3a95fa6
Replicate LogicalClusterMigration to cache server
ntnn Jun 4, 2026
4e8b5bf
Add LogicalClusterMigration feature flag
ntnn Jun 4, 2026
b54b070
Enable LogicalClusterMigration feature in tests
ntnn Jun 4, 2026
4a8f3b0
Add MigratingLogicalClusters
ntnn Jun 5, 2026
f9b3aaa
Wire MigratingLogicalClusters into server
ntnn Jun 5, 2026
d4364a6
Add logicalclustermigration.Controller
ntnn Jun 5, 2026
6339f24
Add LogicalClusterDump handler
ntnn Jun 5, 2026
0ac0e90
Add migrating VW
ntnn Jun 5, 2026
429d91d
Add WithBlockMigratingLogicalClusters and wire it
ntnn Jun 5, 2026
4cb25c7
Wire in migrating VW
ntnn Jun 5, 2026
04be05c
Wire LogicalClusterDump handler
ntnn Jun 5, 2026
11666ee
Skip adding per-lc context to LogicalClusterDump requests
ntnn Jun 5, 2026
8bffeac
Wire logicalclustermigration.Controller into server
ntnn Jun 5, 2026
54e6faa
Add LogicalClusterMigration e2e test
ntnn Jun 5, 2026
d133e13
Add integration test to ignore LCs
ntnn Jun 5, 2026
1e3cc0f
Add system:kcp:external-logical-cluster-admin RBAC for LCMigration
ntnn Jun 5, 2026
1c1b511
Drop TODO about deduplicating exempt paths
ntnn Jun 5, 2026
544e3a0
make modules
ntnn Jun 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ ifdef SUITES
SUITES_ARG = --suites $(SUITES)
COMPLETE_SUITES_ARG = -args $(SUITES_ARG)
endif
TEST_FEATURE_GATES ?= WorkspaceMounts=true,CacheAPIs=true,WorkspaceAuthentication=true
TEST_FEATURE_GATES ?= WorkspaceMounts=true,CacheAPIs=true,WorkspaceAuthentication=true,LogicalClusterMigration=true
PROXY_FEATURE_GATES ?= $(TEST_FEATURE_GATES)

.PHONY: test-e2e
Expand Down
85 changes: 85 additions & 0 deletions config/crds/migration.kcp.io_logicalclusterdumps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.17.3
name: logicalclusterdumps.migration.kcp.io
spec:
group: migration.kcp.io
names:
kind: LogicalClusterDump
listKind: LogicalClusterDumpList
plural: logicalclusterdumps
singular: logicalclusterdump
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: |-
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.
properties:
apiVersion:
description: |-
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: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
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: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: |
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.
type: object
status:
description: LogicalClusterDumpStatus carries the dump payload populated
by the server.
properties:
entries:
description: |-
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).

becomes a concern.
items:
description: EtcdEntry is a single etcd key/value pair from the
origin shard.
properties:
key:
description: |-
key is the etcd key with the origin shard's storage prefix stripped.
The destination shard prepends its own storage prefix before writing.
type: string
value:
description: value is the raw etcd value bytes. JSON-encoded
as base64 on the wire.
format: byte
type: string
required:
- key
- value
type: object
type: array
type: object
type: object
served: true
storage: true
143 changes: 143 additions & 0 deletions config/crds/migration.kcp.io_logicalclustermigrations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.17.3
name: logicalclustermigrations.migration.kcp.io
spec:
group: migration.kcp.io
names:
categories:
- kcp
kind: LogicalClusterMigration
listKind: LogicalClusterMigrationList
plural: logicalclustermigrations
singular: logicalclustermigration
scope: Cluster
versions:
- additionalPrinterColumns:
- description: The logical cluster being migrated
jsonPath: .spec.logicalCluster
name: Logical Cluster
type: string
- description: The current phase of the migration
jsonPath: .status.phase
name: Phase
type: string
- description: The destination shard
jsonPath: .spec.destinationShard
name: Destination
type: string
name: v1alpha1
schema:
openAPIV3Schema:
description: LogicalClusterMigration describes a migration of a logical cluster
from one shard to another.
properties:
apiVersion:
description: |-
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: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
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: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: LogicalClusterMigrationSpec holds the desired state of the
migration.
properties:
destinationShard:
description: destinationShard is the name of the shard to migrate
the logical cluster to.
minLength: 1
type: string
logicalCluster:
description: logicalCluster is the name of the logical cluster to
migrate.
minLength: 1
type: string
required:
- destinationShard
- logicalCluster
type: object
status:
description: LogicalClusterMigrationStatus communicates the observed state
of the migration.
properties:
conditions:
description: Current processing state of the migration.
items:
description: Condition defines an observation of a object operational
state.
properties:
lastTransitionTime:
description: |-
Last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when
the API field changed is acceptable.
format: date-time
type: string
message:
description: |-
A human readable message indicating details about the transition.
This field may be empty.
type: string
reason:
description: |-
The reason for the condition's last transition in CamelCase.
The specific API may choose whether or not this field is considered a guaranteed API.
This field may not be empty.
type: string
severity:
description: |-
Severity provides an explicit classification of Reason code, so the users or machines can immediately
understand the current situation and act accordingly.
The Severity field MUST be set only when Status=False.
type: string
status:
description: Status of the condition, one of True, False, Unknown.
type: string
type:
description: |-
Type of condition in CamelCase or in foo.example.com/CamelCase.
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
can be useful (see .node.status.conditions), the ability to deconflict is important.
type: string
required:
- lastTransitionTime
- status
- type
type: object
type: array
originShard:
description: |-
originShard is the name of the shard to migrate the logical cluster from.
Set by the origin shard controller during preparation.
type: string
phase:
default: Preparing
description: phase is the current phase of the migration.
enum:
- Preparing
- Migrating
- OriginCleanup
- DestinationFinalize
- Completed
- Failed
type: string
type: object
type: object
served: true
storage: true
subresources:
status: {}
17 changes: 17 additions & 0 deletions config/root-phase0/apiexport-migration.kcp.io.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: apis.kcp.io/v1alpha2
kind: APIExport
metadata:
name: migration.kcp.io
spec:
resources:
- group: migration.kcp.io
name: logicalclusterdumps
schema: v260604-70219e163.logicalclusterdumps.migration.kcp.io
storage:
crd: {}
- group: migration.kcp.io
name: logicalclustermigrations
schema: v260604-70219e163.logicalclustermigrations.migration.kcp.io
storage:
crd: {}
status: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
apiVersion: apis.kcp.io/v1alpha1
kind: APIResourceSchema
metadata:
name: v260604-70219e163.logicalclusterdumps.migration.kcp.io
spec:
group: migration.kcp.io
names:
kind: LogicalClusterDump
listKind: LogicalClusterDumpList
plural: logicalclusterdumps
singular: logicalclusterdump
scope: Namespaced
versions:
- name: v1alpha1
schema:
description: |-
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.
properties:
apiVersion:
description: |-
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: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
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: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: |
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.
type: object
status:
description: LogicalClusterDumpStatus carries the dump payload populated
by the server.
properties:
entries:
description: |-
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).

becomes a concern.
items:
description: EtcdEntry is a single etcd key/value pair from the origin
shard.
properties:
key:
description: |-
key is the etcd key with the origin shard's storage prefix stripped.
The destination shard prepends its own storage prefix before writing.
type: string
value:
description: value is the raw etcd value bytes. JSON-encoded as
base64 on the wire.
format: byte
type: string
required:
- key
- value
type: object
type: array
type: object
type: object
served: true
storage: true
subresources: {}
Loading