[Bug][Helm chart] Path based routing doesn't work for common host
@ZhangNing10 がすでに取り組んでいます。
2023年12月13日 から。
評価
この issue はまだ評価されていません。
説明
There is an issue with the helm chart for Ingress resources. We are using path based routing for multiple applications with the same host and the way Devlake helm chart creates ingress resource is based on the helm values file and the path is picked from Prefix value of helm chart. Based on how our ingresses are setup, we are supposed to give devlake as prefix. But this option doesn't seem to working since the application is looking for assets in / and throwing a 404 error in logs. So basically I am getting a blank page when I try to access https:///devlake.
helm values file
--
devlake:
ingress:
enabled: true
enableHttps: false
useDefaultNginx: true
annotations:
kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: "true"
hostname: devlake-hostname.com
prefix: devlake
httpPort: 80
Ingress logs
infra-ingress-controller-ingress-nginx-controller-6bc664dbs2svg:controller 172.20.3.79 - - [19/Jun/2023:23:47:53 +0000] "GET /assets/index-afa74f6a.css HTTP/2.0" 404 548 "https://dvlake-hostname.com/devlake" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" 366 0.001 [upstream-default-backend] [] 127.0.0.1:8181 548 0.001 404 1cad31d8fa0f700b151b7624b57aabaa
Ingress resource
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /$2
generation: 3
name: devlake
namespace: devlake
spec:
rules:
- host: devlake-hostname.com
http:
paths:
- backend:
service:
name: devlake-grafana
port:
number: 3000
path: /devlake/grafana(/|$)(.*)
pathType: Prefix
- backend:
service:
name: devlake-ui
port:
number: 4000
path: /devlake(/?|$)(.*)
pathType: Prefix
If we use prefix as / it works just fine but we are not hosting anything at the root of the url. I think this is because of the base_href path is not mentioned in index.html.
Having an option to overwrite the base_path would be ideal in this case where one can put any custom path based on their environments.
- 主要言語
- Go Template
- スター
- 53
- フォーク
- 71
- 平均マージ
- 16時間 15分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/devlake-helm-chart のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/devlake-helm-chart#367 · コメント 6 件 · リアクション 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
apache/devlake-helm-chart#366 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
apache/devlake-helm-chart#381 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
apache/devlake-helm-chart#374 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
apache/devlake-helm-chart#373 · コメント 1 件 ·