Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug][Helm chart] Path based routing doesn't work for common host

オープン
#149 コメント 6 件 リアクション 2 件 担当者 1 名 GitHub で見る

@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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/devlake-helm-chart のほかの issue

apache/devlake-helm-chart の issue をすべて見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。