Skip to content

Frontend /assets "connection refused" - /assets and /ws Ingress #24

@amanos1022

Description

@amanos1022

I spent some time working out an issue with the frontend not being able to access the /assets path when using MinIO as the S3 storage with private host http://minio:9000. I was also having similar problems with the /ws websockets path. Deploying Ingress resources for the paths fixed things, but I had to make my MinIO deployment public and have extra resources, which is less than ideal. Is anyone else experiencing this or do I have things configured incorrectly?

Previous discussion: penpot/penpot#2811 (comment)

I'd be willing to put some work into a PR on this. If someone could verify this is a known issue, I'd be more motivated 😃 .

Current work around:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: penpot-assets
  annotations:
    nginx.ingress.kubernetes.io/proxy-read-timeout: '3600'
    nginx.ingress.kubernetes.io/proxy-send-timeout: '3600'
    nginx.ingress.kubernetes.io/proxy-connect-timeout: '3600'
    nginx.ingress.kubernetes.io/rewrite-target: /$1
    nginx.ingress.kubernetes.io/use-regex: 'true'
spec:
  rules:
    - host: penpot.yourdomain.com
      http:
        paths:
          - path: /assets
            pathType: Prefix
            backend:
              service:
                name: penpot-backend
                port:
                  number: 6060
          - path: /ws(/|$)(.*)
            pathType: Prefix
            backend:
              service:
                name: penpot-backend
                port:
                  number: 6060
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: minio-public
spec:
  rules:
    - host: minio.yourdomain.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: minio
                port:
                  number: 9000

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions