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

🐛: remove managedclustersetbinding v1beta1 in webhook. #316

Conversation

xuezhaojun
Copy link
Member

@xuezhaojun xuezhaojun commented Nov 22, 2023

Summary

We have split the webhook configuration of managedclustersetbinding to 2 configs in this PR: open-cluster-management-io/registration-operator#293

The previous release are not affected and all functionalities are fine, just remove v1beta1 content to make versions more clear.

Related issue(s)

Fixes #

@xuezhaojun xuezhaojun force-pushed the removal-managedclustersetbindingv1beta1-webhook branch from 01c5a13 to b4330d9 Compare November 22, 2023 08:53
@@ -22,6 +22,6 @@ webhooks:
- v1beta2
resources:
- managedclustersetbindings
admissionReviewVersions: ["v1beta1","v1"]
admissionReviewVersions: ["v1beta2","v1"]
Copy link
Member

Choose a reason for hiding this comment

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

seems the admissionReviewVersions is not related to the to-be-validated resources version? Not sure if we should change this.

Copy link
Member Author

@xuezhaojun xuezhaojun Nov 22, 2023

Choose a reason for hiding this comment

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

In fact, this list is not used in our customized webhook logic, the only field we leverage is UserInfo:

return nil, AllowBindingToClusterSet(b.kubeClient, binding.Spec.ClusterSet, req.UserInfo)

So in this configuration, we can put any version for example "v2". We change it to v1beta2 just to aglin with our version migration progress.

Copy link
Member

Choose a reason for hiding this comment

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

this is the version of admissionReview, not the version of crd.

Copy link
Member

Choose a reason for hiding this comment

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

this should not be changed to v1beta2

Copy link
Member Author

Choose a reason for hiding this comment

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

Got it, changed back.

@xuezhaojun xuezhaojun force-pushed the removal-managedclustersetbindingv1beta1-webhook branch 2 times, most recently from fbbd9fe to 98a8d86 Compare November 22, 2023 09:01
@xuezhaojun xuezhaojun closed this Nov 22, 2023
@xuezhaojun xuezhaojun reopened this Nov 22, 2023
@xuezhaojun
Copy link
Member Author

/assign @zhujian7

Copy link

codecov bot commented Nov 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6571a8a) 61.78% compared to head (4a4986a) 61.78%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #316   +/-   ##
=======================================
  Coverage   61.78%   61.78%           
=======================================
  Files         132      132           
  Lines       13983    13983           
=======================================
  Hits         8640     8640           
+ Misses       4579     4578    -1     
- Partials      764      765    +1     
Flag Coverage Δ
unit 61.78% <ø> (ø)

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.

@xuezhaojun xuezhaojun force-pushed the removal-managedclustersetbindingv1beta1-webhook branch from 98a8d86 to 95d7924 Compare November 22, 2023 09:20
@xuezhaojun
Copy link
Member Author

/assign @qiujian16
Looking for approval.

Signed-off-by: xuezhaojun <zxue@redhat.com>
@xuezhaojun xuezhaojun force-pushed the removal-managedclustersetbindingv1beta1-webhook branch from 95d7924 to 4a4986a Compare November 23, 2023 06:34
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
/lgtm

@openshift-ci openshift-ci bot added the lgtm label Nov 23, 2023
Copy link
Contributor

openshift-ci bot commented Nov 23, 2023

[APPROVALNOTIFIER] This PR is APPROVED

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

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 a46086d into open-cluster-management-io:main Nov 23, 2023
13 checks passed
@xuezhaojun xuezhaojun deleted the removal-managedclustersetbindingv1beta1-webhook branch November 23, 2023 13:23
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