argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
17.98k stars 5.47k forks source link

ArgoCD show the application OutOfSync without any diff #14666

Open quadrinho opened 1 year ago

quadrinho commented 1 year ago

Checklist:

Describe the bug

Hello,

in argocd i can see that an application (correctly working in the target cluster) have the Sync Status in OutOfSync, after some seconds the SyncStatus become Synced and the last Sync is in Syncing; after some seconds the SyncStatus go back to OutOfSync without any change on github.

It seems a sort of "loop"

The target cluster is EKS version 1.24 (but the problem is present also with 1.25). I haven't the same problem in EKS 1.23

To Reproduce

Install an application inside the cluster (i am using app of apps - please see the print below)

Expected behavior

The application when it is deployed and Synced doesn't need to go OutOfSync if i don't change anything

Screenshots APPS in APP

image

OutOfSync:

image

Synced:

image

Version

ArgoCD version --> v2.9.0+b90f3bc Helm Chart Version --> 5.40.0

Logs

I paste here the describe of the application that is continue to go from OutOfSync to Synced and OutOfSync again

e:         external-dns-mobile56-dev
Namespace:    argocd
Labels:       argocd.argoproj.io/instance=rootapps-dev-mobile56-platform
              project=platformapps-dev-mobile56
Annotations:  argocd.argoproj.io/manifest-generate-paths: .
              argocd.argoproj.io/sync-wave: 4
API Version:  argoproj.io/v1alpha1
Kind:         Application
Metadata:
  Creation Timestamp:  2023-07-19T09:14:44Z
  Finalizers:
    resources-finalizer.argocd.argoproj.io
  Generation:  29544
  Managed Fields:
    API Version:  argoproj.io/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .:
          f:argocd.argoproj.io/manifest-generate-paths:
          f:argocd.argoproj.io/sync-wave:
          f:kubectl.kubernetes.io/last-applied-configuration:
        f:finalizers:
          .:
          v:"resources-finalizer.argocd.argoproj.io":
        f:labels:
          .:
          f:argocd.argoproj.io/instance:
          f:project:
      f:spec:
        .:
        f:destination:
          .:
          f:namespace:
          f:server:
        f:project:
        f:source:
          .:
          f:helm:
            .:
            f:valueFiles:
          f:path:
          f:repoURL:
          f:targetRevision:
        f:syncPolicy:
          .:
          f:automated:
            .:
            f:prune:
            f:selfHeal:
          f:managedNamespaceMetadata:
            .:
            f:labels:
              .:
              f:pod-security.kubernetes.io/audit:
              f:pod-security.kubernetes.io/audit-version:
              f:pod-security.kubernetes.io/enforce:
              f:pod-security.kubernetes.io/enforce-version:
              f:pod-security.kubernetes.io/warn:
              f:pod-security.kubernetes.io/warn-version:
          f:syncOptions:
    Manager:      argocd-controller
    Operation:    Update
    Time:         2023-07-19T09:14:44Z
    API Version:  argoproj.io/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:operation:
        .:
        f:initiatedBy:
          .:
          f:automated:
        f:retry:
          .:
          f:limit:
        f:sync:
          .:
          f:prune:
          f:revision:
          f:syncOptions:
      f:status:
        .:
        f:health:
          .:
          f:status:
        f:history:
        f:reconciledAt:
        f:resources:
        f:sourceType:
        f:summary:
          .:
          f:images:
        f:sync:
          .:
          f:comparedTo:
            .:
            f:destination:
              .:
              f:namespace:
              f:server:
            f:source:
              .:
              f:helm:
                .:
                f:valueFiles:
              f:path:
              f:repoURL:
              f:targetRevision:
          f:revision:
          f:status:
    Manager:         argocd-application-controller
    Operation:       Update
    Time:            2023-07-24T11:48:34Z
  Resource Version:  146356045
  UID:               be61a824-bfbd-4f26-aadc-21588926bb1d
Operation:
  Initiated By:
    Automated:  true
  Retry:
    Limit:  5
  Sync:
    Prune:     true
    Revision:  2685c4c3ce9f554fe661f2e8df36de32ded65f63
    Sync Options:
      CreateNamespace=true
      ApplyOutOfSyncOnly=true
      PruneLast=true
