Ignore Differences for Certain Fields in Cert Manager to Stop AKS Sync Loop in ArgoCD #979
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:
This pull request addresses an issue where ArgoCD was continuously syncing changes on an AKS cluster due to differences detected in certain fields managed by Cert Manager.
Problem:
ArgoCD was entering a sync loop due to changes detected in specific fields of Cert Manager resources, particularly in the status and webhook fields of ValidatingWebhookConfiguration objects. These fields are often updated automatically by aks, causing unnecessary sync operations.
Solution:
To prevent this sync loop, the following changes have been implemented:
Added ignoreDifferences configuration in the ArgoCD Application manifest to ignore changes in the webhook fields of ValidatingWebhookConfiguration deployed by the Cert Manager app.
Used jqPathExpressions to specify the paths that should be ignored by ArgoCD during the comparison.
Impact:
This change will stop ArgoCD from unnecessarily syncing changes when these specific fields are updated, reducing sync noise and preventing potential issues in the AKS environment.
Testing:
Verified the ArgoCD sync behavior with the updated ignoreDifferences configuration.
Ensured that no unintended differences are ignored, keeping the sync process accurate and effective.
By submitting this Pull Request, you agree to follow our
Code of Conduct
Notes (Optional)
cert-manager/cert-manager#4114 (comment)
Azure/AKS#4002