✨ feat(awsmanagedcontrolplane): support resource marked as externally managed#6034
Conversation
…to be marked as externally managed using annotation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @aidan-canva! |
|
Hi @aidan-canva. 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 Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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-sigs/prow repository. |
|
/ok-to-test |
|
@aidan-canva - how feasible do you think it to create a new e2e test that covers this scenario? |
|
@richardcase I will take a look and give it a crack (and fix the failing test) |
|
/retest |
|
@aidan-canva - if i can help with the e2e let me know. We could always jump on a call if needed. |
|
/test ? |
|
/test pull-cluster-api-provider-aws-e2e-eks |
|
Apologies for the delay @richardcase , unfortunately got a bit sidetracked. I've put a basic E2E in place ... but it's a bit of a struggle to run this suite in my local-envs (fortunately it seems CI might pass 🤞 ). I'm not a huge fan of the negative test (wait x to prove it didn't do something) structure but couldn't think of a better way to validate this cleanly. Keen to hear some thoughts. |
|
/retest |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Adds support for
AWSManagedControlPlaneresources to be marked as externally managed using the standardcluster.x-k8s.io/managed-byannotation. This allows operators to use CAPI/CAPA to manage machines with pre-existing EKS clusters managed by external-systems (eg, Terraform).Which issue(s) this PR fixes:
Fixes #6031
Special notes for your reviewer:
The second test added is a little redundant with the existing
TestAWSManagedControlPlaneReconcilerIntegrationTeststest but IMO a positive/negative check sitting close together will make identifying a regression easier in the future.I'm not sure how detailed to go in the docs. Too detailed and it'll likely just become out of date quickly as the status/conditions required will change as the internal controllers logic changes. IMO it's a pretty 'power-user' feature so some thing can be left up to the operator to determine for their environment, like the
kubeconfigcredential generation. Alternatively we could to a longer/more detailed guide.AI Usage:
My usage of CAPA doesn't extend to all of its features, so AI was used as an additional review before opening the PR and to try and capture any missed status/conditions or fields required for a minimal working
AWSManagedControlPlaneresource that's externally managed.Checklist:
Release note: