Remove FieldRequired for EnableVMProtection VNET property #274
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
When setting this property to False in the Crossplane VirtualNetwork CR,
the controller finds itself constantly reconciling actual and desired
state. This leads to a lot of instability when trying to create
resources in that VNET, as there is never any convergence.
Adding a few log messages in the provider, I observed that there was
always a mismatch between the EnableVMProtection property for the
desired object (pointer to a boolean value set to false) and the one
for the actual object obtained from the Azure SDK (which is nil).
So it seems that using FieldRequired for EnableVMProtection may not be
accurate, at least not with the version of the SDK currently used by
Crossplane.
Signed-off-by: Antonin Bas abas@vmware.com
I have:
make reviewable test
to ensure this PR is ready for review.How has this code been tested
Created Vnets with EnableVMProtection set to false and looked at reconciliation logs.