Spec:
  Destination:
    Namespace:  platform
    Server:     https://36F950CAB58ED67F6DF6F037ACAD9074.gr7.eu-central-1.eks.amazonaws.com
  Project:      platformapps-dev-mobile56
  Source:
    Helm:
      Value Files:
        values/platform/dev-mobile56.yaml
        values/environment/dev.yaml
    Path:             external-dns
    Repo URL:         https://XXXXX
    Target Revision:  update/eks-1.24
  Sync Policy:
    Automated:
      Prune:      true
      Self Heal:  true
    Managed Namespace Metadata:
      Labels:
        pod-security.kubernetes.io/audit:            privileged
        pod-security.kubernetes.io/audit-version:    latest
        pod-security.kubernetes.io/enforce:          privileged
        pod-security.kubernetes.io/enforce-version:  v1.24
        pod-security.kubernetes.io/warn:             privileged
        pod-security.kubernetes.io/warn-version:     latest
    Sync Options:
      CreateNamespace=true
      ApplyOutOfSyncOnly=true
      PruneLast=true
Status:
  Health:
    Status:  Healthy
  History:
    Deploy Started At:  2023-07-24T11:37:02Z
    Deployed At:        2023-07-24T11:37:41Z
    Id:                 1702
    Revision:           2685c4c3ce9f554fe661f2e8df36de32ded65f63
    Source:
      Helm:
        Value Files:
          values/platform/dev-mobile56.yaml
          values/environment/dev.yaml
      Path:             external-dns
      Repo URL:         https://XXXXXXXX
      Target Revision:  update/eks-1.24
    Deploy Started At:  2023-07-24T11:38:09Z
    Deployed At:        2023-07-24T11:38:51Z
    Id:                 1703
    Revision:           2685c4c3ce9f554fe661f2e8df36de32ded65f63
    Source:
      Helm:
        Value Files:
          values/platform/dev-mobile56.yaml
          values/environment/dev.yaml
      Path:             external-dns
      Repo URL:         https://XXXXXX
      Target Revision:  update/eks-1.24
    Deploy Started At:  2023-07-24T11:39:16Z
    Deployed At:        2023-07-24T11:40:02Z
    Id:                 1704
    Revision:           2685c4c3ce9f554fe661f2e8df36de32ded65f63
    Source:
      Helm:
        Value Files:
          values/platform/dev-mobile56.yaml
          values/environment/dev.yaml
      Path:             external-dns
      Repo URL:         https://XXXXXX
      Target Revision:  update/eks-1.24
    Deploy Started At:  2023-07-24T11:40:28Z
    Deployed At:        2023-07-24T11:41:11Z
    Id:                 1705
    Revision:           2685c4c3ce9f554fe661f2e8df36de32ded65f63
    Source:
      Helm:
        Value Files:
          values/platform/dev-mobile56.yaml
          values/environment/dev.yaml
      Path:             external-dns
      Repo URL:         https://XXXXXX
      Target Revision:  update/eks-1.24
    Deploy Started At:  2023-07-24T11:41:38Z
    Deployed At:        2023-07-24T11:42:23Z
    Id:                 1706
    Revision:           2685c4c3ce9f554fe661f2e8df36de32ded65f63
    Source:
      Helm:
        Value Files:
          values/platform/dev-mobile56.yaml
          values/environment/dev.yaml
      Path:             external-dns
      Repo URL:         https://XXXXXX
      Target Revision:  update/eks-1.24
    Deploy Started At:  2023-07-24T11:42:54Z
    Deployed At:        2023-07-24T11:43:35Z
    Id:                 1707
    Revision:           2685c4c3ce9f554fe661f2e8df36de32ded65f63
    Source:
      Helm:
        Value Files:
          values/platform/dev-mobile56.yaml
          values/environment/dev.yaml
      Path:             external-dns
      Repo URL:         https://XXXXXX
      Target Revision:  update/eks-1.24
    Deploy Started At:  2023-07-24T11:44:05Z
    Deployed At:        2023-07-24T11:44:48Z
    Id:                 1708
    Revision:           2685c4c3ce9f554fe661f2e8df36de32ded65f63
    Source:
      Helm:
        Value Files:
          values/platform/dev-mobile56.yaml
          values/environment/dev.yaml
      Path:             external-dns
      Repo URL:         https://XXXXXX
      Target Revision:  update/eks-1.24
    Deploy Started At:  2023-07-24T11:45:15Z
    Deployed At:        2023-07-24T11:46:03Z
    Id:                 1709
    Revision:           2685c4c3ce9f554fe661f2e8df36de32ded65f63
    Source:
      Helm:
        Value Files:
          values/platform/dev-mobile56.yaml
          values/environment/dev.yaml
      Path:             external-dns
      Repo URL:         https://XXXXXX
      Target Revision:  update/eks-1.24
    Deploy Started At:  2023-07-24T11:46:31Z
    Deployed At:        2023-07-24T11:47:19Z
    Id:                 1710
    Revision:           2685c4c3ce9f554fe661f2e8df36de32ded65f63
    Source:
      Helm:
        Value Files:
          values/platform/dev-mobile56.yaml
          values/environment/dev.yaml
      Path:             external-dns
      Repo URL:         https://XXXXXX
      Target Revision:  update/eks-1.24
    Deploy Started At:  2023-07-24T11:47:49Z
    Deployed At:        2023-07-24T11:48:29Z
    Id:                 1711
    Revision:           2685c4c3ce9f554fe661f2e8df36de32ded65f63
    Source:
      Helm:
        Value Files:
          values/platform/dev-mobile56.yaml
          values/environment/dev.yaml
      Path:             external-dns
      Repo URL:         https://XXXXXX
      Target Revision:  update/eks-1.24
  Reconciled At:        2023-07-24T11:48:34Z
  Resources:
    Health:
      Status:   Healthy
    Kind:       Service
    Name:       external-dns-mobile56-dev
    Namespace:  platform
    Status:     Synced
    Version:    v1
    Kind:       ServiceAccount
    Name:       external-dns
    Namespace:  platform
    Status:     Synced
    Version:    v1
    Group:      apps
    Health:
      Status:   Healthy
    Kind:       Deployment
    Name:       external-dns-mobile56-dev
    Namespace:  platform
    Status:     Synced
    Version:    v1
    Group:      iam.aws.upbound.io
    Kind:       Policy
    Name:       dev-mobile56-external-dns
    Status:     Synced
    Version:    v1beta1
    Group:      iam.aws.upbound.io
    Kind:       Role
    Name:       dev-mobile56-external-dns
    Status:     Synced
    Version:    v1beta1
    Group:      iam.aws.upbound.io
    Kind:       RolePolicyAttachment
    Name:       dev-mobile56-external-dns
    Status:     Synced
    Version:    v1beta1
    Group:      rbac.authorization.k8s.io
    Kind:       ClusterRole
    Name:       external-dns-mobile56-dev
    Status:     Synced
    Version:    v1
    Group:      rbac.authorization.k8s.io
    Kind:       ClusterRoleBinding
    Name:       external-dns-mobile56-dev-viewer
    Status:     Synced
    Version:    v1
  Source Type:  Helm
  Summary:
    Images:
      023951383515.dkr.ecr.eu-central-1.amazonaws.com/cloudification/external-dns/external-dns:v0.12.2
  Sync:
    Compared To:
      Destination:
        Namespace:  platform
        Server:     https://36F950CAB58ED67F6DF6F037ACAD9074.gr7.eu-central-1.eks.amazonaws.com
      Source:
        Helm:
          Value Files:
            values/platform/dev-mobile56.yaml
            values/environment/dev.yaml
        Path:             external-dns
        Repo URL:         https://XXXXXX
        Target Revision:  update/eks-1.24
    Revision:             2685c4c3ce9f554fe661f2e8df36de32ded65f63
    Status:               Synced
Events:
  Type    Reason              Age    From                           Message
  ----    ------              ----   ----                           -------
  Normal  OperationCompleted  59m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    59m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     59m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     59m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  58m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    58m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     58m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     57m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  57m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    57m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     57m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     56m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  55m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    55m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     55m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     55m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  54m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    54m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     54m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     53m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  52m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    52m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     52m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     51m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  51m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    51m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     51m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     50m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  50m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    49m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     49m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     49m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  48m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    48m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     48m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     47m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  47m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  ResourceUpdated     47m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  OperationStarted    47m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     46m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  46m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    46m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     46m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     45m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  44m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    44m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     44m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     44m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  43m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  ResourceUpdated     43m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  OperationStarted    43m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     43m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  42m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    42m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     42m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     42m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  41m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    41m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     41m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     40m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  40m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    40m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     40m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     39m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  39m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    38m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     38m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     38m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  37m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    37m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     37m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     37m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  36m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    36m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     36m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     35m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  35m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    35m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     35m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     34m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  34m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    34m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     34m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     33m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  32m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    32m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     32m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     32m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  31m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    31m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     31m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     31m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  30m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    30m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     30m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     30m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  29m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  ResourceUpdated     29m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  OperationStarted    29m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     28m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  28m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    28m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     28m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     27m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  26m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    26m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     26m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     26m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  25m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    25m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     25m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     25m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  24m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    24m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     24m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     24m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  23m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    23m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     23m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     22m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  22m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    22m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     22m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     21m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  20m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    20m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     20m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     20m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  19m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    19m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     19m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     19m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  18m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    18m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     18m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     17m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  17m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    17m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     17m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     16m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  16m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    16m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     16m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     15m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  14m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    14m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     14m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     14m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  13m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    13m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     13m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     13m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  12m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    12m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     12m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     11m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  11m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    11m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     11m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     10m    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  10m    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    10m    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     10m    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     9m32s  argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  8m54s  argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    8m49s  argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     8m49s  argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     8m18s  argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  7m45s  argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    7m40s  argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     7m40s  argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     7m9s   argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  6m33s  argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    6m28s  argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     6m27s  argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     5m55s  argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  5m20s  argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    5m16s  argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     5m16s  argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     4m44s  argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  4m8s   argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    4m3s   argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     4m3s   argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     3m32s  argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  2m53s  argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    2m48s  argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     2m48s  argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     2m14s  argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  97s    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  OperationStarted    92s    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
  Normal  ResourceUpdated     91s    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  ResourceUpdated     56s    argocd-application-controller  Updated sync status: Synced -> OutOfSync
  Normal  OperationCompleted  26s    argocd-application-controller  Sync operation to 2685c4c3ce9f554fe661f2e8df36de32ded65f63 succeeded
  Normal  ResourceUpdated     22s    argocd-application-controller  Updated sync status: OutOfSync -> Synced
  Normal  OperationStarted    22s    argocd-application-controller  Initiated automated sync to '2685c4c3ce9f554fe661f2e8df36de32ded65f63'
