2026-09-09 02:11:28 +00:00
|
|
|
apiVersion: networking.k8s.io/v1
|
|
|
|
|
kind: Ingress
|
|
|
|
|
metadata:
|
|
|
|
|
name: comfyui
|
|
|
|
|
namespace: comfyui
|
|
|
|
|
annotations:
|
2026-10-24 02:30:48 -07:00
|
|
|
# No cert-manager annotation and no tls: block. This host is covered by
|
|
|
|
|
# the *.riotpiao.com wildcard, which nginx serves as its
|
|
|
|
|
# default-ssl-certificate (ingress-nginx/riotpiao-com-tls).
|
2026-09-09 02:11:28 +00:00
|
|
|
nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
|
|
|
|
|
nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
|
|
|
|
|
nginx.ingress.kubernetes.io/proxy-body-size: "0"
|
|
|
|
|
# WebSocket support for ComfyUI's live preview
|
|
|
|
|
nginx.ingress.kubernetes.io/proxy-http-version: "1.1"
|
2026-09-13 00:18:54 +00:00
|
|
|
nginx.ingress.kubernetes.io/upstream-hash-by: "$remote_addr"
|
2026-10-27 14:17:21 -07:00
|
|
|
# Single sign-on. ComfyUI has no auth of its own, so every request is handed to
|
|
|
|
|
# oauth2-proxy for an allow or deny decision.
|
|
|
|
|
nginx.ingress.kubernetes.io/auth-url: "http://comfyui-oauth2-proxy.comfyui.svc.cluster.local:4180/oauth2/auth"
|
|
|
|
|
nginx.ingress.kubernetes.io/auth-signin: "https://comfyui.riotpiao.com/oauth2/start?rd=$scheme://$host$request_uri"
|
|
|
|
|
nginx.ingress.kubernetes.io/auth-response-headers: "x-auth-request-user,x-auth-request-email"
|
2026-09-13 00:18:54 +00:00
|
|
|
nginx.ingress.kubernetes.io/configuration-snippet: |
|
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
|
proxy_set_header Connection "upgrade";
|
2026-09-09 02:11:28 +00:00
|
|
|
spec:
|
|
|
|
|
ingressClassName: nginx
|
|
|
|
|
rules:
|
2026-09-13 00:18:54 +00:00
|
|
|
- host: comfyui.riotpiao.com
|
2026-09-09 02:11:28 +00:00
|
|
|
http:
|
|
|
|
|
paths:
|
2026-10-27 14:19:22 -07:00
|
|
|
# The login path lives on the SAME ingress as the app. Two Ingresses on
|
|
|
|
|
# one host do not merge their annotations: nginx applies the annotations
|
|
|
|
|
# of a single ingress per host, so a separate /oauth2 object silently
|
|
|
|
|
# dropped the auth_request above and every request fell through to the
|
|
|
|
|
# backend, which answered 404.
|
|
|
|
|
- path: /oauth2
|
|
|
|
|
pathType: Prefix
|
|
|
|
|
backend:
|
|
|
|
|
service:
|
|
|
|
|
name: comfyui-oauth2-proxy
|
|
|
|
|
port:
|
|
|
|
|
number: 4180
|
2026-09-09 02:11:28 +00:00
|
|
|
- path: /
|
|
|
|
|
pathType: Prefix
|
|
|
|
|
backend:
|
|
|
|
|
service:
|
|
|
|
|
name: comfyui
|
|
|
|
|
port:
|
|
|
|
|
number: 80
|