koderover / zadig

Zadig is a cloud native, distributed, developer-oriented DevOps platform
https://koderover.com
Other
2.73k stars 820 forks source link

zadig-portal keeps redirecting non-stop #364

Closed liutao841204 closed 2 years ago

liutao841204 commented 2 years ago

我使用如下命令进行安装: helm upgrade --install zadig --namespace zadig koderover-chart/zadig --version=1.1.0 \ --set endpoint.type=IP \ --set endpoint.IP=192.168.10.100 \ --set tags.ingressController=false \ --set tags.minio=fals

安装完成后,修改了 zadig-portal服务端口为30000,然后打开浏览器登录,发现界面一直在自动刷新

jamsman94 commented 2 years ago

Please provide the information below:

  1. Does your cluster have a default ingress class? If not, please provide the ingress class you want to use.
  2. How did you access the zadig-portal service?
zhangsir1211 commented 2 years ago

image 安装完成后,接口一直404 image

Mr-YYM commented 2 years ago

same as you

Mr-YYM commented 2 years ago

Please provide the information below:

  1. Does your cluster have a default ingress class? If not, please provide the ingress class you want to use.
  2. How did you access the zadig-portal service?

I install with helm, remove ingress just use NodePort manually

jamsman94 commented 2 years ago

@Mr-YYM As for now, you cannot use this way to access zadig system. In our ingress there are multiple ingress rules to ensure the system is working as expected. Simply removing the ingress and access the portal service directly will NOT work.

edisonwd commented 2 years ago

same as you, I install with helm too, use nginx-ingress I installed myself

fanlix commented 2 years ago

初次安装, helm , 1.5.0, traefik ingress 主页无限闪屏无法点击 页面log:

vendor.2738da7701bd30ff9dbf.js:85 TypeError: Cannot read properties of undefined (reading 'name')
    at s.<anonymous> (app.6f55cb830d573b1b754c.js:2)
    at s.e._render (vendor.2738da7701bd30ff9dbf.js:85)
    at s.mn.before (vendor.2738da7701bd30ff9dbf.js:85)
    at mn.get (vendor.2738da7701bd30ff9dbf.js:85)
    at new mn (vendor.2738da7701bd30ff9dbf.js:85)
    at vendor.2738da7701bd30ff9dbf.js:85
    at s.Mn.$mount (vendor.2738da7701bd30ff9dbf.js:85)
    at s.Mn.$mount (vendor.2738da7701bd30ff9dbf.js:85)
    at init (vendor.2738da7701bd30ff9dbf.js:85)
    at vendor.2738da7701bd30ff9dbf.js:85
qe @ vendor.2738da7701bd30ff9dbf.js:85
vendor.2738da7701bd30ff9dbf.js:85 TypeError: Cannot read properties of undefined (reading 'name')
    at s.<anonymous> (app.6f55cb830d573b1b754c.js:2)
    at s.e._render (vendor.2738da7701bd30ff9dbf.js:85)
    at s.mn.before (vendor.2738da7701bd30ff9dbf.js:85)
    at mn.get (vendor.2738da7701bd30ff9dbf.js:85)
    at mn.run (vendor.2738da7701bd30ff9dbf.js:85)
    at fn (vendor.2738da7701bd30ff9dbf.js:85)
    at Array.<anonymous> (vendor.2738da7701bd30ff9dbf.js:85)
    at Xe (vendor.2738da7701bd30ff9dbf.js:85)
qe @ vendor.2738da7701bd30ff9dbf.js:85
app.6f55cb830d573b1b754c.js:1 cancel analytics request
fanlix commented 2 years ago

在http://zadig.xxx.com/signin 和 http://zadig.xxx.com/v1/projects 间快速切换, 每秒四五次那种. 赔我显示器 :)

Mr-YYM commented 2 years ago

@edisonwd @fanlix I have fix this problem, please verify these three Ingress has been correct configured:

[root@k8s-master ingress]# kubectl get Ingress -n zadig
NAME       CLASS    HOSTS   ADDRESS          PORTS   AGE
pe-main    <none>   *       10.108.238.231   80      14m
poetry     <none>   *       10.108.238.231   80      13m
services   <none>   *       10.108.238.231   80      16m
edisonwd commented 2 years ago

