-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Retrieve CRD schemas from the Server so default values can be considered during SSA diff calculation #11139
Comments
This feature is a must have to consider using server side apply because most CRDs will have some default values and applying ignoreDifferences to all applications for CRD default values is an immense task. |
@rouke-broersma Clarifying things. The current limitation just applies for CRDs that define default values at the schema level. In
This is the case that will cause problems in the diff logic for SSA. However, controllers can still define and consider internal default values (only applied in runtime) and in this case there won't be any diff issues in Argo CD. Not every CRD will have default values at the schema level. Argo CD CRDs for example don't define any. |
@leoluz I understand the case where this applies. All our own CRDs define default values at the schema level, and a lot of the applications we deploy do this as well. I still think it's valid to say that most (fine maybe many) CRDs do this. |
This bug pretty much rendered the server-side apply feature useless for me, as I was so hoping it would solve the infamous "CRD too long" issue of |
The new Server-Side Diff feature should be used to cover this use-case |
Summary
When ServerSideApply is enabled, the new diff logic is currently unable to consider CRD default values. Argo CD should be able to retrieve CRD schemas from Kubernetes server and add to the controller cache so default values can be considered during SSA diff calculation.
Motivation
Currently Argo CD is unable to consider CRD default values while calculating diffs when SSA is enabled. This makes it display the Application as out-of-sync when in fact there is no diff between the desired and live states.
Proposal
We currently cache the GVKParser but this object doesn't have the ability to apply default values. We need to investigate and find a way to apply default values during diff calculation.
The text was updated successfully, but these errors were encountered: