Expose conversion option to inject key/values in the conversion to list #465
+244
−12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of your changes
We have observed some issue with the EKS Cluster resource where when we apply the manifest and let it to resolve references to
spec.forProvider.vpcConfig.securityGroupIds
, we noticed the following error in the status:Our assumption (which is validated by observing this changes fixes the problem) is as follows:
Server Side Apply uses merge strategies to make decisions during merging changes by various owners/managers. In EKS Cluster object, for
vpcConfig
field, we mark+listType
as map and//+listMapKey
asindex
. During conversion betweenv1beta1
tov1beta2
, we convert the that field from array to object, losing the index field since it is not in the schema. This is fine in most cases since inv1beta1
of the object schema index defaults to"0"
, even though you don’t provide it.However, with Server Side Apply, apparently some on the fly conversions happening when different managers using different api versions and losing index field causing unexpected merging results and drop of the whole
spec.forProvider.vpcConfig
object.I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR if necessary.How has this code been tested
Unit tests and a custom build for provider-aw-eks with this change.