---
# Source: comfyui/templates/svc.yaml
apiVersion: v1
kind: Service
metadata:
  name: test
  annotations:
    service.cilium.io/global: "true"
spec:
  type: ClusterIP
  selector:
    app: test
  ports:
    - port: 8188
      targetPort: 8188
---
# Source: comfyui/templates/svc.yaml
apiVersion: v1
kind: Service
metadata:
  name: test-headless
spec:
  clusterIP: None
  selector:
    app: test
  ports:
    - port: 8188
      targetPort: 8188
---
# Source: comfyui/templates/deploy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: test
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: test
  template:
    metadata:
      labels:
        app: test
    spec:
      securityContext:
        fsGroup: 0
        seccompProfile:
          type: RuntimeDefault
      containers:
        - name: comfyui
          image: yanwk/comfyui-boot:cu128-slim
          imagePullPolicy: Always
          ports:
            - containerPort: 8188
          env:
            - name: CLI_ARGS
              value: "--disable-xformers"
          resources:
            limits:
              cpu: 16000m
              memory: 64Gi
              nvidia.com/gpu: "1"
            requests:
              cpu: 8000m
              memory: 32Gi
              nvidia.com/gpu: "1"
          volumeMounts:
            - mountPath: /dev/shm
              name: dshm
            - name: comfyui-huggingface
              mountPath: /root/.cache/huggingface/hub
            - name: comfyui-input
              mountPath: /root/ComfyUI/input
            - name: comfyui-models
              mountPath: /root/ComfyUI/models
            - name: comfyui-nodes
              mountPath: /root/ComfyUI/custom_nodes
            - name: comfyui-output
              mountPath: /root/ComfyUI/output
            - name: comfyui-torch
              mountPath: /root/.cache/torch/hub
            - name: comfyui-workflows
              mountPath: /root/ComfyUI/user/default/workflows
      volumes:
        - name: dshm
          emptyDir:
            medium: Memory
        - name: comfyui-huggingface
          persistentVolumeClaim:
            claimName: comfyui-huggingface
        - name: comfyui-input
          persistentVolumeClaim:
            claimName: comfyui-input
        - name: comfyui-models
          persistentVolumeClaim:
            claimName: comfyui-models
        - name: comfyui-nodes
          persistentVolumeClaim:
            claimName: comfyui-nodes
        - name: comfyui-output
          persistentVolumeClaim:
            claimName: comfyui-output
        - name: comfyui-torch
          persistentVolumeClaim:
            claimName: comfyui-torch
        - name: comfyui-workflows
          persistentVolumeClaim:
            claimName: comfyui-workflows
