weaveworks / weave-gitops

Weave GitOps provides insights into your application deployments, and makes continuous delivery with GitOps easier to adopt and scale across your teams.
https://docs.gitops.weave.works/
Apache License 2.0
905 stars 151 forks source link

I can not access the UI when I change the /path from the ingress #4188

Closed songleo closed 8 months ago

songleo commented 8 months ago

Describe the bug

I can not change the ingress path for weave-gitops.

Environment

1) I can access the UI ( https://www.private-cloud.com/ ) when I create the following ingress:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: weave-gitops
  namespace: flux-system
  annotations:
    # nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  ingressClassName: nginx
  rules:
  - host: www.private-cloud.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: ww-gitops-weave-gitops
            port:
              number: 9001

2) when I change the ingress path to /weave, I can not access the UI: https://www.private-cloud.com/weave

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: weave-gitops
  namespace: flux-system
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  ingressClassName: nginx
  rules:
  - host: www.private-cloud.com
    http:
      paths:
      - path: /weave
        pathType: Prefix
        backend:
          service:
            name: ww-gitops-weave-gitops
            port:
              number: 9001

Expected behavior

I should access the UI by https://www.private-cloud.com/weave

Actual Behavior

Additional Context (screenshots, logs, etc)

songleo commented 8 months ago

Follow this doc fix my issue. https://docs.gitops.weave.works/docs/guides/run-ui-subpath/