Skip to content

ArgoCD fails on hook-finalizer (after upgrade to 3.x) #23226

@ep4sh

Description

@ep4sh

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

I have a Job (db migrations) with hook-weight == "-5" and another resource, let's say ConfigMap with hook-weight == "-10".
Job is long-running task, after the job finishes it seems that argocd can't properly finalize the sync process: it successfully removes CM but cant remove Job and eventually fails by timeout (context deadline).

This behavior is actual since I've upgraded to 3.x from 2.x

If I manually remove the finalizer from the Job, the synchronization process completes OK.

Image

To Reproduce

Create Job with hook-weight == "-5", CM hook-weight == "-10".
Sync.

Expected behavior

ArgoCD should properly handle finalizer / helm-hooks

Screenshots

Version

v3.0.3+a14b012

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcomponent:application-controllerIssues related to the Application Controller componentfeature:hooksIssue related to Argo Sync or Helm hooksversion:3.0Latest confirmed affected version is 3.0workaroundThere's a workaround, might not be great, but exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions