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

🐛 fix failed update roleRef in clusterrolebinding in upgrade case #284

Conversation

zhiweiyin318
Copy link
Member

@zhiweiyin318 zhiweiyin318 commented Sep 20, 2023

Summary

the roleRef is changed in work-execution clusterrolebinding, so failed to update the clusterrolebinding during upgrade scenario.

Related issue(s)

Fixes #

@zhiweiyin318
Copy link
Member Author

/hold

@zhiweiyin318 zhiweiyin318 force-pushed the fix-upgrade branch 2 times, most recently from 36fc1e3 to f62bfaa Compare September 20, 2023 23:42
@codecov
Copy link

codecov bot commented Sep 20, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (fe9ecd7) 61.09% compared to head (e536be6) 61.09%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #284   +/-   ##
=======================================
  Coverage   61.09%   61.09%           
=======================================
  Files         129      129           
  Lines       13752    13752           
=======================================
  Hits         8402     8402           
+ Misses       4580     4579    -1     
- Partials      770      771    +1     
Flag Coverage Δ
unit 61.09% <0.00%> (ø)

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

Files Changed Coverage Δ
...usterletcontroller/klusterlet_managed_reconcile.go 59.25% <0.00%> (ø)

... and 1 file with indirect coverage changes

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

@@ -38,7 +38,7 @@ var (
"klusterlet/managed/klusterlet-work-clusterrole.yaml",
"klusterlet/managed/klusterlet-work-clusterrole-execution.yaml",
"klusterlet/managed/klusterlet-work-clusterrolebinding.yaml",
"klusterlet/managed/klusterlet-work-clusterrolebinding-execution.yaml",
"klusterlet/managed/klusterlet-work-clusterrolebinding-aggregate.yaml",
Copy link
Member

@zhujian7 zhujian7 Sep 21, 2023

Choose a reason for hiding this comment

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

should we also add the old open-cluster-management:{{ .KlusterletName }}-work:execution in the list, otherwise, it can not be removed when deleting klusterlet?

Copy link
Member Author

Choose a reason for hiding this comment

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

defined another cleanedManagedStaticResourceFiles to delete all manifests.

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

/lgtm

@qiujian16
Copy link
Member

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 21, 2023

[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

@zhiweiyin318
Copy link
Member Author

/unhold

@openshift-merge-robot openshift-merge-robot merged commit 769272c into open-cluster-management-io:main Sep 21, 2023
12 checks passed
@zhiweiyin318 zhiweiyin318 deleted the fix-upgrade branch September 21, 2023 03:22
TomerFi pushed a commit to TomerFi/OCM that referenced this pull request Sep 27, 2023
Signed-off-by: Jian Qiu <jqiu@redhat.com>

Signed-off-by: Jian Qiu <jqiu@redhat.com>
TomerFi pushed a commit to TomerFi/OCM that referenced this pull request Sep 27, 2023
Signed-off-by: ldpliu <daliu@redhat.com>

Signed-off-by: ldpliu <daliu@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.

4 participants