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 annotation if addon uses InstallStrategy #236

Conversation

haoqing0110
Copy link
Member

@haoqing0110 haoqing0110 commented Jan 31, 2024

Signed-off-by: haoqing0110 <qhao@redhat.com>
@haoqing0110
Copy link
Member Author

/assign @qiujian16

@@ -98,6 +108,27 @@ func (c *addonInstallController) sync(ctx context.Context, syncCtx factory.SyncC
continue
}

cma, err := c.clusterManagementAddonLister.Get(addonName)
Copy link
Member

Choose a reason for hiding this comment

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

this will be called per mca/cluster event. It might bring a lot of conflict. How about we put this in a controller that reconcile clustermanagementaddon only?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that would be a better choice. The current code will have conflicts when the first time adding the annotation, then won't trigger patch annotation action.

Copy link
Member

Choose a reason for hiding this comment

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

we have another existing controller that is reconciling the clustermanageraddon

@haoqing0110 haoqing0110 force-pushed the br_force-annotation branch 4 times, most recently from aaa3816 to b127718 Compare February 1, 2024 14:37
@haoqing0110 haoqing0110 changed the title add annotation if addon uses InstallStrategy [wip] add annotation if addon uses InstallStrategy Feb 2, 2024
@haoqing0110 haoqing0110 changed the title [wip] add annotation if addon uses InstallStrategy add annotation if addon uses InstallStrategy Feb 2, 2024
@haoqing0110
Copy link
Member Author

/assign @zhiweiyin318 @zhujian7

Copy link
Member

@qiujian16 qiujian16 left a comment

Choose a reason for hiding this comment

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

/approve

@@ -38,7 +38,7 @@
verbs: ["update", "patch"]
- apiGroups: ["addon.open-cluster-management.io"]
resources: ["clustermanagementaddons"]
verbs: ["get", "list", "watch"]
verbs: ["get", "list", "watch", "patch"]
Copy link
Member

Choose a reason for hiding this comment

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

note, we will need users to update the clusterrole when upgrading the library.

Copy link
Member

Choose a reason for hiding this comment

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

should be reflected in the release notes.

Copy link
Contributor

openshift-ci bot commented Feb 2, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Feb 2, 2024
Signed-off-by: haoqing0110 <qhao@redhat.com>
@zhujian7
Copy link
Member

zhujian7 commented Feb 2, 2024

LGTM

@zhiweiyin318
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Feb 2, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 41083d1 into open-cluster-management-io:main Feb 2, 2024
9 checks passed
@haoqing0110 haoqing0110 deleted the br_force-annotation branch February 2, 2024 07:48
tamalsaha added a commit to kluster-manager/installer that referenced this pull request Mar 10, 2024
tamalsaha added a commit to kluster-manager/installer that referenced this pull request Mar 12, 2024
tamalsaha added a commit to kluster-manager/installer that referenced this pull request Mar 12, 2024
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

4 participants