-
Notifications
You must be signed in to change notification settings - Fork 362
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
Cloudfront Looping into Deploying State when using cache behaviors #1174
Comments
I commented out everything in the definition and composition relating to cacheBehaviors and the looping stopped. However, I expected the single cache behavior to be removed since I did remove it from the composition all together. Now it can't be deleted through crossplane. The |
I feel this issue has something to do with trying to propagate an array of complex objects from my XRD resource into the composition. I honestly have had many issues with arrays of objects with their own nested arrays. If an an array of objects only has simple keys, ie no objects or arrays, then defining the array works pretty well. In this case the cacheBehaviors array is very complex with many levels deep of objects with arrays of nested objects. The effect in the web console I see is the Distribution completing, but in Kubernetes the Distribution just never says ready is true. I can kind of tell when the reconciliation loop comes around that Crossplane somehow sees the state it has as different from the state in AWS. Then it makes some kind of change every loop and therefore it is looping into deploying state. |
If I cut the cacheBehavior array from the XRD and paste it directly into the composition, then there are no issues. This clearly shows the issue has to do with passing the entire cacheBehaviors array from the XRD resource to the composition. Also to note, the generation number on the Distribution is ticking up and up. Each time it increments, the Distribution goes back to deploying state. |
Hello @kferrone, I opened #1186 which solves the issue you're experiencing. Please note that, Also, with this change, we're removing |
tested the fix #1186 it is working |
Sweet! When is the next planned release? |
0.25 on 09.03 |
What happened?
I have a cloudfront composition which will put the distribution in a constant loop into deploying. Everything was working fine until I added a key for
cacheBehaviors
in the CompositeDefinition which in turn would add to the same key in theDistribution
which is created by the Composition. This was easier said than done.Every single key in every object in the array of the incredibly detailed
cacheBehaviors
needed to be filled. No defaults at all.It all seems to kinda work but it also seems every time Crossplane reconciles the resource, the Distribution will go back to deploying.
Here is what I had to do to get a single cache behavior as it defaults in the web console.
How can we reproduce it?
Here is what I wanted to do:
Use this snippet with a Cloudfront Distribution resource and see what happens.
I have shared the repo with @haarchri and other Crossplane members.
This one: https://github.com/Cubizoid/crosshook
To get the composition and xrd up from that project:
Use this as the example:
The text was updated successfully, but these errors were encountered: