forked from roger/k3s-cluster
59 lines
1.9 KiB
YAML
59 lines
1.9 KiB
YAML
# Shared model-weight storage for all llama.cpp pods.
|
|
#
|
|
# All llamacpp pods are pinned to the NUCBox (roger-nucbox-evo-x2) via
|
|
# nodeSelector, so a single hostPath PV on that node is correct and matches the
|
|
# existing postgres hostPath pattern. GGUF files are large (10s of GB); baking
|
|
# them into images would be wasteful, and an initContainer downloads them
|
|
# idempotently on first boot instead.
|
|
#
|
|
# nodeAffinity keeps the PV bound to the NUCBox even if labels change later.
|
|
#
|
|
# IMPORTANT: capacity is only metadata for a hostPath volume — k8s does NOT
|
|
# enforce it and bumping it does NOT add physical disk space. The active Qwen
|
|
# primary and draft GGUFs are downloaded into this directory, so the hostPath
|
|
# filesystem must have enough free space for both models.
|
|
apiVersion: v1
|
|
kind: PersistentVolume
|
|
metadata:
|
|
name: llamacpp-models
|
|
labels:
|
|
type: local
|
|
app: llamacpp
|
|
spec:
|
|
storageClassName: manual
|
|
capacity:
|
|
storage: 100Gi
|
|
accessModes:
|
|
- ReadWriteMany
|
|
hostPath:
|
|
path: /data/llamacpp/models
|
|
nodeAffinity:
|
|
required:
|
|
nodeSelectorTerms:
|
|
- matchExpressions:
|
|
- key: kubernetes.io/hostname
|
|
operator: In
|
|
values:
|
|
- roger-nucbox-evo-x2
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: llamacpp-models
|
|
namespace: llamacpp
|
|
labels:
|
|
app: llamacpp
|
|
spec:
|
|
storageClassName: manual
|
|
volumeName: llamacpp-models # pin to the static hostPath PV by name — forces
|
|
# static binding and disables dynamic provisioning.
|
|
# The "manual" StorageClass is never created as an
|
|
# object; without volumeName a stuck PVC falls
|
|
# through to the (nonexistent) provisioner and errors
|
|
# with: storageclass.storage.k8s.io "manual" not found
|
|
accessModes:
|
|
- ReadWriteMany
|
|
resources:
|
|
requests:
|
|
storage: 100Gi
|