@edisonwd @fanlix I have fix this problem, please verify these three Ingress has been correct configured:

[root@k8s-master ingress]# kubectl get Ingress -n zadig
NAME       CLASS    HOSTS   ADDRESS          PORTS   AGE
pe-main    <none>   *       10.108.238.231   80      14m
poetry     <none>   *       10.108.238.231   80      13m
services   <none>   *       10.108.238.231   80      16m

I do not understand how to configure ingress, I configured it according to following figure. image

Mr-YYM commented 2 years ago

@Mr-YYM As for now, you cannot use this way to access zadig system. In our ingress there are multiple ingress rules to ensure the system is working as expected. Simply removing the ingress and access the portal service directly will NOT work.

@edisonwd As this answer said, there are multiple ingress rules to ensure the system is working as expected.. So you must configure Ingress sources.

you can use kubectl get Ingress to check if you Ingress configure. If you have no Ingress Controller installed, you cannot add thetag.ingressController=false param.

edisonwd commented 2 years ago

@Mr-YYM As for now, you cannot use this way to access zadig system. In our ingress there are multiple ingress rules to ensure the system is working as expected. Simply removing the ingress and access the portal service directly will NOT work.

@edisonwd As this answer said, there are multiple ingress rules to ensure the system is working as expected.. So you must configure Ingress sources.

you can use kubectl get Ingress to check if you Ingress configure. If you have no Ingress Controller installed, you cannot add thetag.ingressController=false param.

I have installed nginx-ingress-controller myself

Mr-YYM commented 2 years ago

@edisonwd

what kubectl get Ingress -n [your_zadig_ns] show

fanlix commented 2 years ago

@edisonwd we have same problem. i use traefik, you use yourself's nginx-ingress

@Mr-YYM

zhangsir1211 commented 2 years ago

@Mr-YYM 1、安装方式 helm upgrade --install zadig --namespace zadig koderover-chart/zadig --set endpoint.FQDN=ko.ad.com --set tags.ingressController=false --set ingress-nginx.controller.ingressClass=nginx --set mongodb.persistence.storageClass=longhorn --set minio.persistence.storageClass=longhorn image

2、安装完成后打开url页面一直报错404 image

检查发现poetry日志存在404 image

muicoder commented 2 years ago

traefik的IngressRoute资源

ingress-for-services_traefik.yaml ```yaml apiVersion: traefik.containo.us/v1alpha1 kind: IngressRoute metadata: name: services labels: {{- include "zadig.labels" . | nindent 4 }} spec: entryPoints: - web routes: - kind: Rule match: HostRegexp(`{{required ".Values.endpoint.FQDN is required for FQDN" .Values.endpoint.FQDN}}`) && PathPrefix(`/api/aslan`) middlewares: - name: middleware-replace-path-to-api-zadig services: - name: aslan port: {{ include "zadig.microservice.aslan.port" . }} {{- if .Values.tags.enterprise }} - kind: Rule match: HostRegexp(`{{required ".Values.endpoint.FQDN is required for FQDN" .Values.endpoint.FQDN}}`) && PathPrefix(`/api/aslanx`) middlewares: - name: middleware-replace-path-to-api-zadig services: - name: aslanx port: {{ include "zadig.microservice.aslan-x.port" . }} {{- end }} - kind: Rule match: HostRegexp(`{{required ".Values.endpoint.FQDN is required for FQDN" .Values.endpoint.FQDN}}`) && PathPrefix(`/api/podexec`) middlewares: - name: middleware-replace-path-to-api-zadig services: - name: podexec port: {{ include "zadig.microservice.podexec.port" . }} --- apiVersion: traefik.containo.us/v1alpha1 kind: Middleware metadata: name: middleware-replace-path-to-api-zadig spec: replacePathRegex: regex: /api/([a-z]+[/|$]*)(.*) replacement: /api/$2 ```
ingress_traefik.yaml ```yaml apiVersion: traefik.containo.us/v1alpha1 kind: IngressRoute metadata: name: pe-main labels: {{- include "zadig.labels" . | nindent 4 }} spec: entryPoints: - web routes: - kind: Rule match: HostRegexp(`{{required ".Values.endpoint.FQDN is required for FQDN" .Values.endpoint.FQDN}}`) && PathPrefix(`/api/hub`) services: - name: aslan port: {{ include "zadig.microservice.aslan.port" . }} - kind: Rule match: HostRegexp(`{{required ".Values.endpoint.FQDN is required for FQDN" .Values.endpoint.FQDN}}`) && PathPrefix(`/`) services: - name: zadig-portal port: 80 {{- if .Values.tags.enterprise }} - kind: Rule match: HostRegexp(`{{required ".Values.endpoint.FQDN is required for FQDN" .Values.endpoint.FQDN}}`) && PathPrefix(`/zadig/`) services: - name: zadig-x-doc port: 80 - kind: Rule match: HostRegexp(`{{required ".Values.endpoint.FQDN is required for FQDN" .Values.endpoint.FQDN}}`) && PathPrefix(`/api/collie`) services: - name: collie-server port: 28080 - kind: Rule match: HostRegexp(`{{required ".Values.endpoint.FQDN is required for FQDN" .Values.endpoint.FQDN}}`) && PathPrefix(`/sonar/`) services: - name: sonarqube port: 80 {{- end }} ```
poetry-ingress_traefik.yaml ```yaml apiVersion: traefik.containo.us/v1alpha1 kind: IngressRoute metadata: name: poetry labels: {{- include "zadig.labels" . | nindent 4 }} spec: entryPoints: - web routes: - kind: Rule match: HostRegexp(`{{required ".Values.endpoint.FQDN is required for FQDN" .Values.endpoint.FQDN}}`) && PathPrefix(`/api/directory`) middlewares: - name: middleware-replace-path-to-directory-zadig services: - name: poetry port: {{ include "zadig.microservice.poetry.port" . }} --- apiVersion: traefik.containo.us/v1alpha1 kind: Middleware metadata: name: middleware-replace-path-to-directory-zadig spec: replacePathRegex: regex: /api/directory(/|$)(.*) replacement: /directory/$2 ```
i0668 commented 2 years ago

我也遇到了,这么严重的问题居然20多天过去了没人答复

jamsman94 commented 2 years ago

@zlfzy this issue have been resolved already. What do you mean by no response?

jamsman94 commented 2 years ago

This issue will be marked as resolved since the original problem is resolved

fanlix commented 2 years ago
NAME    NAMESPACE       REVISION        UPDATED                                 STATUS          CHART           APP VERSION
zadig   zadig           1               2021-11-22 11:21:50.193896699 +0800 CST deployed        zadig-1.5.0     1.5.0

一个半月, 依然闪屏. 还把issue关了. 此项目,,,,,,,,,,, 放弃.

jamsman94 commented 2 years ago

@edisonwd @fanlix I have fix this problem, please verify these three Ingress has been correct configured:

[root@k8s-master ingress]# kubectl get Ingress -n zadig
NAME       CLASS    HOSTS   ADDRESS          PORTS   AGE
pe-main    <none>   *       10.108.238.231   80      14m
poetry     <none>   *       10.108.238.231   80      13m
services   <none>   *       10.108.238.231   80      16m

@fanlix The fix to this problem has already been proposed. The resolver even mentioned you to make sure you get the solution.

我看到有2人已经把答案发在了这个issue里面,都是为了你的情况定制的,且在第二人回复后你完全没有任何回应。建议你看一下尝试后再给出回复。

flyer103 commented 2 years ago

Ingress is a necessary resource, and ingress-controller can use the ingress-controller that Zadig comes with or already in the cluster.

If you want to use the ingress-controller that comes with Zadig, you can use the ingress default configuration when installing with helm, or explicitly specify tags.ingressController=true and ingress-nginx.controller.ingressClass=zadig-nginx .

If you want to use the existing ingress-controller in the cluster, you can use kubectl get ingressclasses or check ingress-controller deployment first, and then use kubectl -n <NAMESPACE OF INGRESS CONTROLLER DEPLOYMENT> get deployment <NAME OF INGRESS CONTROLLER> -o yaml | grep ingress-class to query ingressClass, then install with helm by explicitly specifying tags.ingressController=false and ingress-nginx.controller.ingressClass=<INGRESS CLASS> .

fanlix commented 2 years ago

目前的可用方法, 后人可能用到: