From 82b664978eb9808faaf309269df082f403d7345b Mon Sep 17 00:00:00 2001 From: James Andariese Date: Thu, 10 Oct 2024 23:23:57 -0500 Subject: [PATCH] convert sts to a deploy --- sts.yaml => deploy.yaml | 39 +++++++++++++++++++++++++-------------- pvc.yaml | 15 +++++++++++++++ 2 files changed, 40 insertions(+), 14 deletions(-) rename sts.yaml => deploy.yaml (60%) create mode 100644 pvc.yaml diff --git a/sts.yaml b/deploy.yaml similarity index 60% rename from sts.yaml rename to deploy.yaml index a63db48..a05765f 100644 --- a/sts.yaml +++ b/deploy.yaml @@ -1,5 +1,5 @@ apiVersion: apps/v1 -kind: StatefulSet +kind: Deployment metadata: labels: app: ${deployment:=comfyui} @@ -7,10 +7,11 @@ metadata: namespace: ${deployment:=comfyui} spec: replicas: 1 - serviceName: ${deployment:=comfyui} selector: matchLabels: app: ${deployment:=comfyui} + strategy: + type: Recreate template: metadata: labels: @@ -23,6 +24,7 @@ spec: containers: - name: ${deployment:=comfyui} image: git.strudelline.net/cascade/docker-comfyui:v0.2.2 + imagePullPolicy: Always resources: requests: cpu: "${cpu_request:=4}" @@ -30,23 +32,32 @@ spec: terminationMessagePath: /dev/termination-log terminationMessagePolicy: File ports: - - containerPort: 7865 + - containerPort: 8848 name: http protocol: TCP volumeMounts: - - mountPath: /content/data - name: ${deployment:=comfyui}-data + - mountPath: /app/ComfyUI/input + name: data + subPath: input + - mountPath: /app/ComfyUI/models + name: data + subPath: models + - mountPath: /app/ComfyUI/output + name: data + subPath: output + - mountPath: /app/ComfyUI/temp + name: data + subPath: temp + - mountPath: /app/ComfyUI/user + name: data + subPath: user runtimeClassName: "${runtime_class:=nvidia}" nodeSelector: nvidia.com/gpu.family: ampere restartPolicy: Always terminationGracePeriodSeconds: 300 - volumeClaimTemplates: - - metadata: - name: ${deployment:=comfyui}-data - spec: - accessModes: ["ReadWriteOnce"] - storageClassName: "${storage_class:=nvme}" - resources: - requests: - storage: ${volume_size:=256Gi} + volumes: + - name: data + persistentVolumeClaim: + claimName: ${deployment:=comfyui}-data + diff --git a/pvc.yaml b/pvc.yaml new file mode 100644 index 0000000..6581b1b --- /dev/null +++ b/pvc.yaml @@ -0,0 +1,15 @@ + +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + labels: + app: ${deployment:=comfyui} + name: ${deployment:=comfyui}-data + namespace: ${deployment:=comfyui} +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: ${volume_size:=256Gi} + storageClassName: nvme