Skip to content

Conversation

@zhujian7
Copy link
Member

Summary

This PR adds comprehensive documentation for the addon.open-cluster-management.io/deletion-orphan annotation that allows addon developers to preserve specific resources when an addon is deleted.

Changes

  • Added a new section "Orphaning manifests on addon deletion" after the "Pre-delete hook" section
  • Documented the addon.open-cluster-management.io/deletion-orphan annotation usage and behavior
  • Included use cases and important notes for addon developers
  • Added a complete example showing how to preserve a PersistentVolumeClaim while removing other resources
  • Updated the addon template documentation to mention deletion-orphan annotation support
  • Added an example in the AddOnTemplate YAML demonstrating the annotation usage

Documentation Reference

The implementation is based on the getDeletionOrphaningRule function in:
https://github.com/open-cluster-management-io/addon-framework/blob/c2f5c52daf5a8057160233e3bfe12c94f3970d3b/pkg/addonmanager/controllers/agentdeploy/utils.go#L274-L311

Example usage in addon template:
https://github.com/open-cluster-management-io/ocm/blob/34cd9a25494b69097474fb5fd3c2add50692a4ae/test/e2e/manifests/addon/addon_template.yaml#L92-L93

🤖 Generated with Claude Code

This commit adds comprehensive documentation for the
addon.open-cluster-management.io/deletion-orphan annotation that
allows addon developers to preserve specific resources when an
addon is deleted.

Changes include:
- New section "Orphaning manifests on addon deletion" explaining
  the deletion-orphan annotation
- Usage examples and use cases for orphaning resources
- Complete example with PersistentVolumeClaim preservation
- Integration with addon template documentation showing the
  annotation can be used in AddOnTemplate manifests
- Example in the AddOnTemplate YAML demonstrating the annotation

This documentation is based on the implementation in
addon-framework/pkg/addonmanager/controllers/agentdeploy/utils.go
(getDeletionOrphaningRule function).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: zhujian <jiazhu@redhat.com>
@netlify
Copy link

netlify bot commented Oct 22, 2025

Deploy Preview for open-cluster-management ready!

Name Link
🔨 Latest commit 49ab3eb
🔍 Latest deploy log https://app.netlify.com/projects/open-cluster-management/deploys/68f854142a8a9c000812a91b
😎 Deploy Preview https://deploy-preview-518--open-cluster-management.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@zhujian7
Copy link
Member Author

/cc @zhiweiyin318

@openshift-ci openshift-ci bot requested a review from zhiweiyin318 October 22, 2025 03:51
@qiujian16
Copy link
Member

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 22, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiujian16, zhujian7

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

The pull request process is described here

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

@zhiweiyin318
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Oct 22, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 127e478 into open-cluster-management-io:main Oct 22, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants