argoproj / argo-cd

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

ProgressiveSync updates are not working as expected #19565

Open mvignes89 opened 3 months ago

mvignes89 commented 3 months ago

I have a application set as mentioned below

apiVersion: argoproj.io/v1alpha1 kind: ApplicationSet metadata: name: applicationset-progressivesync namespace: argocd spec: goTemplate: true goTemplateOptions: ["missingkey=error"] generators:

  • git: repoURL: git@bitbucket.org:test-ai/test-manifests.git revision: progressive-sync directories:
  • path: 'progressive-sync/manifest/*' strategy: type: RollingSync rollingSync: steps:
  • matchExpressions:
  • key: envLabel operator: In values:
  • app1
  • matchExpressions:
  • key: envLabel operator: In values:
  • app2
  • matchExpressions:
  • key: envLabel operator: In values:
  • app3 template: metadata: name: '{{- $envname := (index .path.basename) -}} {{- $envname := lower $envname -}} {{ $envname }}' namespace: argocd labels: cluster: rc-services service: '{{.path.basename}}' envLabel: '{{.path.basename}}' test: 'flag' spec: destination: name: gcp-rc-services namespace: test project: rc-services source: repoURL: git@bitbucket.org:test-ai/test-manifests.git targetRevision: progressive-sync path: '{{.path.path}}' syncPolicy: automated: {}

Here is my folder structure

├── app1 │   └── app1.yaml ├── app2 │   └── app2.yaml └── app3 └── app3.yaml

4 directories, 3 files

The above are app*.yaml are just nginx deployments

While creating the app no issues it flows as expected like app1-> app2->app3

But now when i try to update the application it works fine if there is change in previous step for example if i update the image of all 3 apps it works as expected

    `app1-nginx-deployment-7c79c4bf97-zhklh   0/1     Pending             0          0s
      app1-nginx-deployment-7c79c4bf97-zhklh   0/1     Pending             0          0s
      app1-nginx-deployment-7c79c4bf97-zhklh   0/1     ContainerCreating   0          0s
      app1-nginx-deployment-7c79c4bf97-zhklh   1/1     Running             0          1s
      app1-nginx-deployment-7b99b69886-hqx2v   1/1     Terminating         0          17m
      app1-nginx-deployment-7c79c4bf97-8v5fn   0/1     Pending             0          0s
      app1-nginx-deployment-7c79c4bf97-8v5fn   0/1     Pending             0          0s
      app1-nginx-deployment-7c79c4bf97-8v5fn   0/1     ContainerCreating   0          1s
      app1-nginx-deployment-7b99b69886-hqx2v   0/1     Terminating         0          17m
      app1-nginx-deployment-7b99b69886-hqx2v   0/1     Terminating         0          17m
      app1-nginx-deployment-7b99b69886-hqx2v   0/1     Terminating         0          17m
      app1-nginx-deployment-7c79c4bf97-8v5fn   1/1     Running             0          2s
      app1-nginx-deployment-7b99b69886-fkrsj   1/1     Terminating         0          17m
      app1-nginx-deployment-7b99b69886-fkrsj   0/1     Terminating         0          17m
      app1-nginx-deployment-7b99b69886-fkrsj   0/1     Terminating         0          17m
      app1-nginx-deployment-7b99b69886-fkrsj   0/1     Terminating         0          17m
      app2-nginx-deployment-7c79c4bf97-4twbs   0/1     Pending             0          0s
      app2-nginx-deployment-7c79c4bf97-4twbs   0/1     Pending             0          0s
      app2-nginx-deployment-7c79c4bf97-4twbs   0/1     ContainerCreating   0          0s
      app2-nginx-deployment-7c79c4bf97-4twbs   1/1     Running             0          2s
      app2-nginx-deployment-7b99b69886-vgwq7   1/1     Terminating         0          6m4s
      app2-nginx-deployment-7c79c4bf97-5fh4w   0/1     Pending             0          0s
      app2-nginx-deployment-7c79c4bf97-5fh4w   0/1     Pending             0          0s
      app2-nginx-deployment-7c79c4bf97-5fh4w   0/1     ContainerCreating   0          0s
      app2-nginx-deployment-7b99b69886-vgwq7   0/1     Terminating         0          6m4s
      app2-nginx-deployment-7b99b69886-vgwq7   0/1     Terminating         0          6m4s
      app2-nginx-deployment-7b99b69886-vgwq7   0/1     Terminating         0          6m4s
      app2-nginx-deployment-7c79c4bf97-5fh4w   1/1     Running             0          2s
      app2-nginx-deployment-7b99b69886-kpv95   1/1     Terminating         0          6m9s
      app2-nginx-deployment-7b99b69886-kpv95   0/1     Terminating         0          6m10s
      app2-nginx-deployment-7b99b69886-kpv95   0/1     Terminating         0          6m10s
      app2-nginx-deployment-7b99b69886-kpv95   0/1     Terminating         0          6m10s
      app3-nginx-deployment-7c79c4bf97-6p47h   0/1     Pending             0          0s
      app3-nginx-deployment-7c79c4bf97-6p47h   0/1     Pending             0          0s
      app3-nginx-deployment-7c79c4bf97-6p47h   0/1     ContainerCreating   0          0s
      app3-nginx-deployment-7c79c4bf97-6p47h   1/1     Running             0          2s
      app3-nginx-deployment-7b99b69886-tn8ql   1/1     Terminating         0          6m7s
      app3-nginx-deployment-7c79c4bf97-ht8xj   0/1     Pending             0          0s
      app3-nginx-deployment-7c79c4bf97-ht8xj   0/1     Pending             0          0s
      app3-nginx-deployment-7c79c4bf97-ht8xj   0/1     ContainerCreating   0          0s
      app3-nginx-deployment-7b99b69886-tn8ql   0/1     Terminating         0          6m8s
      app3-nginx-deployment-7b99b69886-tn8ql   0/1     Terminating         0          6m8s
      app3-nginx-deployment-7b99b69886-tn8ql   0/1     Terminating         0          6m8s
      app3-nginx-deployment-7c79c4bf97-ht8xj   1/1     Running             0          2s
      app3-nginx-deployment-7b99b69886-vlm8r   1/1     Terminating         0          6m10s
      app3-nginx-deployment-7b99b69886-vlm8r   0/1     Terminating         0          6m10s
      app3-nginx-deployment-7b99b69886-vlm8r   0/1     Terminating         0          6m10s
      app3-nginx-deployment-7b99b69886-vlm8r   0/1     Terminating         0          6m11s`

But if i update the image of app1 and app3 its not working as expected

    `app1-nginx-deployment-7b99b69886-pv68m   0/1     Pending             0          0s
       app1-nginx-deployment-7b99b69886-pv68m   0/1     Pending             0          0s
     app1-nginx-deployment-7b99b69886-pv68m   0/1     ContainerCreating   0          0s
     app3-nginx-deployment-7b99b69886-486l7   0/1     Pending             0          0s
     app3-nginx-deployment-7b99b69886-486l7   0/1     Pending             0          0s
     app3-nginx-deployment-7b99b69886-486l7   0/1     ContainerCreating   0          0s
     app1-nginx-deployment-7b99b69886-pv68m   1/1     Running             0          3s
     app1-nginx-deployment-7c79c4bf97-8v5fn   1/1     Terminating         0          6m4s
     app1-nginx-deployment-7b99b69886-cjdb9   0/1     Pending             0          0s
     app3-nginx-deployment-7b99b69886-486l7   1/1     Running             0          3s
     app1-nginx-deployment-7b99b69886-cjdb9   0/1     Pending             0          0s
     app1-nginx-deployment-7b99b69886-cjdb9   0/1     ContainerCreating   0          0s
     app3-nginx-deployment-7c79c4bf97-6p47h   1/1     Terminating         0          5m48s
     app3-nginx-deployment-7b99b69886-f2k9w   0/1     Pending             0          0s
     app3-nginx-deployment-7b99b69886-f2k9w   0/1     Pending             0          0s
     app3-nginx-deployment-7b99b69886-f2k9w   0/1     ContainerCreating   0          0s
     app3-nginx-deployment-7c79c4bf97-6p47h   0/1     Terminating         0          5m49s
     app1-nginx-deployment-7c79c4bf97-8v5fn   0/1     Terminating         0          6m5s
     app3-nginx-deployment-7c79c4bf97-6p47h   0/1     Terminating         0          5m49s
     app1-nginx-deployment-7c79c4bf97-8v5fn   0/1     Terminating         0          6m5s
     app3-nginx-deployment-7c79c4bf97-6p47h   0/1     Terminating         0          5m49s
     app3-nginx-deployment-7b99b69886-f2k9w   1/1     Running             0          2s
     app1-nginx-deployment-7c79c4bf97-8v5fn   0/1     Terminating         0          6m6s
     app1-nginx-deployment-7b99b69886-cjdb9   1/1     Running             0          2s
     app3-nginx-deployment-7c79c4bf97-ht8xj   1/1     Terminating         0          5m48s
     app1-nginx-deployment-7c79c4bf97-zhklh   1/1     Terminating         0          6m7s
     app1-nginx-deployment-7c79c4bf97-zhklh   0/1     Terminating         0          6m8s
     app3-nginx-deployment-7c79c4bf97-ht8xj   0/1     Terminating         0          5m49s
     app3-nginx-deployment-7c79c4bf97-ht8xj   0/1     Terminating         0          5m49s
     app1-nginx-deployment-7c79c4bf97-zhklh   0/1     Terminating         0          6m9s
     app3-nginx-deployment-7c79c4bf97-ht8xj   0/1     Terminating         0          5m50s
     app1-nginx-deployment-7c79c4bf97-zhklh   0/1     Terminating         0          6m9s`

In above case app2 does not have any changes so app1 and app3 are executing in parallel

andrii-korotkov-verkada commented 3 days ago

What's your argocd version?

mvignes89 commented 3 days ago

v2.8.4

andrii-korotkov-verkada commented 3 days ago

2.8 is EOL, can you upgrade and see if the issue is still present, please?