Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jschaeff opened this issue Aug 17, 2022 · 4 comments
Open

Comments

@jschaeff
Copy link

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
Copy link

Hello @jschaeff
Were you able to fix the problem?

@jschaeff
Copy link
Author

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
Copy link
Owner

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

@jschaeff
Copy link
Author

jschaeff commented Jan 3, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants