fix(comfyui): disable k8s service links to fix COMFYUI_PORT env collision
Root cause: k8s Service named 'comfyui' auto-injects COMFYUI_PORT=tcp://... into pod env, clobbering ai-dock's own COMFYUI_PORT variable which expects a port number. This broke caddy's proxy config, leaving port 8188 dead. Fix: enableServiceLinks: false, revert to port 8188 (ai-dock default). Also bump startup probe failureThreshold 60->120 (20min budget for model loading).
This commit is contained in:
@@ -22,19 +22,19 @@ spec:
|
|||||||
nodeSelector:
|
nodeSelector:
|
||||||
kubernetes.io/hostname: worker-1
|
kubernetes.io/hostname: worker-1
|
||||||
runtimeClassName: nvidia
|
runtimeClassName: nvidia
|
||||||
|
# k8s Service named 'comfyui' injects COMFYUI_PORT=tcp://... into pod env,
|
||||||
|
# which clobbers ai-dock's own COMFYUI_PORT variable (expects a port number).
|
||||||
|
# Disable service link injection to avoid the collision.
|
||||||
|
enableServiceLinks: false
|
||||||
containers:
|
containers:
|
||||||
- name: comfyui
|
- name: comfyui
|
||||||
image: ghcr.io/ai-dock/comfyui:v2-cuda-12.1.1-base-22.04
|
image: ghcr.io/ai-dock/comfyui:v2-cuda-12.1.1-base-22.04
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 18188
|
- containerPort: 8188
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
env:
|
env:
|
||||||
- name: NVIDIA_VISIBLE_DEVICES
|
- name: NVIDIA_VISIBLE_DEVICES
|
||||||
value: "all"
|
value: "all"
|
||||||
# ai-dock adds 10000 to port: ComfyUI listens on 18188 (localhost)
|
|
||||||
# caddy is NOT configured to proxy 8188->18188 in this image
|
|
||||||
- name: COMFYUI_PORT_HOST
|
|
||||||
value: "18188"
|
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: "4"
|
cpu: "4"
|
||||||
@@ -52,14 +52,14 @@ spec:
|
|||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /
|
||||||
port: 18188
|
port: 8188
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
initialDelaySeconds: 30
|
initialDelaySeconds: 30
|
||||||
startupProbe:
|
startupProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /
|
||||||
port: 18188
|
port: 8188
|
||||||
failureThreshold: 60
|
failureThreshold: 120
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
volumes:
|
volumes:
|
||||||
- name: models
|
- name: models
|
||||||
|
|||||||
@@ -10,5 +10,5 @@ spec:
|
|||||||
app: comfyui
|
app: comfyui
|
||||||
ports:
|
ports:
|
||||||
- port: 80
|
- port: 80
|
||||||
targetPort: 18188
|
targetPort: 8188
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
|||||||
Reference in New Issue
Block a user