rowanruseler / helm-charts

Curated applications for Kubernetes
Apache License 2.0
109 stars 120 forks source link

[pgadmin4] Works OK with port forward, but error on login with ingress #163

Open jschaeff opened 2 years ago

jschaeff commented 2 years ago

First, thank you for this helpfull helm chart. Great work, nicely customizable.

The deployment works well when I access pgadmin4 wit a port-forward. But accessing it through an ingress rule, after login I only get a json file:

{"success":0,"errormsg":"'NoneType' object has no attribute 'decode'","info":"","result":null,"data":null}

The pod log shows:

2022-08-17 05:51:05,868: ERROR  pgadmin:    'NoneType' object has no attribute 'decode'
Traceback (most recent call last):
  File "/venv/lib/python3.9/site-packages/flask/app.py", line 1517, in full_dispatch_request
    rv = self.dispatch_request()
  File "/venv/lib/python3.9/site-packages/flask/app.py", line 1503, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/pgadmin4/pgadmin/authenticate/__init__.py", line 99, in login
    if not auth_obj.validate():
  File "/pgadmin4/pgadmin/authenticate/__init__.py", line 222, in validate
    status, err_msg = source.validate(self.form)
  File "/pgadmin4/pgadmin/authenticate/internal.py", line 101, in validate
    if not validate_email(form.data['email']):
  File "/pgadmin4/pgadmin/utils/validation_utils.py", line 18, in validate_email
    valid = email_validate(
  File "/venv/lib/python3.9/site-packages/email_validator/__init__.py", line 281, in validate_email
    email = email.decode("ascii")
AttributeError: 'NoneType' object has no attribute 'decode'

I tried several options for ingress.hosts.host[0].path but always the same result.

Any idea on what's wrong ?

tirelibirefe commented 2 years ago

Hello @jschaeff Were you able to fix the problem?

jschaeff commented 2 years ago

No, I worked a lot on it and could'nt get the right settings.

I have similar issues with other deployments and ingresses. So the problem may not be related to the chart.

I'd be glad to test any suggestion, though.

rowanruseler commented 1 year ago

Sorry for the very late reply, but do you perhaps have your ingress part for me? So I can try and reproduce it.

jschaeff commented 1 year ago

Hello, thanks for taking the time.

There is my ingress:


---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: pgadmin
spec:
  rules:
    - host: pgadmin.resif.fr
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: pgadmin-service
                port:
                  number: 80