-
Notifications
You must be signed in to change notification settings - Fork 258
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
[runtime] Exclude default values and empty fields during resource adoption when using the annotation approach #2230
Comments
This issue seems to be happening specifically in s3. Will have a patch for it soon |
Issue [#2230](aws-controllers-k8s/community#2230) Description of changes: This PR is ensuring the controller does not assign default empty values to the resource during a read operation By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Hey @adriananeci, after looking into this further, we noticed that this could cause some inconsistencies between the different controllers. |
Hey @michaelhtm, We currently create ACK objects via some helm charts and have objects defined to something like
We are planning to adopt some existing AWS resources by leveraging the adoption annotation feature and then continue to reconcile/adjust the adopted ACK resource via the helm charts. In order to make sure we are not missing any ACK objects setting in their spec definition, I want do a diff/comparison between the ACK object spec as populated by the controller and the ACK object spec defined in helm template. Given currently there are many fields that are empty or have a default value when an ACK object is adopted, it is pretty hard to identify if there is a gap between the object template as defined into the helm chart and the one populated during the adoption during the diff process. For an adopted S3 bucket in particular, I've noticed many fields that are empty or have default values, like:
In order to replicate it, you can manually create an S3 bucket with the default settings via the AWS console or aws cli and then try to adopt it. Then create a new ACK S3 bucket object with only the mandatory fields (e.g. name) , and you'll notice the diff in terms of spec fields between these 2 ACK objects, even if the AWS created resources have the same settings. |
Is your feature request related to a problem?
When adopting an S3 bucket using the annotation based mechanism(
services.k8s.aws/adoption-fields
andservices.k8s.aws/adoption-policy: adopt
annotations), the ACK object's spec is populated with all available options even if many of them are empty or have the default values.Is it possible to populate the spec with only non-default and non-empty fields during adoption?
Describe the solution you'd like
A description of what you want to happen.
Describe alternatives you've considered
A description of any alternative solutions or features you've considered.
The text was updated successfully, but these errors were encountered: