argoproj / argo-cd

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

Argo CD UI needs hard page refresh to update apps #9247

Open reginapizza opened 2 years ago

reginapizza commented 2 years ago

Checklist:

Describe the bug After pulling from the latest argo cd code, I've noticed (as have some other people) that the Argo CD UI does not update responsively. It needs a hard page refresh in order to see the newest changes (see video).

To Reproduce

https://user-images.githubusercontent.com/50851526/165807174-72751265-bf17-4e2c-81a8-519efeecc98d.mp4

Expected behavior

Expected that the applications page would automatically update to have the app I just created.

Version

argocd: v2.0.5+4c94d88
  BuildDate: 2021-07-22T20:52:31Z
  GitCommit: 4c94d886f56bcb2f9d5b3251fdc049c2d1354b88
  GitTreeState: clean
  GoVersion: go1.16
  Compiler: gc
  Platform: linux/amd64
CVanF5 commented 2 years ago

If it helps, I also experienced this, but only when using --insecure mode and allowing the ingress controller to manage the TLS certificate.

Doesn't seem to happen when using ssl-passthrough mode. (Page auto refreshes when adding an app and the overall UI experience is much better).

I just reused the same TLS certfificate ingress was using, and created it with the name argocd-server-tls

logamanig commented 2 years ago

If it helps, I also experienced this, but only when using --insecure mode and allowing the ingress controller to manage the TLS certificate.

Doesn't seem to happen when using ssl-passthrough mode. (Page auto refreshes when adding an app and the overall UI experience is much better).

I just reused the same TLS certfificate ingress was using, and created it with the name argocd-server-tls

Hi @CVanF5 , I tried enabling ssl-passthrough and changing the secret name to argocd-server-tls and haven't set --insecure mode as well, but the issue persist, here's my ingress config in helm values.yaml, Argocd: v2.4.11 Helm Chart: v5.4.3 ingress: enabled: true annotations: nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" nginx.ingress.kubernetes.io/force-ssl-redirect: "true" nginx.ingress.kubernetes.io/ssl-passthrough: "true" cert-manager.io/cluster-issuer: letsencrypt-clusterissuer ingressClassName: nginx hosts:

ChandanShastri commented 1 year ago

I can confirm that this issue still exists in ArgoCD v2.6.3 as well. The UI components do not update automatically until we manually reload the page. I am using ingress-nginx with SSL Pass-through .

quentinlacrouts commented 1 year ago

Hello,

I confirm a hard refresh is also needed with AWS ALB and quay.io/argoproj/argocd:v2.6

Ingress configuration:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    alb.ingress.kubernetes.io/backend-protocol: HTTPS
    alb.ingress.kubernetes.io/certificate-arn: xxxxxxxx
    alb.ingress.kubernetes.io/conditions.argocd-server-grpc: |
      [{"field":"http-header","httpHeaderConfig":{"httpHeaderName": "Content-Type", "values":["application/grpc"]}}]
    alb.ingress.kubernetes.io/group.name: xxxxxxxx
    alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]'
    alb.ingress.kubernetes.io/scheme: internet-facing
    alb.ingress.kubernetes.io/ssl-redirect: "443"
  name: argocd-server
  namespace: argo-cd
spec:
  ingressClassName: alb
  rules:
  - host: xxxxxxxx
    http:
      paths:
      - backend:
          service:
            name: argocd-server-grpc
            port:
              number: 443
        path: /
        pathType: Prefix
      - backend:
          service:
            name: argocd-server
            port:
              number: 443
        path: /
        pathType: Prefix
  tls:
  - hosts:
    - xxxxxxxx
    secretName: xxxxxxxx
status:
  loadBalancer:
    ingress:
    - hostname: xxxxxxxx
quentinlacrouts commented 1 year ago

Hello, Any chance someone can have a look at this ? Thanks

pablode-cs commented 1 year ago

Same issue here

melnikovx commented 1 year ago

Having the same issue

flaviomoringa commented 10 months ago

Also having the same issue... It's really annoying :-( Wonder if someone could give this some TLC :-)

mtrin commented 8 months ago

I figured this was happening because argocd ui tries to use grpc stream but not all reverse proxies support it.

algo7 commented 8 months ago

I figured this was happening because argocd ui tries to use grpc stream but not all reverse proxies support it.

So which reverse proxy do you use and did you manage to resolve the issue?

mtrin commented 8 months ago

I figured this was happening because argocd ui tries to use grpc stream but not all reverse proxies support it.

So which reverse proxy do you use and did you manage to resolve the issue?

Azure Application Gateway and there's no solution other than using a HTTP2 compatible proxy or Argocd providing an UI that doesn't try to call the stream.

HWiese1980 commented 7 months ago

Problem persists!

ArgoCD behind a Cloudflare Tunnel and a Traefik Ingress Controller.

bradenwright commented 6 months ago

I'm having this issue using Traefik and EKS, are there any steps to troubleshoot or try to resolve this. I feel like this is a really annoying issue. I'm currently using quay.io/argoproj/argocd:v2.8.3

HWiese1980 commented 6 months ago

I have now ventured to FluxCD because it seems like there is no motion here anymore. And what can I say, so far I am not regretting it.

mtrin commented 6 months ago

I figured this was happening because argocd ui tries to use grpc stream but not all reverse proxies support it.

So which reverse proxy do you use and did you manage to resolve the issue?

Azure Application Gateway and there's no solution other than using a HTTP2 compatible proxy or Argocd providing an UI that doesn't try to call the stream.

Update: enabling http2 on application gateway actually resolved the issue

HWiese1980 commented 6 months ago

I'm using Traefik as proxy. At some point in the past it used to work, but then somehow it stopped. I don't know what I did that lead to this behavior.

Update: enabling http2 on application gateway actually resolved the issue

Could you elaborate please? Are you talking about Gateway API?

mtrin commented 6 months ago

@HWiese1980 https://learn.microsoft.com/en-us/azure/application-gateway/configuration-listeners#http2-support

I just enabled this. It seemed enough to make it refresh again.

HWiese1980 commented 6 months ago

@mtrin Thanks for the link! You're on Azure, that's a completely different story for me. I am on a bare-metal K8s cluster with a Traefik ingress controller. I'll have to check whether the cause is the same and if I can enable HTTP2 there too, in case it isn't yet (which I doubt).

mtrin commented 6 months ago

@HWiese1980 I don't grasp too much on that but from what I understand, Traefik would need to accept and translate the stream to http1 or you should have http2 end to end

HWiese1980 commented 6 months ago

Okay, good to know, in case I'll give ArgoCD another try. For now, I am pretty happy with FluxCD too, even though it sadly has no dashboard.

oisin88 commented 5 months ago

Think I am hitting the issue

andrask commented 5 months ago

Argo 2.10.4: the problem persists. In insecure mode, the GUI does not refresh.

bradenwright commented 5 months ago

This is really annoying, this is a serious bug as far as I'm concerned it makes the product a lot less usable. And its almost been open for a year with no real responses as to how to try to debug or what the next steps are, or any indication its being looked at. Just more and more people saying they have the issue.

Is there anyway we can escalate this? I get that its an open source product but you;ve literally got people saying they are moving to flux b/c of this issue. I'm not expecting an immediate fix, but it would at least be nice to know its being investigated / there will be a fix in the future.

Nimon77 commented 2 months ago

Hi, we just encountered the same problem and maybe our findings will help some of you It looks like it's indeed a problem with gRPC, we have a weird setup to access argocd where our kube cluster is behind a nginx proxy :

browser ---> nginx ---> traefik ---> argocd

but if we tweak our browser to do

browser ---> traefik ---> argocd

with the correct ingressRoute with gRPC support :

apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: argo-cd-ui
spec:
  entryPoints:
    - websecure
  routes:
    - match: Host(`argocd.example.com`)
      kind: Rule
      priority: 10
      services:
        - name: argocd-server
          port: 80
    - match: Host(`argocd.example.com`) && Headers(`Content-Type`, `application/grpc`)
      kind: Rule
      priority: 11
      services:
        - name: argocd-server
          port: 80
          scheme: h2c
  tls: {}

Everything works fine and we don't need to refresh the page anymore