argocd failed to sync application when argocd connect to cluster apiserver through http proxy,but the http server doesn't support keep-alives conenction. #16480
Describe the bug
If ArgoCD connect to a cluster apiserver through http proxy,but the http server doesn't support keep-alives conenction, we will get error:
Patch "https://x.x.x.x:6443/apis/apiextensions.k8s.io/v1/customresourcedefinitions/podprobemarkers.apps.kruise.io?fieldManager=argocd-controller": http: server closed idle connection
This issue is related to the number of resources to be applied. The greater the number of resources, the more likely it is to occur.
Because ArgoCD creates a task for each resource to be applied, all resources of each Application correspond to a task array. If one task fails, all tasks will be retried. Eventually, some tasks(apply resource) failed when the Last Sync was retried.
Cloud ArgoCD support set DisableKeepAlives while applying resources(and deleting). For the connection to apiserver with proxy, use HTTP non-persistent connection.
Checklist:
argocd version
.Describe the bug If ArgoCD connect to a cluster apiserver through http proxy,but the http server doesn't support keep-alives conenction, we will get error:
This issue is related to the number of resources to be applied. The greater the number of resources, the more likely it is to occur. Because ArgoCD creates a task for each resource to be applied, all resources of each Application correspond to a task array. If one task fails, all tasks will be retried. Eventually, some tasks(apply resource) failed when the Last Sync was retried.
the application yaml is:
Version argocd version:2.7.12
Cloud ArgoCD support set DisableKeepAlives while applying resources(and deleting). For the connection to apiserver with proxy, use HTTP non-persistent connection.