quadrinho commented 1 year ago

Hello,

can anyone help me?

@crenshaw-dev can you help me?

blakepettersson commented 1 year ago

Can you post the Application, to be able to better discern what's going on?

quadrinho commented 1 year ago

Can you post the Application, to be able to better discern what's going on?

Hello @blakepettersson,

below the Application:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  annotations:
    argocd.argoproj.io/manifest-generate-paths: .
    argocd.argoproj.io/sync-wave: "4"
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"argoproj.io/v1alpha1","kind":"Application","metadata":{"annotations":{"argocd.argoproj.io/manifest-generate-paths":".","argocd.argoproj.io/sync-wave":"4"},"finalizers":["resources-finalizer.argocd.argoproj.io"],"labels":{"argocd.argoproj.io/instance":"rootapps-dev-mobile56-platform","project":"platformapps-dev-mobile56"},"name":"external-dns-mobile56-dev","namespace":"argocd"},"spec":{"destination":{"namespace":"platform","server":"https://36F950CAB58ED67F6DF6F037ACAD9074.gr7.eu-central-1.eks.amazonaws.com"},"project":"platformapps-dev-mobile56","source":{"helm":{"valueFiles":["values/platform/dev-mobile56.yaml","values/environment/dev.yaml"]},"path":"external-dns","repoURL":"https://XXXXXXX","targetRevision":"update/eks-1.24"},"syncPolicy":{"automated":{"prune":true,"selfHeal":true},"managedNamespaceMetadata":{"labels":{"pod-security.kubernetes.io/audit":"privileged","pod-security.kubernetes.io/audit-version":"latest","pod-security.kubernetes.io/enforce":"privileged","pod-security.kubernetes.io/enforce-version":"v1.24","pod-security.kubernetes.io/warn":"privileged","pod-security.kubernetes.io/warn-version":"latest"}},"syncOptions":["CreateNamespace=true","ApplyOutOfSyncOnly=true","PruneLast=true"]}}}
  creationTimestamp: "2023-07-19T09:14:44Z"
  finalizers:
  - resources-finalizer.argocd.argoproj.io
  generation: 67117
  labels:
    argocd.argoproj.io/instance: rootapps-dev-mobile56-platform
    project: platformapps-dev-mobile56
  name: external-dns-mobile56-dev
  namespace: argocd
  resourceVersion: "151294717"
  uid: be61a824-bfbd-4f26-aadc-21588926bb1d
operation:
  initiatedBy:
    automated: true
  retry:
    limit: 5
  sync:
    prune: true
    revision: 2685c4c3ce9f554fe661f2e8df36de32ded65f63
    syncOptions:
    - CreateNamespace=true
    - ApplyOutOfSyncOnly=true
    - PruneLast=true
spec:
  destination:
    namespace: platform
    server: https://36F950CAB58ED67F6DF6F037ACAD9074.gr7.eu-central-1.eks.amazonaws.com
  project: platformapps-dev-mobile56
  source:
    helm:
      valueFiles:
      - values/platform/dev-mobile56.yaml
      - values/environment/dev.yaml
    path: external-dns
    repoURL: https://XXXXXXX
    targetRevision: update/eks-1.24
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    managedNamespaceMetadata:
      labels:
        pod-security.kubernetes.io/audit: privileged
        pod-security.kubernetes.io/audit-version: latest
        pod-security.kubernetes.io/enforce: privileged
        pod-security.kubernetes.io/enforce-version: v1.24
        pod-security.kubernetes.io/warn: privileged
        pod-security.kubernetes.io/warn-version: latest
    syncOptions:
    - CreateNamespace=true
    - ApplyOutOfSyncOnly=true
    - PruneLast=true
status:
  health:
    status: Healthy
  history:
  - deployStartedAt: "2023-07-28T07:35:05Z"
    deployedAt: "2023-07-28T07:36:01Z"
    id: 4062
    revision: 2685c4c3ce9f554fe661f2e8df36de32ded65f63
    source:
      helm:
        valueFiles:
        - values/platform/dev-mobile56.yaml
        - values/environment/dev.yaml
      path: external-dns
      repoURL: https://XXXXXXX
      targetRevision: update/eks-1.24
  - deployStartedAt: "2023-07-28T07:36:41Z"
    deployedAt: "2023-07-28T07:37:47Z"
    id: 4063
    revision: 2685c4c3ce9f554fe661f2e8df36de32ded65f63
    source:
      helm:
        valueFiles:
        - values/platform/dev-mobile56.yaml
        - values/environment/dev.yaml
      path: external-dns
      repoURL: https://XXXXXXX
      targetRevision: update/eks-1.24
  - deployStartedAt: "2023-07-28T07:38:28Z"
    deployedAt: "2023-07-28T07:39:31Z"
    id: 4064
    revision: 2685c4c3ce9f554fe661f2e8df36de32ded65f63
    source:
      helm:
        valueFiles:
        - values/platform/dev-mobile56.yaml
        - values/environment/dev.yaml
      path: external-dns
      repoURL: https://XXXXXXX
      targetRevision: update/eks-1.24
  - deployStartedAt: "2023-07-28T07:40:09Z"
    deployedAt: "2023-07-28T07:41:05Z"
    id: 4065
    revision: 2685c4c3ce9f554fe661f2e8df36de32ded65f63
    source:
      helm:
        valueFiles:
        - values/platform/dev-mobile56.yaml
        - values/environment/dev.yaml
      path: external-dns
      repoURL: https://XXXXXXX
      targetRevision: update/eks-1.24
  - deployStartedAt: "2023-07-28T07:41:47Z"
    deployedAt: "2023-07-28T07:42:43Z"
    id: 4066
    revision: 2685c4c3ce9f554fe661f2e8df36de32ded65f63
    source:
      helm:
        valueFiles:
        - values/platform/dev-mobile56.yaml
        - values/environment/dev.yaml
      path: external-dns
      repoURL: https://XXXXXXX
      targetRevision: update/eks-1.24
  - deployStartedAt: "2023-07-28T07:43:24Z"
    deployedAt: "2023-07-28T07:44:28Z"
    id: 4067
    revision: 2685c4c3ce9f554fe661f2e8df36de32ded65f63
    source:
      helm:
        valueFiles:
        - values/platform/dev-mobile56.yaml
        - values/environment/dev.yaml
      path: external-dns
      repoURL: https://XXXXXXX
      targetRevision: update/eks-1.24
  - deployStartedAt: "2023-07-28T07:45:14Z"
    deployedAt: "2023-07-28T07:46:12Z"
    id: 4068
    revision: 2685c4c3ce9f554fe661f2e8df36de32ded65f63
    source:
      helm:
        valueFiles:
        - values/platform/dev-mobile56.yaml
        - values/environment/dev.yaml
      path: external-dns
      repoURL: https://XXXXXXX
      targetRevision: update/eks-1.24
  - deployStartedAt: "2023-07-28T07:46:52Z"
    deployedAt: "2023-07-28T07:47:56Z"
    id: 4069
    revision: 2685c4c3ce9f554fe661f2e8df36de32ded65f63
    source:
      helm:
        valueFiles:
        - values/platform/dev-mobile56.yaml
        - values/environment/dev.yaml
      path: external-dns
      repoURL: https://XXXXXXX
      targetRevision: update/eks-1.24
  - deployStartedAt: "2023-07-28T07:48:43Z"
    deployedAt: "2023-07-28T07:49:48Z"
    id: 4070
    revision: 2685c4c3ce9f554fe661f2e8df36de32ded65f63
    source:
      helm:
        valueFiles:
        - values/platform/dev-mobile56.yaml
        - values/environment/dev.yaml
      path: external-dns
      repoURL: https://XXXXXXX
      targetRevision: update/eks-1.24
  - deployStartedAt: "2023-07-28T07:50:31Z"
    deployedAt: "2023-07-28T07:51:35Z"
    id: 4071
    revision: 2685c4c3ce9f554fe661f2e8df36de32ded65f63
    source:
      helm:
        valueFiles:
        - values/platform/dev-mobile56.yaml
        - values/environment/dev.yaml
      path: external-dns
      repoURL: https://XXXXXXX
      targetRevision: update/eks-1.24
  operationState:
    message: waiting for healthy state of rbac.authorization.k8s.io/ClusterRole/external-dns-mobile56-dev
      and 4 more resources
    operation:
      initiatedBy:
        automated: true
      retry:
        limit: 5
      sync:
        prune: true
        revision: 2685c4c3ce9f554fe661f2e8df36de32ded65f63
        syncOptions:
        - CreateNamespace=true
        - ApplyOutOfSyncOnly=true
        - PruneLast=true
    phase: Running
    startedAt: "2023-07-28T07:52:18Z"
    syncResult:
      resources:
      - group: ""
        hookPhase: Running
        kind: Namespace
        message: namespace/platform serverside-applied
        name: platform
        namespace: ""
        status: Synced
        syncPhase: PreSync
        version: v1
      revision: 2685c4c3ce9f554fe661f2e8df36de32ded65f63
      source:
        helm:
          valueFiles:
          - values/platform/dev-mobile56.yaml
          - values/environment/dev.yaml
        path: external-dns
        repoURL: https://XXXXXXX
        targetRevision: update/eks-1.24
  reconciledAt: "2023-07-28T07:52:30Z"
  resources:
  - health:
      status: Healthy
    kind: Service
    name: external-dns-mobile56-dev
    namespace: platform
    status: Synced
    version: v1
  - kind: ServiceAccount
    name: external-dns
    namespace: platform
    status: Synced
    version: v1
  - group: apps
    health:
      status: Healthy
    kind: Deployment
    name: external-dns-mobile56-dev
    namespace: platform
    status: Synced
    version: v1
  - group: iam.aws.upbound.io
    kind: Policy
    name: dev-mobile56-external-dns
    status: Synced
    version: v1beta1
  - group: iam.aws.upbound.io
    kind: Role
    name: dev-mobile56-external-dns
    status: Synced
    version: v1beta1
  - group: iam.aws.upbound.io
    kind: RolePolicyAttachment
    name: dev-mobile56-external-dns
    status: Synced
    version: v1beta1
  - group: rbac.authorization.k8s.io
    kind: ClusterRole
    name: external-dns-mobile56-dev
    status: Synced
    version: v1
  - group: rbac.authorization.k8s.io
    kind: ClusterRoleBinding
    name: external-dns-mobile56-dev-viewer
    status: Synced
    version: v1
  sourceType: Helm
  summary:
    images:
    - XXXXXXX/external-dns/external-dns:v0.12.2
  sync:
    comparedTo:
      destination:
        namespace: platform
        server: https://36F950CAB58ED67F6DF6F037ACAD9074.gr7.eu-central-1.eks.amazonaws.com
      source:
        helm:
          valueFiles:
          - values/platform/dev-mobile56.yaml
          - values/environment/dev.yaml
        path: external-dns
        repoURL: https://XXXXXXX
        targetRevision: update/eks-1.24
    revision: 2685c4c3ce9f554fe661f2e8df36de32ded65f63
    status: OutOfSync
