-
Notifications
You must be signed in to change notification settings - Fork 42
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 AdoptedResource
functionality for SecurityGroups
#164
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: nnbu The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @nnbu. Thanks for your PR. I'm waiting for a aws-controllers-k8s 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. |
8a0ce0a
to
39144c6
Compare
Hi @nnbu - have you tested this? I've tried something similar before, but in this case, if the user set the wrong Name in the adoption, the existing value in AWS is overwritten which is an undesired side effect of this. Just checking if this is not the case. I have a PR in progress that follows a different method and avoid that problem |
Hi pcolazurdo Here is what I have tried.
|
In fact, there is an unrelated issue here. Here are the steps
This happens because ec2 controller does not detect the name change when it calculates the This bug is not related to |
implemented in #165 |
Issue # : aws-controllers-k8s/community#1946
Description of changes:
RCA:
Following CR currently fails to adopt the existing SecurityGroups resource.
The error
comes from https://github.com/aws-controllers-k8s/runtime/blob/main/pkg/runtime/adoption_reconciler.go#L157
SetIdentifiers function needs to have code to fill up required values of the CR so as to solve this issue.
Solution:
A new fields is defined as name and it is initialized in SetIdentifiers function. This field needs to be part of additionalKeys field of AdoptedResource CR for SecurityGroups.
The new CR looks like,
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.