-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 provider namespace secret not included in clusterctl move #9694
Conversation
|
Welcome @archerwu9425! |
Hi @archerwu9425. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/area area/clusterctl |
@archerwu9425: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/area clusterctl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ok-to-test
Thanks for this!
Could we add a unit test to ensure we don't have regression here?
Note that the linked issue references two problems:
This PR only impacts the first AFAIU, so we should leave the linked issue open to ensure that bug also gets fixed. |
Sure, will add UT |
Per my migration process, the secret in workload cluster namespace with the label is getting migrated successfully, only the provider namespace secret skipped. |
I would like to take a look into the changed behavior for controller runtime fake client so we can decide if to backport/up to which release, but currently dealing with a huge backlog (I will get to this ASAP) |
/hold |
/hold cancel /lgtm |
LGTM label has been added. Git tree hash: 501928021f376a406c6fe64c0560a059b8b0eada
|
/cherry-pick release-1.5 |
@fabriziopandini: once the present PR merges, I will cherry-pick it on top of release-1.5 in a new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/cherry-pick release-1.4 |
@fabriziopandini: once the present PR merges, I will cherry-pick it on top of release-1.4 in a new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
As far as I can tell we check now for "Secret" which we set in cluster-api/cmd/clusterctl/client/cluster/objectgraph.go Lines 391 to 392 in 328b4d8
So this change seems fine to me. @archerwu9425 Can you please squash the commits? |
remove getFakeDiscoveryTypes and directly use graph.getDiscoveryTypes fix provider namespace secret not included in clusterclt move
@sbueringer Squashed. Thanks |
Thx! /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbueringer 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 |
@fabriziopandini: #9694 failed to apply on top of branch "release-1.5":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@fabriziopandini: #9694 failed to apply on top of branch "release-1.4":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What this PR does / why we need it:
clusterclt move
didn't include secrets in provider namespace, for example:I have claimed
AWSClusterStaticIdentity
for cluster A, and add the reference secret tocapa-system
. But when I tried to useclusterclt move
to migrate the cluster, only the AWSClusterStaticIdentity will be included, but the secret for the identity not included and causing issue in target management cluster after move.The root cause of this is that the
discoveryType
isSecret
but the filter set for provider namespace check isSecretList
, so that part of logic will never run into.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Part of #9630