Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/e2e-clouds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
strategy:
fail-fast: false
matrix:
cloud: [eks, aks, gke, civo, nebius, vultr, existing, existing-filtered]
cloud: [eks, aks, gke, civo, coreweave, nebius, vultr, existing, existing-filtered]

steps:
# Two kind clusters and the serving stack need more disk than the runner
Expand Down
1 change: 1 addition & 0 deletions .vale/styles/config/vocabularies/Modelplane/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ PrefillDecode

# Clouds and neoclouds, their managed Kubernetes services, and Crossplane providers
CoreWeave
VAST
Alibaba
ACK
Tencent
Expand Down
16 changes: 16 additions & 0 deletions apis/coreweaveclusters/composition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: apiextensions.crossplane.io/v1
kind: Composition
metadata:
name: coreweaveclusters.infrastructure.modelplane.ai
spec:
compositeTypeRef:
apiVersion: infrastructure.modelplane.ai/v1alpha1
kind: CoreWeaveCluster
mode: Pipeline
pipeline:
- functionRef:
name: modelplane-modelplanecompose-coreweave-cluster
step: compose-coreweave-cluster
- functionRef:
name: modelplane-modelplanecompose-usages
step: compose-usages
227 changes: 227 additions & 0 deletions apis/coreweaveclusters/definition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
apiVersion: apiextensions.crossplane.io/v2
kind: CompositeResourceDefinition
metadata:
name: coreweaveclusters.infrastructure.modelplane.ai
spec:
group: infrastructure.modelplane.ai
names:
categories:
- crossplane
- modelplane
- infrastructure
kind: CoreWeaveCluster
plural: coreweaveclusters
scope: Namespaced
versions:
- name: v1alpha1
referenceable: true
additionalPrinterColumns:
- name: ZONE
type: string
jsonPath: .spec.zone
schema:
openAPIV3Schema:
description: >-
A CoreWeaveCluster provisions a CoreWeave Kubernetes Service (CKS)
cluster in a dedicated VPC, with node pools for GPU inference and
system workloads. CKS node pools are Kubernetes resources inside
the cluster, so they're created through the cluster's own API
once it's running. It outputs a Secret containing a kubeconfig
for the cluster, which authenticates with the CoreWeave API
access token the CoreWeave ProviderConfig uses.
properties:
spec:
description: CoreWeaveClusterSpec defines the desired state of CoreWeaveCluster.
required:
- zone
- nodePools
properties:
zone:
type: string
description: >-
CoreWeave Availability Zone for the cluster (e.g.
US-EAST-04A). Instance types vary by zone.
minLength: 1
maxLength: 32
kubernetesVersion:
type: string
description: >-
CKS Kubernetes minor version, in the form X.Y. CKS
applies patch versions itself.
default: "1.37"
pattern: '^[0-9]+\.[0-9]+$'
credentials:
type: object
description: >-
CoreWeave ProviderConfig or ClusterProviderConfig used to
authenticate to the CoreWeave API. Its API access token
also authenticates the kubeconfig this cluster outputs,
so the kubeconfig Secret holds a copy of the org's API
token. Limit who can create CoreWeaveClusters, and who
can read Secrets in their namespaces. Defaults to the
ClusterProviderConfig named default.
properties:
type:
type: string
default: ClusterProviderConfig
enum:
- ProviderConfig
- ClusterProviderConfig
name:
type: string
default: default
minLength: 1
maxLength: 253
nodePools:
type: array
description: >-
Node pools for the cluster. A system pool for controllers
and infrastructure workloads is added automatically.
minItems: 1
maxItems: 8
x-kubernetes-list-type: map
x-kubernetes-list-map-keys:
- name
items:
type: object
required:
- name
- role
- instanceType
x-kubernetes-validations:
- rule: "self.role != 'GPU' || has(self.gpu)"
message: gpu is required when role is GPU.
- rule: "!has(self.minNodeCount) || has(self.maxNodeCount)"
message: maxNodeCount is required when minNodeCount is set.
- rule: "self.name != 'system'"
message: system is reserved for the system pool added to every cluster.
properties:
name:
type: string
description: >-
Unique name for this node pool. Used as the name of
the pool's CKS NodePool.
minLength: 1
maxLength: 40
pattern: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'
role:
type: string
description: >-
Determines what workloads this pool runs. GPU pools
host inference workloads and are tainted to exclude
non-GPU pods. CPU pools host CPU inference
workloads: a CPU instance type and the
modelplane.ai/cpu label and taint.
enum:
- GPU
- CPU
instanceType:
type: string
description: >-
CKS instance type for the pool's nodes (e.g.
rtxp6000-8x, turin-gp). CKS can't
change an existing pool's instance type; replace
the pool with a new name instead.
minLength: 1
maxLength: 63
nodeCount:
type: integer
default: 1
description: >-
Number of nodes. Fixed unless maxNodeCount enables
autoscaling, in which case it's the initial count,
and a new pool starts with at least one node even if
this is 0, because CKS's autoscaler can't scale it up
from zero (see minNodeCount).
minimum: 0
maximum: 1000
minNodeCount:
type: integer
description: >-
Minimum number of nodes for autoscaling. Defaults to
nodeCount, or 1 if nodeCount is 0. Requires
maxNodeCount. Keep it at 1 or higher: CKS's cluster
autoscaler can't scale a pool whose devices bind
through DRA up from zero nodes, so a pod scheduled to
an empty pool waits forever.
minimum: 0
maximum: 1000
maxNodeCount:
type: integer
description: >-
Maximum number of nodes for autoscaling. When set,
CKS's managed cluster autoscaler scales the pool
between minNodeCount (or nodeCount) and this, and
owns the pool's node count. Setting this on an
existing pool with no nodes leaves it at zero (see
minNodeCount). Omit for fixed-size pools.
minimum: 1
maximum: 1000
gpu:
type: object
description: >-
GPU configuration. Required when role is GPU.
required:
- acceleratorType
properties:
acceleratorType:
type: string
description: >-
GPU accelerator type (e.g. nvidia-h100,
nvidia-l40s). Used to label GPU nodes; the
actual GPU and count are determined by the
instance type.
minLength: 1
maxLength: 63
type: object
status:
description: CoreWeaveClusterStatus defines the observed state of CoreWeaveCluster.
properties:
secrets:
type: array
description: >-
Secrets produced by this cluster. Consumers use these to
authenticate to the cluster. All secrets are in the same
namespace as this CoreWeaveCluster.
items:
type: object
required:
- type
- name
- key
properties:
type:
type: string
description: >-
The type of credential this secret contains.
Kubeconfig contains a kubeconfig file with the
cluster endpoint and a CoreWeave API access token.
enum:
- Kubeconfig
name:
type: string
description: Name of the Secret.
maxLength: 253
key:
type: string
description: >-
Key within the Secret that holds the credential data.
maxLength: 253
cache:
type: object
description: >-
Observed ModelCache RWX storage state.
properties:
storageClassName:
type: string
description: >-
Name of the Modelplane-managed ReadWriteMany
StorageClass composed on this cluster for ModelCache
PVCs, a copy of CKS's shared-vast class that deletes
a volume when its claim is deleted.
maxLength: 253
type: object
required:
- spec
type: object
served: true
58 changes: 57 additions & 1 deletion apis/inferenceclasses/definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,20 @@ spec:
message: >-
spec.provisioning.civo.accelerator must be omitted when no
device claims a DRA driver other than dra.cpu.
- rule: >-
!has(self.provisioning) || !has(self.provisioning.coreweave) ||
has(self.provisioning.coreweave.accelerator) ||
!(has(self.devices) && self.devices.exists(d, (!has(d.claim) || d.claim == 'DRA') && d.driver != 'dra.cpu'))
message: >-
spec.provisioning.coreweave.accelerator is required when a
device claims a DRA driver other than dra.cpu.
- rule: >-
!has(self.provisioning) || !has(self.provisioning.coreweave) ||
!has(self.provisioning.coreweave.accelerator) ||
(has(self.devices) && self.devices.exists(d, (!has(d.claim) || d.claim == 'DRA') && d.driver != 'dra.cpu'))
message: >-
spec.provisioning.coreweave.accelerator must be omitted when no
device claims a DRA driver other than dra.cpu.
# dra-driver-cpu runs only on CPU pools, so a provisioned GPU
# pool never publishes dra.cpu devices for a claim to allocate.
- rule: >-
Expand Down Expand Up @@ -151,10 +165,12 @@ spec:
message: spec.provisioning.vultr is required when spec.provisioning.provider is Vultr.
- rule: "self.provider != 'Civo' || has(self.civo)"
message: spec.provisioning.civo is required when spec.provisioning.provider is Civo.
- rule: "self.provider != 'CoreWeave' || has(self.coreweave)"
message: spec.provisioning.coreweave is required when spec.provisioning.provider is CoreWeave.
properties:
provider:
type: string
enum: [GKE, EKS, AKS, Nebius, Vultr, Civo]
enum: [GKE, EKS, AKS, Nebius, Vultr, Civo, CoreWeave]
gke:
type: object
required: [machineType]
Expand Down Expand Up @@ -423,6 +439,46 @@ spec:
type: integer
minimum: 1
maximum: 16
coreweave:
type: object
required: [instanceType]
properties:
instanceType:
type: string
description: >-
CKS instance type (e.g. rtxp6000-8x, turin-gp).
The instance type determines
the GPU model and count, if any. The accelerator
block below doesn't change the hardware, but
whether it's set decides whether the pool is
provisioned as a GPU or a CPU pool.
minLength: 1
maxLength: 63
accelerator:
type: object
description: >-
GPU accelerator to attach when provisioning the node
pool. Provisioning input only: the scheduler matches
against spec.devices, not this block. Set this when
and only when a device claims a DRA driver other
than dra.cpu; the API rejects a mismatch.
Omitted, Modelplane provisions a CPU pool: the
modelplane.ai/cpu label and taint, and no GPU
stack.
required: [type, count]
properties:
type:
type: string
description: >-
GPU accelerator type (e.g. nvidia-h100,
nvidia-l40s). Informational - reported on
the consuming InferenceCluster's status.
minLength: 1
maxLength: 63
count:
type: integer
minimum: 1
maximum: 16
devices:
type: array
description: >-
Expand Down
Loading
Loading