-
Notifications
You must be signed in to change notification settings - Fork 35
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: mapping failed. #660
Fix: mapping failed. #660
Conversation
/lgtm |
Signed-off-by: xuezhaojun <zxue@redhat.com>
d2415ef
to
b189b86
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
/unhold |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: xuezhaojun, 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 |
The fix[1] for bug[2] seems to break ManagedClusterView for custom resources (like VolumeReplicationGroup). Ramen works with previous commit[3]. [1] stolostron/multicloud-operators-foundation#660 [2] https://issues.redhat.com/browse/ACM-7479 [3] stolostron/multicloud-operators-foundation@031ee0f Signed-off-by: Nir Soffer <nsoffer@redhat.com>
Fixes: https://issues.redhat.com/browse/ACM-7479
Root cause: Start with this PR, the behavior of
NewDynamicRESTMapper
changed.Run this
restMapper.KindFor(&schema.GroupVersionResource{Resource:"deployment"}})
, the results:Before it returns a
GroupVersionKind
:But now, it returns the error:
The root cause is in controller-runtime
v0.14.6
, it reloads by this function: https://github.com/kubernetes-sigs/controller-runtime/blob/cd65cb25d314f40a329a688f4714fe3282589e97/pkg/client/apiutil/dynamicrestmapper.go#L94 which caches all groups and resource from discoveryClient.But after this PR, it reloads by
ServerResourcesForGroupVersion
which makesversion
a required value, and that against our API design ofManagedClusterView
.