From 72a088b2c13a021b53dc4a5090c2e70095ee35a1 Mon Sep 17 00:00:00 2001 From: Ilia Medvedev Date: Mon, 29 Jan 2024 13:43:56 +0200 Subject: [PATCH 1/3] native ui routing - rewrite target --- charts/gitops-runtime/Chart.yaml | 2 ++ .../templates/_components/internal-router/_configmap.yaml | 1 + 2 files changed, 3 insertions(+) diff --git a/charts/gitops-runtime/Chart.yaml b/charts/gitops-runtime/Chart.yaml index 9dd03216..3bf974d1 100644 --- a/charts/gitops-runtime/Chart.yaml +++ b/charts/gitops-runtime/Chart.yaml @@ -20,6 +20,8 @@ annotations: description: Update argo-cd chart to 5.51.6-8-cap-2.9-2024.1.24-ccd7124b3. Includes: window rate limiter for the event reporter; support of apps in non-contoller namespaces for non-GRPC reporting mode; critical vuln fixes for argocd; - kind: changed description: Update argo-rollouts chart to 2.32.5-3-analysis-fix + - kind: fixed + description: fix routing to workflows native UI dependencies: - name: argo-cd repository: https://codefresh-io.github.io/argo-helm diff --git a/charts/gitops-runtime/templates/_components/internal-router/_configmap.yaml b/charts/gitops-runtime/templates/_components/internal-router/_configmap.yaml index 7f4a2511..972f5165 100644 --- a/charts/gitops-runtime/templates/_components/internal-router/_configmap.yaml +++ b/charts/gitops-runtime/templates/_components/internal-router/_configmap.yaml @@ -33,6 +33,7 @@ data: proxy_set_header Connection ''; proxy_http_version 1.1; chunked_transfer_encoding off; + rewrite /workflows(/|$)(.*) /$2 break; proxy_pass {{ .Values.routing.workflows.internalUrl }}; } From 01a9f0041014cda154d9138cde3ac42ff2e9f5ba Mon Sep 17 00:00:00 2001 From: Ilia Medvedev Date: Mon, 29 Jan 2024 16:04:27 +0200 Subject: [PATCH 2/3] native ui routing - rewrite target --- .../templates/_components/internal-router/_configmap.yaml | 1 + charts/gitops-runtime/values.yaml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/charts/gitops-runtime/templates/_components/internal-router/_configmap.yaml b/charts/gitops-runtime/templates/_components/internal-router/_configmap.yaml index 972f5165..08a86b98 100644 --- a/charts/gitops-runtime/templates/_components/internal-router/_configmap.yaml +++ b/charts/gitops-runtime/templates/_components/internal-router/_configmap.yaml @@ -10,6 +10,7 @@ data: listen [::]:8080 default_server; access_log /dev/stdout main; error_log /dev/stdout; + port_in_redirect off; {{- if .Values.resolver }} resolver {{ .Values.resolver }} valid=10s; diff --git a/charts/gitops-runtime/values.yaml b/charts/gitops-runtime/values.yaml index 802ef53b..9c467cd6 100644 --- a/charts/gitops-runtime/values.yaml +++ b/charts/gitops-runtime/values.yaml @@ -176,6 +176,8 @@ argo-workflows: # -- auth-mode needs to be set to client to be able to see workflow logs from Codefresh UI extraArgs: - --auth-mode=client + # -- Do not change. Workflows UI is only accessed through internal router, changing this values will break routing to workflows native UI from Codefresh. + baseHref: /workflows/ crds: # -- Install and upgrade CRDs install: true From 446f298feee3d43eddd7f9cf2eb2d70ed2f85b2e Mon Sep 17 00:00:00 2001 From: Ilia Medvedev Date: Mon, 29 Jan 2024 16:08:13 +0200 Subject: [PATCH 3/3] native ui routing - rewrite target --- charts/gitops-runtime/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/gitops-runtime/README.md b/charts/gitops-runtime/README.md index fbacd8fd..c77e5561 100644 --- a/charts/gitops-runtime/README.md +++ b/charts/gitops-runtime/README.md @@ -160,6 +160,7 @@ sealed-secrets: | argo-workflows.crds.install | bool | `true` | Install and upgrade CRDs | | argo-workflows.enabled | bool | `true` | | | argo-workflows.fullnameOverride | string | `"argo"` | | +| argo-workflows.server.baseHref | string | `"/workflows/"` | Do not change. Workflows UI is only accessed through internal router, changing this values will break routing to workflows native UI from Codefresh. | | argo-workflows.server.extraArgs | list | `["--auth-mode=client"]` | auth-mode needs to be set to client to be able to see workflow logs from Codefresh UI | | event-reporters.events.argoCDServerServiceName | string | `nil` | LEAVE EMPTY and let the chart logic determine the name. Change only if you are totally sure you need to override ArgoCD service name. | | event-reporters.events.argoCDServerServicePort | string | `nil` | LEAVE EMPTY and let the chart logic determine the name. Change only if you are totally sure you need to override ArgoCD service port. |