### Describe the bug Events in an LC that is being migrated do not expire. ### Steps To Reproduce 1. Start an external etcd ```bash etcd --data-dir .etcd ``` And run `sharded-test-server` against it ```bash ./bin/sharded-test-server --number-of-shards=3 \ --shard-feature-gates=LogicalClusterMigration=true \ --external-etcd-servers=http://localhost:2379 ``` 2. Bind the migration API ```bash export KUBEOCNFIG=.kcp/admin.kubeconfig kubectl apply -f - <<EOF apiVersion: apis.kcp.io/v1alpha2 kind: APIBinding metadata: name: migration spec: reference: export: path: root name: migration.kcp.io EOF ``` 3. Create a workspaces with events ```bash kubectl create-workspace event-migration --location-selector name=shard-1 --enter kubectl apply -f - <<EOF apiVersion: v1 kind: Event metadata: name: demo-event namespace: default involvedObject: apiVersion: v1 kind: ConfigMap name: kube-root-ca.crt namespace: default reason: Demo message: lease check type: Normal EOF ``` 4. Check the lease in etcd: ```bash kubectl ws :root lc="$(kubectl get workspace event-migration -o jsonpath='{.spec.cluster}')" etcdctl get "/shard/shard-1/core/events/$lc/default/demo-event" -w json | grep -o '"lease":[0-9]*' ``` 5. Migrate the LC ```bash kubectl apply -f - <<EOF apiVersion: migration.kcp.io/v1alpha1 kind: LogicalClusterMigration metadata: name: event-migration spec: logicalCluster: $lc destinationShard: shard-2 EOF kubectl wait logicalclustermigration event-migration --for=jsonpath='{.status.phase}'=Completed ``` 6. Check the lease in etcd after the migration: ```bash etcdctl get "/shard/shard-1/core/events/$lc/default/demo-event" -w json ``` ### Expected Behaviour Events should retain their expiry during a migration. ### Additional Context _No response_
Activity
Sarthak-Shreshtha01 commentedon Oct 5, 2026
I looked into this, but I will not be able to work on it after all, so please feel free to pick it up. Thanks!