quadrinho commented 1 year ago

hello @blakepettersson and @crenshaw-dev

can you help me?

crenshaw-dev commented 1 year ago

Looks to me like the status is OutOfSync because technically (even though all the resources are "synced,") the sync operation hasn't ended.

  operationState:
    message: waiting for healthy state of rbac.authorization.k8s.io/ClusterRole/external-dns-mobile56-dev
      and 4 more resources
    operation:
      initiatedBy:
        automated: true
      retry:
        limit: 5
      sync:
        prune: true
        revision: 2685c4c3ce9f554fe661f2e8df36de32ded65f63
        syncOptions:
        - CreateNamespace=true
        - ApplyOutOfSyncOnly=true
        - PruneLast=true
    phase: Running
quadrinho commented 1 year ago

Hello @crenshaw-dev ,

yes i am agree with you but why?

After some time the application looks like Healthy and Synced but after some seconds the OutOfSync appears again...

i really don't follow why :(

Do you have any idea?

Thanks!!!

crenshaw-dev commented 1 year ago

I only have a hunch: I suspect that PruneLast=true is causing the app to include resource health in the sync operation.

I've also seen PostSync hooks extend the sync context until resources are healthy.

timbu306 commented 1 year ago

Thank you for the answer @crenshaw-dev! You understand you are saying the sync is in progress because application's resources are "waiting for healthy state of ..".

