Skip to content
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

ArgoCD out of sync because of unpredictable list order in networkacl and routetable objects #2053

Open
adriananeci opened this issue Apr 12, 2024 · 6 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. service/ec2 Indicates issues or PRs that are related to ec2-controller.

Comments

@adriananeci
Copy link

Describe the bug
There are few fields in networkacl and routetable objects spec that are of type list (e.g tags, entries, etc).
I've noticed that the tags and entries values are getting changed by the ack controller once created which means the order of the items from these lists are not set in a predictable order.

In the context of ArgoCD, because of the unpredictable order of the elements from a list, an application that creates/reconciles such objects is constantly out of sync

Steps to reproduce

Create an ArgoCD Application that is deploying a networkacl object which contains multiple tags and multiple entries in its spec.

Expected outcome
ArgoCD Application that is deploying a networkacl object should be in a synced state

Environment

  • Kubernetes version: 1.27
  • Using EKS (yes/no), if so version? : 1.27
  • AWS service targeted (S3, RDS, etc.): EC2

cc @a-hilaly

@a-hilaly a-hilaly added kind/bug Categorizes issue or PR as related to a bug. service/ec2 Indicates issues or PRs that are related to ec2-controller. labels Apr 15, 2024
@a-hilaly
Copy link
Member

Thank you for reporting this @adriananeci - this is indeed a bug, and the controller shouldn't mess with the order of tags or any other field. More reasons to stop sorting/using samberlo

@gecube
Copy link

gecube commented Apr 16, 2024

In the context of ArgoCD, because of the unpredictable order of the elements from a list, an application that creates/reconciles such objects is constantly out of sync

ArgoCD bugs. It should not react on diff when list elements were in changed order. I could recommed only to remove these particular fields from diff monitoring. The documentation is here: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/

@a-hilaly it's what we already discussed in context of FluxCD usages. like here #1898 or #1880

@gecube
Copy link

gecube commented Apr 16, 2024

ArgoCD Application that is deploying a networkacl object should be in a synced state

it's another thing. It is related to kstatus support I believe #1899 The very same issue is with Crossplane project.

@gecube
Copy link

gecube commented Apr 16, 2024

Also proof that ArgoCD still has an issue with the ordering of the lists:

argoproj/argo-cd#12033

@adriananeci
Copy link
Author

I could recommed only to remove these particular fields from diff monitoring. The documentation is here: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/

That won't work because then any changes added to these lists won't be synced by argocd

@gecube
Copy link

gecube commented Apr 18, 2024

@adriananeci thanks, your remark makes sense.

@a-hilaly a-hilaly self-assigned this Jun 4, 2024
@a-hilaly a-hilaly added the priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. service/ec2 Indicates issues or PRs that are related to ec2-controller.
Projects
None yet
Development

No branches or pull requests

3 participants