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

🐛 add enable-sync-labels flag to klusterlet operator #505

Conversation

zhiweiyin318
Copy link
Member

@zhiweiyin318 zhiweiyin318 commented Jun 6, 2024

Summary

in gitops case, klusterlet is deployed by ArgoCD, so klusterlet has a label argocd.argoproj.io/instance=xxx. If everything created klusterlet inherits this label, these objects will be triggered as being managed by ArgoCD but actually they are not.

fix: to add a flag to enable sync labels feature, the default is disable.

Related issue(s)

Fixes #

@openshift-ci openshift-ci bot requested review from elgnay and xuezhaojun June 6, 2024 07:54
Copy link

codecov bot commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 62.17%. Comparing base (84ec2b2) to head (bdeee2a).
Report is 2 commits behind head on main.

Files Patch % Lines
...lers/klusterletcontroller/klusterlet_controller.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #505      +/-   ##
==========================================
+ Coverage   62.15%   62.17%   +0.01%     
==========================================
  Files         140      140              
  Lines       11770    11760      -10     
==========================================
- Hits         7316     7312       -4     
+ Misses       3683     3675       -8     
- Partials      771      773       +2     
Flag Coverage Δ
unit 62.17% <66.66%> (+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.

@zhiweiyin318 zhiweiyin318 force-pushed the add-label-flag branch 3 times, most recently from 552bf46 to 035c8ea Compare June 6, 2024 09:53
@zhiweiyin318
Copy link
Member Author

cc @qiujian16 @EricaJ6

Signed-off-by: Zhiwei Yin <zyin@redhat.com>
@qiujian16
Copy link
Member

/approve
/lgtm

Copy link
Contributor

openshift-ci bot commented Jun 6, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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-ci openshift-ci bot added the approved label Jun 6, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit c4b2c65 into open-cluster-management-io:main Jun 6, 2024
14 checks passed
@zhiweiyin318 zhiweiyin318 deleted the add-label-flag branch June 7, 2024 00:31
zhiweiyin318 added a commit to zhiweiyin318/ocm that referenced this pull request Jun 13, 2024
openshift-merge-bot bot pushed a commit that referenced this pull request Jun 13, 2024
* sync labels from klusterlet to all agent resources (#475)

Signed-off-by: Zhiwei Yin <zyin@redhat.com>

* add enable-sync-labels flag to klusterlet operator (#505)

Signed-off-by: Zhiwei Yin <zyin@redhat.com>

* fix issue that pull secret and ns are synced labels when enable-sync-labels is disabled (#511)

Signed-off-by: Zhiwei Yin <zyin@redhat.com>

---------

Signed-off-by: Zhiwei Yin <zyin@redhat.com>
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.

2 participants