Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Only decorate namespace for namespaced resources #462

Merged

Conversation

zhujian7
Copy link
Member

@zhujian7 zhujian7 commented May 14, 2024

Summary

Only decorate namespace for namespaced resources for template addons, otherwise if we set the namespace for cluster-scoped resources, and we want to use the annotation addon.open-cluster-management.io/deletion-orphan to orphan the resource when deleting the addon, the deleteOption will look like:

  deleteOption:
    propagationPolicy: SelectivelyOrphan
    selectivelyOrphans:
      orphaningRules:
      - group: ""
        name: open-cluster-management-agent-addon
        namespace: open-cluster-management-agent-addon # added ns value
        resource: namespaces

the extra namespace filed will result in the resource being deleted

Related issue(s)

Fixes #

Signed-off-by: zhujian <jiazhu@redhat.com>
Copy link

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.64%. Comparing base (5313ff7) to head (41cc2c2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #462      +/-   ##
==========================================
- Coverage   62.64%   62.64%   -0.01%     
==========================================
  Files         136      136              
  Lines       11528    11529       +1     
==========================================
  Hits         7222     7222              
  Misses       3539     3539              
- Partials      767      768       +1     
Flag Coverage Δ
unit 62.64% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zhujian7
Copy link
Member Author

/cc @qiujian16

@openshift-ci openshift-ci bot requested a review from qiujian16 May 15, 2024 01:44
@qiujian16
Copy link
Member

/approve
/lgtm

Copy link
Contributor

openshift-ci bot commented May 15, 2024

[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

@openshift-merge-bot openshift-merge-bot bot merged commit fd65f37 into open-cluster-management-io:main May 15, 2024
15 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.

None yet

2 participants