You are suggesting the try following:

  1. To not include the resource health in the sync operation you are suggesting to set PruneLast=false
  2. To search for PostSync hooks and check if there might be a loop in those https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks/
crenshaw-dev commented 1 year ago

Correct!

quadrinho commented 1 year ago

Hello @crenshaw-dev ,

i have tried to set PruneLast=false both in the app in apps and in the specific app:

image

and

image

But the application aws-load-balancer-controller is continuing to have "Last Sync" in Syncing

image

I really don't know where to hit my head anymore.

Can you help me?

Thanks a lot!

sym-stiller commented 1 year ago

I was running into the same issue, and was able to fix it by removing the CreateNamespace=true sync option and all managed namespace metadata from my affected applications (instead I am now using a K8s manifest to manage the namespace). I am not using the PruneLast=true sync option at all.

So an application like this:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: my-app
spec:
  ... some omitted fields
  destination:
    server: https://kubernetes.default.svc
    namespace: my-namespace
  syncPolicy:
    syncOptions:
      - CreateNamespace=true
    managedNamespaceMetadata:
      labels:
        foo: bar

would be replaced by this:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: my-app
spec:
  ... some omitted fields
  destination:
    server: https://kubernetes.default.svc
    namespace: my-namespace
---
apiVersion: v1
kind: Namespace
metadata:
  name: my-namespace
  labels:
    foo: bar

