Skip to content

Implement cleanup of leftover resources after Shard CR gets deleted#142

Merged
kcp-ci-bot merged 1 commit intokcp-dev:mainfrom
iakmc:shard-deletion-cleanup
Feb 9, 2026
Merged

Implement cleanup of leftover resources after Shard CR gets deleted#142
kcp-ci-bot merged 1 commit intokcp-dev:mainfrom
iakmc:shard-deletion-cleanup

Conversation

@iakmc
Copy link

@iakmc iakmc commented Jan 30, 2026

Summary

  • Adds finalizer to Shard controller to clean up kcp Shard object on deletion
  • Extends e2e test to verify cleanup behavior

What Type of PR Is This?

/kind feature

Related Issue(s)

Fixes #125

Release Notes

Deleting a Shard CR now properly removes the corresponding Shard object from the RootShard.

@kcp-ci-bot kcp-ci-bot added kind/feature Categorizes issue or PR as related to a new feature. release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 30, 2026
@iakmc iakmc changed the title Implement cleanup of leftover resources after Shard CR gets deleted WIP Implement cleanup of leftover resources after Shard CR gets deleted Jan 30, 2026
@iakmc iakmc marked this pull request as draft January 30, 2026 09:39
@kcp-ci-bot kcp-ci-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 30, 2026
@iakmc
Copy link
Author

iakmc commented Jan 30, 2026

/test all

@kcp-ci-bot kcp-ci-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Jan 30, 2026
@iakmc
Copy link
Author

iakmc commented Jan 30, 2026

/test pull-kcp-operator-test-e2e-0.28 pull-kcp-operator-test-e2e-canary pull-kcp-operator-test-e2e-default

@kcp-ci-bot kcp-ci-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 30, 2026
@iakmc iakmc force-pushed the shard-deletion-cleanup branch 2 times, most recently from 055b0eb to 1cd6f08 Compare January 31, 2026 23:42
@kcp-ci-bot kcp-ci-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 31, 2026
@iakmc iakmc force-pushed the shard-deletion-cleanup branch from 1cd6f08 to e2a1774 Compare February 1, 2026 01:12
@iakmc
Copy link
Author

iakmc commented Feb 2, 2026

/test all

@iakmc iakmc force-pushed the shard-deletion-cleanup branch from 5fe574d to e2a1774 Compare February 3, 2026 12:19
@iakmc
Copy link
Author

iakmc commented Feb 3, 2026

/test all

@iakmc
Copy link
Author

iakmc commented Feb 3, 2026

/test pull-kcp-operator-test

@kcp-ci-bot kcp-ci-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 3, 2026
@iakmc iakmc force-pushed the shard-deletion-cleanup branch from 3b62bfa to bf94952 Compare February 3, 2026 12:50
@kcp-ci-bot kcp-ci-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 3, 2026
@iakmc iakmc force-pushed the shard-deletion-cleanup branch from bf94952 to e79b60c Compare February 3, 2026 12:50
@iakmc
Copy link
Author

iakmc commented Feb 3, 2026

/test all

1 similar comment
@iakmc
Copy link
Author

iakmc commented Feb 3, 2026

/test all

@iakmc iakmc force-pushed the shard-deletion-cleanup branch 2 times, most recently from 25c30e1 to a6ab35a Compare February 3, 2026 13:40
@iakmc
Copy link
Author

iakmc commented Feb 3, 2026

/test all

@iakmc iakmc changed the title WIP Implement cleanup of leftover resources after Shard CR gets deleted Implement cleanup of leftover resources after Shard CR gets deleted Feb 3, 2026
@iakmc iakmc marked this pull request as ready for review February 3, 2026 15:11
@kcp-ci-bot kcp-ci-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 3, 2026
@iakmc
Copy link
Author

iakmc commented Feb 3, 2026

/test pull-kcp-operator-test-e2e-0.28 pull-kcp-operator-test-e2e-0.29 pull-kcp-operator-test-e2e-canary pull-kcp-operator-test-e2e-default

4 similar comments
@iakmc
Copy link
Author

iakmc commented Feb 3, 2026

/test pull-kcp-operator-test-e2e-0.28 pull-kcp-operator-test-e2e-0.29 pull-kcp-operator-test-e2e-canary pull-kcp-operator-test-e2e-default

@iakmc
Copy link
Author

iakmc commented Feb 3, 2026

/test pull-kcp-operator-test-e2e-0.28 pull-kcp-operator-test-e2e-0.29 pull-kcp-operator-test-e2e-canary pull-kcp-operator-test-e2e-default

@iakmc
Copy link
Author

iakmc commented Feb 3, 2026

/test pull-kcp-operator-test-e2e-0.28 pull-kcp-operator-test-e2e-0.29 pull-kcp-operator-test-e2e-canary pull-kcp-operator-test-e2e-default

@iakmc
Copy link
Author

iakmc commented Feb 4, 2026

/test pull-kcp-operator-test-e2e-0.28 pull-kcp-operator-test-e2e-0.29 pull-kcp-operator-test-e2e-canary pull-kcp-operator-test-e2e-default

@xrstf
Copy link
Contributor

xrstf commented Feb 4, 2026

@iakmc e2e is currently borked and needs #146. #146 is blocked by docker pull limits.

@iakmc
Copy link
Author

iakmc commented Feb 5, 2026

/test pull-kcp-operator-test-e2e-0.28 pull-kcp-operator-test-e2e-0.29 pull-kcp-operator-test-e2e-canary pull-kcp-operator-test-e2e-default

On-behalf-of: SAP <iskren.pertov@sap.com>
Signed-off-by: Iskren Petrov <iskren@kubermatic.com>

Implement cleanup of leftover resources after Shard CR gets deleted

Implement cleanup of leftover resources after Shard CR gets deleted

fix the e2e tests

On-behalf-of: SAP <iskren.pertov@sap.com>
Signed-off-by: Iskren Petrov <iskren@kubermatic.com>

core v1alpha1 package missing from kcp-dev

On-behalf-of: SAP <iskren.pertov@sap.com>
Signed-off-by: Iskren Petrov <iskren@kubermatic.com>

verify
@iakmc iakmc force-pushed the shard-deletion-cleanup branch from a6ab35a to 313f03f Compare February 5, 2026 23:32
@iakmc
Copy link
Author

iakmc commented Feb 5, 2026

/test pull-kcp-operator-test-e2e-0.29 pull-kcp-operator-test-e2e-default

1 similar comment
@iakmc
Copy link
Author

iakmc commented Feb 5, 2026

/test pull-kcp-operator-test-e2e-0.29 pull-kcp-operator-test-e2e-default

Copy link
Member

@ntnn ntnn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@xrstf Review and stamp please

@kcp-ci-bot kcp-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Feb 6, 2026
@kcp-ci-bot
Copy link
Contributor

LGTM label has been added.

DetailsGit tree hash: 044f6718395b7430a484cb63751672a5d857effb

@ntnn ntnn requested a review from xrstf February 6, 2026 22:53
@xrstf
Copy link
Contributor

xrstf commented Feb 8, 2026

/approve

@kcp-ci-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xrstf

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kcp-ci-bot kcp-ci-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 8, 2026
@kcp-ci-bot kcp-ci-bot merged commit fa4c3be into kcp-dev:main Feb 9, 2026
9 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature: implement cleanup of left over resources after Shard CR gets deleted

4 participants