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

Enable ignoreResourceUpdate by default with known high churn resources #19992

Open
agaudreault opened this issue Sep 18, 2024 · 4 comments · May be fixed by #21760
Open

Enable ignoreResourceUpdate by default with known high churn resources #19992

agaudreault opened this issue Sep 18, 2024 · 4 comments · May be fixed by #21760
Assignees
Labels
component:config-management Tools specific issues (helm, kustomize etc) component:sync enhancement New feature or request more-information-needed Further information is requested
Milestone

Comments

@agaudreault
Copy link
Member

Summary

The feature is behind a flag. We should enable resource.ignoreResourceUpdatesEnabled: true by default the argocd-cm ConfigMap.

Motivation

No undesired effect has been reported since it has been implemented. Argo operators will likely experience problems until they find that flag and turn it on. If it is on by default, argo performance will be sustainable with default configurations for longer. CPU will be less and new/existing users are less likely to deploy Argo on instances with a lot of CPU request/limits, saving cost.

Proposal

  • Set it to true by default
  • For widely used Kubernetes resources that are known to have high churn, we should configure the ignore by default.
@agaudreault agaudreault added the enhancement New feature or request label Sep 18, 2024
@agaudreault agaudreault added this to the v3.0 milestone Sep 18, 2024
@todaywasawesome todaywasawesome added component:config-management Tools specific issues (helm, kustomize etc) component:sync labels Sep 19, 2024
agaudreault pushed a commit that referenced this issue Oct 10, 2024
austin5219 pushed a commit to austin5219/argo-cd that referenced this issue Oct 16, 2024
@andrii-korotkov-verkada
Copy link
Contributor

Can we enable ignore updates and differences for the status field for all resources? Or is it for v3?

@andrii-korotkov-verkada andrii-korotkov-verkada added the more-information-needed Further information is requested label Nov 11, 2024
adriananeci pushed a commit to adriananeci/argo-cd that referenced this issue Dec 4, 2024
@rumstead
Copy link
Member

rumstead commented Jan 7, 2025

FYI - Since v2.14 ignoreResourceUpdate is enabled by default!

Here are some suggestions on what to ignore from the docs

I don't quite follow the first one for ownerReferences.

  resource.customizations.ignoreResourceUpdates.argoproj.io_Application: |
    jsonPointers:
    # Ignore when ownerReferences change, for example, when a parent ApplicationSet changes often.
    - /metadata/ownerReferences
    # Ignore reconciledAt, since by itself it doesn't indicate any important change
    - /status/reconciledAt
    # status can change when controllers update a resource since it is used to track the status 
    - /status

Maybe we don't need /status if #10312 is merged

Some ones I use:

    jqPathExpressions:
    # Ignore lastTransitionTime for conditions; helpful when SharedResourceWarnings are being regularly updated but not
    # actually changing in content
    - .status?.conditions[]?.lastTransitionTime
  resource.customizations.ignoreResourceUpdates.all: |
    jqPathExpressions:
    # ignoring the argo cd tracking annotation to avoid shared resources with self-heal
    - '.metadata.annotations?."argocd.argoproj.io/tracking-id"'

@crenshaw-dev crenshaw-dev moved this to Todo in Argo CD 3.0 Jan 14, 2025
@agaudreault agaudreault self-assigned this Jan 17, 2025
@nebojsa-prodana
Copy link

          resource.customizations.ignoreResourceUpdates.all: |
            jsonPointers:
              - /status
              - /metadata/generation
              - /metadata/resourceVersion
              # ignoring managedFields to prevent churn when argocd competes with argo-rollouts for ownership of vs and dr
              - /metadata/managedFields

          # pods are not directly managed by argocd - skipping churn on larger service (200 or more pods) helps significantly
          resource.customizations.ignoreResourceUpdates.v1_Pod: |
            jsonPointers:
              - /metadata
              - /spec

          # HPA is in control of this, no need to reconcile
          resource.customizations.ignoreResourceUpdates.argoproj.io_Rollout: |
            jsonPointers:
              - /spec/replicas

          # controlled by rollout, no need to reconcile
          resource.customizations.ignoreResourceUpdates.apps_ReplicaSet: |
            jsonPointers:
              - /metadata
              - /spec/replicas

          # controlled by discovery API, no need to reconcile - helps reduce churn with larger services
          resource.customizations.ignoreResourceUpdates.discovery.k8s.io_EndpointSlice:
            |
            jsonPointers:
              - /metadata
              - /endpoints
              - /ports

@agaudreault
Copy link
Member Author

  resource.customizations.ignoreResourceUpdates._ConfigMap: |
    jqPathExpressions:
    - '.metadata.annotations."control-plane.alpha.kubernetes.io/leader"'
    - .metadata.resourceVersion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:config-management Tools specific issues (helm, kustomize etc) component:sync enhancement New feature or request more-information-needed Further information is requested
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

5 participants