I assume that this issue is caused by the server-side-apply mechanism used for the managedNamespaceMetadata, but I was not able to verify that assumption. For more context: I am running ArgoCD on AKS (k8s version 1.26.6) and the issue only became visible after upgrading ArgoCD to v2.8.x.

fredleger commented 1 year ago

@sym-stiller any chance you are using rancher here ? i'm facing a similar issue and i suspect that rancher altering metadata of the namespace can be the cause.

sym-stiller commented 1 year ago

@fredleger No, I'm not using Rancher.

But afaik AKS also alters namespace labels. It adds the kubernetes.io/metadata.name label to each namespace (but this could also be standard K8s behavior, idk). This is why I'm assuming that the server-side-apply performed by ArgoCD is the root cause of the problem. There will always be a difference between the managedNamespaceMetadata and the actual metadata, caused by the additional labels injected by AKS (or Rancher in your case).

sym-stiller commented 1 year ago

This PR seems to be fixing the issue in v2.8.4 and above: https://github.com/argoproj/argo-cd/pull/15488

cbankston-alk commented 1 year ago

The applications .spec.syncPolicy.managedNamespaceMetadata does not match its .status.operationState.syncResult.managedNamespaceMetadata. When this is the case (as of v2.8.0), the application will show OutOfSync and have a blank App Diff. Since the application has auto-sync enabled, ArgoCD is likely performing this sync to populate the tracking field (.status.operationState.syncResult.managedNamespaceMetadata).

I suggest verifying the ArgoCD CRDs in your cluster are up to date for your ArgoCD version; specifically, the application CRD needs to define this tracking field.

If the application CRDs are up to date, it seems that something is deleting the managedNamespaceMetadata tracking data, which is causing ArgoCD to try to add it back. To verify this, you could populate the tracking fields yourself, then check to see if they remain populated or if something is causing them to be deleted.

cbankston-alk commented 12 months ago

We ended up rolling back the ArgoCD 2.8.6 upgrade due to this, as the application-controller performance tanked after the upgrade. We tried doubling the number of ArgoCD application-controller shards before rolling back, but the application-controllers were still not able to keep up with all of the repeated reconciles. Additionally, this caused argocd-server to scale out to maxReplicas and triggered various alerts.

We've now completed the upgrade to 2.8.6 successfully; all that was required was to sync in all of the ArgoCD applications, so that this tracking field was populated. Syncing ArgoCD applications was not possible in the first upgrade attempt, because some applications had other pending changes that could not be synced at that time. Also, most of the other applications are the responsibility of different teams.

It may be worth adding a note to the 2.8 upgrade guide stating that the CRD updates are required when using managedNamespaceMetadata, and if autosync isn't enabled you will need to manually sync these apps after the upgrade in order for the performance of the argocd-application-controller to go back to normal. Specifically, this would allow companies to inventory applications that are out-of-sync before the upgrade and allow requesting proper approval or cross-team communication to happen before taking on the upgrade.

Some of our environments do not use managedNamespaceMetadata, so we initially missed this when testing the upgrade process.

blakepettersson commented 12 months ago

It may be worth adding a note to the 2.8 upgrade guide stating that the CRD updates are required when using managedNamespaceMetadata, and if autosync isn't enabled you will need to manually sync these apps after the upgrade in order for the performance of the argocd-application-controller to go back to normal. Specifically, this would allow companies to inventory applications that are out-of-sync before the upgrade and allow requesting proper approval or cross-team communication to happen before taking on the upgrade.

That's a good point, I can add that - although it must be said that CRD updates are ~pretty much required~ highly recommended for all major/minor Argo CD upgrades.

cbankston-alk commented 11 months ago

That's a good point, I can add that - although it must be said that CRD updates are ~pretty much required~ highly recommended for all major/minor Argo CD upgrades.

FWIW, my CRDs were updated with each upgrade as I use ArgoCD to mange itself and its CRDs.

Additionally, I think the problem I faced was exacerbated due to resource status updates that were triggering refreshes outside of the standard reconciliation loop (#13912). We will resolve these misconfigurations in the future, maybe others do not have this problem as well.