diff --git a/.github/workflows/e2e-clouds.yml b/.github/workflows/e2e-clouds.yml index b6103d940..e4a1b9bef 100644 --- a/.github/workflows/e2e-clouds.yml +++ b/.github/workflows/e2e-clouds.yml @@ -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 diff --git a/.vale/styles/config/vocabularies/Modelplane/accept.txt b/.vale/styles/config/vocabularies/Modelplane/accept.txt index b38c41472..1a58698c5 100644 --- a/.vale/styles/config/vocabularies/Modelplane/accept.txt +++ b/.vale/styles/config/vocabularies/Modelplane/accept.txt @@ -574,6 +574,7 @@ PrefillDecode # Clouds and neoclouds, their managed Kubernetes services, and Crossplane providers CoreWeave +VAST Alibaba ACK Tencent diff --git a/apis/coreweaveclusters/composition.yaml b/apis/coreweaveclusters/composition.yaml new file mode 100644 index 000000000..3bb7a873d --- /dev/null +++ b/apis/coreweaveclusters/composition.yaml @@ -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 diff --git a/apis/coreweaveclusters/definition.yaml b/apis/coreweaveclusters/definition.yaml new file mode 100644 index 000000000..de8f223a3 --- /dev/null +++ b/apis/coreweaveclusters/definition.yaml @@ -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 diff --git a/apis/inferenceclasses/definition.yaml b/apis/inferenceclasses/definition.yaml index c75f231c9..96f71f9cb 100644 --- a/apis/inferenceclasses/definition.yaml +++ b/apis/inferenceclasses/definition.yaml @@ -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: >- @@ -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] @@ -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: >- diff --git a/apis/inferenceclusters/definition.yaml b/apis/inferenceclusters/definition.yaml index 02e3e7f13..da4b159df 100644 --- a/apis/inferenceclusters/definition.yaml +++ b/apis/inferenceclusters/definition.yaml @@ -53,12 +53,14 @@ spec: message: spec.cluster.vultr is required when spec.cluster.source is Vultr. - rule: "self.source != 'Civo' || has(self.civo)" message: spec.cluster.civo is required when spec.cluster.source is Civo. + - rule: "self.source != 'CoreWeave' || has(self.coreweave)" + message: spec.cluster.coreweave is required when spec.cluster.source is CoreWeave. properties: source: type: string description: >- Cluster provisioning method. - enum: [GKE, EKS, AKS, Nebius, Vultr, Civo, Existing] + enum: [GKE, EKS, AKS, Nebius, Vultr, Civo, CoreWeave, Existing] existing: type: object description: >- @@ -375,6 +377,46 @@ spec: default: default minLength: 1 maxLength: 253 + coreweave: + type: object + description: >- + CoreWeave Kubernetes Service (CKS) cluster + configuration. Required when source is CoreWeave. + required: [zone] + 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. + 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 Modelplane to the + cluster. Defaults to the ClusterProviderConfig + named default. + properties: + type: + type: string + default: ClusterProviderConfig + enum: + - ProviderConfig + - ClusterProviderConfig + name: + type: string + default: default + minLength: 1 + maxLength: 253 stack: type: string default: Standard @@ -527,6 +569,8 @@ spec: High-performance node-to-node fabric for multi-node engines, so a gang's tensor-parallel traffic isn't capped by TCP. Omit for standard VPC networking. + Ignored on CoreWeave, where a CKS instance type + either includes InfiniBand or doesn't. x-kubernetes-validations: - rule: "!has(self.infiniband) || self.type == 'InfiniBand'" message: fabric.infiniband is only valid when fabric.type is InfiniBand. diff --git a/apis/servingstacks/definition.yaml b/apis/servingstacks/definition.yaml index 40c30446a..d0552ee36 100644 --- a/apis/servingstacks/definition.yaml +++ b/apis/servingstacks/definition.yaml @@ -62,6 +62,7 @@ spec: - Nebius - Vultr - Civo + - CoreWeave - Existing draDrivers: type: array diff --git a/crossplane-project.yaml b/crossplane-project.yaml index b4fd40a7f..0610ee5d2 100644 --- a/crossplane-project.yaml +++ b/crossplane-project.yaml @@ -27,6 +27,10 @@ spec: tarball: name: compose-civo-cluster pathPrefix: _output/functions/compose-civo-cluster + - source: Tarball + tarball: + name: compose-coreweave-cluster + pathPrefix: _output/functions/compose-coreweave-cluster - source: Tarball tarball: name: compose-eks-cluster @@ -156,6 +160,12 @@ spec: kind: Provider package: xpkg.upbound.io/upbound/provider-civo version: v1.0.1 + - type: xpkg + xpkg: + apiVersion: pkg.crossplane.io/v1 + kind: Provider + package: xpkg.upbound.io/upbound/provider-coreweave + version: v0.1.0 - type: xpkg xpkg: apiVersion: pkg.crossplane.io/v1 diff --git a/docs/content/getting-started/build-the-platform.md b/docs/content/getting-started/build-the-platform.md index 44940fe65..df972ecfa 100644 --- a/docs/content/getting-started/build-the-platform.md +++ b/docs/content/getting-started/build-the-platform.md @@ -56,6 +56,12 @@ You also need an account with one of these providers: - A Civo account with access to GPU node sizes - A Civo API key {{< /tab >}} +{{< tab "CoreWeave" >}} +- A CoreWeave account with quota in `US-EAST-04A` for two `rtxp6000-8x` GPU + nodes and two `turin-gp` CPU nodes +- A CoreWeave API access token belonging to a user who can administer CKS + clusters +{{< /tab >}} {{< /tabs >}} ## Configure cloud credentials @@ -187,6 +193,29 @@ Apply the `ClusterProviderConfig` referencing your secret: {{< manifests "getting-started/clusterproviderconfig-civo.yaml" >}} {{< /tab >}} + +{{< tab "CoreWeave" >}} +Create a Kubernetes secret from your API access token, as the JSON `creds` +key the provider parses: + +{{< editCode >}} +```bash +kubectl create secret generic coreweave-credentials \ + --from-literal=creds='{"token": "$@$@"}' \ + -n crossplane-system +``` +{{< /editCode >}} + +Apply the `ClusterProviderConfig` referencing your secret: + +{{< manifests "getting-started/clusterproviderconfig-coreweave.yaml" >}} + +{{< hint "note" >}} +The token also authenticates Modelplane to each CKS cluster, and each +cluster's kubeconfig Secret in `modelplane-system` holds a copy of it. Limit +who can read Secrets there. +{{< /hint >}} +{{< /tab >}} {{}} ## Publish hardware and register the cluster @@ -262,6 +291,16 @@ GPU Operator installs it on first boot): kubectl wait --for=condition=Ready ic/civo-nyc1 --timeout=20m ``` {{< /tab >}} + +{{< tab "CoreWeave" >}} +{{< manifests "getting-started/coreweave/platform.yaml" >}} + +Modelplane provisions the cluster: + +```bash +kubectl wait --for=condition=Ready ic/coreweave-us-east-04 --timeout=45m +``` +{{< /tab >}} {{< /tabs >}} {{< hint "note" >}} @@ -318,6 +357,9 @@ for an example with TLS and authentication. {{< tab "Civo" >}} {{< manifests "getting-started/civo/inference-gateway.yaml" >}} {{< /tab >}} +{{< tab "CoreWeave" >}} +{{< manifests "getting-started/coreweave/inference-gateway.yaml" >}} +{{< /tab >}} {{< /tabs >}} Wait until the gateway is ready: diff --git a/docs/content/getting-started/deploying-a-model.md b/docs/content/getting-started/deploying-a-model.md index b406eceba..f67fa9738 100644 --- a/docs/content/getting-started/deploying-a-model.md +++ b/docs/content/getting-started/deploying-a-model.md @@ -40,6 +40,9 @@ you just added: {{< tab "Civo" >}} {{< manifests "getting-started/civo/model-deployment.yaml" >}} {{< /tab >}} +{{< tab "CoreWeave" >}} +{{< manifests "getting-started/coreweave/model-deployment.yaml" >}} +{{< /tab >}} {{< /tabs >}} Wait until `REPLICAS` shows `1`: diff --git a/docs/content/getting-started/scale-the-model.md b/docs/content/getting-started/scale-the-model.md index e33881710..ac272607c 100644 --- a/docs/content/getting-started/scale-the-model.md +++ b/docs/content/getting-started/scale-the-model.md @@ -11,8 +11,8 @@ across two regions. ```mermaid graph LR subgraph fleet ["Fleet"] - IC1["cluster-a\nsmall GPU"] - IC2["cluster-b\nlarger GPU"] + IC1["cluster-a\nfirst cluster"] + IC2["cluster-b\nadded cluster"] end subgraph ml ["ML team"] @@ -29,10 +29,11 @@ graph LR ## Add a second deployment -The new deployment targets a larger-GPU cluster you added in the last step. On +The new deployment targets the cluster you added in the last step. On EKS, GKE, AKS, Vultr, and Civo it pins to a second region with a -`clusterSelector`. On Nebius, which runs one region per project, the capacity -selector alone routes it to the `H100` tier: +`clusterSelector`, and on CoreWeave it pins to the second cluster the same +way. On Nebius, which runs one region per project, the capacity selector +alone routes it to the `H100` tier: {{< tabs >}} {{< tab "EKS" >}} @@ -53,6 +54,9 @@ selector alone routes it to the `H100` tier: {{< tab "Civo" >}} {{< manifests "getting-started/civo/model-deployment-west.yaml" >}} {{< /tab >}} +{{< tab "CoreWeave" >}} +{{< manifests "getting-started/coreweave/model-deployment-scale.yaml" >}} +{{< /tab >}} {{< /tabs >}} Wait until its replica is `Ready`, then check placement. You now have one replica diff --git a/docs/content/getting-started/scale-the-platform.md b/docs/content/getting-started/scale-the-platform.md index 8e58b7378..4bfc5ac25 100644 --- a/docs/content/getting-started/scale-the-platform.md +++ b/docs/content/getting-started/scale-the-platform.md @@ -4,8 +4,8 @@ weight: 50 description: Grow from one cluster to a multi-region fleet. --- -You have one small-GPU cluster with a running model. In this guide, you'll grow -the fleet with larger-GPU capacity so the ML team has more to schedule against. +You have one GPU cluster with a running model. In this guide, you'll grow the +fleet with more GPU capacity so the ML team has more to schedule against. Provisioning takes about 10 to 15 minutes. @@ -88,6 +88,20 @@ The `A100` cluster costs more per hour than the `L40S` from earlier. Clean up when you're done (see [Clean up]({{< ref "getting-started/clean-up.md" >}})). {{< /hint >}} {{< /tab >}} +{{< tab "CoreWeave" >}} +Register a second `RTX PRO 6000` (`96 GB`) cluster in the same zone: + +{{< manifests "getting-started/coreweave/platform-scale.yaml" >}} + +{{< hint "note" >}} +The second cluster doubles the hourly cost. Clean up when you're done (see +[Clean up]({{< ref "getting-started/clean-up.md" >}})). +{{< /hint >}} + +```bash +kubectl wait --for=condition=Ready ic/coreweave-us-east-04-b --timeout=45m +``` +{{< /tab >}} {{< /tabs >}} Modelplane provisions the new clusters in parallel: @@ -105,4 +119,4 @@ its deployment changes in a way that no longer fits where it runs. ## Next step -The fleet has grown with larger-GPU capacity. The ML team is next. [Scale the model]({{< ref "getting-started/scale-the-model.md" >}}) to serve it across the fleet behind one endpoint. +The fleet has more GPU capacity. The ML team is next. [Scale the model]({{< ref "getting-started/scale-the-model.md" >}}) to serve it across the fleet behind one endpoint. diff --git a/docs/content/platform/inference-class.md b/docs/content/platform/inference-class.md index 6d8a7acd8..b91f1ba81 100644 --- a/docs/content/platform/inference-class.md +++ b/docs/content/platform/inference-class.md @@ -81,6 +81,9 @@ GPU. {{< tab "Civo L40S" >}} {{< manifests "concepts/inference-class-civo-l40s.yaml" >}} {{< /tab >}} +{{< tab "CoreWeave RTX PRO 6000" >}} +{{< manifests "concepts/inference-class-coreweave-rtxp6000.yaml" >}} +{{< /tab >}} {{< tab "H100 bare-metal" >}} {{< manifests "concepts/inference-class-h100-byo.yaml" >}} {{< /tab >}} diff --git a/docs/content/platform/inference-cluster.md b/docs/content/platform/inference-cluster.md index 40151aa8f..5299a4176 100644 --- a/docs/content/platform/inference-cluster.md +++ b/docs/content/platform/inference-cluster.md @@ -11,7 +11,7 @@ serving. Platform teams create these to provide GPU capacity. Each cluster has: -- A **cluster source**: `GKE`, `EKS`, `AKS`, `Nebius`, `Vultr` or `Civo` (Modelplane +- A **cluster source**: `GKE`, `EKS`, `AKS`, `Nebius`, `Vultr`, `Civo` or `CoreWeave` (Modelplane provisions the full cluster) or `Existing` (bring a cluster you manage yourself). See [Supported Providers]({{< ref "platform/providers.md" >}}) for the clouds and neoclouds Modelplane runs on. @@ -40,7 +40,7 @@ cluster](#requirements-for-an-existing-cluster) sets out. The `cluster.source` discriminator picks one of two models: -- **Provisioned (`GKE`, `EKS`, `AKS`, `Nebius`, `Vultr`, `Civo`).** Modelplane creates the cluster and its GPU node +- **Provisioned (`GKE`, `EKS`, `AKS`, `Nebius`, `Vultr`, `Civo`, `CoreWeave`).** Modelplane creates the cluster and its GPU node pools from each pool's `InferenceClass`, labels the pool's nodes so the scheduler's placement is enforced, and provisions the storage class for model weights. It also injects a non-GPU **system pool** with opinionated defaults to @@ -196,6 +196,9 @@ pool. {{< tab "Civo" >}} {{< manifests path="concepts/inference-cluster-civo.yaml" apply="false" >}} {{< /tab >}} +{{< tab "CoreWeave" >}} +{{< manifests path="concepts/inference-cluster-coreweave.yaml" apply="false" >}} +{{< /tab >}} {{< tab "Existing" >}} {{< manifests path="concepts/inference-cluster-existing.yaml" apply="false" >}} {{< /tab >}} @@ -209,8 +212,9 @@ depends on the source: - **`GKE`** (Filestore Enterprise), **`EKS`** (EFS), **`AKS`** (Azure Files), - and **`Nebius`** (shared filesystem): auto-provisioned. Those classes are - fixed; nothing for the admin to do. + **`Nebius`** (shared filesystem), and **`CoreWeave`** (Distributed File + Storage): auto-provisioned. Those classes are fixed; nothing for the admin + to do. - **`Vultr`** and **`Civo`**: none. VKE's built-in RWX class (Vultr File System) isn't usable on GPU nodes, Civo's `civo-volume` class is `ReadWriteOnce` only, and Modelplane doesn't provision an alternative diff --git a/docs/content/platform/providers.md b/docs/content/platform/providers.md index 1c587eb35..1a7f9a522 100644 --- a/docs/content/platform/providers.md +++ b/docs/content/platform/providers.md @@ -13,7 +13,7 @@ A provider can show up here in three ways: {{< hint "note" >}} - **Provisioning supported.** Modelplane creates and manages the whole cluster from an `InferenceCluster`, selected through `cluster.source`. GKE, EKS, AKS, - Nebius mk8s, Vultr VKE, Civo K3s work this way today. + Nebius mk8s, Vultr VKE, Civo K3s, CoreWeave CKS work this way today. - **Bring your own supported.** Register a cluster you already run with `source: Existing`. This works on any provider whose Kubernetes meets Modelplane's requirements (Dynamic Resource Allocation and a recent Kubernetes @@ -37,7 +37,7 @@ native provisioning. | Alibaba Cloud (ACK) | {{< accel nvidia >}} | Planned | ✓ | {{< repolink "https://github.com/crossplane-contrib/provider-upjet-alibabacloud" "provider-upjet-alibabacloud" "community" >}} | | AWS (EKS) | {{< accel nvidia >}} {{< accel trainium >}} | ✓ | ✓ | {{< repolink "https://github.com/crossplane-contrib/provider-upjet-aws" "provider-upjet-aws" "community" >}} | | Civo | {{< accel nvidia >}} | ✓ | ✓ | {{< repolink "https://github.com/upbound/provider-upjet-civo" "provider-civo" "community" >}} | -| CoreWeave (CKS) | {{< accel nvidia >}} | Planned | ✓ | none yet | +| CoreWeave (CKS) | {{< accel nvidia >}} | ✓ | ✓ | {{< repolink "https://github.com/upbound/provider-upjet-coreweave" "provider-coreweave" "community" >}} | | Crusoe (CMK) | {{< accel nvidia >}} {{< accel amd >}} | Planned | ✓ | none yet | | DigitalOcean (DOKS) | {{< accel nvidia >}} {{< accel amd >}} | Planned | ✓ | {{< repolink "https://github.com/crossplane-contrib/provider-upjet-digitalocean" "provider-upjet-digitalocean" "community" >}} | | Fluidstack | {{< accel nvidia >}} | Planned | ✓ | none yet | diff --git a/docs/content/platform/telemetry.md b/docs/content/platform/telemetry.md index e9f1fbbad..a92d2ec34 100644 --- a/docs/content/platform/telemetry.md +++ b/docs/content/platform/telemetry.md @@ -483,10 +483,10 @@ spec: ## GPUs The GPU series come from a vendor's GPU exporter, not from the engine: a GPU -belongs to a node, and its series have a `node` label. On EKS, AKS, Civo and -Nebius a GPU series also has the `deployment`, `replica`, `role` and `engine` -labels of the pod using the GPU, so it joins that deployment's engine series -on those labels. GKE serves GPU telemetry with Google's managed exporter, +belongs to a node, and its series have a `node` label. On EKS, AKS, Civo, +Nebius and CoreWeave a GPU series also has the `deployment`, `replica`, +`role` and `engine` labels of the pod using the GPU, so it joins that +deployment's engine series on those labels. GKE serves GPU telemetry with Google's managed exporter, which Modelplane doesn't configure, so its GPU series don't carry these labels. On an existing cluster it depends on your exporter. On NVIDIA pools the exporter is a [DCGM exporter](https://github.com/NVIDIA/dcgm-exporter). On AMD pools it's the AMD @@ -500,7 +500,9 @@ either by its pod - an `app` or `app.kubernetes.io/name` label containing Where the exporter comes from depends on the cluster: - **A cluster Modelplane provisions** runs one already: the serving stack - installs an exporter wherever the cloud doesn't provide its own. + installs an exporter on clouds that don't run their own. CoreWeave runs one, + but it can't attribute DRA-allocated GPUs to pods. On CoreWeave the serving + stack installs a second exporter, and the collector skips CoreWeave's. - **An existing cluster provides its own DCGM exporter**, as [Requirements for an existing cluster]({{< ref "/platform/inference-cluster.md#requirements-for-an-existing-cluster" >}}) diff --git a/docs/manifests/concepts/inference-class-coreweave-rtxp6000.yaml b/docs/manifests/concepts/inference-class-coreweave-rtxp6000.yaml new file mode 100644 index 000000000..6cecc8cbb --- /dev/null +++ b/docs/manifests/concepts/inference-class-coreweave-rtxp6000.yaml @@ -0,0 +1,35 @@ +# An InferenceClass describing CoreWeave's rtxp6000-8x instance type with +# 8x NVIDIA RTX PRO 6000 Blackwell. +# +# The provisioning block tells Modelplane how to create a node pool of +# this class on CKS, where the instance type determines the GPU model and +# count. The devices block describes what hardware a node of this class +# has, DRA-style - used by the scheduler to match models to clusters, and +# to form DRA ResourceClaims for claim: DRA devices. +apiVersion: modelplane.ai/v1alpha1 +kind: InferenceClass +metadata: + name: coreweave-rtxp6000-8x +spec: + description: "CoreWeave rtxp6000-8x, 8x NVIDIA RTX PRO 6000 Blackwell 96GB" + provisioning: + provider: CoreWeave + coreweave: + # Instance types vary by zone. + instanceType: rtxp6000-8x + accelerator: + type: nvidia-rtx-pro-6000 + count: 8 + devices: + - name: gpu + claim: DRA + driver: gpu.nvidia.com + deviceClassName: gpu.nvidia.com + count: 8 + attributes: + architecture: { string: Blackwell } + cudaComputeCapability: { version: "12.0.0" } + capacity: + # The real usable VRAM the NVIDIA DRA driver reports, not the nominal + # 96GB. A nodeSelector asking for >= 96Gi would never bind. + memory: { value: "97887Mi" } diff --git a/docs/manifests/concepts/inference-cluster-coreweave.yaml b/docs/manifests/concepts/inference-cluster-coreweave.yaml new file mode 100644 index 000000000..a25802686 --- /dev/null +++ b/docs/manifests/concepts/inference-cluster-coreweave.yaml @@ -0,0 +1,36 @@ +# An InferenceCluster backed by a CoreWeave Kubernetes Service (CKS) +# cluster. +# +# Modelplane provisions the cluster (VPC, control plane, system and GPU +# node pools) and installs the inference stack. The system node pool is +# provisioned automatically and isn't declared here. Only GPU node pools, +# each referencing an InferenceClass, need to be declared. +# +# CKS publishes no kubeconfig, so Modelplane authenticates to the cluster +# with the CoreWeave API access token of the ClusterProviderConfig named +# default. The token must belong to a user who can administer CKS +# clusters. +# +# Delete what runs on this InferenceCluster first, since it refuses deletion +# while anything uses it, then delete it with foreground cascading deletion, +# so the inference stack uninstalls while the cluster still exists: +# +# kubectl delete inferencecluster coreweave-us-east-04 --cascade=foreground +apiVersion: modelplane.ai/v1alpha1 +kind: InferenceCluster +metadata: + name: coreweave-us-east-04 + labels: + modelplane.ai/region: us-east-04 +spec: + cluster: + source: CoreWeave + coreweave: + zone: US-EAST-04A + + nodePools: + - name: gpu-rtxp6000 + className: coreweave-rtxp6000-8x + nodeCount: 1 + minNodeCount: 1 + maxNodeCount: 2 diff --git a/docs/manifests/getting-started/clusterproviderconfig-coreweave.yaml b/docs/manifests/getting-started/clusterproviderconfig-coreweave.yaml new file mode 100644 index 000000000..8e342e663 --- /dev/null +++ b/docs/manifests/getting-started/clusterproviderconfig-coreweave.yaml @@ -0,0 +1,17 @@ +# Points the CoreWeave provider at the API access token Secret you created. +# Named default, so InferenceClusters with a CoreWeave source use it +# without further configuration. The token provisions clusters and also +# authenticates Modelplane to them: CKS publishes no kubeconfig, so +# Modelplane renders one from each cluster's managed API endpoint and this +# token. The token must belong to a user who can administer CKS clusters. +apiVersion: coreweave.m.upbound.io/v1beta1 +kind: ClusterProviderConfig +metadata: + name: default +spec: + credentials: + source: Secret + secretRef: + namespace: crossplane-system + name: coreweave-credentials + key: creds diff --git a/docs/manifests/getting-started/coreweave/inference-gateway.yaml b/docs/manifests/getting-started/coreweave/inference-gateway.yaml new file mode 100644 index 000000000..684f2da4a --- /dev/null +++ b/docs/manifests/getting-started/coreweave/inference-gateway.yaml @@ -0,0 +1,10 @@ +# An InferenceGateway is the front door for inference requests: the only address +# a caller sees. It speaks the OpenAI and Anthropic APIs and resolves the model a +# request names to a ModelService. It runs on an InferenceCluster, named by +# spec.clusterName. This one sets no auth, so it authenticates nobody. +apiVersion: modelplane.ai/v1alpha1 +kind: InferenceGateway +metadata: + name: public +spec: + clusterName: coreweave-us-east-04 diff --git a/docs/manifests/getting-started/coreweave/model-deployment-scale.yaml b/docs/manifests/getting-started/coreweave/model-deployment-scale.yaml new file mode 100644 index 000000000..07a8eed6f --- /dev/null +++ b/docs/manifests/getting-started/coreweave/model-deployment-scale.yaml @@ -0,0 +1,36 @@ +# A second ModelDeployment, pinned with clusterSelector to the second cluster +# you added in "Scale the fleet". It carries its own deployment name, so the +# ModelService can front it alongside qwen-demo and serve both from one +# endpoint. +apiVersion: modelplane.ai/v1alpha1 +kind: ModelDeployment +metadata: + name: qwen-west + namespace: ml-team +spec: + replicas: 1 + template: + spec: + clusterSelector: + matchLabels: + modelplane.ai/tier: b + engines: + - name: qwen + members: + - role: Standalone + nodeSelector: + devices: + - name: gpu + count: 1 + selectors: + - cel: | + device.capacity["gpu.nvidia.com"].memory.compareTo(quantity("20Gi")) >= 0 + template: + spec: + containers: + - name: engine + image: vllm/vllm-openai:v0.23.0 + args: + - --model=Qwen/Qwen2.5-0.5B-Instruct + - --served-model-name=$(MODELPLANE_SERVED_MODEL_NAME) + - --dtype=half diff --git a/docs/manifests/getting-started/coreweave/model-deployment.yaml b/docs/manifests/getting-started/coreweave/model-deployment.yaml new file mode 100644 index 000000000..9cb64f5cd --- /dev/null +++ b/docs/manifests/getting-started/coreweave/model-deployment.yaml @@ -0,0 +1,32 @@ +apiVersion: modelplane.ai/v1alpha1 +kind: ModelDeployment +metadata: + name: qwen-demo + namespace: ml-team +spec: + replicas: 1 + template: + spec: + engines: + - name: qwen + members: + - role: Standalone + nodeSelector: + devices: + - name: gpu + count: 1 + selectors: + # The RTX PRO 6000 class declares ~95Gi, so >= 20Gi matches. The selector + # matches against the capacity declared in the InferenceClass, not + # the pod's resource requests. + - cel: | + device.capacity["gpu.nvidia.com"].memory.compareTo(quantity("20Gi")) >= 0 + template: + spec: + containers: + - name: engine + image: vllm/vllm-openai:v0.23.0 + args: + - --model=Qwen/Qwen2.5-0.5B-Instruct + - --served-model-name=$(MODELPLANE_SERVED_MODEL_NAME) + - --dtype=half diff --git a/docs/manifests/getting-started/coreweave/platform-scale.yaml b/docs/manifests/getting-started/coreweave/platform-scale.yaml new file mode 100644 index 000000000..eaa399118 --- /dev/null +++ b/docs/manifests/getting-started/coreweave/platform-scale.yaml @@ -0,0 +1,20 @@ +# A second cluster of the same class in the same zone. The tier label +# lets a ModelDeployment's clusterSelector pick it. +apiVersion: modelplane.ai/v1alpha1 +kind: InferenceCluster +metadata: + name: coreweave-us-east-04-b + labels: + modelplane.ai/region: us-east-04 + modelplane.ai/tier: b +spec: + cluster: + source: CoreWeave + coreweave: + zone: US-EAST-04A + nodePools: + - name: gpu-rtxp6000 + className: rtxp6000-8x + nodeCount: 1 + minNodeCount: 1 + maxNodeCount: 1 diff --git a/docs/manifests/getting-started/coreweave/platform.yaml b/docs/manifests/getting-started/coreweave/platform.yaml new file mode 100644 index 000000000..2ad12abba --- /dev/null +++ b/docs/manifests/getting-started/coreweave/platform.yaml @@ -0,0 +1,44 @@ +apiVersion: modelplane.ai/v1alpha1 +kind: InferenceClass +metadata: + name: rtxp6000-8x +spec: + # An 8x RTX PRO 6000 bare-metal instance type. CKS instance types vary by + # zone. + description: "CoreWeave rtxp6000-8x, 8x NVIDIA RTX PRO 6000 Blackwell 96GB" + provisioning: + provider: CoreWeave + coreweave: + instanceType: rtxp6000-8x + accelerator: + type: nvidia-rtx-pro-6000 + count: 8 + devices: + - name: gpu + claim: DRA + driver: gpu.nvidia.com + deviceClassName: gpu.nvidia.com + count: 8 + attributes: + architecture: { string: Blackwell } + cudaComputeCapability: { version: "12.0.0" } + capacity: + memory: { value: "97887Mi" } # RTX PRO 6000's real reported VRAM +--- +apiVersion: modelplane.ai/v1alpha1 +kind: InferenceCluster +metadata: + name: coreweave-us-east-04 + labels: + modelplane.ai/region: us-east-04 +spec: + cluster: + source: CoreWeave + coreweave: + zone: US-EAST-04A + nodePools: + - name: gpu-rtxp6000 + className: rtxp6000-8x + nodeCount: 1 + minNodeCount: 1 + maxNodeCount: 1 diff --git a/docs/manifests/reference/coreweaveclusters.yaml b/docs/manifests/reference/coreweaveclusters.yaml new file mode 100644 index 000000000..bbd23e9ae --- /dev/null +++ b/docs/manifests/reference/coreweaveclusters.yaml @@ -0,0 +1,16 @@ +apiVersion: infrastructure.modelplane.ai/v1alpha1 +kind: CoreWeaveCluster +metadata: + name: inference-us-east-04 + namespace: platform +spec: + zone: US-EAST-04A + kubernetesVersion: "1.37" + nodePools: + - name: gpu-rtxp6000 + role: GPU + instanceType: rtxp6000-8x + nodeCount: 1 + maxNodeCount: 2 + gpu: + acceleratorType: nvidia-rtx-pro-6000 diff --git a/e2e/README.md b/e2e/README.md index 59f3b0947..56513a69d 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -91,9 +91,9 @@ runs, so prefer a separate control plane for cloud work. ## Cloud serving stacks on kind (`--cloud`) -`nix run .#e2e -- --cloud eks|aks|gke|civo|nebius|vultr|existing` installs that +`nix run .#e2e -- --cloud eks|aks|gke|civo|coreweave|nebius|vultr|existing` installs that cloud's serving stack — the AICR-generated component lists for EKS/AKS/GKE, or -the hand-written halves for Civo, Nebius, Vultr and Existing — onto the same +the hand-written halves for Civo, CoreWeave, Nebius, Vultr and Existing — onto the same workload kind cluster, with no cloud credentials. The trick is [KWOK](https://kwok.sigs.k8s.io): bring-up applies its pinned `kwok.yaml` and `stage-fast.yaml` manifests and two fake Nodes per device pool, labelled and diff --git a/e2e/clouds/__init__.py b/e2e/clouds/__init__.py index 985c27031..8e6681c2a 100644 --- a/e2e/clouds/__init__.py +++ b/e2e/clouds/__init__.py @@ -321,6 +321,36 @@ class Cloud: "dra-driver-cpu/mp-dra-driver-cpu": 2, }, ), + # CoreWeave's half of the stack doesn't install NFD, because CoreWeave + # runs its own on every CKS cluster. Its NFD would set the GPU labels on + # real nodes, and here they're set up front as on the other clouds. The + # device-plugin label is the one compose-coreweave-cluster sets to keep + # CoreWeave's device plugin off GPU nodes. + "coreweave": Cloud( + cloud="CoreWeave", + labels={ + "node.kubernetes.io/instance-type": "rtxp6000-8x", + "nvidia.com/gpu.deploy.device-plugin": "false", + "modelplane.ai/pool": "gpu-fake", + "modelplane.ai/gpu": "nvidia-rtx-pro-6000", + "nvidia.com/gpu.present": "true", + "feature.node.kubernetes.io/pci-10de.present": "true", + # CKS GPU nodes run Ubuntu 24.04, and CoreWeave's NFD sets these. + "feature.node.kubernetes.io/system-os_release.ID": "ubuntu", + "feature.node.kubernetes.io/system-os_release.VERSION_ID": "24.04", + }, + taint_value="true", + cpu_labels={ + "node.kubernetes.io/instance-type": "turin-gp", + "modelplane.ai/pool": "cpu-fake", + "modelplane.ai/cpu": "true", + }, + dra_drivers=("dra.cpu", "gpu.nvidia.com"), + expected_daemonsets={ + "nvidia-dra-driver/dra-driver-nvidia-gpu-kubelet-plugin": 2, + "dra-driver-cpu/mp-dra-driver-cpu": 2, + }, + ), # The model e2e already installs the Existing stack, but on an untainted # single node - this leg adds what it can't check: tainted GPU pools, so # the placement and toleration audits have teeth. Modelplane doesn't diff --git a/e2e/test_legs.py b/e2e/test_legs.py index 1578677c3..8a29f8173 100644 --- a/e2e/test_legs.py +++ b/e2e/test_legs.py @@ -40,6 +40,7 @@ "gke": "compose-gke-cluster", "aks": "compose-aks-cluster", "civo": "compose-civo-cluster", + "coreweave": "compose-coreweave-cluster", "nebius": "compose-nebius-cluster", "vultr": "compose-vultr-cluster", } diff --git a/flake.nix b/flake.nix index 76d7f1cb0..6ae95f8d5 100644 --- a/flake.nix +++ b/flake.nix @@ -53,6 +53,7 @@ "compose-aks-cluster" "compose-capacity-reservation" "compose-civo-cluster" + "compose-coreweave-cluster" "compose-eks-cluster" "compose-gke-cluster" "compose-inference-class" diff --git a/functions/compose-coreweave-cluster/function/__init__.py b/functions/compose-coreweave-cluster/function/__init__.py new file mode 100644 index 000000000..b53d39d12 --- /dev/null +++ b/functions/compose-coreweave-cluster/function/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2026 The Modelplane Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/functions/compose-coreweave-cluster/function/fn.py b/functions/compose-coreweave-cluster/function/fn.py new file mode 100644 index 000000000..25a1c5f3a --- /dev/null +++ b/functions/compose-coreweave-cluster/function/fn.py @@ -0,0 +1,704 @@ +# Copyright 2026 The Modelplane Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Compose a CoreWeave Kubernetes Service (CKS) cluster with node pools. + +CKS has no cloud API for node pools. A pool is a NodePool resource inside +the cluster, which this function composes as a provider-kubernetes Object +once the cluster is Ready. + +CKS doesn't publish a kubeconfig. Its API endpoint accepts the CoreWeave +API access token the provider uses, and this function renders a +kubeconfig from that endpoint and token. + +CKS's autoscaler can't scale a pool up from zero nodes when its pods' +devices bind through DRA, as Modelplane's do. An autoscaled pool that +reaches zero stays there. +""" + +import base64 +import json +from typing import Any, Literal + +import grpc +from crossplane.function import logging, request, resource, response +from crossplane.function.proto.v1 import run_function_pb2 as fnv1 +from crossplane.function.proto.v1 import run_function_pb2_grpc as grpcv1 +from models.ai.modelplane.infrastructure.coreweavecluster import v1alpha1 +from models.io.crossplane.m.kubernetes.object import v1alpha1 as k8sobjv1alpha1 +from models.io.crossplane.m.kubernetes.providerconfig import v1alpha1 as k8spcv1alpha1 +from models.io.crossplane.protection.usage import v1beta1 as usagev1beta1 +from models.io.k8s.apimachinery.pkg.apis.meta import v1 as metav1 +from models.io.upbound.m.coreweave.cks.cluster import v1beta1 as clusterv1beta1 +from models.io.upbound.m.coreweave.clusterproviderconfig import v1beta1 as cwcpcv1beta1 +from models.io.upbound.m.coreweave.networking.vpc import v1beta1 as vpcv1beta1 +from models.io.upbound.m.coreweave.providerconfig import v1beta1 as cwpcv1beta1 + +# The system pool runs controllers such as Envoy Gateway and cert-manager. +# compose-inference-cluster passes only inference pools, and this function +# adds the system pool. CKS nodes are bare metal, which makes one CPU node +# enough. +_SYSTEM_POOL_NAME = "system" +_SYSTEM_POOL_INSTANCE_TYPE = "turin-gp" +_SYSTEM_POOL_NODES = 1 + +# CoreWeave caps cluster and VPC names at 30 characters. +_NAME_MAX_LEN = 30 + +# The cluster's pod, service and internal load balancer ranges, from its +# own VPC. They're the sizes CoreWeave recommends. +_POD_CIDR_NAME = "pod-cidr" +_POD_CIDR = "10.0.0.0/13" +_SERVICE_CIDR_NAME = "service-cidr" +_SERVICE_CIDR = "10.16.0.0/22" +_INTERNAL_LB_CIDR_NAME = "internal-lb-cidr" +_INTERNAL_LB_CIDR = "10.32.4.0/22" + +# Labels written on CKS node pools' nodes. compose-model-deployment reads +# these labels for GPU scheduling. +_LABEL_GPU = "modelplane.ai/gpu" +_LABEL_POOL = "modelplane.ai/pool" + +# CoreWeave's managed GPU Operator doesn't run its device plugin on a node +# with this label set to false. That leaves the DRA driver as the only GPU +# allocator. CKS drops only coreweave.com and coreweave.cloud label keys +# from a NodePool, which lets this one through to the nodes. +_LABEL_DEVICE_PLUGIN_KEY = "nvidia.com/gpu.deploy.device-plugin" +_LABEL_DEVICE_PLUGIN_VALUE = "false" + +# Only pods that tolerate this taint run on GPU nodes. CKS's own is_gpu +# taint is PreferNoSchedule, which doesn't stop other pods. +_GPU_TAINT_KEY = "nvidia.com/gpu" +_GPU_TAINT_VALUE = "true" +_GPU_TAINT_EFFECT = "NoSchedule" + +# The serving stack's dra-driver-cpu runs on nodes with this label. Engine +# pods tolerate the taint, and other pods don't. +_LABEL_CPU = "modelplane.ai/cpu" +_CPU_TAINT_KEY = "modelplane.ai/cpu" +_CPU_TAINT_VALUE = "true" +_CPU_TAINT_EFFECT = "NoSchedule" + +# A NodePool is Ready once CKS validates it. Readiness ignores AtTarget, +# which changes with every autoscaler step and node replacement, because +# the InferenceCluster stops composing the serving stack's ProviderConfig +# while this XR isn't Ready. +_NODE_POOL_READY_CEL = ( + "has(object.status) && has(object.status.conditions)" + " && object.status.conditions.exists(c, c.type == 'Validated' && c.status == 'True')" +) + +# Until this XR is first Ready, the system pool is Ready once it has a +# node. CKS validates a pool long before its nodes boot, and the serving +# stack installs as soon as this XR is Ready. Its Helm releases would time +# out with no node to run on, and provider-helm doesn't retry a failed +# install. After that the pool always uses _NODE_POOL_READY_CEL, even if +# the XR later goes un-Ready, because replacing its one node can leave it +# empty for a while. +_SYSTEM_POOL_READY_CEL = "has(object.status) && has(object.status.currentNodes) && object.status.currentNodes >= 1" + +# Management policies for an autoscaled pool's two Objects. CKS's +# autoscaler sets the NodePool's targetNodes, and CKS rejects a NodePool +# without it. One Object would either reset targetNodes on every poll or +# remove it by leaving it out. provider-kubernetes server-side applies each +# Object under its own field manager. The first Object creates and deletes the +# NodePool with a starting targetNodes. The second updates every other +# field, and leaving targetNodes out doesn't remove a field it never set. +_ManagementPolicy = Literal["Observe", "Create", "Update", "Delete", "LateInitialize", "*"] +_AUTOSCALED_POOL_MANAGEMENT: list[_ManagementPolicy] = ["Observe", "Create", "Delete"] +_AUTOSCALED_POOL_SETTINGS_MANAGEMENT: list[_ManagementPolicy] = ["Observe", "Update"] + +# Suffix of an autoscaled pool's second Object's resource name. Pool names +# can't contain a dot, which rules out a collision with another pool's. +_SETTINGS_SUFFIX = ".settings" + +# Secret type written to XR status. compose-inference-cluster reads this to +# wire the kubeconfig into a ClusterProviderConfig. +_SECRET_TYPE_KUBECONFIG = "Kubeconfig" + +# Key within the composed kubeconfig Secret. +_SECRET_KEY_KUBECONFIG = "kubeconfig" + +# Key within the CoreWeave credentials Secret's JSON that holds the API +# access token, as provider-coreweave reads it. +_CREDENTIALS_KEY_TOKEN = "token" + +# CKS's ReadWriteMany StorageClass, and the copy ModelCache uses. CKS's +# class retains a volume after its claim goes, which would leave a deleted +# ModelCache's weights on billed storage. +_CKS_STORAGE_CLASS = "shared-vast" +_CACHE_STORAGE_CLASS = "modelplane-rwx-fs" + +# The fields of shared-vast the copy takes. Not its metadata, which marks +# shared-vast as the cluster's default class. +_STORAGE_CLASS_FIELDS = ("provisioner", "parameters", "mountOptions", "allowVolumeExpansion", "volumeBindingMode") + + +def _name(meta: metav1.ObjectMeta | None) -> str: + """The object's name, always set on resources read from the API server.""" + if meta is None or meta.name is None: + raise ValueError("metadata.name is unexpectedly absent") + return meta.name + + +def _namespace(meta: metav1.ObjectMeta | None) -> str: + """The object's namespace, always set on namespaced resources read from the API server.""" + if meta is None or meta.namespace is None: + raise ValueError("metadata.namespace is unexpectedly absent") + return meta.namespace + + +def _kubeconfig_secret_name(xr: v1alpha1.CoreWeaveCluster) -> str: + """Derive the kubeconfig secret name from the XR.""" + return resource.child_name(_name(xr.metadata), "kubeconfig") + + +def _cluster_name(xr: v1alpha1.CoreWeaveCluster) -> str: + """The CKS cluster's name, also used for its VPC. + + The name includes the XR's namespace and a hash. CoreWeave rejects a + second VPC with the same name in a zone, and XRs in different namespaces + can share a name. The XR's name leads, which makes it what survives + truncation and what the CoreWeave console shows. A name longer than + CoreWeave's 30 characters loses characters before its hash, which keeps + it unique. + """ + name = resource.child_name(_name(xr.metadata), _namespace(xr.metadata)) + if len(name) <= _NAME_MAX_LEN: + return name + prefix, suffix = name.rsplit("-", 1) + return f"{prefix[: _NAME_MAX_LEN - len(suffix) - 1].rstrip('-')}-{suffix}" + + +def _kubeconfig(endpoint: str, token: str) -> str: + """A kubeconfig for the cluster's API endpoint. + + It omits certificate-authority-data. The endpoint's certificate is + publicly trusted, and CoreWeave's docs warn that setting + certificate-authority-data can break the connection. It's JSON, which is + valid YAML, to avoid a YAML dependency. + """ + return json.dumps( + { + "apiVersion": "v1", + "kind": "Config", + "clusters": [{"name": "cks", "cluster": {"server": f"https://{endpoint}"}}], + "users": [{"name": "cks", "user": {"token": token}}], + "contexts": [{"name": "cks", "context": {"cluster": "cks", "user": "cks"}}], + "current-context": "cks", + }, + indent=2, + ) + + +class FunctionRunner(grpcv1.FunctionRunnerServiceServicer): + """A FunctionRunner handles gRPC RunFunctionRequests.""" + + def __init__(self) -> None: + """Create a new FunctionRunner.""" + self.log = logging.get_logger() + + async def RunFunction( + self, req: fnv1.RunFunctionRequest, _: grpc.aio.ServicerContext | None + ) -> fnv1.RunFunctionResponse: # ty: ignore[invalid-method-override] # the generated grpc servicer base is untyped + """Run the function.""" + log = self.log.bind(tag=req.meta.tag) + log.info("Running function") + + rsp = response.to(req) + c = Composer(req, rsp) + c.compose() + return rsp + + +class Composer: + def __init__(self, req: fnv1.RunFunctionRequest, rsp: fnv1.RunFunctionResponse) -> None: + self.req = req + self.rsp = rsp + self.xr = v1alpha1.CoreWeaveCluster(**resource.struct_to_dict(req.observed.composite.resource)) + + def _cred_kind(self) -> str: + creds = self.xr.spec.credentials + return creds.type if creds and creds.type else "ClusterProviderConfig" + + def _cred_name(self) -> str: + creds = self.xr.spec.credentials + return creds.name if creds and creds.name else "default" + + def compose(self) -> None: + self.compose_vpc() + self.compose_cluster() + self.compose_vpc_usage() + self.compose_kubeconfig(self.resolve_token()) + if self._dependents_ready() or self._dependents_observed(): + self.compose_provider_config() + self.compose_node_pools() + self.compose_cache_storage_class() + self.compose_usages() + else: + # The VPC and cluster can be Ready before the kubeconfig and node + # pools exist. + self.rsp.desired.composite.ready = fnv1.READY_FALSE + self.write_status() + self.mark_readiness() + + def _dependents_ready(self) -> bool: + """Whether the cluster is Ready and its kubeconfig Secret exists.""" + cluster_ready = resource.get_condition(self.req.observed.resources.get("cluster"), "Ready").status == "True" + return cluster_ready and "kubeconfig" in self.req.observed.resources + + def _dependents_observed(self) -> bool: + """Whether an earlier reconcile composed the dependents. + + Dropping them when the cluster's Ready condition briefly regresses + would delete the NodePools and their nodes. + """ + observed = self.req.observed.resources + return "provider-config-kubernetes" in observed or any(name.startswith("node-pool-") for name in observed) + + def compose_vpc(self) -> None: + """Compose the cluster's VPC.""" + resource.update( + self.rsp.desired.resources["vpc"], + vpcv1beta1.VPC( + spec=vpcv1beta1.Spec( + providerConfigRef=vpcv1beta1.ProviderConfigRef( + kind=self._cred_kind(), + name=self._cred_name(), + ), + forProvider=vpcv1beta1.ForProvider( + name=_cluster_name(self.xr), + zone=self.xr.spec.zone, + vpcPrefixes=[ + vpcv1beta1.VpcPrefix(name=_POD_CIDR_NAME, value=_POD_CIDR), + vpcv1beta1.VpcPrefix(name=_SERVICE_CIDR_NAME, value=_SERVICE_CIDR), + vpcv1beta1.VpcPrefix(name=_INTERNAL_LB_CIDR_NAME, value=_INTERNAL_LB_CIDR), + ], + ), + ), + ), + ) + + def compose_cluster(self) -> None: + """Compose the CKS cluster. Its API server must be public, because only + the public endpoint accepts CoreWeave API access tokens.""" + resource.update( + self.rsp.desired.resources["cluster"], + clusterv1beta1.Cluster( + spec=clusterv1beta1.Spec( + providerConfigRef=clusterv1beta1.ProviderConfigRef( + kind=self._cred_kind(), + name=self._cred_name(), + ), + forProvider=clusterv1beta1.ForProvider( + name=_cluster_name(self.xr), + zone=self.xr.spec.zone, + version=f"v{self.xr.spec.kubernetesVersion}", + public=True, + vpcIdSelector=clusterv1beta1.VpcIdSelector(matchControllerRef=True), + podCidrName=_POD_CIDR_NAME, + serviceCidrName=_SERVICE_CIDR_NAME, + internalLbCidrNames=[_INTERNAL_LB_CIDR_NAME], + ), + ), + ), + ) + + def compose_vpc_usage(self) -> None: + """Block deleting the VPC until the cluster is gone. CoreWeave's API + answers a delete of a VPC a cluster still uses with NotFound, and + provider-coreweave treats that as success, which leaks the VPC.""" + resource.update( + self.rsp.desired.resources["usage-vpc-by-cluster"], + usagev1beta1.Usage( + metadata=metav1.ObjectMeta(namespace=_namespace(self.xr.metadata)), + spec=usagev1beta1.Spec( + of=usagev1beta1.Of( + apiVersion="networking.coreweave.m.upbound.io/v1beta1", + kind="VPC", + resourceSelector=usagev1beta1.ResourceSelectorModel(matchControllerRef=True), + ), + by=usagev1beta1.By( + apiVersion="cks.coreweave.m.upbound.io/v1beta1", + kind="Cluster", + resourceSelector=usagev1beta1.ResourceSelector(matchControllerRef=True), + ), + replayDeletion=True, + ), + ), + ) + + def resolve_token(self) -> str | None: + """The CoreWeave API access token from the CoreWeave ProviderConfig's + Secret, or None if the function can't get it.""" + cred_kind = self._cred_kind() + cred_name = self._cred_name() + response.require_resources( + self.rsp, + name="coreweave-provider-config", + api_version="coreweave.m.upbound.io/v1beta1", + kind=cred_kind, + match_name=cred_name, + namespace=_namespace(self.xr.metadata) if cred_kind == "ProviderConfig" else None, + ) + d = request.get_required_resource(self.req, "coreweave-provider-config") + if d is None: + response.normal(self.rsp, f"Waiting for CoreWeave {cred_kind} {cred_name}") + return None + + # A namespaced ProviderConfig's secretRef has no namespace. The Secret + # is in the ProviderConfig's. + if cred_kind == "ClusterProviderConfig": + cpc = cwcpcv1beta1.ClusterProviderConfig.model_validate(d) + source = cpc.spec.credentials.source + ref = cpc.spec.credentials.secretRef + secret_namespace = ref.namespace if ref else None + else: + pc = cwpcv1beta1.ProviderConfig.model_validate(d) + source = pc.spec.credentials.source + ref = pc.spec.credentials.secretRef + secret_namespace = _namespace(pc.metadata) + if source != "Secret" or ref is None: + response.warning( + self.rsp, + f"CoreWeave {cred_kind} {cred_name} doesn't source credentials from a Secret; " + "can't render a kubeconfig without its API access token", + ) + return None + + response.require_resources( + self.rsp, + name="coreweave-credentials", + api_version="v1", + kind="Secret", + match_name=ref.name, + namespace=secret_namespace, + ) + secret = request.get_required_resource(self.req, "coreweave-credentials") + if secret is None: + response.normal(self.rsp, f"Waiting for CoreWeave credentials Secret {secret_namespace}/{ref.name}") + return None + # Invalid base64, UTF-8 and JSON all raise ValueError. + try: + creds = json.loads(base64.b64decode(secret.get("data", {}).get(ref.key, ""))) + except ValueError: + creds = None + token = creds.get(_CREDENTIALS_KEY_TOKEN) if isinstance(creds, dict) else None + if not isinstance(token, str) or not token: + response.warning( + self.rsp, + f"CoreWeave credentials Secret {secret_namespace}/{ref.name} key {ref.key} " + f"isn't a JSON object with a {_CREDENTIALS_KEY_TOKEN} field", + ) + return None + return token + + def compose_kubeconfig(self, token: str | None) -> None: + """Compose the kubeconfig Secret once the cluster reports its endpoint + and the function has the token. Until then an existing Secret keeps + its observed data. Dropping it from desired state would delete it + and cut every consumer off from the cluster.""" + endpoint = self._observed_api_server_endpoint() + if endpoint and token: + secret: dict[str, Any] = {"stringData": {_SECRET_KEY_KUBECONFIG: _kubeconfig(endpoint, token)}} + elif "kubeconfig" in self.req.observed.resources: + observed = resource.struct_to_dict(self.req.observed.resources["kubeconfig"].resource) + secret = {"data": observed.get("data", {})} + else: + return + resource.update( + self.rsp.desired.resources["kubeconfig"], + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": _kubeconfig_secret_name(self.xr), + "namespace": _namespace(self.xr.metadata), + }, + "type": "Opaque", + **secret, + }, + ) + + def _observed_api_server_endpoint(self) -> str | None: + """The cluster's API server endpoint, None until CKS reports it.""" + observed = self.req.observed.resources.get("cluster") + if observed is None: + return None + cluster = clusterv1beta1.Cluster.model_validate(resource.struct_to_dict(observed.resource)) + if cluster.status and cluster.status.atProvider and cluster.status.atProvider.apiServerEndpoint: + return cluster.status.atProvider.apiServerEndpoint + return None + + def compose_provider_config(self) -> None: + """Compose the provider-kubernetes ProviderConfig the cluster's + Objects use.""" + kubeconfig_name = _kubeconfig_secret_name(self.xr) + resource.update( + self.rsp.desired.resources["provider-config-kubernetes"], + k8spcv1alpha1.ProviderConfig( + metadata=metav1.ObjectMeta( + name=kubeconfig_name, + namespace=_namespace(self.xr.metadata), + ), + spec=k8spcv1alpha1.Spec( + credentials=k8spcv1alpha1.Credentials( + source="Secret", + secretRef=k8spcv1alpha1.SecretRef( + namespace=_namespace(self.xr.metadata), + name=kubeconfig_name, + key=_SECRET_KEY_KUBECONFIG, + ), + ), + ), + ), + ) + + def compose_node_pools(self) -> None: + """Compose a NodePool Object for the system pool and each + user-defined pool, and a second Object for each autoscaled pool.""" + ready_cel = _SYSTEM_POOL_READY_CEL + if resource.get_condition(self.req.observed.composite.resource, "Ready").status == "True": + ready_cel = _NODE_POOL_READY_CEL + observed = self.req.observed.resources.get(f"node-pool-{_SYSTEM_POOL_NAME}") + if observed is not None: + obj = k8sobjv1alpha1.Object.model_validate(resource.struct_to_dict(observed.resource)) + if obj.spec.readiness is not None and obj.spec.readiness.celQuery == _NODE_POOL_READY_CEL: + ready_cel = _NODE_POOL_READY_CEL + self._compose_node_pool( + key=f"node-pool-{_SYSTEM_POOL_NAME}", + name=_SYSTEM_POOL_NAME, + management_policies=None, + ready_cel=ready_cel, + spec={ + "instanceType": _SYSTEM_POOL_INSTANCE_TYPE, + "targetNodes": _SYSTEM_POOL_NODES, + "autoscaling": False, + "nodeLabels": {_LABEL_POOL: _SYSTEM_POOL_NAME}, + }, + ) + for pool in self.xr.spec.nodePools: + spec = self._node_pool_spec(pool) + autoscaled = pool.maxNodeCount is not None + self._compose_node_pool( + key=f"node-pool-{pool.name}", + name=pool.name, + management_policies=_AUTOSCALED_POOL_MANAGEMENT if autoscaled else None, + ready_cel=_NODE_POOL_READY_CEL, + spec=spec, + ) + if not autoscaled: + continue + self._compose_node_pool( + key=f"node-pool-{pool.name}{_SETTINGS_SUFFIX}", + name=pool.name, + management_policies=_AUTOSCALED_POOL_SETTINGS_MANAGEMENT, + ready_cel=None, + spec={k: v for k, v in spec.items() if k != "targetNodes"}, + ) + + def _node_pool_spec(self, pool: v1alpha1.NodePool) -> dict[str, Any]: + """Map an XR node pool to a CKS NodePool's spec.""" + labels = {_LABEL_POOL: pool.name} + if pool.role == "GPU" and pool.gpu: + labels[_LABEL_GPU] = pool.gpu.acceleratorType + labels[_LABEL_DEVICE_PLUGIN_KEY] = _LABEL_DEVICE_PLUGIN_VALUE + taint = {"key": _GPU_TAINT_KEY, "value": _GPU_TAINT_VALUE, "effect": _GPU_TAINT_EFFECT} + else: + labels[_LABEL_CPU] = "true" + taint = {"key": _CPU_TAINT_KEY, "value": _CPU_TAINT_VALUE, "effect": _CPU_TAINT_EFFECT} + + spec: dict[str, Any] = { + "instanceType": pool.instanceType, + "targetNodes": pool.nodeCount, + "autoscaling": False, + "nodeLabels": labels, + "nodeTaints": [taint], + } + # An autoscaled pool's nodeCount only sets its starting targetNodes + # (see _AUTOSCALED_POOL_MANAGEMENT). The pool starts with at least one + # node, because CKS's autoscaler must have seen one of a pool's nodes + # before it can scale the pool up. minNodes defaults to the starting + # count, because a pool whose pods bind devices through DRA can't + # scale up from zero. + if pool.maxNodeCount is not None: + spec["targetNodes"] = pool.nodeCount or 1 + spec["autoscaling"] = True + spec["minNodes"] = pool.minNodeCount if pool.minNodeCount is not None else spec["targetNodes"] + spec["maxNodes"] = pool.maxNodeCount + return spec + + def _compose_node_pool( + self, + *, + key: str, + name: str, + management_policies: list[_ManagementPolicy] | None, + ready_cel: str | None, + spec: dict[str, Any], + ) -> None: + """Compose an Object for a cluster-scoped NodePool.""" + obj = k8sobjv1alpha1.Object( + metadata=metav1.ObjectMeta(namespace=_namespace(self.xr.metadata)), + spec=k8sobjv1alpha1.Spec( + providerConfigRef=k8sobjv1alpha1.ProviderConfigRef( + kind="ProviderConfig", + name=_kubeconfig_secret_name(self.xr), + ), + forProvider=k8sobjv1alpha1.ForProvider( + manifest={ + "apiVersion": "compute.coreweave.com/v1alpha1", + "kind": "NodePool", + "metadata": {"name": name}, + "spec": spec, + }, + ), + ), + ) + if ready_cel is not None: + obj.spec.readiness = k8sobjv1alpha1.Readiness(policy="DeriveFromCelQuery", celQuery=ready_cel) + if management_policies is not None: + obj.spec.managementPolicies = management_policies + resource.update(self.rsp.desired.resources[key], obj) + + def compose_cache_storage_class(self) -> None: + """Observe CKS's shared-vast StorageClass, and compose a copy of it + whose reclaimPolicy is Delete. It copies the observed class because + the class's parameters specify the org's storage tenant and the + zone.""" + resource.update( + self.rsp.desired.resources["storage-class-cks"], + k8sobjv1alpha1.Object( + metadata=metav1.ObjectMeta(namespace=_namespace(self.xr.metadata)), + spec=k8sobjv1alpha1.Spec( + managementPolicies=["Observe"], + providerConfigRef=k8sobjv1alpha1.ProviderConfigRef( + kind="ProviderConfig", + name=_kubeconfig_secret_name(self.xr), + ), + forProvider=k8sobjv1alpha1.ForProvider( + manifest={ + "apiVersion": "storage.k8s.io/v1", + "kind": "StorageClass", + "metadata": {"name": _CKS_STORAGE_CLASS}, + }, + ), + ), + ), + ) + + observed = self.req.observed.resources.get("storage-class-cks") + if observed is None: + return + obj = k8sobjv1alpha1.Object.model_validate(resource.struct_to_dict(observed.resource)) + if obj.status is None or obj.status.atProvider is None or obj.status.atProvider.manifest is None: + return + cks = obj.status.atProvider.manifest + + manifest = { + "apiVersion": "storage.k8s.io/v1", + "kind": "StorageClass", + "metadata": {"name": _CACHE_STORAGE_CLASS}, + **{f: cks[f] for f in _STORAGE_CLASS_FIELDS if f in cks}, + "reclaimPolicy": "Delete", + } + resource.update( + self.rsp.desired.resources["storage-class-rwx-fs"], + k8sobjv1alpha1.Object( + metadata=metav1.ObjectMeta(namespace=_namespace(self.xr.metadata)), + spec=k8sobjv1alpha1.Spec( + providerConfigRef=k8sobjv1alpha1.ProviderConfigRef( + kind="ProviderConfig", + name=_kubeconfig_secret_name(self.xr), + ), + forProvider=k8sobjv1alpha1.ForProvider(manifest=manifest), + ), + ), + ) + + def compose_usages(self) -> None: + """Block deleting the kubeconfig Secret and the cluster until the + provider-kubernetes ProviderConfig is gone. compose-usages blocks + deleting the ProviderConfig until every Object is gone, so + provider-kubernetes can still reach the cluster to delete the + NodePools.""" + by = usagev1beta1.By( + apiVersion="kubernetes.m.crossplane.io/v1alpha1", + kind="ProviderConfig", + resourceRef=usagev1beta1.ResourceRef(name=_kubeconfig_secret_name(self.xr)), + ) + resource.update( + self.rsp.desired.resources["usage-kubeconfig-by-provider-config"], + usagev1beta1.Usage( + metadata=metav1.ObjectMeta(namespace=_namespace(self.xr.metadata)), + spec=usagev1beta1.Spec( + of=usagev1beta1.Of( + apiVersion="v1", + kind="Secret", + resourceRef=usagev1beta1.ResourceRefModel(name=_kubeconfig_secret_name(self.xr)), + ), + by=by, + replayDeletion=True, + ), + ), + ) + resource.update( + self.rsp.desired.resources["usage-cluster-by-provider-config"], + usagev1beta1.Usage( + metadata=metav1.ObjectMeta(namespace=_namespace(self.xr.metadata)), + spec=usagev1beta1.Spec( + of=usagev1beta1.Of( + apiVersion="cks.coreweave.m.upbound.io/v1beta1", + kind="Cluster", + resourceSelector=usagev1beta1.ResourceSelectorModel(matchControllerRef=True), + ), + by=by, + replayDeletion=True, + ), + ), + ) + + def write_status(self) -> None: + status = v1alpha1.Status( + secrets=[ + v1alpha1.Secret( + type=_SECRET_TYPE_KUBECONFIG, + name=_kubeconfig_secret_name(self.xr), + key=_SECRET_KEY_KUBECONFIG, + ), + ], + cache=v1alpha1.Cache(storageClassName=_CACHE_STORAGE_CLASS), + ) + resource.update_status(self.rsp.desired.composite, status) + + def mark_readiness(self) -> None: + """Mark the VPC, the cluster and each pool's first NodePool Object + ready when its observed Ready condition is True, and everything else + ready unconditionally. An autoscaled pool's first Object reports the + pool's readiness.""" + always_ready = ( + "storage-class-cks", + "storage-class-rwx-fs", + "usage-vpc-by-cluster", + "kubeconfig", + "provider-config-kubernetes", + "usage-kubeconfig-by-provider-config", + "usage-cluster-by-provider-config", + ) + for r in self.rsp.desired.resources: + if r in always_ready or r.endswith(_SETTINGS_SUFFIX): + self.rsp.desired.resources[r].ready = fnv1.READY_TRUE + continue + if resource.get_condition(self.req.observed.resources.get(r), "Ready").status == "True": + self.rsp.desired.resources[r].ready = fnv1.READY_TRUE diff --git a/functions/compose-coreweave-cluster/function/main.py b/functions/compose-coreweave-cluster/function/main.py new file mode 100644 index 000000000..2e8441dac --- /dev/null +++ b/functions/compose-coreweave-cluster/function/main.py @@ -0,0 +1,55 @@ +# Copyright 2026 The Modelplane Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""The composition function's main CLI.""" + +import click +from crossplane.function import logging, runtime + +from function import fn + + +@click.command() +@click.option("--debug", "-d", is_flag=True, help="Emit debug logs.") +@click.option( + "--address", + default="0.0.0.0:9443", + show_default=True, + help="Address at which to listen for gRPC connections", +) +@click.option("--tls-certs-dir", help="Serve using mTLS certificates.", envvar="TLS_SERVER_CERTS_DIR") +@click.option( + "--insecure", + is_flag=True, + help="Run without mTLS credentials. If you supply this flag --tls-certs-dir will be ignored.", +) +def cli(debug: bool, address: str, tls_certs_dir: str, insecure: bool) -> None: + """A Crossplane composition function.""" + try: + level = logging.Level.INFO + if debug: + level = logging.Level.DEBUG + logging.configure(level=level) + runtime.serve( + fn.FunctionRunner(), + address, + creds=runtime.load_credentials(tls_certs_dir), + insecure=insecure, + ) + except Exception as e: + click.echo(f"Cannot run function: {e}") + + +if __name__ == "__main__": + cli() diff --git a/functions/compose-coreweave-cluster/pyproject.toml b/functions/compose-coreweave-cluster/pyproject.toml new file mode 100644 index 000000000..2452ba2af --- /dev/null +++ b/functions/compose-coreweave-cluster/pyproject.toml @@ -0,0 +1,26 @@ +[build-system] +requires = ["uv_build>=0.11.0,<0.12"] +build-backend = "uv_build" + +[project] +name = "compose-coreweave-cluster" +version = "0.0.0" +description = "Compose a CoreWeave Kubernetes Service cluster with networking and node pools." +requires-python = ">=3.11,<3.14" +license = "Apache-2.0" +dependencies = [ + "crossplane-function-sdk-python>=0.14.0", + "click>=8.1.0", + "grpcio>=1.73.1", + "crossplane-models", +] + +[tool.uv.sources] +crossplane-models = { workspace = true } + +[project.scripts] +function = "function.main:cli" + +[tool.uv.build-backend] +module-name = "function" +module-root = "" diff --git a/functions/compose-coreweave-cluster/tests/test_fn.py b/functions/compose-coreweave-cluster/tests/test_fn.py new file mode 100644 index 000000000..8c89b5d21 --- /dev/null +++ b/functions/compose-coreweave-cluster/tests/test_fn.py @@ -0,0 +1,1815 @@ +# Copyright 2026 The Modelplane Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Tests for the compose-coreweave-cluster function.""" + +import asyncio +import dataclasses +import datetime +import json +from typing import Any + +import pytest +from crossplane.function import resource +from crossplane.function.proto.v1 import run_function_pb2 as fnv1 +from function import fn +from google.protobuf import duration_pb2 as durationpb +from google.protobuf import json_format, message +from google.protobuf import struct_pb2 as structpb +from models.ai.modelplane.infrastructure.coreweavecluster import v1alpha1 +from models.io.k8s.apimachinery.pkg.apis.meta import v1 as metav1 + +# The kubeconfig the function renders for the observed cluster's endpoint and +# the token in _credentials_secret. +_KUBECONFIG = """{ + "apiVersion": "v1", + "kind": "Config", + "clusters": [ + { + "name": "cks", + "cluster": { + "server": "https://abc123-abcd1234.k8s.us-east-04a.coreweave.com" + } + } + ], + "users": [ + { + "name": "cks", + "user": { + "token": "CW-SECRET-test" + } + } + ], + "contexts": [ + { + "name": "cks", + "context": { + "cluster": "cks", + "user": "cks" + } + } + ], + "current-context": "cks" +}""" + + +@dataclasses.dataclass +class Case: + """A test case for compose-coreweave-cluster.""" + + name: str + reason: str + req: fnv1.RunFunctionRequest + want: fnv1.RunFunctionResponse + + +def _xr(*, credentials: v1alpha1.Credentials | None, node_pools: list[v1alpha1.NodePool], ready: bool) -> fnv1.Resource: + """The observed CoreWeaveCluster XR, with the given credentials and node pools, and a Ready condition if ready.""" + xr = v1alpha1.CoreWeaveCluster( + metadata=metav1.ObjectMeta( + name="test-cluster", + namespace="modelplane-system", + ), + spec=v1alpha1.Spec( + zone="US-EAST-04A", + kubernetesVersion="1.37", + credentials=credentials, + nodePools=node_pools, + ), + ) + if ready: + xr.status = v1alpha1.Status( + conditions=[ + v1alpha1.Condition( + type="Ready", + status="True", + reason="Available", + lastTransitionTime=datetime.datetime(2024, 1, 1, tzinfo=datetime.UTC), + ), + ], + ) + return fnv1.Resource(resource=resource.dict_to_struct(xr.model_dump(exclude_none=True, mode="json", by_alias=True))) + + +def _desired_xr(*, ready: fnv1.Ready) -> fnv1.Resource: + """The desired XR, publishing the kubeconfig Secret and the cache StorageClass.""" + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "status": { + "secrets": [ + { + "type": "Kubeconfig", + "name": "test-cluster-kubeconfig-55b57", + "key": "kubeconfig", + }, + ], + "cache": {"storageClassName": "modelplane-rwx-fs"}, + }, + } + ), + ready=ready, + ) + + +def _vpc(*, cred_kind: str, cred_name: str, ready: fnv1.Ready) -> fnv1.Resource: + """The composed VPC.""" + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "networking.coreweave.m.upbound.io/v1beta1", + "kind": "VPC", + "spec": { + "providerConfigRef": {"kind": cred_kind, "name": cred_name}, + "forProvider": { + "name": "test-cluster-modelplane-21669", + "zone": "US-EAST-04A", + "vpcPrefixes": [ + {"name": "pod-cidr", "value": "10.0.0.0/13"}, + {"name": "service-cidr", "value": "10.16.0.0/22"}, + {"name": "internal-lb-cidr", "value": "10.32.4.0/22"}, + ], + }, + }, + } + ), + ready=ready, + ) + + +def _cluster(*, cred_kind: str, cred_name: str, ready: fnv1.Ready) -> fnv1.Resource: + """The composed CKS cluster.""" + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "cks.coreweave.m.upbound.io/v1beta1", + "kind": "Cluster", + "spec": { + "providerConfigRef": {"kind": cred_kind, "name": cred_name}, + "forProvider": { + "name": "test-cluster-modelplane-21669", + "zone": "US-EAST-04A", + "version": "v1.37", + "public": True, + "vpcIdSelector": {"matchControllerRef": True}, + "podCidrName": "pod-cidr", + "serviceCidrName": "service-cidr", + "internalLbCidrNames": ["internal-lb-cidr"], + }, + }, + } + ), + ready=ready, + ) + + +def _observed_cluster(*, ready: bool) -> fnv1.Resource: + """The CKS cluster as observed, reporting its API server endpoint, with a Ready condition that's True if ready and False if not.""" + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "cks.coreweave.m.upbound.io/v1beta1", + "kind": "Cluster", + "spec": { + "providerConfigRef": {"kind": "ClusterProviderConfig", "name": "default"}, + "forProvider": { + "name": "test-cluster-modelplane-21669", + "zone": "US-EAST-04A", + "version": "v1.37", + "public": True, + "vpcIdSelector": {"matchControllerRef": True}, + "podCidrName": "pod-cidr", + "serviceCidrName": "service-cidr", + "internalLbCidrNames": ["internal-lb-cidr"], + }, + }, + "status": { + "atProvider": { + "id": "8a5f1c9e-0000-0000-0000-000000000000", + "apiServerEndpoint": "abc123-abcd1234.k8s.us-east-04a.coreweave.com", + }, + "conditions": [ + { + "type": "Ready", + "status": "True" if ready else "False", + "reason": "Available" if ready else "Unavailable", + "lastTransitionTime": "2024-01-01T00:00:00Z", + }, + ], + }, + } + ), + ) + + +def _cluster_provider_config() -> fnv1.Resource: + """The CoreWeave ClusterProviderConfig named default, reading the token from crossplane-system/coreweave-creds.""" + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "coreweave.m.upbound.io/v1beta1", + "kind": "ClusterProviderConfig", + "metadata": {"name": "default"}, + "spec": { + "credentials": { + "source": "Secret", + "secretRef": { + "namespace": "crossplane-system", + "name": "coreweave-creds", + "key": "credentials", + }, + }, + }, + } + ), + ) + + +def _credentials_secret(*, credentials: str) -> fnv1.Resource: + """The CoreWeave credentials Secret, with the given base64 data under its credentials key.""" + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": {"name": "coreweave-creds", "namespace": "crossplane-system"}, + "data": {"credentials": credentials}, + } + ), + ) + + +def _kubeconfig_secret() -> fnv1.Resource: + """The composed kubeconfig Secret, rendered from the observed endpoint and token, which is always ready.""" + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "test-cluster-kubeconfig-55b57", + "namespace": "modelplane-system", + }, + "type": "Opaque", + "stringData": {"kubeconfig": _KUBECONFIG}, + } + ), + ready=fnv1.READY_TRUE, + ) + + +def _observed_kubeconfig_secret() -> fnv1.Resource: + """The kubeconfig Secret as observed, its data base64 encoded by the API server.""" + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "test-cluster-kubeconfig-55b57", + "namespace": "modelplane-system", + }, + "type": "Opaque", + "data": {"kubeconfig": "eyJraW5kIjogIkNvbmZpZyJ9"}, + } + ), + ) + + +def _provider_config() -> fnv1.Resource: + """The composed provider-kubernetes ProviderConfig for the cluster, which is always ready.""" + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "kubernetes.m.crossplane.io/v1alpha1", + "kind": "ProviderConfig", + "metadata": { + "name": "test-cluster-kubeconfig-55b57", + "namespace": "modelplane-system", + }, + "spec": { + "credentials": { + "source": "Secret", + "secretRef": { + "namespace": "modelplane-system", + "name": "test-cluster-kubeconfig-55b57", + "key": "kubeconfig", + }, + }, + }, + } + ), + ready=fnv1.READY_TRUE, + ) + + +def _node_pool( + *, name: str, management_policies: list[str] | None, cel_query: str, spec: dict[str, Any], ready: fnv1.Ready +) -> fnv1.Resource: + """A composed NodePool Object, with the given NodePool name, readiness query and spec, and management policies unless they're None.""" + object_spec: dict[str, Any] = { + "providerConfigRef": { + "kind": "ProviderConfig", + "name": "test-cluster-kubeconfig-55b57", + }, + "readiness": { + "policy": "DeriveFromCelQuery", + "celQuery": cel_query, + }, + "forProvider": { + "manifest": { + "apiVersion": "compute.coreweave.com/v1alpha1", + "kind": "NodePool", + "metadata": {"name": name}, + "spec": spec, + }, + }, + } + if management_policies is not None: + object_spec["managementPolicies"] = management_policies + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "kubernetes.m.crossplane.io/v1alpha1", + "kind": "Object", + "metadata": {"namespace": "modelplane-system"}, + "spec": object_spec, + } + ), + ready=ready, + ) + + +def _node_pool_settings(*, name: str, spec: dict[str, Any]) -> fnv1.Resource: + """The composed Object keeping an autoscaled pool's NodePool current, with the given NodePool name and spec.""" + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "kubernetes.m.crossplane.io/v1alpha1", + "kind": "Object", + "metadata": {"namespace": "modelplane-system"}, + "spec": { + "managementPolicies": ["Observe", "Update"], + "providerConfigRef": { + "kind": "ProviderConfig", + "name": "test-cluster-kubeconfig-55b57", + }, + "forProvider": { + "manifest": { + "apiVersion": "compute.coreweave.com/v1alpha1", + "kind": "NodePool", + "metadata": {"name": name}, + "spec": spec, + }, + }, + }, + } + ), + ready=fnv1.READY_TRUE, + ) + + +def _observed_node_pool(*, name: str, cel_query: str, spec: dict[str, Any]) -> fnv1.Resource: + """An observed, Ready NodePool Object, with the given NodePool name, readiness query and spec.""" + manifest = { + "apiVersion": "compute.coreweave.com/v1alpha1", + "kind": "NodePool", + "metadata": {"name": name}, + "spec": spec, + } + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "kubernetes.m.crossplane.io/v1alpha1", + "kind": "Object", + "metadata": {"namespace": "modelplane-system"}, + "spec": { + "providerConfigRef": { + "kind": "ProviderConfig", + "name": "test-cluster-kubeconfig-55b57", + }, + "readiness": { + "policy": "DeriveFromCelQuery", + "celQuery": cel_query, + }, + "forProvider": {"manifest": manifest}, + }, + "status": { + "atProvider": {"manifest": manifest}, + "conditions": [ + { + "type": "Ready", + "status": "True", + "reason": "Available", + "lastTransitionTime": "2024-01-01T00:00:00Z", + }, + ], + }, + } + ), + ) + + +def _system_node_pool(*, ready: fnv1.Ready) -> fnv1.Resource: + """The composed NodePool Object for the system pool every cluster gets.""" + return _node_pool( + name="system", + management_policies=None, + cel_query="has(object.status) && has(object.status.currentNodes) && object.status.currentNodes >= 1", + spec={ + "instanceType": "turin-gp", + "targetNodes": 1, + "autoscaling": False, + "nodeLabels": {"modelplane.ai/pool": "system"}, + }, + ready=ready, + ) + + +def _usage_vpc() -> fnv1.Resource: + """The composed Usage holding the VPC until the CKS cluster is gone.""" + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "protection.crossplane.io/v1beta1", + "kind": "Usage", + "metadata": {"namespace": "modelplane-system"}, + "spec": { + "of": { + "apiVersion": "networking.coreweave.m.upbound.io/v1beta1", + "kind": "VPC", + "resourceSelector": {"matchControllerRef": True}, + }, + "by": { + "apiVersion": "cks.coreweave.m.upbound.io/v1beta1", + "kind": "Cluster", + "resourceSelector": {"matchControllerRef": True}, + }, + "replayDeletion": True, + }, + } + ), + ready=fnv1.READY_TRUE, + ) + + +def _usage_kubeconfig() -> fnv1.Resource: + """The composed Usage holding the kubeconfig Secret until the provider-kubernetes ProviderConfig is gone.""" + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "protection.crossplane.io/v1beta1", + "kind": "Usage", + "metadata": {"namespace": "modelplane-system"}, + "spec": { + "of": { + "apiVersion": "v1", + "kind": "Secret", + "resourceRef": {"name": "test-cluster-kubeconfig-55b57"}, + }, + "by": { + "apiVersion": "kubernetes.m.crossplane.io/v1alpha1", + "kind": "ProviderConfig", + "resourceRef": {"name": "test-cluster-kubeconfig-55b57"}, + }, + "replayDeletion": True, + }, + } + ), + ready=fnv1.READY_TRUE, + ) + + +def _usage_cluster() -> fnv1.Resource: + """The composed Usage holding the CKS cluster until the provider-kubernetes ProviderConfig is gone.""" + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "protection.crossplane.io/v1beta1", + "kind": "Usage", + "metadata": {"namespace": "modelplane-system"}, + "spec": { + "of": { + "apiVersion": "cks.coreweave.m.upbound.io/v1beta1", + "kind": "Cluster", + "resourceSelector": {"matchControllerRef": True}, + }, + "by": { + "apiVersion": "kubernetes.m.crossplane.io/v1alpha1", + "kind": "ProviderConfig", + "resourceRef": {"name": "test-cluster-kubeconfig-55b57"}, + }, + "replayDeletion": True, + }, + } + ), + ready=fnv1.READY_TRUE, + ) + + +def _storage_class_observer() -> fnv1.Resource: + """The composed Object observing CKS's shared-vast StorageClass, which is always ready.""" + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "kubernetes.m.crossplane.io/v1alpha1", + "kind": "Object", + "metadata": {"namespace": "modelplane-system"}, + "spec": { + "managementPolicies": ["Observe"], + "providerConfigRef": { + "kind": "ProviderConfig", + "name": "test-cluster-kubeconfig-55b57", + }, + "forProvider": { + "manifest": { + "apiVersion": "storage.k8s.io/v1", + "kind": "StorageClass", + "metadata": {"name": "shared-vast"}, + }, + }, + }, + } + ), + ready=fnv1.READY_TRUE, + ) + + +def _to_dict(msg: message.Message) -> dict: + """msg as a dict with sorted keys, so pytest's diff of two lines them up.""" + return json.loads(json_format.MessageToJson(msg, sort_keys=True)) + + +COMPOSE_CASES = [ + Case( + name="FirstPass", + reason="With nothing observed or fetched, a CoreWeaveCluster composes the VPC and cluster and requires its ClusterProviderConfig.", + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_xr( + credentials=None, + ready=False, + node_pools=[ + v1alpha1.NodePool( + name="gpu-h100", + role="GPU", + instanceType="gd-8xh100ib-i128", + gpu=v1alpha1.Gpu(acceleratorType="nvidia-h100"), + ), + ], + ), + ), + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_xr(ready=fnv1.READY_FALSE), + resources={ + "vpc": _vpc(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_UNSPECIFIED), + "cluster": _cluster( + cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_UNSPECIFIED + ), + "usage-vpc-by-cluster": _usage_vpc(), + }, + ), + results=[ + fnv1.Result( + severity=fnv1.SEVERITY_NORMAL, + message="Waiting for CoreWeave ClusterProviderConfig default", + ), + ], + context=structpb.Struct(), + requirements=fnv1.Requirements( + resources={ + "coreweave-provider-config": fnv1.ResourceSelector( + api_version="coreweave.m.upbound.io/v1beta1", + kind="ClusterProviderConfig", + match_name="default", + ), + }, + ), + ), + ), + Case( + name="CustomCredentials", + reason=( + "A CoreWeaveCluster naming a namespaced ProviderConfig uses it for the VPC and cluster, and requires its " + "credentials Secret from the ProviderConfig's namespace." + ), + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_xr( + credentials=v1alpha1.Credentials(type="ProviderConfig", name="team"), + ready=False, + node_pools=[ + v1alpha1.NodePool( + name="gpu-h100", + role="GPU", + instanceType="gd-8xh100ib-i128", + gpu=v1alpha1.Gpu(acceleratorType="nvidia-h100"), + ), + ], + ), + ), + required_resources={ + "coreweave-provider-config": fnv1.Resources( + items=[ + fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "coreweave.m.upbound.io/v1beta1", + "kind": "ProviderConfig", + "metadata": {"name": "team", "namespace": "modelplane-system"}, + "spec": { + "credentials": { + "source": "Secret", + "secretRef": {"name": "team-creds", "key": "credentials"}, + }, + }, + } + ), + ), + ], + ), + }, + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_xr(ready=fnv1.READY_FALSE), + resources={ + "vpc": _vpc(cred_kind="ProviderConfig", cred_name="team", ready=fnv1.READY_UNSPECIFIED), + "cluster": _cluster(cred_kind="ProviderConfig", cred_name="team", ready=fnv1.READY_UNSPECIFIED), + "usage-vpc-by-cluster": _usage_vpc(), + }, + ), + results=[ + fnv1.Result( + severity=fnv1.SEVERITY_NORMAL, + message="Waiting for CoreWeave credentials Secret modelplane-system/team-creds", + ), + ], + context=structpb.Struct(), + requirements=fnv1.Requirements( + resources={ + "coreweave-provider-config": fnv1.ResourceSelector( + api_version="coreweave.m.upbound.io/v1beta1", + kind="ProviderConfig", + match_name="team", + namespace="modelplane-system", + ), + "coreweave-credentials": fnv1.ResourceSelector( + api_version="v1", + kind="Secret", + match_name="team-creds", + namespace="modelplane-system", + ), + }, + ), + ), + ), + Case( + name="ClusterReady", + reason=( + "With the cluster observed Ready and the token fetched, a CoreWeaveCluster composes the kubeconfig " + "Secret, holding back the node pools until the Secret exists." + ), + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_xr( + credentials=None, + ready=False, + node_pools=[ + v1alpha1.NodePool( + name="gpu-h100", + role="GPU", + instanceType="gd-8xh100ib-i128", + gpu=v1alpha1.Gpu(acceleratorType="nvidia-h100"), + ), + ], + ), + resources={ + "cluster": _observed_cluster(ready=True), + }, + ), + required_resources={ + "coreweave-provider-config": fnv1.Resources(items=[_cluster_provider_config()]), + "coreweave-credentials": fnv1.Resources( + items=[_credentials_secret(credentials="eyJ0b2tlbiI6ICJDVy1TRUNSRVQtdGVzdCJ9")], + ), + }, + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_xr(ready=fnv1.READY_FALSE), + resources={ + "vpc": _vpc(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_UNSPECIFIED), + "cluster": _cluster(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_TRUE), + "usage-vpc-by-cluster": _usage_vpc(), + "kubeconfig": _kubeconfig_secret(), + }, + ), + context=structpb.Struct(), + requirements=fnv1.Requirements( + resources={ + "coreweave-provider-config": fnv1.ResourceSelector( + api_version="coreweave.m.upbound.io/v1beta1", + kind="ClusterProviderConfig", + match_name="default", + ), + "coreweave-credentials": fnv1.ResourceSelector( + api_version="v1", + kind="Secret", + match_name="coreweave-creds", + namespace="crossplane-system", + ), + }, + ), + ), + ), + Case( + name="KubeconfigObserved", + reason=( + "With the cluster Ready and its kubeconfig Secret observed, a CoreWeaveCluster composes the ProviderConfig, " + "a fixed-size GPU NodePool beside the system NodePool, and the Usages that order their teardown." + ), + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_xr( + credentials=None, + ready=False, + node_pools=[ + v1alpha1.NodePool( + name="gpu-h100", + role="GPU", + instanceType="gd-8xh100ib-i128", + nodeCount=2, + gpu=v1alpha1.Gpu(acceleratorType="nvidia-h100"), + ), + ], + ), + resources={ + "cluster": _observed_cluster(ready=True), + "kubeconfig": _observed_kubeconfig_secret(), + }, + ), + required_resources={ + "coreweave-provider-config": fnv1.Resources(items=[_cluster_provider_config()]), + "coreweave-credentials": fnv1.Resources( + items=[_credentials_secret(credentials="eyJ0b2tlbiI6ICJDVy1TRUNSRVQtdGVzdCJ9")], + ), + }, + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_xr(ready=fnv1.READY_UNSPECIFIED), + resources={ + "vpc": _vpc(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_UNSPECIFIED), + "cluster": _cluster(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_TRUE), + "usage-vpc-by-cluster": _usage_vpc(), + "kubeconfig": _kubeconfig_secret(), + "provider-config-kubernetes": _provider_config(), + "node-pool-system": _system_node_pool(ready=fnv1.READY_UNSPECIFIED), + "node-pool-gpu-h100": _node_pool( + name="gpu-h100", + management_policies=None, + cel_query=( + "has(object.status) && has(object.status.conditions)" + " && object.status.conditions.exists(c, c.type == 'Validated' && c.status == 'True')" + ), + spec={ + "instanceType": "gd-8xh100ib-i128", + "targetNodes": 2, + "autoscaling": False, + "nodeLabels": { + "modelplane.ai/pool": "gpu-h100", + "modelplane.ai/gpu": "nvidia-h100", + "nvidia.com/gpu.deploy.device-plugin": "false", + }, + "nodeTaints": [{"key": "nvidia.com/gpu", "value": "true", "effect": "NoSchedule"}], + }, + ready=fnv1.READY_UNSPECIFIED, + ), + "usage-kubeconfig-by-provider-config": _usage_kubeconfig(), + "usage-cluster-by-provider-config": _usage_cluster(), + "storage-class-cks": _storage_class_observer(), + }, + ), + context=structpb.Struct(), + requirements=fnv1.Requirements( + resources={ + "coreweave-provider-config": fnv1.ResourceSelector( + api_version="coreweave.m.upbound.io/v1beta1", + kind="ClusterProviderConfig", + match_name="default", + ), + "coreweave-credentials": fnv1.ResourceSelector( + api_version="v1", + kind="Secret", + match_name="coreweave-creds", + namespace="crossplane-system", + ), + }, + ), + ), + ), + Case( + name="ReadySwitchesSystemPool", + reason=( + "Once a CoreWeaveCluster is Ready, its system pool's NodePool Object is Ready once CKS validates the pool, " + "like any other pool, so replacing the pool's one node doesn't make the XR un-Ready." + ), + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_xr( + credentials=None, + ready=True, + node_pools=[ + v1alpha1.NodePool( + name="gpu-h100", + role="GPU", + instanceType="gd-8xh100ib-i128", + nodeCount=2, + gpu=v1alpha1.Gpu(acceleratorType="nvidia-h100"), + ), + ], + ), + resources={ + "cluster": _observed_cluster(ready=True), + "kubeconfig": _observed_kubeconfig_secret(), + "node-pool-system": _observed_node_pool( + name="system", + cel_query="has(object.status) && has(object.status.currentNodes) && object.status.currentNodes >= 1", + spec={"instanceType": "turin-gp", "targetNodes": 1}, + ), + "node-pool-gpu-h100": _observed_node_pool( + name="gpu-h100", + cel_query=( + "has(object.status) && has(object.status.conditions)" + " && object.status.conditions.exists(c, c.type == 'Validated' && c.status == 'True')" + ), + spec={"instanceType": "gd-8xh100ib-i128", "targetNodes": 2}, + ), + }, + ), + required_resources={ + "coreweave-provider-config": fnv1.Resources(items=[_cluster_provider_config()]), + "coreweave-credentials": fnv1.Resources( + items=[_credentials_secret(credentials="eyJ0b2tlbiI6ICJDVy1TRUNSRVQtdGVzdCJ9")], + ), + }, + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_xr(ready=fnv1.READY_UNSPECIFIED), + resources={ + "vpc": _vpc(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_UNSPECIFIED), + "cluster": _cluster(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_TRUE), + "usage-vpc-by-cluster": _usage_vpc(), + "kubeconfig": _kubeconfig_secret(), + "provider-config-kubernetes": _provider_config(), + "node-pool-system": _node_pool( + name="system", + management_policies=None, + cel_query=( + "has(object.status) && has(object.status.conditions)" + " && object.status.conditions.exists(c, c.type == 'Validated' && c.status == 'True')" + ), + spec={ + "instanceType": "turin-gp", + "targetNodes": 1, + "autoscaling": False, + "nodeLabels": {"modelplane.ai/pool": "system"}, + }, + ready=fnv1.READY_TRUE, + ), + "node-pool-gpu-h100": _node_pool( + name="gpu-h100", + management_policies=None, + cel_query=( + "has(object.status) && has(object.status.conditions)" + " && object.status.conditions.exists(c, c.type == 'Validated' && c.status == 'True')" + ), + spec={ + "instanceType": "gd-8xh100ib-i128", + "targetNodes": 2, + "autoscaling": False, + "nodeLabels": { + "modelplane.ai/pool": "gpu-h100", + "modelplane.ai/gpu": "nvidia-h100", + "nvidia.com/gpu.deploy.device-plugin": "false", + }, + "nodeTaints": [{"key": "nvidia.com/gpu", "value": "true", "effect": "NoSchedule"}], + }, + ready=fnv1.READY_TRUE, + ), + "usage-kubeconfig-by-provider-config": _usage_kubeconfig(), + "usage-cluster-by-provider-config": _usage_cluster(), + "storage-class-cks": _storage_class_observer(), + }, + ), + context=structpb.Struct(), + requirements=fnv1.Requirements( + resources={ + "coreweave-provider-config": fnv1.ResourceSelector( + api_version="coreweave.m.upbound.io/v1beta1", + kind="ClusterProviderConfig", + match_name="default", + ), + "coreweave-credentials": fnv1.ResourceSelector( + api_version="v1", + kind="Secret", + match_name="coreweave-creds", + namespace="crossplane-system", + ), + }, + ), + ), + ), + Case( + name="SystemPoolLatched", + reason=( + "A system pool whose NodePool Object is already Ready once validated stays that way while the " + "CoreWeaveCluster is un-Ready, here because a new pool is waiting for CKS to validate it." + ), + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_xr( + credentials=None, + ready=False, + node_pools=[ + v1alpha1.NodePool( + name="gpu-h100", + role="GPU", + instanceType="gd-8xh100ib-i128", + nodeCount=2, + gpu=v1alpha1.Gpu(acceleratorType="nvidia-h100"), + ), + ], + ), + resources={ + "cluster": _observed_cluster(ready=True), + "kubeconfig": _observed_kubeconfig_secret(), + "node-pool-system": _observed_node_pool( + name="system", + cel_query=( + "has(object.status) && has(object.status.conditions)" + " && object.status.conditions.exists(c, c.type == 'Validated' && c.status == 'True')" + ), + spec={"instanceType": "turin-gp", "targetNodes": 1}, + ), + }, + ), + required_resources={ + "coreweave-provider-config": fnv1.Resources(items=[_cluster_provider_config()]), + "coreweave-credentials": fnv1.Resources( + items=[_credentials_secret(credentials="eyJ0b2tlbiI6ICJDVy1TRUNSRVQtdGVzdCJ9")], + ), + }, + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_xr(ready=fnv1.READY_UNSPECIFIED), + resources={ + "vpc": _vpc(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_UNSPECIFIED), + "cluster": _cluster(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_TRUE), + "usage-vpc-by-cluster": _usage_vpc(), + "kubeconfig": _kubeconfig_secret(), + "provider-config-kubernetes": _provider_config(), + "node-pool-system": _node_pool( + name="system", + management_policies=None, + cel_query=( + "has(object.status) && has(object.status.conditions)" + " && object.status.conditions.exists(c, c.type == 'Validated' && c.status == 'True')" + ), + spec={ + "instanceType": "turin-gp", + "targetNodes": 1, + "autoscaling": False, + "nodeLabels": {"modelplane.ai/pool": "system"}, + }, + ready=fnv1.READY_TRUE, + ), + "node-pool-gpu-h100": _node_pool( + name="gpu-h100", + management_policies=None, + cel_query=( + "has(object.status) && has(object.status.conditions)" + " && object.status.conditions.exists(c, c.type == 'Validated' && c.status == 'True')" + ), + spec={ + "instanceType": "gd-8xh100ib-i128", + "targetNodes": 2, + "autoscaling": False, + "nodeLabels": { + "modelplane.ai/pool": "gpu-h100", + "modelplane.ai/gpu": "nvidia-h100", + "nvidia.com/gpu.deploy.device-plugin": "false", + }, + "nodeTaints": [{"key": "nvidia.com/gpu", "value": "true", "effect": "NoSchedule"}], + }, + ready=fnv1.READY_UNSPECIFIED, + ), + "usage-kubeconfig-by-provider-config": _usage_kubeconfig(), + "usage-cluster-by-provider-config": _usage_cluster(), + "storage-class-cks": _storage_class_observer(), + }, + ), + context=structpb.Struct(), + requirements=fnv1.Requirements( + resources={ + "coreweave-provider-config": fnv1.ResourceSelector( + api_version="coreweave.m.upbound.io/v1beta1", + kind="ClusterProviderConfig", + match_name="default", + ), + "coreweave-credentials": fnv1.ResourceSelector( + api_version="v1", + kind="Secret", + match_name="coreweave-creds", + namespace="crossplane-system", + ), + }, + ), + ), + ), + Case( + name="CacheStorageClass", + reason=( + "Once CKS's shared-vast StorageClass is observed, a CoreWeaveCluster composes modelplane-rwx-fs, a copy " + "of it that deletes a volume when its claim is deleted." + ), + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_xr( + credentials=None, + ready=False, + node_pools=[ + v1alpha1.NodePool( + name="gpu-h100", + role="GPU", + instanceType="gd-8xh100ib-i128", + nodeCount=2, + gpu=v1alpha1.Gpu(acceleratorType="nvidia-h100"), + ), + ], + ), + resources={ + "cluster": _observed_cluster(ready=True), + "kubeconfig": _observed_kubeconfig_secret(), + "storage-class-cks": fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "kubernetes.m.crossplane.io/v1alpha1", + "kind": "Object", + "spec": { + "managementPolicies": ["Observe"], + "forProvider": { + "manifest": { + "apiVersion": "storage.k8s.io/v1", + "kind": "StorageClass", + "metadata": {"name": "shared-vast"}, + }, + }, + }, + # The class as CKS creates it, with its tenant + # and zone specific values replaced. + "status": { + "atProvider": { + "manifest": { + "apiVersion": "storage.k8s.io/v1", + "kind": "StorageClass", + "metadata": { + "name": "shared-vast", + "annotations": {"storageclass.kubernetes.io/is-default-class": "true"}, + }, + "provisioner": "csi.vastdata.com", + "parameters": { + "root_export": "/k8s", + "view_policy": "nosquash-tenant", + "vip_pool_fqdn": "all-tenants.storage-backend01.us-east-04.int.coreweave.cloud", + }, + "mountOptions": ["vers=3", "nconnect=32"], + "allowVolumeExpansion": True, + "reclaimPolicy": "Retain", + "volumeBindingMode": "Immediate", + }, + }, + }, + } + ), + ), + }, + ), + required_resources={ + "coreweave-provider-config": fnv1.Resources(items=[_cluster_provider_config()]), + "coreweave-credentials": fnv1.Resources( + items=[_credentials_secret(credentials="eyJ0b2tlbiI6ICJDVy1TRUNSRVQtdGVzdCJ9")], + ), + }, + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_xr(ready=fnv1.READY_UNSPECIFIED), + resources={ + "vpc": _vpc(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_UNSPECIFIED), + "cluster": _cluster(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_TRUE), + "usage-vpc-by-cluster": _usage_vpc(), + "kubeconfig": _kubeconfig_secret(), + "provider-config-kubernetes": _provider_config(), + "node-pool-system": _system_node_pool(ready=fnv1.READY_UNSPECIFIED), + "node-pool-gpu-h100": _node_pool( + name="gpu-h100", + management_policies=None, + cel_query=( + "has(object.status) && has(object.status.conditions)" + " && object.status.conditions.exists(c, c.type == 'Validated' && c.status == 'True')" + ), + spec={ + "instanceType": "gd-8xh100ib-i128", + "targetNodes": 2, + "autoscaling": False, + "nodeLabels": { + "modelplane.ai/pool": "gpu-h100", + "modelplane.ai/gpu": "nvidia-h100", + "nvidia.com/gpu.deploy.device-plugin": "false", + }, + "nodeTaints": [{"key": "nvidia.com/gpu", "value": "true", "effect": "NoSchedule"}], + }, + ready=fnv1.READY_UNSPECIFIED, + ), + "usage-kubeconfig-by-provider-config": _usage_kubeconfig(), + "usage-cluster-by-provider-config": _usage_cluster(), + "storage-class-cks": _storage_class_observer(), + "storage-class-rwx-fs": fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "kubernetes.m.crossplane.io/v1alpha1", + "kind": "Object", + "metadata": {"namespace": "modelplane-system"}, + "spec": { + "providerConfigRef": { + "kind": "ProviderConfig", + "name": "test-cluster-kubeconfig-55b57", + }, + "forProvider": { + "manifest": { + "apiVersion": "storage.k8s.io/v1", + "kind": "StorageClass", + "metadata": {"name": "modelplane-rwx-fs"}, + "provisioner": "csi.vastdata.com", + "parameters": { + "root_export": "/k8s", + "view_policy": "nosquash-tenant", + "vip_pool_fqdn": "all-tenants.storage-backend01.us-east-04.int.coreweave.cloud", + }, + "mountOptions": ["vers=3", "nconnect=32"], + "allowVolumeExpansion": True, + "volumeBindingMode": "Immediate", + "reclaimPolicy": "Delete", + }, + }, + }, + } + ), + ready=fnv1.READY_TRUE, + ), + }, + ), + context=structpb.Struct(), + requirements=fnv1.Requirements( + resources={ + "coreweave-provider-config": fnv1.ResourceSelector( + api_version="coreweave.m.upbound.io/v1beta1", + kind="ClusterProviderConfig", + match_name="default", + ), + "coreweave-credentials": fnv1.ResourceSelector( + api_version="v1", + kind="Secret", + match_name="coreweave-creds", + namespace="crossplane-system", + ), + }, + ), + ), + ), + Case( + name="CPUPool", + reason=( + "A CPU-role pool composes a NodePool with the modelplane.ai/pool and modelplane.ai/cpu labels and the " + "CPU taint, and no GPU or device-plugin labels." + ), + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_xr( + credentials=None, + ready=False, + node_pools=[ + v1alpha1.NodePool( + name="cpu-pool", + role="CPU", + instanceType="turin-gp", + nodeCount=1, + ), + ], + ), + resources={ + "cluster": _observed_cluster(ready=True), + "kubeconfig": _observed_kubeconfig_secret(), + }, + ), + required_resources={ + "coreweave-provider-config": fnv1.Resources(items=[_cluster_provider_config()]), + "coreweave-credentials": fnv1.Resources( + items=[_credentials_secret(credentials="eyJ0b2tlbiI6ICJDVy1TRUNSRVQtdGVzdCJ9")], + ), + }, + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_xr(ready=fnv1.READY_UNSPECIFIED), + resources={ + "vpc": _vpc(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_UNSPECIFIED), + "cluster": _cluster(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_TRUE), + "usage-vpc-by-cluster": _usage_vpc(), + "kubeconfig": _kubeconfig_secret(), + "provider-config-kubernetes": _provider_config(), + "node-pool-system": _system_node_pool(ready=fnv1.READY_UNSPECIFIED), + "node-pool-cpu-pool": _node_pool( + name="cpu-pool", + management_policies=None, + cel_query=( + "has(object.status) && has(object.status.conditions)" + " && object.status.conditions.exists(c, c.type == 'Validated' && c.status == 'True')" + ), + spec={ + "instanceType": "turin-gp", + "targetNodes": 1, + "autoscaling": False, + "nodeLabels": {"modelplane.ai/pool": "cpu-pool", "modelplane.ai/cpu": "true"}, + "nodeTaints": [{"key": "modelplane.ai/cpu", "value": "true", "effect": "NoSchedule"}], + }, + ready=fnv1.READY_UNSPECIFIED, + ), + "usage-kubeconfig-by-provider-config": _usage_kubeconfig(), + "usage-cluster-by-provider-config": _usage_cluster(), + "storage-class-cks": _storage_class_observer(), + }, + ), + context=structpb.Struct(), + requirements=fnv1.Requirements( + resources={ + "coreweave-provider-config": fnv1.ResourceSelector( + api_version="coreweave.m.upbound.io/v1beta1", + kind="ClusterProviderConfig", + match_name="default", + ), + "coreweave-credentials": fnv1.ResourceSelector( + api_version="v1", + kind="Secret", + match_name="coreweave-creds", + namespace="crossplane-system", + ), + }, + ), + ), + ), + # The autoscaler has moved the observed NodePool's targetNodes to 3. The + # function still composes its seed of one node, which the first Object's + # management policies never apply to an existing NodePool. + Case( + name="AutoscaledPoolReady", + reason=( + "An autoscaled pool that asks for no nodes is seeded with one and keeps one, its NodePool Object can't update the " + "targetNodes CKS's autoscaler owns, a second Object without targetNodes keeps the rest of the pool " + "current, and both are marked ready with the rest of the cluster." + ), + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_xr( + credentials=None, + ready=False, + node_pools=[ + v1alpha1.NodePool( + name="gpu-h100", + role="GPU", + instanceType="gd-8xh100ib-i128", + nodeCount=0, + maxNodeCount=4, + gpu=v1alpha1.Gpu(acceleratorType="nvidia-h100"), + ), + ], + ), + resources={ + "vpc": fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "networking.coreweave.m.upbound.io/v1beta1", + "kind": "VPC", + "status": { + "conditions": [ + { + "type": "Ready", + "status": "True", + "reason": "Available", + "lastTransitionTime": "2024-01-01T00:00:00Z", + }, + ], + }, + } + ), + ), + "cluster": _observed_cluster(ready=True), + "kubeconfig": _observed_kubeconfig_secret(), + "node-pool-system": _observed_node_pool( + name="system", + cel_query="has(object.status) && has(object.status.currentNodes) && object.status.currentNodes >= 1", + spec={"instanceType": "turin-gp", "targetNodes": 1}, + ), + "node-pool-gpu-h100": fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "kubernetes.m.crossplane.io/v1alpha1", + "kind": "Object", + "spec": { + "forProvider": { + "manifest": { + "apiVersion": "compute.coreweave.com/v1alpha1", + "kind": "NodePool", + "metadata": {"name": "gpu-h100"}, + "spec": { + "instanceType": "gd-8xh100ib-i128", + "autoscaling": True, + "minNodes": 1, + "maxNodes": 4, + "targetNodes": 1, + }, + }, + }, + }, + "status": { + "atProvider": { + "manifest": { + "apiVersion": "compute.coreweave.com/v1alpha1", + "kind": "NodePool", + "metadata": {"name": "gpu-h100"}, + "spec": { + "instanceType": "gd-8xh100ib-i128", + "autoscaling": True, + "minNodes": 1, + "maxNodes": 4, + "targetNodes": 3, + }, + }, + }, + "conditions": [ + { + "type": "Ready", + "status": "True", + "reason": "Available", + "lastTransitionTime": "2024-01-01T00:00:00Z", + }, + ], + }, + } + ), + ), + }, + ), + required_resources={ + "coreweave-provider-config": fnv1.Resources(items=[_cluster_provider_config()]), + "coreweave-credentials": fnv1.Resources( + items=[_credentials_secret(credentials="eyJ0b2tlbiI6ICJDVy1TRUNSRVQtdGVzdCJ9")], + ), + }, + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_xr(ready=fnv1.READY_UNSPECIFIED), + resources={ + "vpc": _vpc(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_TRUE), + "cluster": _cluster(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_TRUE), + "usage-vpc-by-cluster": _usage_vpc(), + "kubeconfig": _kubeconfig_secret(), + "provider-config-kubernetes": _provider_config(), + "node-pool-system": _system_node_pool(ready=fnv1.READY_TRUE), + "node-pool-gpu-h100": _node_pool( + name="gpu-h100", + management_policies=["Observe", "Create", "Delete"], + cel_query=( + "has(object.status) && has(object.status.conditions)" + " && object.status.conditions.exists(c, c.type == 'Validated' && c.status == 'True')" + ), + spec={ + "instanceType": "gd-8xh100ib-i128", + "targetNodes": 1, + "autoscaling": True, + "minNodes": 1, + "maxNodes": 4, + "nodeLabels": { + "modelplane.ai/pool": "gpu-h100", + "modelplane.ai/gpu": "nvidia-h100", + "nvidia.com/gpu.deploy.device-plugin": "false", + }, + "nodeTaints": [{"key": "nvidia.com/gpu", "value": "true", "effect": "NoSchedule"}], + }, + ready=fnv1.READY_TRUE, + ), + "node-pool-gpu-h100.settings": _node_pool_settings( + name="gpu-h100", + spec={ + "instanceType": "gd-8xh100ib-i128", + "autoscaling": True, + "minNodes": 1, + "maxNodes": 4, + "nodeLabels": { + "modelplane.ai/pool": "gpu-h100", + "modelplane.ai/gpu": "nvidia-h100", + "nvidia.com/gpu.deploy.device-plugin": "false", + }, + "nodeTaints": [{"key": "nvidia.com/gpu", "value": "true", "effect": "NoSchedule"}], + }, + ), + "usage-kubeconfig-by-provider-config": _usage_kubeconfig(), + "usage-cluster-by-provider-config": _usage_cluster(), + "storage-class-cks": _storage_class_observer(), + }, + ), + context=structpb.Struct(), + requirements=fnv1.Requirements( + resources={ + "coreweave-provider-config": fnv1.ResourceSelector( + api_version="coreweave.m.upbound.io/v1beta1", + kind="ClusterProviderConfig", + match_name="default", + ), + "coreweave-credentials": fnv1.ResourceSelector( + api_version="v1", + kind="Secret", + match_name="coreweave-creds", + namespace="crossplane-system", + ), + }, + ), + ), + ), + Case( + name="ClusterReadyRegressed", + reason=( + "With the cluster's Ready condition regressed to False but its ProviderConfig observed, a " + "CoreWeaveCluster keeps the NodePools composed, seeding the new autoscaled pool from nodeCount with the " + "minNodeCount it asks for." + ), + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_xr( + credentials=None, + ready=False, + node_pools=[ + v1alpha1.NodePool( + name="gpu-h100", + role="GPU", + instanceType="gd-8xh100ib-i128", + nodeCount=2, + minNodeCount=1, + maxNodeCount=4, + gpu=v1alpha1.Gpu(acceleratorType="nvidia-h100"), + ), + ], + ), + resources={ + "cluster": _observed_cluster(ready=False), + "kubeconfig": _observed_kubeconfig_secret(), + "provider-config-kubernetes": fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "kubernetes.m.crossplane.io/v1alpha1", + "kind": "ProviderConfig", + "metadata": { + "name": "test-cluster-kubeconfig-55b57", + "namespace": "modelplane-system", + }, + } + ), + ), + }, + ), + required_resources={ + "coreweave-provider-config": fnv1.Resources(items=[_cluster_provider_config()]), + "coreweave-credentials": fnv1.Resources( + items=[_credentials_secret(credentials="eyJ0b2tlbiI6ICJDVy1TRUNSRVQtdGVzdCJ9")], + ), + }, + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_xr(ready=fnv1.READY_UNSPECIFIED), + resources={ + "vpc": _vpc(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_UNSPECIFIED), + "cluster": _cluster( + cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_UNSPECIFIED + ), + "usage-vpc-by-cluster": _usage_vpc(), + "kubeconfig": _kubeconfig_secret(), + "provider-config-kubernetes": _provider_config(), + "node-pool-system": _system_node_pool(ready=fnv1.READY_UNSPECIFIED), + "node-pool-gpu-h100": _node_pool( + name="gpu-h100", + management_policies=["Observe", "Create", "Delete"], + cel_query=( + "has(object.status) && has(object.status.conditions)" + " && object.status.conditions.exists(c, c.type == 'Validated' && c.status == 'True')" + ), + spec={ + "instanceType": "gd-8xh100ib-i128", + "targetNodes": 2, + "autoscaling": True, + "minNodes": 1, + "maxNodes": 4, + "nodeLabels": { + "modelplane.ai/pool": "gpu-h100", + "modelplane.ai/gpu": "nvidia-h100", + "nvidia.com/gpu.deploy.device-plugin": "false", + }, + "nodeTaints": [{"key": "nvidia.com/gpu", "value": "true", "effect": "NoSchedule"}], + }, + ready=fnv1.READY_UNSPECIFIED, + ), + "node-pool-gpu-h100.settings": _node_pool_settings( + name="gpu-h100", + spec={ + "instanceType": "gd-8xh100ib-i128", + "autoscaling": True, + "minNodes": 1, + "maxNodes": 4, + "nodeLabels": { + "modelplane.ai/pool": "gpu-h100", + "modelplane.ai/gpu": "nvidia-h100", + "nvidia.com/gpu.deploy.device-plugin": "false", + }, + "nodeTaints": [{"key": "nvidia.com/gpu", "value": "true", "effect": "NoSchedule"}], + }, + ), + "usage-kubeconfig-by-provider-config": _usage_kubeconfig(), + "usage-cluster-by-provider-config": _usage_cluster(), + "storage-class-cks": _storage_class_observer(), + }, + ), + context=structpb.Struct(), + requirements=fnv1.Requirements( + resources={ + "coreweave-provider-config": fnv1.ResourceSelector( + api_version="coreweave.m.upbound.io/v1beta1", + kind="ClusterProviderConfig", + match_name="default", + ), + "coreweave-credentials": fnv1.ResourceSelector( + api_version="v1", + kind="Secret", + match_name="coreweave-creds", + namespace="crossplane-system", + ), + }, + ), + ), + ), + Case( + name="CredentialsMissing", + reason=( + "With the ClusterProviderConfig gone, a CoreWeaveCluster keeps the observed kubeconfig Secret's data " + "rather than deleting the Secret." + ), + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_xr( + credentials=None, + ready=False, + node_pools=[ + v1alpha1.NodePool( + name="gpu-h100", + role="GPU", + instanceType="gd-8xh100ib-i128", + gpu=v1alpha1.Gpu(acceleratorType="nvidia-h100"), + ), + ], + ), + resources={ + "cluster": _observed_cluster(ready=False), + "kubeconfig": _observed_kubeconfig_secret(), + }, + ), + required_resources={ + "coreweave-provider-config": fnv1.Resources(), + }, + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_xr(ready=fnv1.READY_FALSE), + resources={ + "vpc": _vpc(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_UNSPECIFIED), + "cluster": _cluster( + cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_UNSPECIFIED + ), + "usage-vpc-by-cluster": _usage_vpc(), + "kubeconfig": fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "test-cluster-kubeconfig-55b57", + "namespace": "modelplane-system", + }, + "type": "Opaque", + "data": {"kubeconfig": "eyJraW5kIjogIkNvbmZpZyJ9"}, + } + ), + ready=fnv1.READY_TRUE, + ), + }, + ), + results=[ + fnv1.Result( + severity=fnv1.SEVERITY_NORMAL, + message="Waiting for CoreWeave ClusterProviderConfig default", + ), + ], + context=structpb.Struct(), + requirements=fnv1.Requirements( + resources={ + "coreweave-provider-config": fnv1.ResourceSelector( + api_version="coreweave.m.upbound.io/v1beta1", + kind="ClusterProviderConfig", + match_name="default", + ), + }, + ), + ), + ), + Case( + name="CredentialsNotJSON", + reason="A credentials Secret that isn't the JSON provider-coreweave reads warns, and no kubeconfig is composed.", + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_xr( + credentials=None, + ready=False, + node_pools=[ + v1alpha1.NodePool( + name="gpu-h100", + role="GPU", + instanceType="gd-8xh100ib-i128", + gpu=v1alpha1.Gpu(acceleratorType="nvidia-h100"), + ), + ], + ), + resources={ + "cluster": _observed_cluster(ready=True), + }, + ), + required_resources={ + "coreweave-provider-config": fnv1.Resources(items=[_cluster_provider_config()]), + "coreweave-credentials": fnv1.Resources(items=[_credentials_secret(credentials="bm90IGpzb24=")]), + }, + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_xr(ready=fnv1.READY_FALSE), + resources={ + "vpc": _vpc(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_UNSPECIFIED), + "cluster": _cluster(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_TRUE), + "usage-vpc-by-cluster": _usage_vpc(), + }, + ), + results=[ + fnv1.Result( + severity=fnv1.SEVERITY_WARNING, + message=( + "CoreWeave credentials Secret crossplane-system/coreweave-creds key credentials " + "isn't a JSON object with a token field" + ), + ), + ], + context=structpb.Struct(), + requirements=fnv1.Requirements( + resources={ + "coreweave-provider-config": fnv1.ResourceSelector( + api_version="coreweave.m.upbound.io/v1beta1", + kind="ClusterProviderConfig", + match_name="default", + ), + "coreweave-credentials": fnv1.ResourceSelector( + api_version="v1", + kind="Secret", + match_name="coreweave-creds", + namespace="crossplane-system", + ), + }, + ), + ), + ), + Case( + name="CredentialsNotFromSecret", + reason="A ClusterProviderConfig that doesn't read its credentials from a Secret warns, and no kubeconfig is composed.", + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_xr( + credentials=None, + ready=False, + node_pools=[ + v1alpha1.NodePool( + name="gpu-h100", + role="GPU", + instanceType="gd-8xh100ib-i128", + gpu=v1alpha1.Gpu(acceleratorType="nvidia-h100"), + ), + ], + ), + resources={ + "cluster": _observed_cluster(ready=True), + }, + ), + required_resources={ + "coreweave-provider-config": fnv1.Resources( + items=[ + fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "coreweave.m.upbound.io/v1beta1", + "kind": "ClusterProviderConfig", + "metadata": {"name": "default"}, + "spec": { + "credentials": { + "source": "Environment", + "env": {"name": "COREWEAVE_TOKEN"}, + }, + }, + } + ), + ), + ], + ), + }, + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_xr(ready=fnv1.READY_FALSE), + resources={ + "vpc": _vpc(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_UNSPECIFIED), + "cluster": _cluster(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_TRUE), + "usage-vpc-by-cluster": _usage_vpc(), + }, + ), + results=[ + fnv1.Result( + severity=fnv1.SEVERITY_WARNING, + message=( + "CoreWeave ClusterProviderConfig default doesn't source credentials from a Secret; " + "can't render a kubeconfig without its API access token" + ), + ), + ], + context=structpb.Struct(), + requirements=fnv1.Requirements( + resources={ + "coreweave-provider-config": fnv1.ResourceSelector( + api_version="coreweave.m.upbound.io/v1beta1", + kind="ClusterProviderConfig", + match_name="default", + ), + }, + ), + ), + ), +] + + +@pytest.mark.parametrize("case", COMPOSE_CASES, ids=lambda case: case.name) +def test_compose(case: Case) -> None: + """RunFunction composes CKS cluster infrastructure.""" + got = asyncio.run(fn.FunctionRunner().RunFunction(case.req, None)) + assert _to_dict(got) == _to_dict(case.want), case.reason diff --git a/functions/compose-inference-cluster/function/fn.py b/functions/compose-inference-cluster/function/fn.py index a7ccf0033..a0a61a638 100644 --- a/functions/compose-inference-cluster/function/fn.py +++ b/functions/compose-inference-cluster/function/fn.py @@ -45,6 +45,7 @@ from models.ai.modelplane.inferencegateway import v1alpha1 as igv1alpha1 from models.ai.modelplane.infrastructure.akscluster import v1alpha1 as aksv1alpha1 from models.ai.modelplane.infrastructure.civocluster import v1alpha1 as civov1alpha1 +from models.ai.modelplane.infrastructure.coreweavecluster import v1alpha1 as coreweavev1alpha1 from models.ai.modelplane.infrastructure.ekscluster import v1alpha1 as eksv1alpha1 from models.ai.modelplane.infrastructure.gkecluster import v1alpha1 as gkev1alpha1 from models.ai.modelplane.infrastructure.nebiuscluster import v1alpha1 as nebiusv1alpha1 @@ -65,13 +66,14 @@ # Cluster source discriminator values from the XRD enum. The Literal # mirrors ServingStack spec.cloud, so passing a wrong or unsupported # cloud fails type checking; Final makes each constant a literal type. -Cloud = Literal["GKE", "EKS", "AKS", "Nebius", "Vultr", "Civo", "Existing"] +Cloud = Literal["GKE", "EKS", "AKS", "Nebius", "Vultr", "Civo", "CoreWeave", "Existing"] CLUSTER_SOURCE_GKE: Final = "GKE" CLUSTER_SOURCE_EKS: Final = "EKS" CLUSTER_SOURCE_AKS: Final = "AKS" CLUSTER_SOURCE_NEBIUS: Final = "Nebius" CLUSTER_SOURCE_VULTR: Final = "Vultr" CLUSTER_SOURCE_CIVO: Final = "Civo" +CLUSTER_SOURCE_COREWEAVE: Final = "CoreWeave" CLUSTER_SOURCE_EXISTING: Final = "Existing" # Condition types and reasons for the InferenceCluster XR. @@ -104,6 +106,7 @@ CLUSTER_SOURCE_NEBIUS: frozenset({"gpu.nvidia.com", "dra.cpu"}), CLUSTER_SOURCE_VULTR: frozenset({"gpu.nvidia.com", "dra.cpu"}), CLUSTER_SOURCE_CIVO: frozenset({"gpu.nvidia.com", "dra.cpu"}), + CLUSTER_SOURCE_COREWEAVE: frozenset({"gpu.nvidia.com", "dra.cpu"}), } # InferenceClass device claim values. An unset claim means DRA. @@ -243,6 +246,10 @@ "networks.vpc.civo.m.upbound.io", "firewalls.vpc.civo.m.upbound.io", ) +_ACTIVATE_COREWEAVE = ( + "clusters.cks.coreweave.m.upbound.io", + "vpcs.networking.coreweave.m.upbound.io", +) def _name(meta: metav1.ObjectMeta | None) -> str: @@ -363,6 +370,8 @@ def compose(self) -> None: self.compose_vultr(cluster.vultr) elif source == CLUSTER_SOURCE_CIVO: self.compose_civo(cluster.civo) + elif source == CLUSTER_SOURCE_COREWEAVE: + self.compose_coreweave(cluster.coreweave) elif source == CLUSTER_SOURCE_EXISTING: self.compose_existing(cluster.existing) else: @@ -1094,6 +1103,47 @@ def compose_civo(self, civo: v1alpha1.Civo | None) -> None: self.write_status(self.schedulable_pools()) self.derive_conditions(cluster_ready=civo_ready) + def compose_coreweave(self, coreweave: v1alpha1.Coreweave | None) -> None: + """Compose an InferenceCluster backed by a Modelplane-provisioned + CKS cluster. Its kubeconfig authenticates with a CoreWeave API access + token, which means the ClusterProviderConfig doesn't need an + identity. + """ + if not coreweave: + response.warning(self.rsp, "CoreWeave configuration is required when source is CoreWeave") + return + + self.compose_activation(_ACTIVATE_COREWEAVE) + if self._activation_ready(_ACTIVATE_COREWEAVE) or "coreweave-cluster" in self.req.observed.resources: + self.rsp.desired.resources["activation"].ready = fnv1.READY_TRUE + if not self.compose_coreweave_cluster(coreweave): + return + + coreweave_ready = ( + resource.get_condition(self.req.observed.resources.get("coreweave-cluster"), "Ready").status == "True" + ) + kubeconfig = self.observed_coreweave_secret(_SECRET_TYPE_KUBECONFIG) + backend_exists = BACKEND_RESOURCE_KEY in self.req.observed.resources + + if coreweave_ready and kubeconfig: + self.compose_cluster_provider_config(kubeconfig.name, kubeconfig.key) + + backend_secrets = self.resolve_coreweave_backend_secrets( + coreweave_ready=coreweave_ready, backend_exists=backend_exists + ) + if backend_secrets or backend_exists: + if backend_secrets: + self.compose_serving_stack(backend_secrets, CLUSTER_SOURCE_COREWEAVE) + self.compose_coreweave_usage() + + if coreweave_ready: + self.rsp.desired.resources["coreweave-cluster"].ready = fnv1.READY_TRUE + if not backend_exists: + response.normal(self.rsp, "CoreWeave cluster ready, composing backend") + + self.write_status(self.schedulable_pools()) + self.derive_conditions(cluster_ready=coreweave_ready) + def compose_existing(self, existing: v1alpha1.Existing | None) -> None: """Compose an InferenceCluster backed by a user-supplied cluster. No gating needed — the kubeconfig secret is provided by the user.""" @@ -1963,6 +2013,129 @@ def observed_civo_secret(self, secret_type: str) -> civov1alpha1.Secret | None: return None return next((s for s in civo_secrets if s.type == secret_type), None) + def compose_coreweave_cluster(self, coreweave: v1alpha1.Coreweave) -> bool: + """Compose a CoreWeaveCluster XR from the zone and the node pools' + classes. compose-coreweave-cluster adds the system pool. Returns + False, having failed the reconcile, if a node pool is invalid. + """ + coreweave_node_pools: list[coreweavev1alpha1.NodePool] = [] + + for pool in self.xr.spec.nodePools or []: + cls = self.classes[pool.className] + if not cls.spec.provisioning or not cls.spec.provisioning.coreweave: + msg = f"InferenceClass {pool.className} has no CoreWeave provisioning block" + self.fail(CONDITION_REASON_INVALID_NODE_POOL, msg) + return False + prov = cls.spec.provisioning.coreweave + # A class with no accelerator describes a CPU pool (see the GKE + # builder above). Fabric isn't mapped, because CKS instance types + # with InfiniBand include it. + node_pool = coreweavev1alpha1.NodePool( + name=pool.name, + role="GPU" if prov.accelerator else "CPU", + instanceType=prov.instanceType, + nodeCount=pool.nodeCount, + ) + if prov.accelerator: + node_pool.gpu = coreweavev1alpha1.Gpu( + acceleratorType=prov.accelerator.type, + ) + # Set only when given. resource.update serializes with + # exclude_unset, and assigning None would emit maxNodeCount: null. + if pool.maxNodeCount is not None: + node_pool.maxNodeCount = pool.maxNodeCount + if pool.minNodeCount is not None: + node_pool.minNodeCount = pool.minNodeCount + coreweave_node_pools.append(node_pool) + + coreweave_spec = coreweavev1alpha1.Spec( + zone=coreweave.zone, + nodePools=coreweave_node_pools, + ) + # Left unset unless specified, so the CoreWeaveCluster's default + # version applies. + if coreweave.kubernetesVersion is not None: + coreweave_spec.kubernetesVersion = coreweave.kubernetesVersion + if coreweave.credentials: + coreweave_spec.credentials = coreweavev1alpha1.Credentials( + type=coreweave.credentials.type, + name=coreweave.credentials.name, + ) + resource.update( + self.rsp.desired.resources["coreweave-cluster"], + coreweavev1alpha1.CoreWeaveCluster( + metadata=metav1.ObjectMeta( + name=_name(self.xr.metadata), + namespace=_NAMESPACE_SYSTEM, + ), + spec=coreweave_spec, + ), + ) + return True + + def compose_coreweave_usage(self) -> None: + """Block CoreWeaveCluster deletion until the backend is deleted.""" + resource.update( + self.rsp.desired.resources["usage-coreweave-by-backend"], + usagev1beta1.Usage( + metadata=metav1.ObjectMeta(namespace=_NAMESPACE_SYSTEM), + spec=usagev1beta1.Spec( + of=usagev1beta1.Of( + apiVersion="infrastructure.modelplane.ai/v1alpha1", + kind="CoreWeaveCluster", + resourceSelector=usagev1beta1.ResourceSelectorModel(matchControllerRef=True), + ), + by=usagev1beta1.By( + apiVersion="infrastructure.modelplane.ai/v1alpha1", + kind="ServingStack", + resourceSelector=usagev1beta1.ResourceSelector(matchControllerRef=True), + ), + replayDeletion=True, + ), + ), + ) + self.rsp.desired.resources["usage-coreweave-by-backend"].ready = fnv1.READY_TRUE + + def resolve_coreweave_backend_secrets( + self, *, coreweave_ready: bool, backend_exists: bool + ) -> list[ssv1alpha1.Secret] | None: + """Resolve secrets for the backend from CoreWeaveCluster status. + Falls back to the observed backend's spec.secrets if CoreWeaveCluster + secrets aren't available but the backend already exists.""" + coreweave_secrets = self.observed_coreweave_secrets() + + if coreweave_ready and coreweave_secrets: + return [ssv1alpha1.Secret(type=s.type, name=s.name, key=s.key) for s in coreweave_secrets] + + if backend_exists: + observed = self.req.observed.resources.get(BACKEND_RESOURCE_KEY) + if observed: + d = resource.struct_to_dict(observed.resource) + observed_secrets = d.get("spec", {}).get("secrets", []) + if observed_secrets: + return [ssv1alpha1.Secret(type=s["type"], name=s["name"], key=s["key"]) for s in observed_secrets] + + return None + + def observed_coreweave_secrets(self) -> list[coreweavev1alpha1.Secret] | None: + """Read the CoreWeaveCluster's status.secrets from observed state.""" + coreweave_observed = self.req.observed.resources.get("coreweave-cluster") + if not coreweave_observed: + return None + observed_coreweave = coreweavev1alpha1.CoreWeaveCluster.model_validate( + resource.struct_to_dict(coreweave_observed.resource) + ) + if not observed_coreweave.status: + return None + return observed_coreweave.status.secrets + + def observed_coreweave_secret(self, secret_type: str) -> coreweavev1alpha1.Secret | None: + """Read a specific secret from the observed CoreWeaveCluster status.""" + coreweave_secrets = self.observed_coreweave_secrets() + if not coreweave_secrets: + return None + return next((s for s in coreweave_secrets if s.type == secret_type), None) + def compose_eks_usage(self) -> None: """Block EKSCluster deletion until the backend is deleted.""" resource.update( @@ -2210,7 +2383,7 @@ def observed_cache_storage_class(self) -> str | None: For provisioned clusters it comes from the backing cluster's status.cache.storageClassName, which reports the Modelplane-managed - class. Vultr and Civo are absent: their cluster XRs compose no + class. Vultr and Civo are absent: their cluster XRs report no cache StorageClass (neither cloud has usable RWX storage). For Existing clusters there is no cluster XR, so it's the user-supplied name. None until the cluster XR reports it.""" @@ -2219,6 +2392,7 @@ def observed_cache_storage_class(self) -> str | None: CLUSTER_SOURCE_EKS: ("eks-cluster", eksv1alpha1.EKSCluster), CLUSTER_SOURCE_AKS: ("aks-cluster", aksv1alpha1.AKSCluster), CLUSTER_SOURCE_NEBIUS: ("nebius-cluster", nebiusv1alpha1.NebiusCluster), + CLUSTER_SOURCE_COREWEAVE: ("coreweave-cluster", coreweavev1alpha1.CoreWeaveCluster), } cluster = self.xr.spec.cluster if cluster.source in provisioned: @@ -2234,7 +2408,8 @@ def _observed_cluster_cache_class( model: type[gkev1alpha1.GKECluster] | type[eksv1alpha1.EKSCluster] | type[aksv1alpha1.AKSCluster] - | type[nebiusv1alpha1.NebiusCluster], + | type[nebiusv1alpha1.NebiusCluster] + | type[coreweavev1alpha1.CoreWeaveCluster], ) -> str | None: """Read status.cache.storageClassName from an observed cluster XR.""" observed = self.req.observed.resources.get(key) diff --git a/functions/compose-inference-cluster/tests/test_fn.py b/functions/compose-inference-cluster/tests/test_fn.py index 47e4eba02..ad38e65fe 100644 --- a/functions/compose-inference-cluster/tests/test_fn.py +++ b/functions/compose-inference-cluster/tests/test_fn.py @@ -357,6 +357,24 @@ def _civo_cluster(*, node_pools: list[dict], credentials: dict | None, ready: fn ) +def _coreweave_cluster(*, node_pools: list[dict], credentials: dict | None, ready: fnv1.Ready) -> fnv1.Resource: + """The composed CoreWeaveCluster in US-EAST-04A with node_pools, using credentials unless they're None.""" + spec: dict = {"zone": "US-EAST-04A", "nodePools": node_pools} + if credentials is not None: + spec["credentials"] = credentials + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "infrastructure.modelplane.ai/v1alpha1", + "kind": "CoreWeaveCluster", + "metadata": {"name": "test-cluster", "namespace": "modelplane-system"}, + "spec": spec, + } + ), + ready=ready, + ) + + def _cluster_provider_config(*, kubeconfig: str, identity: dict | None) -> fnv1.Resource: """The ClusterProviderConfig reaching test-cluster with the kubeconfig Secret, as identity unless it's None.""" spec: dict = { @@ -5966,6 +5984,575 @@ def _to_dict(msg: message.Message) -> dict: ], ), ), + ComposeCase( + name="CoreWeaveFirstPass", + reason="With no CoreWeaveCluster observed yet, a CoreWeave cluster composes only the activation policy and the CoreWeaveCluster.", + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_inference_cluster( + cluster=v1alpha1.Cluster(source="CoreWeave", coreweave=v1alpha1.Coreweave(zone="US-EAST-04A")), + node_pools=[ + v1alpha1.NodePool(name="h100-pool", className="gpu-h100-coreweave", nodeCount=1), + ], + ), + resources={ + "activation": _observed_activation_policy( + activated=["clusters.cks.coreweave.m.upbound.io", "vpcs.networking.coreweave.m.upbound.io"] + ), + }, + ), + required_resources={ + "class-gpu-h100-coreweave": fnv1.Resources( + items=[ + _inference_class( + name="gpu-h100-coreweave", + count=8, + memory="81559Mi", + provisioning={ + "provider": "CoreWeave", + "coreweave": { + "instanceType": "gd-8xh100ib-i128", + "accelerator": {"type": "nvidia-h100", "count": 8}, + }, + }, + ), + ], + ), + }, + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_inference_cluster( + schedulable_pools=[ + { + "name": "h100-pool", + "nodes": 1, + "devices": [ + { + "name": "gpu", + "claim": "DRA", + "driver": "gpu.nvidia.com", + "deviceClassName": "gpu.nvidia.com", + "count": 8, + "capacity": {"memory": {"value": "81559Mi"}}, + }, + ], + }, + ], + cache=None, + gateway=None, + ), + resources={ + "usage-inferenceclass-gpu-h100-coreweave": _input_usage( + kind="InferenceClass", name="gpu-h100-coreweave" + ), + "activation": _activation_policy( + activate=["clusters.cks.coreweave.m.upbound.io", "vpcs.networking.coreweave.m.upbound.io"], + ready=fnv1.READY_TRUE, + ), + "coreweave-cluster": _coreweave_cluster( + node_pools=[ + { + "name": "h100-pool", + "role": "GPU", + "instanceType": "gd-8xh100ib-i128", + "nodeCount": 1, + "gpu": {"acceleratorType": "nvidia-h100"}, + }, + ], + credentials=None, + ready=fnv1.READY_UNSPECIFIED, + ), + }, + ), + context=structpb.Struct(), + requirements=fnv1.Requirements( + resources={ + "model-replicas": fnv1.ResourceSelector( + api_version="modelplane.ai/v1alpha1", + kind="ModelReplica", + match_labels=fnv1.MatchLabels(labels={"modelplane.ai/cluster": "test-cluster"}), + ), + "model-routes": fnv1.ResourceSelector( + api_version="modelplane.ai/v1alpha1", + kind="ModelRoute", + match_labels=fnv1.MatchLabels(labels={"modelplane.ai/cluster": "test-cluster"}), + ), + "model-caches": fnv1.ResourceSelector(api_version="modelplane.ai/v1alpha1", kind="ModelCache"), + "gateways": fnv1.ResourceSelector(api_version="modelplane.ai/v1alpha1", kind="InferenceGateway"), + "class-gpu-h100-coreweave": fnv1.ResourceSelector( + api_version="modelplane.ai/v1alpha1", kind="InferenceClass", match_name="gpu-h100-coreweave" + ), + }, + ), + conditions=[ + fnv1.Condition(type="ClusterReady", status=fnv1.STATUS_CONDITION_FALSE, reason="Provisioning"), + fnv1.Condition(type="BackendReady", status=fnv1.STATUS_CONDITION_FALSE, reason="WaitingForCluster"), + ], + ), + ), + ComposeCase( + name="CoreWeaveCredentials", + reason=( + "A CoreWeave cluster's credentials, Kubernetes version and autoscaling bounds pass through to the " + "CoreWeaveCluster's spec." + ), + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_inference_cluster( + cluster=v1alpha1.Cluster( + source="CoreWeave", + coreweave=v1alpha1.Coreweave( + zone="US-EAST-04A", + kubernetesVersion="1.36", + credentials=v1alpha1.Credentials(type="ProviderConfig", name="my-coreweave-org"), + ), + ), + node_pools=[ + v1alpha1.NodePool( + name="h100-pool", + className="gpu-h100-coreweave", + nodeCount=1, + minNodeCount=0, + maxNodeCount=4, + ), + ], + ), + resources={ + "activation": _observed_activation_policy( + activated=["clusters.cks.coreweave.m.upbound.io", "vpcs.networking.coreweave.m.upbound.io"] + ), + }, + ), + required_resources={ + "class-gpu-h100-coreweave": fnv1.Resources( + items=[ + _inference_class( + name="gpu-h100-coreweave", + count=8, + memory="81559Mi", + provisioning={ + "provider": "CoreWeave", + "coreweave": { + "instanceType": "gd-8xh100ib-i128", + "accelerator": {"type": "nvidia-h100", "count": 8}, + }, + }, + ), + ], + ), + }, + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_inference_cluster( + schedulable_pools=[ + { + "name": "h100-pool", + "nodes": 4, + "devices": [ + { + "name": "gpu", + "claim": "DRA", + "driver": "gpu.nvidia.com", + "deviceClassName": "gpu.nvidia.com", + "count": 8, + "capacity": {"memory": {"value": "81559Mi"}}, + }, + ], + }, + ], + cache=None, + gateway=None, + ), + resources={ + "usage-inferenceclass-gpu-h100-coreweave": _input_usage( + kind="InferenceClass", name="gpu-h100-coreweave" + ), + "activation": _activation_policy( + activate=["clusters.cks.coreweave.m.upbound.io", "vpcs.networking.coreweave.m.upbound.io"], + ready=fnv1.READY_TRUE, + ), + "coreweave-cluster": fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "infrastructure.modelplane.ai/v1alpha1", + "kind": "CoreWeaveCluster", + "metadata": {"name": "test-cluster", "namespace": "modelplane-system"}, + "spec": { + "zone": "US-EAST-04A", + "kubernetesVersion": "1.36", + "credentials": {"type": "ProviderConfig", "name": "my-coreweave-org"}, + "nodePools": [ + { + "name": "h100-pool", + "role": "GPU", + "instanceType": "gd-8xh100ib-i128", + "nodeCount": 1, + "minNodeCount": 0, + "maxNodeCount": 4, + "gpu": {"acceleratorType": "nvidia-h100"}, + }, + ], + }, + } + ), + ), + }, + ), + context=structpb.Struct(), + requirements=fnv1.Requirements( + resources={ + "model-replicas": fnv1.ResourceSelector( + api_version="modelplane.ai/v1alpha1", + kind="ModelReplica", + match_labels=fnv1.MatchLabels(labels={"modelplane.ai/cluster": "test-cluster"}), + ), + "model-routes": fnv1.ResourceSelector( + api_version="modelplane.ai/v1alpha1", + kind="ModelRoute", + match_labels=fnv1.MatchLabels(labels={"modelplane.ai/cluster": "test-cluster"}), + ), + "model-caches": fnv1.ResourceSelector(api_version="modelplane.ai/v1alpha1", kind="ModelCache"), + "gateways": fnv1.ResourceSelector(api_version="modelplane.ai/v1alpha1", kind="InferenceGateway"), + "class-gpu-h100-coreweave": fnv1.ResourceSelector( + api_version="modelplane.ai/v1alpha1", kind="InferenceClass", match_name="gpu-h100-coreweave" + ), + }, + ), + conditions=[ + fnv1.Condition(type="ClusterReady", status=fnv1.STATUS_CONDITION_FALSE, reason="Provisioning"), + fnv1.Condition(type="BackendReady", status=fnv1.STATUS_CONDITION_FALSE, reason="WaitingForCluster"), + ], + ), + ), + # compose-coreweave-cluster renders the kubeconfig with a CoreWeave API + # access token, so the ClusterProviderConfig carries no identity (unlike + # Nebius). The CoreWeaveCluster reports its cache StorageClass, which is + # relayed to status.cache. + ComposeCase( + name="CoreWeaveReady", + reason=( + "Once its CoreWeaveCluster is Ready, a CoreWeave cluster composes a ClusterProviderConfig without " + "identity, the ServingStack and the Usage, and relays the cache StorageClass." + ), + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_inference_cluster( + cluster=v1alpha1.Cluster(source="CoreWeave", coreweave=v1alpha1.Coreweave(zone="US-EAST-04A")), + node_pools=[ + v1alpha1.NodePool(name="h100-pool", className="gpu-h100-coreweave", nodeCount=1), + ], + ), + resources={ + "coreweave-cluster": fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "infrastructure.modelplane.ai/v1alpha1", + "kind": "CoreWeaveCluster", + "metadata": {"name": "test-cluster", "namespace": "modelplane-system"}, + "spec": { + "zone": "US-EAST-04A", + "nodePools": [ + { + "name": "h100-pool", + "role": "GPU", + "instanceType": "gd-8xh100ib-i128", + "nodeCount": 1, + "gpu": {"acceleratorType": "nvidia-h100"}, + }, + ], + }, + "status": { + "conditions": [ + { + "type": "Ready", + "status": "True", + "reason": "Available", + "lastTransitionTime": "2024-01-01T00:00:00Z", + }, + ], + "secrets": [ + { + "type": "Kubeconfig", + "name": "test-cluster-kubeconfig-abcde", + "key": "kubeconfig", + }, + ], + "cache": {"storageClassName": "modelplane-rwx-fs"}, + }, + } + ), + ), + "activation": _observed_activation_policy( + activated=["clusters.cks.coreweave.m.upbound.io", "vpcs.networking.coreweave.m.upbound.io"] + ), + }, + ), + required_resources={ + "class-gpu-h100-coreweave": fnv1.Resources( + items=[ + _inference_class( + name="gpu-h100-coreweave", + count=8, + memory="81559Mi", + provisioning={ + "provider": "CoreWeave", + "coreweave": { + "instanceType": "gd-8xh100ib-i128", + "accelerator": {"type": "nvidia-h100", "count": 8}, + }, + }, + ), + ], + ), + }, + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_inference_cluster( + schedulable_pools=[ + { + "name": "h100-pool", + "nodes": 1, + "devices": [ + { + "name": "gpu", + "claim": "DRA", + "driver": "gpu.nvidia.com", + "deviceClassName": "gpu.nvidia.com", + "count": 8, + "capacity": {"memory": {"value": "81559Mi"}}, + }, + ], + }, + ], + cache={"storageClassName": "modelplane-rwx-fs"}, + gateway=None, + ), + resources={ + "usage-inferenceclass-gpu-h100-coreweave": _input_usage( + kind="InferenceClass", name="gpu-h100-coreweave" + ), + "activation": _activation_policy( + activate=["clusters.cks.coreweave.m.upbound.io", "vpcs.networking.coreweave.m.upbound.io"], + ready=fnv1.READY_TRUE, + ), + "coreweave-cluster": _coreweave_cluster( + node_pools=[ + { + "name": "h100-pool", + "role": "GPU", + "instanceType": "gd-8xh100ib-i128", + "nodeCount": 1, + "gpu": {"acceleratorType": "nvidia-h100"}, + }, + ], + credentials=None, + ready=fnv1.READY_TRUE, + ), + "cluster-provider-config-kubernetes": _cluster_provider_config( + kubeconfig="test-cluster-kubeconfig-abcde", identity=None + ), + "serving-stack": _serving_stack( + cloud="CoreWeave", + dra_drivers=("gpu.nvidia.com",), + secrets=[{"type": "Kubeconfig", "name": "test-cluster-kubeconfig-abcde", "key": "kubeconfig"}], + client_cas=None, + gpu=None, + ready=fnv1.READY_UNSPECIFIED, + ), + "usage-coreweave-by-backend": _backend_usage(cluster_kind="CoreWeaveCluster"), + }, + ), + results=[fnv1.Result(severity=fnv1.SEVERITY_NORMAL, message="CoreWeave cluster ready, composing backend")], + context=structpb.Struct(), + requirements=fnv1.Requirements( + resources={ + "model-replicas": fnv1.ResourceSelector( + api_version="modelplane.ai/v1alpha1", + kind="ModelReplica", + match_labels=fnv1.MatchLabels(labels={"modelplane.ai/cluster": "test-cluster"}), + ), + "model-routes": fnv1.ResourceSelector( + api_version="modelplane.ai/v1alpha1", + kind="ModelRoute", + match_labels=fnv1.MatchLabels(labels={"modelplane.ai/cluster": "test-cluster"}), + ), + "model-caches": fnv1.ResourceSelector(api_version="modelplane.ai/v1alpha1", kind="ModelCache"), + "gateways": fnv1.ResourceSelector(api_version="modelplane.ai/v1alpha1", kind="InferenceGateway"), + "class-gpu-h100-coreweave": fnv1.ResourceSelector( + api_version="modelplane.ai/v1alpha1", kind="InferenceClass", match_name="gpu-h100-coreweave" + ), + }, + ), + conditions=[ + fnv1.Condition(type="ClusterReady", status=fnv1.STATUS_CONDITION_TRUE, reason="ClusterRunning"), + fnv1.Condition(type="BackendReady", status=fnv1.STATUS_CONDITION_FALSE, reason="Installing"), + ], + ), + ), + # A class with no accelerator describes a CPU pool: the CoreWeaveCluster + # pool is CPU-role with no gpu block, and the ServingStack installs the + # dra.cpu stack. + ComposeCase( + name="CoreWeaveCPUPool", + reason=( + "Once its CoreWeaveCluster is Ready, a CoreWeave cluster whose pool's class names no accelerator " + "composes a CPU-role pool and a ServingStack claiming dra.cpu." + ), + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_inference_cluster( + cluster=v1alpha1.Cluster(source="CoreWeave", coreweave=v1alpha1.Coreweave(zone="US-EAST-04A")), + node_pools=[ + v1alpha1.NodePool(name="cpu-pool", className="cpu-coreweave", nodeCount=1), + ], + ), + resources={ + "coreweave-cluster": fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "infrastructure.modelplane.ai/v1alpha1", + "kind": "CoreWeaveCluster", + "metadata": {"name": "test-cluster", "namespace": "modelplane-system"}, + "spec": { + "zone": "US-EAST-04A", + "nodePools": [ + { + "name": "cpu-pool", + "role": "CPU", + "instanceType": "cd-gp-i64-erapids", + "nodeCount": 1, + }, + ], + }, + "status": { + "conditions": [ + { + "type": "Ready", + "status": "True", + "reason": "Available", + "lastTransitionTime": "2024-01-01T00:00:00Z", + }, + ], + "secrets": [ + { + "type": "Kubeconfig", + "name": "test-cluster-kubeconfig-abcde", + "key": "kubeconfig", + }, + ], + "cache": {"storageClassName": "modelplane-rwx-fs"}, + }, + } + ), + ), + "activation": _observed_activation_policy( + activated=["clusters.cks.coreweave.m.upbound.io", "vpcs.networking.coreweave.m.upbound.io"] + ), + }, + ), + required_resources={ + "class-cpu-coreweave": fnv1.Resources( + items=[ + _cpu_inference_class( + name="cpu-coreweave", + cpus="64", + provisioning={ + "provider": "CoreWeave", + "coreweave": {"instanceType": "cd-gp-i64-erapids"}, + }, + ), + ], + ), + }, + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_inference_cluster( + schedulable_pools=[ + { + "name": "cpu-pool", + "nodes": 1, + "devices": [ + { + "name": "cpu", + "claim": "DRA", + "driver": "dra.cpu", + "deviceClassName": "dra.cpu", + "count": 1, + "capacity": {"cpu": {"value": "64"}}, + }, + ], + }, + ], + cache={"storageClassName": "modelplane-rwx-fs"}, + gateway=None, + ), + resources={ + "usage-inferenceclass-cpu-coreweave": _input_usage(kind="InferenceClass", name="cpu-coreweave"), + "activation": _activation_policy( + activate=["clusters.cks.coreweave.m.upbound.io", "vpcs.networking.coreweave.m.upbound.io"], + ready=fnv1.READY_TRUE, + ), + "coreweave-cluster": _coreweave_cluster( + node_pools=[ + { + "name": "cpu-pool", + "role": "CPU", + "instanceType": "cd-gp-i64-erapids", + "nodeCount": 1, + }, + ], + credentials=None, + ready=fnv1.READY_TRUE, + ), + "cluster-provider-config-kubernetes": _cluster_provider_config( + kubeconfig="test-cluster-kubeconfig-abcde", identity=None + ), + "serving-stack": _serving_stack( + cloud="CoreWeave", + dra_drivers=("dra.cpu",), + secrets=[{"type": "Kubeconfig", "name": "test-cluster-kubeconfig-abcde", "key": "kubeconfig"}], + client_cas=None, + gpu=None, + ready=fnv1.READY_UNSPECIFIED, + ), + "usage-coreweave-by-backend": _backend_usage(cluster_kind="CoreWeaveCluster"), + }, + ), + results=[fnv1.Result(severity=fnv1.SEVERITY_NORMAL, message="CoreWeave cluster ready, composing backend")], + context=structpb.Struct(), + requirements=fnv1.Requirements( + resources={ + "model-replicas": fnv1.ResourceSelector( + api_version="modelplane.ai/v1alpha1", + kind="ModelReplica", + match_labels=fnv1.MatchLabels(labels={"modelplane.ai/cluster": "test-cluster"}), + ), + "model-routes": fnv1.ResourceSelector( + api_version="modelplane.ai/v1alpha1", + kind="ModelRoute", + match_labels=fnv1.MatchLabels(labels={"modelplane.ai/cluster": "test-cluster"}), + ), + "model-caches": fnv1.ResourceSelector(api_version="modelplane.ai/v1alpha1", kind="ModelCache"), + "gateways": fnv1.ResourceSelector(api_version="modelplane.ai/v1alpha1", kind="InferenceGateway"), + "class-cpu-coreweave": fnv1.ResourceSelector( + api_version="modelplane.ai/v1alpha1", kind="InferenceClass", match_name="cpu-coreweave" + ), + }, + ), + conditions=[ + fnv1.Condition(type="ClusterReady", status=fnv1.STATUS_CONDITION_TRUE, reason="ClusterRunning"), + fnv1.Condition(type="BackendReady", status=fnv1.STATUS_CONDITION_FALSE, reason="Installing"), + ], + ), + ), # The deletion guard cases, ReplicasRoutesAndCaches through ClassUnresolved, # observe an existing cluster along with whatever uses it. # diff --git a/functions/compose-inference-gateway/function/fn.py b/functions/compose-inference-gateway/function/fn.py index 25bd39aa3..dd7d918f3 100644 --- a/functions/compose-inference-gateway/function/fn.py +++ b/functions/compose-inference-gateway/function/fn.py @@ -572,7 +572,10 @@ def compose_envoy_proxy(self) -> None: Attached to the Gateway rather than the GatewayClass, because the class is shared with the cluster gateway, whose per-pod routing has nothing to - log here. + log here. It merges onto the GatewayClass's EnvoyProxy rather than + replacing it, so this gateway's LoadBalancer Service gets what the + serving stack configures there: the Service settings the cluster's + cloud needs, and the externalTrafficPolicy pin. Every token field reads request metadata rather than a header or the response body. The AI Gateway's ext-proc writes the counts there, having @@ -591,10 +594,10 @@ def compose_envoy_proxy(self) -> None: "kind": "EnvoyProxy", "metadata": {"name": _GATEWAY_NAME, "namespace": REMOTE_NAMESPACE}, "spec": { + "mergeType": "StrategicMerge", "provider": { "type": "Kubernetes", "kubernetes": { - "envoyService": {"externalTrafficPolicy": "Cluster"}, "envoyDeployment": { "name": _ENVOY_DEPLOYMENT_NAME, "replicas": _PROXY_REPLICAS, diff --git a/functions/compose-inference-gateway/tests/test_fn.py b/functions/compose-inference-gateway/tests/test_fn.py index 3afeab481..594f10a3b 100644 --- a/functions/compose-inference-gateway/tests/test_fn.py +++ b/functions/compose-inference-gateway/tests/test_fn.py @@ -241,6 +241,7 @@ def _envoy_proxy() -> fnv1.Resource: "kind": "EnvoyProxy", "metadata": {"name": "inference-gateway", "namespace": "modelplane-system"}, "spec": { + "mergeType": "StrategicMerge", # Two proxy pods spread softly across nodes and # zones, a disruption budget so a drain can't # evict both, and ndots:1. Without ndots:1 every @@ -253,7 +254,6 @@ def _envoy_proxy() -> fnv1.Resource: "provider": { "type": "Kubernetes", "kubernetes": { - "envoyService": {"externalTrafficPolicy": "Cluster"}, "envoyDeployment": { "name": "envoy-modelplane-system-inference-gateway", "replicas": 2, diff --git a/functions/compose-serving-stack/function/collector.py b/functions/compose-serving-stack/function/collector.py index 2aa798ade..ab55e97e1 100644 --- a/functions/compose-serving-stack/function/collector.py +++ b/functions/compose-serving-stack/function/collector.py @@ -332,12 +332,17 @@ def _scrape_configs() -> list[dict[str, Any]]: # A job of its own because nobody annotates a GPU exporter # for scraping: GKE runs a managed DCGM in # gke-managed-system, the NVIDIA GPU operator installs its - # own elsewhere, Nebius gets the standalone dcgm-exporter - # chart, the AMD GPU operator Modelplane installs on + # own elsewhere, Nebius and CoreWeave get the standalone + # dcgm-exporter chart, the AMD GPU operator Modelplane installs on # Existing runs AMD's device-metrics-exporter, and the # substrate job sees none of them. Without this every # modelplane_gpu_* series is empty. _gpu_exporter_selector("keep"), + # CKS runs its own DCGM exporter in cw-exporters, which can't + # attribute DRA-allocated GPUs to pods. The serving stack + # installs one that can, and scraping both would collect + # every GPU series twice. + {"source_labels": ["__meta_kubernetes_namespace"], "action": "drop", "regex": "cw-exporters"}, # The exporters name their metrics port differently: DCGM's # is metrics, the AMD operator's is exporter-port. { diff --git a/functions/compose-serving-stack/function/fn.py b/functions/compose-serving-stack/function/fn.py index fbb6b4b36..5b47f1f24 100644 --- a/functions/compose-serving-stack/function/fn.py +++ b/functions/compose-serving-stack/function/fn.py @@ -91,6 +91,10 @@ _CERT_MANAGER_KEY = "cert-manager" _CLUSTER_RESOURCE_NAMESPACE = "modelplane-system" +# The composed-resource key of the EnvoyProxy the GatewayClass references +# (stacks.common.gateway_proxy). +_GATEWAY_PROXY = "gateway-proxy" + # The (apiVersion, kind) a component's composed resources render as, # used by the derived Usages' of/by references. _RELEASE_REF = ("helm.m.crossplane.io/v1beta1", "Release") @@ -563,10 +567,18 @@ def compose_gateway(self) -> list[str]: f"Gateway {gw.hostname} not served: no InferenceGateway has published a client CA for this " "cluster to trust, and serving without one would accept unauthenticated callers", ) + # Envoy Gateway creates the Gateway's LoadBalancer Service from the + # EnvoyProxy that exists at that moment, and some clouds assign the + # Service an address only once. CKS gives a Service without its public + # annotation a private address and keeps it after the annotation + # arrives. The Gateway waits for the EnvoyProxy the first time. + proxy_ready = resource.get_condition(self.req.observed.resources.get(_GATEWAY_PROXY), "Ready").status == "True" rendered: list[str] = [] for key, manifest, cel in gateway.objects(self.xr.spec.gateway): if key == "gateway" and not serve_gateway: continue + if key == "gateway" and not proxy_ready and key not in self.req.observed.resources: + continue if not (pc_observed or key in self.req.observed.resources): continue resource.update( diff --git a/functions/compose-serving-stack/function/stacks/__init__.py b/functions/compose-serving-stack/function/stacks/__init__.py index 8187499ab..c093b6365 100644 --- a/functions/compose-serving-stack/function/stacks/__init__.py +++ b/functions/compose-serving-stack/function/stacks/__init__.py @@ -21,8 +21,10 @@ stack's own file. See design/serving-stack-generation.md. """ +from typing import Any + from function.stacks import common, components, dynamo, metrics, standard -from function.stacks.clouds import civo, existing, nebius, vultr +from function.stacks.clouds import civo, coreweave, existing, nebius, vultr from function.stacks.clouds.generated.aicr import aks, eks, gke from function.stacks.components import Chart, Cloud, Component, Manifests, Stack from function.stacks.metrics import BUILTIN_MAPPINGS @@ -52,6 +54,7 @@ "Nebius": nebius.COMPONENTS, "Vultr": vultr.COMPONENTS, "Civo": civo.COMPONENTS, + "CoreWeave": coreweave.COMPONENTS, "Existing": existing.COMPONENTS, } @@ -73,10 +76,20 @@ "Nebius": frozenset(nebius.EXTERNAL_DRIVERS), "Vultr": frozenset(vultr.EXTERNAL_DRIVERS), "Civo": frozenset(civo.EXTERNAL_DRIVERS), + "CoreWeave": frozenset(coreweave.EXTERNAL_DRIVERS), "Existing": frozenset(existing.EXTERNAL_DRIVERS), } +# What each cloud's load balancers need on a gateway's LoadBalancer +# Service, as a subset of Envoy Gateway's KubernetesServiceSpec. join() +# builds common.gateway_proxy from it. Clouds whose load balancers don't +# need any settings are absent. +_GATEWAY_SERVICE: dict[Cloud, dict[str, Any]] = { + "CoreWeave": coreweave.GATEWAY_SERVICE, +} + + def clouds() -> list[Cloud]: """The clouds a stack can be joined for.""" return list(_CLOUDS) @@ -140,7 +153,12 @@ def join(cloud: Cloud, stack: Stack, dra_drivers: list[str] | None = None) -> li if stack not in _STACKS: raise ValueError(f"unknown stack {stack!r}; known: {', '.join(_STACKS)}") - joined = [*_CLOUDS[cloud], *common.COMPONENTS, *_STACKS[stack]] + joined = [ + *_CLOUDS[cloud], + *common.COMPONENTS, + common.gateway_proxy(_GATEWAY_SERVICE.get(cloud, {})), + *_STACKS[stack], + ] keys = [c.key for c in joined] duplicates = sorted({k for k in keys if keys.count(k) > 1}) diff --git a/functions/compose-serving-stack/function/stacks/clouds/coreweave.py b/functions/compose-serving-stack/function/stacks/clouds/coreweave.py new file mode 100644 index 000000000..326e4f0ee --- /dev/null +++ b/functions/compose-serving-stack/function/stacks/clouds/coreweave.py @@ -0,0 +1,128 @@ +# Copyright 2026 The Modelplane Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""The cloud half of the stack for CoreWeave. + +No generator covers CoreWeave, so Modelplane pins this half by hand. +Where a component also appears on a generated cloud, it uses the same +pin. + +CoreWeave runs the NVIDIA driver, a managed GPU Operator and NFD on every +CKS cluster, and its docs say not to install a second GPU Operator. This +half installs none of them. + +CoreWeave also installs NVIDIA's DRA driver, but only for ComputeDomains. +This half installs it again with GPU allocation on and ComputeDomains +off. + +CoreWeave's own DCGM exporter attributes a GPU's series to a pod only if +the device plugin allocated it. This half installs a second exporter that +maps DRA allocations to pods. Both exporters run side by side without +disturbing each other's profiling metrics. +""" + +from typing import Any + +from function.stacks.clouds.generated.aicr.dcgm import DCGM_METRICS_CSV +from function.stacks.components import Chart, Component + +# DRA drivers this cloud supports that arrive outside the serving +# stack; the stacks package folds them into its derived +# supported-drivers table. +EXTERNAL_DRIVERS: list[str] = [] + +# Settings for every gateway's LoadBalancer Service. CKS gives a +# LoadBalancer Service a private address without this annotation. +GATEWAY_SERVICE: dict[str, Any] = { + "annotations": {"service.beta.kubernetes.io/coreweave-load-balancer-type": "public"}, +} + +COMPONENTS: list[Component] = [ + Chart( + key="cert-manager", + release="mp-cert-manager", + namespace="cert-manager", + chart="cert-manager", + repository="https://charts.jetstack.io", + version="v1.20.2", + # envoy-gateway in common.py depends on this chart (a cross-half + # edge), so its Ready must mean healthy, not just deployed. + wait=True, + # The chart keeps its CRDs on uninstall by default, which the gateway PKI + # needs: it composes Certificates and Issuers as provider-kubernetes + # Objects, and removing their CRDs would stop provider-kubernetes + # observing them to release their finalizers. + values={"crds": {"enabled": True}}, + ), + # Publishes each GPU node's devices as DRA ResourceSlices and registers + # the gpu.nvidia.com DeviceClass that ModelReplica ResourceClaims use. + # GPU allocation is opt-in, and CoreWeave's own install of the driver + # handles ComputeDomains. nvidiaDriverRoot keeps the chart default, /, + # where the node image puts the driver. + Chart( + key="nvidia-dra-driver-gpu", + release="mp-dra-driver-nvidia-gpu", + namespace="nvidia-dra-driver", + chart="dra-driver-nvidia-gpu", + repository="oci://registry.k8s.io/dra-driver-nvidia/charts", + version="0.5.0", + dra_drivers=["gpu.nvidia.com"], + values={ + "gpuResourcesEnabledOverride": True, + "resources": {"computeDomains": {"enabled": False}}, + }, + ), + # The same exporter and values as nebius.py. + Chart( + key="dcgm-exporter", + release="mp-dcgm-exporter", + namespace="dcgm-exporter", + chart="dcgm-exporter", + repository="https://nvidia.github.io/dcgm-exporter/helm-charts", + version="4.8.4", + values={ + "serviceMonitor": {"enabled": False}, + "customMetrics": DCGM_METRICS_CSV, + "kubernetesDRA": {"enabled": True}, + "kubernetes": { + "enablePodLabels": True, + "podLabelAllowlistRegex": [r"^modelplane\.ai/(deployment|replica|role|engine)$"], + }, + "tolerations": [ + { + "key": "nvidia.com/gpu", + "operator": "Exists", + "effect": "NoSchedule", + }, + ], + # The first three nodeSelectorTerms of dra-driver-nvidia-gpu + # v0.5.0's kubeletPlugin affinity. CKS GPU nodes have + # pci-0302_10de. Recheck them when that chart moves. + "affinity": { + "nodeAffinity": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [ + {"matchExpressions": [{"key": key, "operator": "In", "values": ["true"]}]} + for key in ( + "feature.node.kubernetes.io/pci-10de.present", + "feature.node.kubernetes.io/pci-0302_10de.present", + "feature.node.kubernetes.io/pci-0300_10de.present", + ) + ], + }, + }, + }, + }, + ), +] diff --git a/functions/compose-serving-stack/function/stacks/common.py b/functions/compose-serving-stack/function/stacks/common.py index 9732f7008..fcfd3db34 100644 --- a/functions/compose-serving-stack/function/stacks/common.py +++ b/functions/compose-serving-stack/function/stacks/common.py @@ -17,7 +17,8 @@ Modelplane's own half of the serving stack, where the Standard and Dynamo stacks don't differ: the gateway path (Envoy Gateway, Envoy AI Gateway and its CRDs, the Gateway API Inference Extension CRDs, the -gateway namespace and EnvoyProxy), the gateway's PKI (a self-signed +gateway namespace, and the EnvoyProxy gateway_proxy builds from the +cloud's Service settings), the gateway's PKI (a self-signed Issuer and trust-manager), the DRA critical-pods quotas, the cluster agent, and the device stacks every cloud pins identically - today dra-driver-cpu, whose nodes look the same whatever provisioned them. @@ -208,32 +209,6 @@ def _crds(filename: str) -> list[dict[str, Any]]: }, ], ), - # EnvoyProxy pins the managed LoadBalancer Service's - # externalTrafficPolicy to Cluster. Envoy Gateway defaults it to - # Local, which some clouds' load balancers reject (Nebius returns - # SyncLoadBalancerFailed and never assigns an external IP). Cluster - # is accepted by every cloud Modelplane runs on; the inference - # gateway does not need client source-IP preservation. The - # GatewayClass references it via parametersRef. - Manifests( - key="gateway-proxy", - depends_on=["gateway-namespace"], - manifests=[ - { - "apiVersion": "gateway.envoyproxy.io/v1alpha1", - "kind": "EnvoyProxy", - "metadata": {"name": "cluster-gateway", "namespace": "modelplane-system"}, - "spec": { - "provider": { - "type": "Kubernetes", - "kubernetes": { - "envoyService": {"externalTrafficPolicy": "Cluster"}, - }, - }, - }, - }, - ], - ), # The cluster gateway's mTLS trust anchor. A self-signed Issuer signs the # per-cluster CA (fn.py's compose_gateway_pki), which signs the gateway's # serving certificate. Every cluster's gateway CA roots in it. @@ -408,3 +383,40 @@ def _crds(filename: str) -> list[dict[str, Any]]: depends_on=["gateway-namespace"], ), ] + + +def gateway_proxy(service: dict[str, Any]) -> Manifests: + """The EnvoyProxy the GatewayClass references, configuring the + LoadBalancer Service of every gateway on the cluster. + + service is the cloud's settings for that Service, a subset of Envoy + Gateway's KubernetesServiceSpec. The cluster gateway uses this EnvoyProxy + as is, and compose-inference-gateway's EnvoyProxy merges onto it, which + gives both gateways' Services these settings. + + externalTrafficPolicy is pinned to Cluster over whatever service says. + Envoy Gateway defaults it to Local, which some clouds' load balancers + reject (Nebius returns SyncLoadBalancerFailed and never assigns an + external IP). Cluster is accepted by every cloud Modelplane runs on, and + neither gateway needs client source-IP preservation. A CKS webhook sets + Local regardless, which CKS's load balancers accept. + """ + return Manifests( + key="gateway-proxy", + depends_on=["gateway-namespace"], + manifests=[ + { + "apiVersion": "gateway.envoyproxy.io/v1alpha1", + "kind": "EnvoyProxy", + "metadata": {"name": "cluster-gateway", "namespace": "modelplane-system"}, + "spec": { + "provider": { + "type": "Kubernetes", + "kubernetes": { + "envoyService": {**service, "externalTrafficPolicy": "Cluster"}, + }, + }, + }, + }, + ], + ) diff --git a/functions/compose-serving-stack/function/stacks/components.py b/functions/compose-serving-stack/function/stacks/components.py index 69e22a21f..fd0810e7a 100644 --- a/functions/compose-serving-stack/function/stacks/components.py +++ b/functions/compose-serving-stack/function/stacks/components.py @@ -29,7 +29,7 @@ # The clouds and stacks the join can select - the values of ServingStack # spec.cloud and spec.stack, so a wrong or unsupported value fails type # checking at the caller. -Cloud = Literal["GKE", "EKS", "AKS", "Nebius", "Vultr", "Civo", "Existing"] +Cloud = Literal["GKE", "EKS", "AKS", "Nebius", "Vultr", "Civo", "CoreWeave", "Existing"] Stack = Literal["Standard", "Dynamo"] diff --git a/functions/compose-serving-stack/tests/test_collector.py b/functions/compose-serving-stack/tests/test_collector.py index 950d09b8b..3583f936d 100644 --- a/functions/compose-serving-stack/tests/test_collector.py +++ b/functions/compose-serving-stack/tests/test_collector.py @@ -321,6 +321,11 @@ def _config( "action": "keep", "regex": ".*dcgm.*|.*metrics-exporter.*", }, + { + "source_labels": ["__meta_kubernetes_namespace"], + "action": "drop", + "regex": "cw-exporters", + }, { "source_labels": ["__meta_kubernetes_pod_container_port_name"], "action": "keep", @@ -1240,7 +1245,7 @@ def test_transform(case: TransformCase) -> None: ( "collector", _deployment( - config_hash="ed6e1a2446fa88db", + config_hash="522e31c7cedc07c5", volumes=[{"name": "config", "configMap": {"name": "modelplane-collector"}}], volume_mounts=[{"name": "config", "mountPath": "/conf"}], env_from=None, @@ -1285,7 +1290,7 @@ def test_transform(case: TransformCase) -> None: ( "collector", _deployment( - config_hash="01749001b45477d3", + config_hash="1f03e323432223be", volumes=[ {"name": "config", "configMap": {"name": "modelplane-collector"}}, {"name": "credentials-primary", "secret": {"secretName": "telemetry-credentials"}}, @@ -1352,7 +1357,7 @@ def test_transform(case: TransformCase) -> None: ( "collector", _deployment( - config_hash="4abf1d7de91ea0e6", + config_hash="b1539f5a25d85bfc", volumes=[ {"name": "config", "configMap": {"name": "modelplane-collector"}}, {"name": "credentials-vendor", "secret": {"secretName": "vendor-token"}}, diff --git a/functions/compose-serving-stack/tests/test_fn.py b/functions/compose-serving-stack/tests/test_fn.py index f85b72f5e..d3e90092a 100644 --- a/functions/compose-serving-stack/tests/test_fn.py +++ b/functions/compose-serving-stack/tests/test_fn.py @@ -492,6 +492,36 @@ def _gaie_crd(*, name: str, ready: fnv1.Ready) -> fnv1.Resource: ) +def _gateway_proxy(*, ready: fnv1.Ready) -> fnv1.Resource: + """The composed EnvoyProxy the GatewayClass references, on a cloud whose load balancers need no settings.""" + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "kubernetes.m.crossplane.io/v1alpha1", + "kind": "Object", + "metadata": {"labels": {"modelplane.ai/resource": "gateway-proxy"}}, + "spec": { + "providerConfigRef": {"kind": "ProviderConfig", "name": "test-backend-cluster-63fde"}, + "forProvider": { + "manifest": { + "apiVersion": "gateway.envoyproxy.io/v1alpha1", + "kind": "EnvoyProxy", + "metadata": {"name": "cluster-gateway", "namespace": "modelplane-system"}, + "spec": { + "provider": { + "type": "Kubernetes", + "kubernetes": {"envoyService": {"externalTrafficPolicy": "Cluster"}}, + } + }, + } + }, + }, + } + ), + ready=ready, + ) + + def _gateway_namespace(*, ready: fnv1.Ready) -> fnv1.Resource: """The composed modelplane-system Namespace.""" return fnv1.Resource( @@ -1534,6 +1564,11 @@ def _collector_config( "action": "keep", "regex": ".*dcgm.*|.*metrics-exporter.*", }, + { + "source_labels": ["__meta_kubernetes_namespace"], + "action": "drop", + "regex": "cw-exporters", + }, { "source_labels": ["__meta_kubernetes_pod_container_port_name"], "action": "keep", @@ -2041,7 +2076,10 @@ def _to_dict(msg: message.Message) -> dict: # trust-manager on gateway-selfsigned-issuer. ComposeCase( name="ProviderConfigsObserved", - reason="Once its ProviderConfigs are observed, a stack renders the components with no dependencies.", + reason=( + "Once its ProviderConfigs are observed, a stack renders the components with no dependencies, and " + "withholds the Gateway until the EnvoyProxy it references is Ready." + ), req=fnv1.RunFunctionRequest( observed=fnv1.State( composite=_serving_stack( @@ -2337,7 +2375,6 @@ def _to_dict(msg: message.Message) -> dict: ) ), "gateway-class": _gateway_class(ready=fnv1.READY_UNSPECIFIED), - "gateway": _gateway(hostname="test-backend.gateways.example.com", ready=fnv1.READY_UNSPECIFIED), "gateway-ca-certificate": _gateway_ca_certificate( common_name="modelplane cluster CA test-backend.gateways.example.com", ready=fnv1.READY_UNSPECIFIED, @@ -2682,37 +2719,7 @@ def _to_dict(msg: message.Message) -> dict: name="inferencepools.inference.networking.x-k8s.io", ready=fnv1.READY_TRUE ), "gateway-namespace": _gateway_namespace(ready=fnv1.READY_TRUE), - "gateway-proxy": fnv1.Resource( - resource=resource.dict_to_struct( - { - "apiVersion": "kubernetes.m.crossplane.io/v1alpha1", - "kind": "Object", - "metadata": {"labels": {"modelplane.ai/resource": "gateway-proxy"}}, - "spec": { - "providerConfigRef": { - "kind": "ProviderConfig", - "name": "test-backend-cluster-63fde", - }, - "forProvider": { - "manifest": { - "apiVersion": "gateway.envoyproxy.io/v1alpha1", - "kind": "EnvoyProxy", - "metadata": {"name": "cluster-gateway", "namespace": "modelplane-system"}, - "spec": { - "provider": { - "type": "Kubernetes", - "kubernetes": { - "envoyService": {"externalTrafficPolicy": "Cluster"} - }, - } - }, - } - }, - }, - } - ), - ready=fnv1.READY_TRUE, - ), + "gateway-proxy": _gateway_proxy(ready=fnv1.READY_TRUE), "gateway-selfsigned-issuer": _gateway_selfsigned_issuer(), "trust-manager": _trust_manager(ready=fnv1.READY_TRUE), "cluster-agent": _cluster_agent(ready=fnv1.READY_TRUE), @@ -3378,6 +3385,7 @@ def _to_dict(msg: message.Message) -> dict: resources={ "provider-config-kubernetes": _observed_kubernetes_provider_config(), "provider-config-helm": _observed_helm_provider_config(), + "gateway-proxy": _observed_ready(), "gateway-selfsigned-issuer": _observed_ready(), "gateway-ca-configmap": fnv1.Resource( resource=resource.dict_to_struct( @@ -3395,6 +3403,7 @@ def _to_dict(msg: message.Message) -> dict: resources={ "provider-config-kubernetes": _kubernetes_provider_config(identity=None, ready=fnv1.READY_TRUE), "provider-config-helm": _helm_provider_config(identity=None, ready=fnv1.READY_TRUE), + "gateway-proxy": _gateway_proxy(ready=fnv1.READY_TRUE), "cert-manager": _cert_manager(ready=fnv1.READY_UNSPECIFIED), "node-feature-discovery": _node_feature_discovery( ready=fnv1.READY_UNSPECIFIED, @@ -3553,6 +3562,7 @@ def _to_dict(msg: message.Message) -> dict: resources={ "provider-config-kubernetes": _observed_kubernetes_provider_config(), "provider-config-helm": _observed_helm_provider_config(), + "gateway-proxy": _observed_ready(), "gateway-selfsigned-issuer": _observed_ready(), "gateway-ca-certificate": _observed_ready(), "gateway-ca-issuer": _observed_ready(), @@ -3581,6 +3591,7 @@ def _to_dict(msg: message.Message) -> dict: resources={ "provider-config-kubernetes": _kubernetes_provider_config(identity=None, ready=fnv1.READY_TRUE), "provider-config-helm": _helm_provider_config(identity=None, ready=fnv1.READY_TRUE), + "gateway-proxy": _gateway_proxy(ready=fnv1.READY_TRUE), "cert-manager": _cert_manager(ready=fnv1.READY_UNSPECIFIED), "node-feature-discovery": _node_feature_discovery( ready=fnv1.READY_UNSPECIFIED, @@ -4653,6 +4664,7 @@ def _to_dict(msg: message.Message) -> dict: resources={ "provider-config-kubernetes": _observed_kubernetes_provider_config(), "provider-config-helm": _observed_helm_provider_config(), + "gateway-proxy": _observed_ready(), }, ), required_resources={ @@ -4688,6 +4700,7 @@ def _to_dict(msg: message.Message) -> dict: }, ready=fnv1.READY_TRUE, ), + "gateway-proxy": _gateway_proxy(ready=fnv1.READY_TRUE), "cert-manager": _gke_cert_manager(), "node-feature-discovery": _gke_node_feature_discovery(), "nodewright-operator": _nodewright_operator(), @@ -4733,7 +4746,7 @@ def _to_dict(msg: message.Message) -> dict: service_extensions=None, ), "collector": _collector( - config_hash="e4e26049f9c409ed", + config_hash="be9842417e13d6c1", volumes=[{"name": "config", "configMap": {"name": "modelplane-collector"}}], volume_mounts=[{"name": "config", "mountPath": "/conf"}], env_from=None, @@ -4916,6 +4929,7 @@ def _to_dict(msg: message.Message) -> dict: resources={ "provider-config-kubernetes": _observed_kubernetes_provider_config(), "provider-config-helm": _observed_helm_provider_config(), + "gateway-proxy": _observed_ready(), }, ), required_resources={ @@ -4973,6 +4987,7 @@ def _to_dict(msg: message.Message) -> dict: }, ready=fnv1.READY_TRUE, ), + "gateway-proxy": _gateway_proxy(ready=fnv1.READY_TRUE), "cert-manager": _gke_cert_manager(), "node-feature-discovery": _gke_node_feature_discovery(), "nodewright-operator": _nodewright_operator(), @@ -5050,7 +5065,7 @@ def _to_dict(msg: message.Message) -> dict: ready=fnv1.READY_TRUE, ), "collector": _collector( - config_hash="c053b356fa878457", + config_hash="5d3c556be06d8ca8", volumes=[ {"name": "config", "configMap": {"name": "modelplane-collector"}}, {"name": "credentials-primary", "secret": {"secretName": "telemetry-credentials"}}, @@ -5243,6 +5258,7 @@ def _to_dict(msg: message.Message) -> dict: resources={ "provider-config-kubernetes": _observed_kubernetes_provider_config(), "provider-config-helm": _observed_helm_provider_config(), + "gateway-proxy": _observed_ready(), }, ), required_resources={ @@ -5284,6 +5300,7 @@ def _to_dict(msg: message.Message) -> dict: }, ready=fnv1.READY_TRUE, ), + "gateway-proxy": _gateway_proxy(ready=fnv1.READY_TRUE), "cert-manager": _gke_cert_manager(), "node-feature-discovery": _gke_node_feature_discovery(), "nodewright-operator": _nodewright_operator(), @@ -5335,7 +5352,7 @@ def _to_dict(msg: message.Message) -> dict: service_extensions=None, ), "collector": _collector( - config_hash="d413599cd033eb66", + config_hash="0a72aaee56455e72", volumes=[{"name": "config", "configMap": {"name": "modelplane-collector"}}], volume_mounts=[{"name": "config", "mountPath": "/conf"}], env_from=None, @@ -5512,6 +5529,7 @@ def _to_dict(msg: message.Message) -> dict: resources={ "provider-config-kubernetes": _observed_kubernetes_provider_config(), "provider-config-helm": _observed_helm_provider_config(), + "gateway-proxy": _observed_ready(), }, ), required_resources={ @@ -5551,6 +5569,7 @@ def _to_dict(msg: message.Message) -> dict: }, ready=fnv1.READY_TRUE, ), + "gateway-proxy": _gateway_proxy(ready=fnv1.READY_TRUE), "cert-manager": _gke_cert_manager(), "node-feature-discovery": _gke_node_feature_discovery(), "nodewright-operator": _nodewright_operator(), @@ -5596,7 +5615,7 @@ def _to_dict(msg: message.Message) -> dict: service_extensions=None, ), "collector": _collector( - config_hash="3361552a8e3ea3fd", + config_hash="57e31b8f680bd6d3", volumes=[{"name": "config", "configMap": {"name": "modelplane-collector"}}], volume_mounts=[{"name": "config", "mountPath": "/conf"}], env_from=None, @@ -5784,6 +5803,7 @@ def _to_dict(msg: message.Message) -> dict: resources={ "provider-config-kubernetes": _observed_kubernetes_provider_config(), "provider-config-helm": _observed_helm_provider_config(), + "gateway-proxy": _observed_ready(), }, ), required_resources={ @@ -5840,6 +5860,7 @@ def _to_dict(msg: message.Message) -> dict: }, ready=fnv1.READY_TRUE, ), + "gateway-proxy": _gateway_proxy(ready=fnv1.READY_TRUE), "cert-manager": _gke_cert_manager(), "node-feature-discovery": _gke_node_feature_discovery(), "nodewright-operator": _nodewright_operator(), @@ -5885,7 +5906,7 @@ def _to_dict(msg: message.Message) -> dict: service_extensions=None, ), "collector": _collector( - config_hash="e4e26049f9c409ed", + config_hash="be9842417e13d6c1", volumes=[{"name": "config", "configMap": {"name": "modelplane-collector"}}], volume_mounts=[{"name": "config", "mountPath": "/conf"}], env_from=None, @@ -7450,6 +7471,256 @@ def test_compose(case: ComposeCase) -> None: "usage-modelexpress-crds-modelmetadatas.modelexpress.nvidia.com-by-modelexpress-server", }, ), + ComposedResourceKeysCase( + name="CoreWeaveStandard", + reason=( + "On CoreWeave, the Standard stack composes the gateway, the common components, CoreWeave's hand-written half " + "and the Standard stack's own components, each under its pinned key." + ), + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_serving_stack( + cloud="CoreWeave", + stack="Standard", + dra_drivers=["gpu.nvidia.com"], + secrets=[ + v1alpha1.Secret(type="Kubeconfig", name="kube-secret", key="kubeconfig"), + v1alpha1.Secret(type="GoogleApplicationCredentials", name="sa-secret", key="private_key"), + ], + gateway=v1alpha1.Gateway( + hostname="test-backend.gateways.example.com", + clientCAs=[ + v1alpha1.ClientCA( + name="eu", + certificate="-----BEGIN CERTIFICATE-----\nfleet\n-----END CERTIFICATE-----\n", + ) + ], + ), + gpu=None, + ), + resources={ + "provider-config-kubernetes": _observed_ready(), + "provider-config-helm": _observed_ready(), + "gateway": _observed_ready(), + "gateway-class": _observed_ready(), + "gateway-ca-certificate": _observed_ready(), + "gateway-ca-issuer": _observed_ready(), + "gateway-serving-certificate": _observed_ready(), + "gateway-ca-bundle": _observed_ready(), + "gateway-ca-configmap": _observed_ready(), + "gateway-client-ca-bundle": _observed_ready(), + "gateway-client-auth": _observed_ready(), + "usage-gateway-class-by-gateway": _observed_ready(), + "usage-envoy-gateway-by-gateway-class": _observed_ready(), + "ai-gateway": _observed_ready(), + "ai-gateway-crds": _observed_ready(), + "cluster-agent": _observed_ready(), + "dra-driver-critical-pods-quota": _observed_ready(), + "envoy-gateway": _observed_ready(), + "gaie-crds-inferenceobjectives.inference.networking.x-k8s.io": _observed_ready(), + "gaie-crds-inferencepools.inference.networking.k8s.io": _observed_ready(), + "gaie-crds-inferencepools.inference.networking.x-k8s.io": _observed_ready(), + "gateway-namespace": _observed_ready(), + "gateway-proxy": _observed_ready(), + "gateway-selfsigned-issuer": _observed_ready(), + "trust-manager": _observed_ready(), + "usage-ai-gateway-crds-by-ai-gateway": _observed_ready(), + "usage-cert-manager-by-envoy-gateway": _observed_ready(), + "usage-cert-manager-by-gateway-selfsigned-issuer": _observed_ready(), + "usage-gateway-namespace-by-gateway-proxy": _observed_ready(), + "usage-gateway-namespace-by-cluster-agent": _observed_ready(), + "usage-gateway-namespace-by-gateway-selfsigned-issuer": _observed_ready(), + "usage-gateway-selfsigned-issuer-by-trust-manager": _observed_ready(), + "cert-manager": _observed_ready(), + "nvidia-dra-driver-gpu": _observed_ready(), + "dcgm-exporter": _observed_ready(), + "leader-worker-set": _observed_ready(), + }, + ), + ), + want={ + # Every cloud and stack. + "provider-config-kubernetes", + "provider-config-helm", + "gateway", + "gateway-class", + "gateway-ca-certificate", + "gateway-ca-issuer", + "gateway-serving-certificate", + "gateway-ca-bundle", + "gateway-ca-configmap", + "gateway-client-ca-bundle", + "gateway-client-auth", + "usage-gateway-class-by-gateway", + "usage-envoy-gateway-by-gateway-class", + # The common components. + "ai-gateway", + "ai-gateway-crds", + "cluster-agent", + "dra-driver-critical-pods-quota", + "envoy-gateway", + "gaie-crds-inferenceobjectives.inference.networking.x-k8s.io", + "gaie-crds-inferencepools.inference.networking.k8s.io", + "gaie-crds-inferencepools.inference.networking.x-k8s.io", + "gateway-namespace", + "gateway-proxy", + "gateway-selfsigned-issuer", + "trust-manager", + "usage-ai-gateway-crds-by-ai-gateway", + "usage-cert-manager-by-envoy-gateway", + "usage-cert-manager-by-gateway-selfsigned-issuer", + "usage-gateway-namespace-by-gateway-proxy", + "usage-gateway-namespace-by-cluster-agent", + "usage-gateway-namespace-by-gateway-selfsigned-issuer", + "usage-gateway-selfsigned-issuer-by-trust-manager", + # The hand-written CoreWeave half. CKS runs a managed GPU Operator with + # NFD, so it carries no node-feature-discovery of its own. + "cert-manager", + "nvidia-dra-driver-gpu", + "dcgm-exporter", + # The Standard stack. + "leader-worker-set", + }, + ), + ComposedResourceKeysCase( + name="CoreWeaveDynamo", + reason=( + "On CoreWeave, the Dynamo stack composes the gateway, the common components, CoreWeave's hand-written half " + "and the Dynamo stack's own components, each under its pinned key." + ), + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_serving_stack( + cloud="CoreWeave", + stack="Dynamo", + dra_drivers=["gpu.nvidia.com"], + secrets=[ + v1alpha1.Secret(type="Kubeconfig", name="kube-secret", key="kubeconfig"), + v1alpha1.Secret(type="GoogleApplicationCredentials", name="sa-secret", key="private_key"), + ], + gateway=v1alpha1.Gateway( + hostname="test-backend.gateways.example.com", + clientCAs=[ + v1alpha1.ClientCA( + name="eu", + certificate="-----BEGIN CERTIFICATE-----\nfleet\n-----END CERTIFICATE-----\n", + ) + ], + ), + gpu=None, + ), + resources={ + "provider-config-kubernetes": _observed_ready(), + "provider-config-helm": _observed_ready(), + "gateway": _observed_ready(), + "gateway-class": _observed_ready(), + "gateway-ca-certificate": _observed_ready(), + "gateway-ca-issuer": _observed_ready(), + "gateway-serving-certificate": _observed_ready(), + "gateway-ca-bundle": _observed_ready(), + "gateway-ca-configmap": _observed_ready(), + "gateway-client-ca-bundle": _observed_ready(), + "gateway-client-auth": _observed_ready(), + "usage-gateway-class-by-gateway": _observed_ready(), + "usage-envoy-gateway-by-gateway-class": _observed_ready(), + "ai-gateway": _observed_ready(), + "ai-gateway-crds": _observed_ready(), + "cluster-agent": _observed_ready(), + "dra-driver-critical-pods-quota": _observed_ready(), + "envoy-gateway": _observed_ready(), + "gaie-crds-inferenceobjectives.inference.networking.x-k8s.io": _observed_ready(), + "gaie-crds-inferencepools.inference.networking.k8s.io": _observed_ready(), + "gaie-crds-inferencepools.inference.networking.x-k8s.io": _observed_ready(), + "gateway-namespace": _observed_ready(), + "gateway-proxy": _observed_ready(), + "gateway-selfsigned-issuer": _observed_ready(), + "trust-manager": _observed_ready(), + "usage-ai-gateway-crds-by-ai-gateway": _observed_ready(), + "usage-cert-manager-by-envoy-gateway": _observed_ready(), + "usage-cert-manager-by-gateway-selfsigned-issuer": _observed_ready(), + "usage-gateway-namespace-by-gateway-proxy": _observed_ready(), + "usage-gateway-namespace-by-cluster-agent": _observed_ready(), + "usage-gateway-namespace-by-gateway-selfsigned-issuer": _observed_ready(), + "usage-gateway-selfsigned-issuer-by-trust-manager": _observed_ready(), + "cert-manager": _observed_ready(), + "nvidia-dra-driver-gpu": _observed_ready(), + "dcgm-exporter": _observed_ready(), + "grove": _observed_ready(), + "kai-queue": _observed_ready(), + "kai-queue-root": _observed_ready(), + "kai-scheduler": _observed_ready(), + "modelexpress-crds-modelcacheentries.modelexpress.nvidia.com": _observed_ready(), + "modelexpress-crds-modelmetadatas.modelexpress.nvidia.com": _observed_ready(), + "modelexpress-server": _observed_ready(), + "modelexpress-server-role": _observed_ready(), + "modelexpress-server-rolebinding": _observed_ready(), + "modelexpress-server-sa": _observed_ready(), + "modelexpress-server-svc": _observed_ready(), + "usage-kai-scheduler-by-kai-queue": _observed_ready(), + "usage-kai-scheduler-by-kai-queue-root": _observed_ready(), + "usage-modelexpress-crds-modelcacheentries.modelexpress.nvidia.com-by-modelexpress-server": _observed_ready(), + "usage-modelexpress-crds-modelmetadatas.modelexpress.nvidia.com-by-modelexpress-server": _observed_ready(), + }, + ), + ), + want={ + # Every cloud and stack. + "provider-config-kubernetes", + "provider-config-helm", + "gateway", + "gateway-class", + "gateway-ca-certificate", + "gateway-ca-issuer", + "gateway-serving-certificate", + "gateway-ca-bundle", + "gateway-ca-configmap", + "gateway-client-ca-bundle", + "gateway-client-auth", + "usage-gateway-class-by-gateway", + "usage-envoy-gateway-by-gateway-class", + # The common components. + "ai-gateway", + "ai-gateway-crds", + "cluster-agent", + "dra-driver-critical-pods-quota", + "envoy-gateway", + "gaie-crds-inferenceobjectives.inference.networking.x-k8s.io", + "gaie-crds-inferencepools.inference.networking.k8s.io", + "gaie-crds-inferencepools.inference.networking.x-k8s.io", + "gateway-namespace", + "gateway-proxy", + "gateway-selfsigned-issuer", + "trust-manager", + "usage-ai-gateway-crds-by-ai-gateway", + "usage-cert-manager-by-envoy-gateway", + "usage-cert-manager-by-gateway-selfsigned-issuer", + "usage-gateway-namespace-by-gateway-proxy", + "usage-gateway-namespace-by-cluster-agent", + "usage-gateway-namespace-by-gateway-selfsigned-issuer", + "usage-gateway-selfsigned-issuer-by-trust-manager", + # The hand-written CoreWeave half. CKS runs a managed GPU Operator with + # NFD, so it carries no node-feature-discovery of its own. + "cert-manager", + "nvidia-dra-driver-gpu", + "dcgm-exporter", + # The Dynamo stack. + "grove", + "kai-queue", + "kai-queue-root", + "kai-scheduler", + "modelexpress-crds-modelcacheentries.modelexpress.nvidia.com", + "modelexpress-crds-modelmetadatas.modelexpress.nvidia.com", + "modelexpress-server", + "modelexpress-server-role", + "modelexpress-server-rolebinding", + "modelexpress-server-sa", + "modelexpress-server-svc", + "usage-kai-scheduler-by-kai-queue", + "usage-kai-scheduler-by-kai-queue-root", + "usage-modelexpress-crds-modelcacheentries.modelexpress.nvidia.com-by-modelexpress-server", + "usage-modelexpress-crds-modelmetadatas.modelexpress.nvidia.com-by-modelexpress-server", + }, + ), ComposedResourceKeysCase( name="CivoStandard", reason=( diff --git a/functions/compose-serving-stack/tests/test_stacks.py b/functions/compose-serving-stack/tests/test_stacks.py index 531621d5f..7389cae2f 100644 --- a/functions/compose-serving-stack/tests/test_stacks.py +++ b/functions/compose-serving-stack/tests/test_stacks.py @@ -55,6 +55,16 @@ class SupportedDriversCase: want: frozenset[str] +@dataclasses.dataclass +class GatewayProxyCase: + """A test case for the EnvoyProxy stacks.join builds for a cloud.""" + + name: str + reason: str + cloud: str + want: dict + + @dataclasses.dataclass class WithNvLinkDisabledCase: """A test case for civo.with_nvlink_disabled.""" @@ -242,6 +252,12 @@ def test_join_fails_closed(case: JoinFailsClosedCase) -> None: cloud="Civo", want=frozenset({"gpu.nvidia.com", "dra.cpu"}), ), + SupportedDriversCase( + name="CoreWeave", + reason="CoreWeave tags the NVIDIA and CPU stacks.", + cloud="CoreWeave", + want=frozenset({"gpu.nvidia.com", "dra.cpu"}), + ), SupportedDriversCase( name="Existing", reason="Existing is the one cloud that tags the AMD stack, beside NVIDIA and CPU.", @@ -257,6 +273,57 @@ def test_supported_drivers(case: SupportedDriversCase) -> None: assert stacks.supported_drivers(case.cloud) == case.want, case.reason # ty: ignore[invalid-argument-type] # parametrize erases the Literal +# The EnvoyProxy every gateway's LoadBalancer Service is configured by, +# pinned as literals so a cloud's Service settings change deliberately. +GATEWAY_PROXY_CASES = [ + GatewayProxyCase( + name="NoServiceSettings", + reason="A cloud whose load balancers need nothing gets only the externalTrafficPolicy pin.", + cloud="GKE", + want={ + "apiVersion": "gateway.envoyproxy.io/v1alpha1", + "kind": "EnvoyProxy", + "metadata": {"name": "cluster-gateway", "namespace": "modelplane-system"}, + "spec": { + "provider": { + "type": "Kubernetes", + "kubernetes": {"envoyService": {"externalTrafficPolicy": "Cluster"}}, + }, + }, + }, + ), + GatewayProxyCase( + name="CoreWeave", + reason="CoreWeave's EnvoyProxy asks CKS for a public load balancer beside the externalTrafficPolicy pin.", + cloud="CoreWeave", + want={ + "apiVersion": "gateway.envoyproxy.io/v1alpha1", + "kind": "EnvoyProxy", + "metadata": {"name": "cluster-gateway", "namespace": "modelplane-system"}, + "spec": { + "provider": { + "type": "Kubernetes", + "kubernetes": { + "envoyService": { + "annotations": {"service.beta.kubernetes.io/coreweave-load-balancer-type": "public"}, + "externalTrafficPolicy": "Cluster", + }, + }, + }, + }, + }, + ), +] + + +@pytest.mark.parametrize("case", GATEWAY_PROXY_CASES, ids=lambda case: case.name) +def test_gateway_proxy(case: GatewayProxyCase) -> None: + """The joined stack's gateway-proxy EnvoyProxy carries the cloud's Service settings.""" + joined = stacks.join(case.cloud, "Standard") # ty: ignore[invalid-argument-type] # parametrize erases the Literal + proxy = next(c for c in joined if isinstance(c, stacks.Manifests) and c.key == "gateway-proxy") + assert proxy.manifests == [case.want], case.reason + + @pytest.mark.parametrize("stack", stacks.stacks()) @pytest.mark.parametrize("cloud", stacks.clouds()) def test_join_filter_empty(cloud: stacks.Cloud, stack: stacks.Stack) -> None: @@ -462,31 +529,38 @@ def test_generated_dcgm_csv(cloud: str) -> None: """ -def test_nebius_dcgm_exporter() -> None: - """Nebius's dcgm-exporter exports the generated clouds' DCGM fields. +# The clouds that install NVIDIA's standalone dcgm-exporter chart rather +# than the gpu-operator. +STANDALONE_EXPORTER_CLOUDS = ("Nebius", "CoreWeave") - Nebius installs NVIDIA's standalone dcgm-exporter chart rather than the - GPU Operator, so the CSV goes in the chart's customMetrics rather than + +@pytest.mark.parametrize("cloud", STANDALONE_EXPORTER_CLOUDS) +def test_standalone_dcgm_exporter(cloud: str) -> None: + """A standalone dcgm-exporter exports the generated clouds' DCGM fields. + + These clouds install NVIDIA's standalone dcgm-exporter chart rather than + the GPU Operator, so the CSV goes in the chart's customMetrics rather than dcgmExporter.config.data. Left unset, the chart falls back to its own - shorter default list and Nebius silently exports fewer fields than every + shorter default list and the cloud silently exports fewer fields than every other cloud. Compared against the same literal as Civo's cases, so a generator-moved CSV fails here until a human confirms the change. """ - joined = stacks.join("Nebius", "Standard") + joined = stacks.join(cloud, "Standard") # ty: ignore[invalid-argument-type] # parametrize erases the Literal exporter = next(c for c in joined if isinstance(c, stacks.Chart) and c.key == "dcgm-exporter") assert exporter.values is not None assert exporter.values["customMetrics"] == _DCGM_METRICS_CSV -def test_nebius_exporter_affinity() -> None: - """Nebius's dcgm-exporter schedules by the DRA kubelet plugin's PCI terms. +@pytest.mark.parametrize("cloud", STANDALONE_EXPORTER_CLOUDS) +def test_standalone_exporter_affinity(cloud: str) -> None: + """A standalone dcgm-exporter schedules by the DRA kubelet plugin's PCI terms. - Nebius GPU nodes carry pci-0302_10de but not pci-10de, so dropping the - 0302 term would leave the exporter on no node with every unit test still - passing. Spelled out as a literal so a changed term fails here rather - than only on a real cluster. + Nebius and CKS GPU nodes carry pci-0302_10de but not pci-10de, so dropping + the 0302 term would leave the exporter on no node with every unit test + still passing. Spelled out as a literal so a changed term fails here + rather than only on a real cluster. """ - joined = stacks.join("Nebius", "Standard") + joined = stacks.join(cloud, "Standard") # ty: ignore[invalid-argument-type] # parametrize erases the Literal exporter = next(c for c in joined if isinstance(c, stacks.Chart) and c.key == "dcgm-exporter") assert exporter.values is not None required = exporter.values["affinity"]["nodeAffinity"]["requiredDuringSchedulingIgnoredDuringExecution"] @@ -496,14 +570,15 @@ def test_nebius_exporter_affinity() -> None: ] -def test_nebius_exporter_dra() -> None: - """Nebius's dcgm-exporter attributes GPU series to DRA-allocated pods. +@pytest.mark.parametrize("cloud", STANDALONE_EXPORTER_CLOUDS) +def test_standalone_exporter_dra(cloud: str) -> None: + """A standalone dcgm-exporter attributes GPU series to DRA-allocated pods. - Nebius allocates GPUs through DRA ResourceClaims, not the device plugin. - Without kubernetesDRA the exporter still exports every GPU's fields, but - can't say which pod holds the GPU, and nothing else fails. + Modelplane allocates GPUs through DRA ResourceClaims, not the device + plugin. Without kubernetesDRA the exporter still exports every GPU's + fields, but can't say which pod holds the GPU, and nothing else fails. """ - joined = stacks.join("Nebius", "Standard") + joined = stacks.join(cloud, "Standard") # ty: ignore[invalid-argument-type] # parametrize erases the Literal exporter = next(c for c in joined if isinstance(c, stacks.Chart) and c.key == "dcgm-exporter") assert exporter.values is not None assert exporter.values["kubernetesDRA"] == {"enabled": True} diff --git a/schemas/.lock.json b/schemas/.lock.json index 66c1ebcd8..f5e193428 100644 --- a/schemas/.lock.json +++ b/schemas/.lock.json @@ -1,6 +1,6 @@ { "packages": { - "fs://apis": "c69b947b593aa624b26448b710efbe7376efcfb5961ef2fb21856fa830465af3", + "fs://apis": "7765fe0a737410e9a3f3504455b088e8d2c9ba91fb33046a56acb5441f1ce741", "git://https://github.com/crossplane/crossplane/cluster/crds": "14c53aac914d393b5bcc00962fbc90d4be5d35bc", "git://https://github.com/modelplaneai/cluster-agent/cluster/charts/cluster-agent/files/crds": "a833d3f6f7d9a6ac6083e7453375b58b65ee741a", "xpkg://xpkg.upbound.io/upbound/provider-aws-ec2:v2.9.4": "sha256:7a0febdfb8da2d59a9fdcdbc2d476811f00566fcb941880313fc2034b0ca6177", @@ -10,6 +10,7 @@ "xpkg://xpkg.upbound.io/upbound/provider-azure-containerservice:v2.8.4": "sha256:20ac5475f94c449b8c2a689760d0defb412943901ffb203f8716bfaf65e188d4", "xpkg://xpkg.upbound.io/upbound/provider-azure-network:v2.8.4": "sha256:ab757668f87d4a80c7c2b8b9fb12705f51ade907ba24f09417de92c698eb74fb", "xpkg://xpkg.upbound.io/upbound/provider-civo:v1.0.1": "sha256:d7f4d8d340597e190cc6efb0a9f4a1e16c813df955c7d999d5f49ab30277bfec", + "xpkg://xpkg.upbound.io/upbound/provider-coreweave:v0.1.0": "sha256:bcb3d48c873d3b906b3d1e0343952855e70e1b5a9044fb21b6e30f82299172e2", "xpkg://xpkg.upbound.io/upbound/provider-family-aws:v2.9.4": "sha256:bbaac0fedaf80e088d7536ccc3936a998bbd006ca676c434344e8b761e388441", "xpkg://xpkg.upbound.io/upbound/provider-family-azure:v2.8.4": "sha256:b3497267266a4561e5204a3036101178e672905fceaabe0e89f0565604b7e54f", "xpkg://xpkg.upbound.io/upbound/provider-family-gcp:v3.1.3": "sha256:bc7c1ccc324acf29bd4648ec3a8262d24d6954402f9649e5a912cb7b73f9277f", diff --git a/schemas/python/models/ai/modelplane/inferenceclass/v1alpha1.py b/schemas/python/models/ai/modelplane/inferenceclass/v1alpha1.py index 22e16ec31..21388b761 100644 --- a/schemas/python/models/ai/modelplane/inferenceclass/v1alpha1.py +++ b/schemas/python/models/ai/modelplane/inferenceclass/v1alpha1.py @@ -130,6 +130,25 @@ class Civo(BaseModel): class AcceleratorModel1(BaseModel): + count: conint(ge=1, le=16) + type: constr(min_length=1, max_length=63) + """ + GPU accelerator type (e.g. nvidia-h100, nvidia-l40s). Informational - reported on the consuming InferenceCluster's status. + """ + + +class Coreweave(BaseModel): + accelerator: AcceleratorModel1 | None = None + """ + 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. + """ + instanceType: constr(min_length=1, max_length=63) + """ + 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. + """ + + +class AcceleratorModel2(BaseModel): count: conint(ge=1, le=16) type: constr(min_length=1, max_length=63) """ @@ -138,7 +157,7 @@ class AcceleratorModel1(BaseModel): class Eks(BaseModel): - accelerator: AcceleratorModel1 | None = None + accelerator: AcceleratorModel2 | None = None """ GPU accelerator to attach when provisioning the node group. 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 group: a standard node image, the modelplane.ai/cpu label and taint, and no GPU stack. """ @@ -149,7 +168,7 @@ class Eks(BaseModel): """ -class AcceleratorModel2(BaseModel): +class AcceleratorModel3(BaseModel): count: conint(ge=1, le=16) type: constr(min_length=1, max_length=63) """ @@ -158,7 +177,7 @@ class AcceleratorModel2(BaseModel): class Gke(BaseModel): - accelerator: AcceleratorModel2 | None = None + accelerator: AcceleratorModel3 | None = None """ GPU accelerator to attach when provisioning the node pool. Provisioning input only: the scheduler matches against spec.devices, not this block, so count here is the GCP machine's GPU count and need not be restated in devices. 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: a standard node image, the modelplane.ai/cpu label and taint, and no GPU stack. """ @@ -166,7 +185,7 @@ class Gke(BaseModel): machineType: constr(min_length=1) -class AcceleratorModel3(BaseModel): +class AcceleratorModel4(BaseModel): count: conint(ge=1, le=16) type: constr(min_length=1, max_length=63) """ @@ -175,7 +194,7 @@ class AcceleratorModel3(BaseModel): class Nebius(BaseModel): - accelerator: AcceleratorModel3 | None = None + accelerator: AcceleratorModel4 | None = None """ GPU accelerator to attach when provisioning the node group. 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 group: a standard node image, the modelplane.ai/cpu label and taint, and no GPU stack. """ @@ -194,7 +213,7 @@ class Nebius(BaseModel): """ -class AcceleratorModel4(BaseModel): +class AcceleratorModel5(BaseModel): count: conint(ge=1, le=16) type: constr(min_length=1, max_length=63) """ @@ -203,7 +222,7 @@ class AcceleratorModel4(BaseModel): class Vultr(BaseModel): - accelerator: AcceleratorModel4 | None = None + accelerator: AcceleratorModel5 | None = None """ 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: a standard node image, the modelplane.ai/cpu label and taint, and no GPU stack. """ @@ -216,10 +235,11 @@ class Vultr(BaseModel): class Provisioning(BaseModel): aks: Aks | None = None civo: Civo | None = None + coreweave: Coreweave | None = None eks: Eks | None = None gke: Gke | None = None nebius: Nebius | None = None - provider: Literal['GKE', 'EKS', 'AKS', 'Nebius', 'Vultr', 'Civo'] + provider: Literal['GKE', 'EKS', 'AKS', 'Nebius', 'Vultr', 'Civo', 'CoreWeave'] vultr: Vultr | None = None diff --git a/schemas/python/models/ai/modelplane/inferencecluster/v1alpha1.py b/schemas/python/models/ai/modelplane/inferencecluster/v1alpha1.py index 03bbca998..09fcebc51 100644 --- a/schemas/python/models/ai/modelplane/inferencecluster/v1alpha1.py +++ b/schemas/python/models/ai/modelplane/inferencecluster/v1alpha1.py @@ -47,6 +47,21 @@ class Civo(BaseModel): """ +class Coreweave(BaseModel): + credentials: Credentials | None = None + """ + CoreWeave ProviderConfig or ClusterProviderConfig used to authenticate to the CoreWeave API. Its API access token also authenticates Modelplane to the cluster. Defaults to the ClusterProviderConfig named default. + """ + kubernetesVersion: constr(pattern=r'^[0-9]+\.[0-9]+$') | None = None + """ + CKS Kubernetes minor version, in the form X.Y. CKS applies patch versions itself. + """ + zone: constr(min_length=1, max_length=32) + """ + CoreWeave Availability Zone for the cluster (e.g. US-EAST-04A). Instance types vary by zone. + """ + + class Eks(BaseModel): credentials: Credentials | None = None """ @@ -152,6 +167,10 @@ class Cluster(BaseModel): """ Civo Kubernetes (k3s) cluster configuration. Required when source is Civo. """ + coreweave: Coreweave | None = None + """ + CoreWeave Kubernetes Service (CKS) cluster configuration. Required when source is CoreWeave. + """ eks: Eks | None = None """ EKS cluster configuration. Required when source is EKS. @@ -168,7 +187,9 @@ class Cluster(BaseModel): """ Nebius mk8s cluster configuration. Required when source is Nebius; may be empty, since every field has a default. The cluster is created in the project the referenced ProviderConfig or ClusterProviderConfig sets as its projectID; Nebius projects are bound to a region, so the project also determines where the cluster runs. """ - source: Literal['GKE', 'EKS', 'AKS', 'Nebius', 'Vultr', 'Civo', 'Existing'] + source: Literal[ + 'GKE', 'EKS', 'AKS', 'Nebius', 'Vultr', 'Civo', 'CoreWeave', 'Existing' + ] """ Cluster provisioning method. """ @@ -242,7 +263,7 @@ class NodePool(BaseModel): """ fabric: Fabric | None = None """ - High-performance node-to-node fabric for multi-node engines, so a gang's tensor-parallel traffic isn't capped by TCP. Omit for standard VPC networking. + High-performance node-to-node fabric for multi-node engines, so a gang's tensor-parallel traffic isn't capped by TCP. Omit for standard VPC networking. Ignored on CoreWeave, where a CKS instance type either includes InfiniBand or doesn't. """ maxNodeCount: conint(ge=1) | None = None """ diff --git a/schemas/python/models/ai/modelplane/infrastructure/coreweavecluster/__init__.py b/schemas/python/models/ai/modelplane/infrastructure/coreweavecluster/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/ai/modelplane/infrastructure/coreweavecluster/v1alpha1.py b/schemas/python/models/ai/modelplane/infrastructure/coreweavecluster/v1alpha1.py new file mode 100644 index 000000000..726cff8e3 --- /dev/null +++ b/schemas/python/models/ai/modelplane/infrastructure/coreweavecluster/v1alpha1.py @@ -0,0 +1,201 @@ +# generated by datamodel-codegen: +# filename: workdir/infrastructure_modelplane_ai_v1alpha1_coreweavecluster.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field, conint, constr + +from .....io.k8s.apimachinery.pkg.apis.meta import v1 + + +class Credentials(BaseModel): + name: constr(min_length=1, max_length=253) | None = 'default' + type: Literal['ProviderConfig', 'ClusterProviderConfig'] | None = ( + 'ClusterProviderConfig' + ) + + +class CompositionRef(BaseModel): + name: str + + +class CompositionRevisionRef(BaseModel): + name: str + + +class CompositionRevisionSelector(BaseModel): + matchLabels: dict[str, str] + + +class CompositionSelector(BaseModel): + matchLabels: dict[str, str] + + +class ResourceRef(BaseModel): + apiVersion: str + kind: str + name: str | None = None + + +class Crossplane(BaseModel): + compositionRef: CompositionRef | None = None + compositionRevisionRef: CompositionRevisionRef | None = None + compositionRevisionSelector: CompositionRevisionSelector | None = None + compositionSelector: CompositionSelector | None = None + compositionUpdatePolicy: Literal['Automatic', 'Manual'] | None = None + resourceRefs: list[ResourceRef] | None = None + + +class Gpu(BaseModel): + acceleratorType: constr(min_length=1, max_length=63) + """ + 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. + """ + + +class NodePool(BaseModel): + gpu: Gpu | None = None + """ + GPU configuration. Required when role is GPU. + """ + instanceType: constr(min_length=1, max_length=63) + """ + 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. + """ + maxNodeCount: conint(ge=1, le=1000) | None = None + """ + 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. + """ + minNodeCount: conint(ge=0, le=1000) | None = None + """ + 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. + """ + name: constr( + pattern=r'^[a-z0-9]([-a-z0-9]*[a-z0-9])?$', min_length=1, max_length=40 + ) + """ + Unique name for this node pool. Used as the name of the pool's CKS NodePool. + """ + nodeCount: conint(ge=0, le=1000) | None = 1 + """ + 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). + """ + role: Literal['GPU', 'CPU'] + """ + 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. + """ + + +class Spec(BaseModel): + credentials: Credentials | None = None + """ + 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. + """ + crossplane: Crossplane | None = None + """ + Configures how Crossplane will reconcile this composite resource + """ + kubernetesVersion: constr(pattern=r'^[0-9]+\.[0-9]+$') | None = '1.37' + """ + CKS Kubernetes minor version, in the form X.Y. CKS applies patch versions itself. + """ + nodePools: list[NodePool] = Field(..., max_length=8, min_length=1) + """ + Node pools for the cluster. A system pool for controllers and infrastructure workloads is added automatically. + """ + zone: constr(min_length=1, max_length=32) + """ + CoreWeave Availability Zone for the cluster (e.g. US-EAST-04A). Instance types vary by zone. + """ + + +class Cache(BaseModel): + storageClassName: constr(max_length=253) | None = None + """ + 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. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + message: str | None = None + observedGeneration: int | None = None + reason: str + status: str + type: str + + +class Secret(BaseModel): + key: constr(max_length=253) + """ + Key within the Secret that holds the credential data. + """ + name: constr(max_length=253) + """ + Name of the Secret. + """ + type: Literal['Kubeconfig'] = 'Kubeconfig' + """ + The type of credential this secret contains. Kubeconfig contains a kubeconfig file with the cluster endpoint and a CoreWeave API access token. + """ + + +class Status(BaseModel): + cache: Cache | None = None + """ + Observed ModelCache RWX storage state. + """ + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + secrets: list[Secret] | None = None + """ + Secrets produced by this cluster. Consumers use these to authenticate to the cluster. All secrets are in the same namespace as this CoreWeaveCluster. + """ + + +class CoreWeaveCluster(BaseModel): + apiVersion: Literal['infrastructure.modelplane.ai/v1alpha1'] | None = ( + 'infrastructure.modelplane.ai/v1alpha1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['CoreWeaveCluster'] | None = 'CoreWeaveCluster' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + CoreWeaveClusterSpec defines the desired state of CoreWeaveCluster. + """ + status: Status | None = None + """ + CoreWeaveClusterStatus defines the observed state of CoreWeaveCluster. + """ + + +class CoreWeaveClusterList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[CoreWeaveCluster] + """ + List of coreweaveclusters. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/ai/modelplane/infrastructure/servingstack/v1alpha1.py b/schemas/python/models/ai/modelplane/infrastructure/servingstack/v1alpha1.py index cf1823ab5..f343e8052 100644 --- a/schemas/python/models/ai/modelplane/infrastructure/servingstack/v1alpha1.py +++ b/schemas/python/models/ai/modelplane/infrastructure/servingstack/v1alpha1.py @@ -115,7 +115,9 @@ class Secret(BaseModel): class Spec(BaseModel): - cloud: Literal['GKE', 'EKS', 'AKS', 'Nebius', 'Vultr', 'Civo', 'Existing'] + cloud: Literal[ + 'GKE', 'EKS', 'AKS', 'Nebius', 'Vultr', 'Civo', 'CoreWeave', 'Existing' + ] """ The cloud the target cluster runs on. Selects the fixed set of components and versions this stack installs there, which is resolved per cloud at build time and changes only with a Modelplane release. Mirrors InferenceCluster.spec.cluster.source; the cluster composition sets it. """ diff --git a/schemas/python/models/io/upbound/coreweave/__init__.py b/schemas/python/models/io/upbound/coreweave/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/cks/__init__.py b/schemas/python/models/io/upbound/coreweave/cks/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/cks/cluster/__init__.py b/schemas/python/models/io/upbound/coreweave/cks/cluster/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/cks/cluster/v1beta1.py b/schemas/python/models/io/upbound/coreweave/cks/cluster/v1beta1.py new file mode 100644 index 000000000..1219d621f --- /dev/null +++ b/schemas/python/models/io/upbound/coreweave/cks/cluster/v1beta1.py @@ -0,0 +1,765 @@ +# generated by datamodel-codegen: +# filename: workdir/cks_coreweave_upbound_io_v1beta1_cluster.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....k8s.apimachinery.pkg.apis.meta import v1 + + +class AuthnWebhook(BaseModel): + ca: str | None = None + """ + encoded PEM-encoded certificate. + The CA certificate for the webhook server. Must be a base64-encoded PEM-encoded certificate. + """ + server: str | None = None + """ + (String) The URL of the webhook server. + The URL of the webhook server. + """ + + +class AuthzWebhook(BaseModel): + ca: str | None = None + """ + encoded PEM-encoded certificate. + The CA certificate for the webhook server. Must be a base64-encoded PEM-encoded certificate. + """ + server: str | None = None + """ + (String) The URL of the webhook server. + The URL of the webhook server. + """ + + +class Public(BaseModel): + allowCidrs: list[str] | None = None + """ + empty set denies every other source, so 0.0.0.0/0 alone allows only IPv4 sources and ::/0 alone allows only IPv6 sources. At most 1024 entries. Each must be an IPv4 or IPv6 network address with no host bits set, such as 203.0.113.0/24. + Source network prefixes allowed to reach the endpoint. An empty set allows all sources, subject to `deny_cidrs`. A non-empty set denies every other source, so `0.0.0.0/0` alone allows only IPv4 sources and `::/0` alone allows only IPv6 sources. At most 1024 entries. Each must be an IPv4 or IPv6 network address with no host bits set, such as `203.0.113.0/24`. + """ + denyCidrs: list[str] | None = None + """ + (Set of String) Source network prefixes denied access to the endpoint. Entries take precedence over allow_cidrs. At most 1024 entries. Each must be an IPv4 or IPv6 network address with no host bits set, such as 203.0.113.0/24. + Source network prefixes denied access to the endpoint. Entries take precedence over `allow_cidrs`. At most 1024 entries. Each must be an IPv4 or IPv6 network address with no host bits set, such as `203.0.113.0/24`. + """ + + +class KubeApiAccess(BaseModel): + public: Public | None = None + """ + managed authentication. This setting is independent of kube_api_access. + """ + + +class NodePortRange(BaseModel): + end: float | None = None + """ + (Number) + """ + start: float | None = None + """ + (Number) + """ + + +class Oidc(BaseModel): + adminGroupBinding: str | None = None + """ + admin role for bootstrap access to the cluster. + The OIDC group that is bound to the cluster-admin role for bootstrap access to the cluster. + """ + ca: str | None = None + """ + encoded PEM-encoded certificate. + The CA certificate for the OIDC issuer. Must be a base64-encoded PEM-encoded certificate. + """ + clientId: str | None = None + """ + (String) The client ID for the OIDC client. + The client ID for the OIDC client. + """ + groupsClaim: str | None = None + """ + (String) The claim to use as the groups. + The claim to use as the groups. + """ + groupsPrefix: str | None = None + """ + (String) The prefix to use for the groups. + The prefix to use for the groups. + """ + issuerUrl: str | None = None + """ + (String) The URL of the OIDC issuer. + The URL of the OIDC issuer. + """ + requiredClaim: str | None = None + """ + (String) The claim to require for authentication. + The claim to require for authentication. + """ + signingAlgs: list[str] | None = None + """ + (Set of String) A list of signing algorithms that the OpenID Connect discovery endpoint uses. + A list of signing algorithms that the OpenID Connect discovery endpoint uses. + """ + usernameClaim: str | None = None + """ + (String) The claim to use as the username. + The claim to use as the username. + """ + usernamePrefix: str | None = None + """ + (String) The prefix to use for the username. + The prefix to use for the username. + """ + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class SharedStorageClusterIdRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class SharedStorageClusterIdSelector(BaseModel): + matchControllerRef: bool | None = None + """ + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + """ + matchLabels: dict[str, str] | None = None + """ + MatchLabels ensures an object with matching labels is selected. + """ + policy: Policy | None = None + """ + Policies for selection. + """ + + +class Tailscale(BaseModel): + clientId: str | None = None + """ + (String) The client ID for the OIDC client. + The Tailscale Client ID for the federated identity. + """ + + +class VpcIdRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class VpcIdSelector(BaseModel): + matchControllerRef: bool | None = None + """ + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + """ + matchLabels: dict[str, str] | None = None + """ + MatchLabels ensures an object with matching labels is selected. + """ + policy: Policy | None = None + """ + Policies for selection. + """ + + +class ForProvider(BaseModel): + additionalServerSans: list[str] | None = None + """ + (Set of String) Additional Subject Alternative Names (SANs) to include in the Kubernetes API server TLS certificate. Maximum 10 entries. + Additional Subject Alternative Names (SANs) to include in the Kubernetes API server TLS certificate. Maximum 10 entries. + """ + auditPolicy: str | None = None + """ + encoded JSON/YAML string. + Audit policy for the cluster. Must be provided as a base64-encoded JSON/YAML string. + """ + authnWebhook: AuthnWebhook | None = None + """ + (Attributes) Authentication webhook configuration for the cluster. (see below for nested schema) + """ + authzWebhook: AuthzWebhook | None = None + """ + (Attributes) Authorization webhook configuration for the cluster. (see below for nested schema) + """ + internalLbCidrNames: list[str] | None = None + """ + only. + The names of the vpc prefixes to use as internal load balancer CIDR ranges. Internal load balancers are reachable within the VPC but not accessible from the internet. + The prefixes must exist in the cluster's VPC. This field is append-only. + """ + internalLbCidrNamesV6: list[str] | None = None + """ + (List of String) IPv6 Internal Load Balancer CIDR names. If any IPv6 field is set, then ALL IPv6 fields must be set. + IPv6 Internal Load Balancer CIDR names. If any IPv6 field is set, then ALL IPv6 fields must be set. + """ + kubeApiAccess: KubeApiAccess | None = None + """ + (Attributes) Access configuration for the cluster's Kubernetes API server, independent of public. Before you set this attribute, contact CoreWeave support to enable this feature for your organization. Changes, including clears, cannot be applied in the same update as a Kubernetes version change. (see below for nested schema) + """ + kubelet: str | None = None + """ + (String) Selective overrides applied to every cluster Node's kubelet configuration, as a JSON object (e.g. jsonencode({ maxPods = 256 })). A Node reboot is required for changes to take effect, and unknown options are stored but ignored by CKS. See the Kubernetes kubelet configuration reference for supported options. + Selective overrides applied to every cluster Node's kubelet configuration, as a JSON object (e.g. `jsonencode({ maxPods = 256 })`). A Node reboot is required for changes to take effect, and unknown options are stored but ignored by CKS. See the [Kubernetes kubelet configuration reference](https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/) for supported options. + """ + name: str | None = None + """ + (String) The name of the cluster. Must not be longer than 30 characters. + The name of the cluster. Must not be longer than 30 characters. + """ + nodePortRange: NodePortRange | None = None + """ + (Attributes) Kubernetes Service NodePort range. NodePort range can be expanded in existing clusters but not shrunk. Updating the NodePort range to a smaller range will require a replacement of the cluster. (see below for nested schema) + """ + oidc: Oidc | None = None + """ + server. (see below for nested schema) + """ + podCidrName: str | None = None + """ + (String) The name of the vpc prefix to use as the pod CIDR range. The prefix must exist in the cluster's VPC. + The name of the vpc prefix to use as the pod CIDR range. The prefix must exist in the cluster's VPC. + """ + podCidrNameV6: str | None = None + """ + (String) IPv6 Pod CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + IPv6 Pod CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + """ + public: bool | None = None + """ + managed authentication. This setting is independent of kube_api_access. + Whether the cluster's Kubernetes API server is reachable through CoreWeave's public ingress, which supports CoreWeave-managed authentication. This setting is independent of `kube_api_access`. + """ + serviceCidrName: str | None = None + """ + (String) The name of the vpc prefix to use as the service CIDR range. The prefix must exist in the cluster's VPC. + The name of the vpc prefix to use as the service CIDR range. The prefix must exist in the cluster's VPC. + """ + serviceCidrNameV6: str | None = None + """ + (String) IPv6 Service CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + IPv6 Service CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + """ + sharedStorageClusterId: str | None = None + """ + (String) The cluster_id of the cluster to share storage with. Must be enabled by CoreWeave support. Contact CoreWeave support if you are interested in this feature. + The `cluster_id` of the cluster to share storage with. Must be enabled by CoreWeave support. Contact CoreWeave support if you are interested in this feature. + """ + sharedStorageClusterIdRef: SharedStorageClusterIdRef | None = None + """ + Reference to a Cluster in cks to populate sharedStorageClusterId. + """ + sharedStorageClusterIdSelector: SharedStorageClusterIdSelector | None = None + """ + Selector for a Cluster in cks to populate sharedStorageClusterId. + """ + tailscale: Tailscale | None = None + """ + (Attributes) Tailscale configuration for the cluster. Enables cluster access via a Tailscale VPN. (see below for nested schema) + """ + version: str | None = None + """ + (String) The version of Kubernetes to run on the cluster, in minor version format (e.g. 'v1.35'). Patch versions are automatically applied by CKS as they are released. + The version of Kubernetes to run on the cluster, in minor version format (e.g. 'v1.35'). Patch versions are automatically applied by CKS as they are released. + """ + vpcId: str | None = None + """ + (String) The ID of the VPC in which the cluster is located. Must be a VPC in the same Availability Zone as the cluster. + The ID of the VPC in which the cluster is located. Must be a VPC in the same Availability Zone as the cluster. + """ + vpcIdRef: VpcIdRef | None = None + """ + Reference to a VPC in networking to populate vpcId. + """ + vpcIdSelector: VpcIdSelector | None = None + """ + Selector for a VPC in networking to populate vpcId. + """ + zone: str | None = None + """ + (String) The Availability Zone in which the cluster is located. + The Availability Zone in which the cluster is located. + """ + + +class InitProvider(BaseModel): + additionalServerSans: list[str] | None = None + """ + (Set of String) Additional Subject Alternative Names (SANs) to include in the Kubernetes API server TLS certificate. Maximum 10 entries. + Additional Subject Alternative Names (SANs) to include in the Kubernetes API server TLS certificate. Maximum 10 entries. + """ + auditPolicy: str | None = None + """ + encoded JSON/YAML string. + Audit policy for the cluster. Must be provided as a base64-encoded JSON/YAML string. + """ + authnWebhook: AuthnWebhook | None = None + """ + (Attributes) Authentication webhook configuration for the cluster. (see below for nested schema) + """ + authzWebhook: AuthzWebhook | None = None + """ + (Attributes) Authorization webhook configuration for the cluster. (see below for nested schema) + """ + internalLbCidrNames: list[str] | None = None + """ + only. + The names of the vpc prefixes to use as internal load balancer CIDR ranges. Internal load balancers are reachable within the VPC but not accessible from the internet. + The prefixes must exist in the cluster's VPC. This field is append-only. + """ + internalLbCidrNamesV6: list[str] | None = None + """ + (List of String) IPv6 Internal Load Balancer CIDR names. If any IPv6 field is set, then ALL IPv6 fields must be set. + IPv6 Internal Load Balancer CIDR names. If any IPv6 field is set, then ALL IPv6 fields must be set. + """ + kubeApiAccess: KubeApiAccess | None = None + """ + (Attributes) Access configuration for the cluster's Kubernetes API server, independent of public. Before you set this attribute, contact CoreWeave support to enable this feature for your organization. Changes, including clears, cannot be applied in the same update as a Kubernetes version change. (see below for nested schema) + """ + kubelet: str | None = None + """ + (String) Selective overrides applied to every cluster Node's kubelet configuration, as a JSON object (e.g. jsonencode({ maxPods = 256 })). A Node reboot is required for changes to take effect, and unknown options are stored but ignored by CKS. See the Kubernetes kubelet configuration reference for supported options. + Selective overrides applied to every cluster Node's kubelet configuration, as a JSON object (e.g. `jsonencode({ maxPods = 256 })`). A Node reboot is required for changes to take effect, and unknown options are stored but ignored by CKS. See the [Kubernetes kubelet configuration reference](https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/) for supported options. + """ + name: str | None = None + """ + (String) The name of the cluster. Must not be longer than 30 characters. + The name of the cluster. Must not be longer than 30 characters. + """ + nodePortRange: NodePortRange | None = None + """ + (Attributes) Kubernetes Service NodePort range. NodePort range can be expanded in existing clusters but not shrunk. Updating the NodePort range to a smaller range will require a replacement of the cluster. (see below for nested schema) + """ + oidc: Oidc | None = None + """ + server. (see below for nested schema) + """ + podCidrName: str | None = None + """ + (String) The name of the vpc prefix to use as the pod CIDR range. The prefix must exist in the cluster's VPC. + The name of the vpc prefix to use as the pod CIDR range. The prefix must exist in the cluster's VPC. + """ + podCidrNameV6: str | None = None + """ + (String) IPv6 Pod CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + IPv6 Pod CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + """ + public: bool | None = None + """ + managed authentication. This setting is independent of kube_api_access. + Whether the cluster's Kubernetes API server is reachable through CoreWeave's public ingress, which supports CoreWeave-managed authentication. This setting is independent of `kube_api_access`. + """ + serviceCidrName: str | None = None + """ + (String) The name of the vpc prefix to use as the service CIDR range. The prefix must exist in the cluster's VPC. + The name of the vpc prefix to use as the service CIDR range. The prefix must exist in the cluster's VPC. + """ + serviceCidrNameV6: str | None = None + """ + (String) IPv6 Service CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + IPv6 Service CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + """ + sharedStorageClusterId: str | None = None + """ + (String) The cluster_id of the cluster to share storage with. Must be enabled by CoreWeave support. Contact CoreWeave support if you are interested in this feature. + The `cluster_id` of the cluster to share storage with. Must be enabled by CoreWeave support. Contact CoreWeave support if you are interested in this feature. + """ + sharedStorageClusterIdRef: SharedStorageClusterIdRef | None = None + """ + Reference to a Cluster in cks to populate sharedStorageClusterId. + """ + sharedStorageClusterIdSelector: SharedStorageClusterIdSelector | None = None + """ + Selector for a Cluster in cks to populate sharedStorageClusterId. + """ + tailscale: Tailscale | None = None + """ + (Attributes) Tailscale configuration for the cluster. Enables cluster access via a Tailscale VPN. (see below for nested schema) + """ + version: str | None = None + """ + (String) The version of Kubernetes to run on the cluster, in minor version format (e.g. 'v1.35'). Patch versions are automatically applied by CKS as they are released. + The version of Kubernetes to run on the cluster, in minor version format (e.g. 'v1.35'). Patch versions are automatically applied by CKS as they are released. + """ + vpcId: str | None = None + """ + (String) The ID of the VPC in which the cluster is located. Must be a VPC in the same Availability Zone as the cluster. + The ID of the VPC in which the cluster is located. Must be a VPC in the same Availability Zone as the cluster. + """ + vpcIdRef: VpcIdRef | None = None + """ + Reference to a VPC in networking to populate vpcId. + """ + vpcIdSelector: VpcIdSelector | None = None + """ + Selector for a VPC in networking to populate vpcId. + """ + zone: str | None = None + """ + (String) The Availability Zone in which the cluster is located. + The Availability Zone in which the cluster is located. + """ + + +class ProviderConfigRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Spec(BaseModel): + deletionPolicy: Literal['Orphan', 'Delete'] | None = 'Delete' + """ + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + """ + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class PublicModel(BaseModel): + endpoint: str | None = None + """ + (String) The HTTPS URL of the public Kubernetes API endpoint, suitable for a kubeconfig server. null until the endpoint is available. + The HTTPS URL of the public Kubernetes API endpoint, suitable for a kubeconfig `server`. `null` until the endpoint is available. + """ + status: str | None = None + """ + (String) The current status of the cluster. + Acceptance of the endpoint's route and access policy. The value is one of the following: `STATUS_UNSPECIFIED`, `STATUS_UNKNOWN`, `STATUS_PENDING`, `STATUS_ACCEPTED`, `STATUS_REJECTED`, `STATUS_ERROR`. `STATUS_ACCEPTED` does not confirm that the endpoint is reachable or that CIDR rules are enforced. + """ + + +class KubeApiAccessStatus(BaseModel): + caData: str | None = None + """ + encoded PEM CA bundle for the Kubernetes API server. Use base64decode() to obtain the PEM text. null until the API reports a CA. + The base64-encoded PEM CA bundle for the Kubernetes API server. Use `base64decode()` to obtain the PEM text. `null` until the API reports a CA. + """ + public: PublicModel | None = None + """ + managed authentication. This setting is independent of kube_api_access. + """ + + +class AtProvider(BaseModel): + additionalServerSans: list[str] | None = None + """ + (Set of String) Additional Subject Alternative Names (SANs) to include in the Kubernetes API server TLS certificate. Maximum 10 entries. + Additional Subject Alternative Names (SANs) to include in the Kubernetes API server TLS certificate. Maximum 10 entries. + """ + apiServerEndpoint: str | None = None + """ + server. + The endpoint for the cluster's api-server. + """ + auditPolicy: str | None = None + """ + encoded JSON/YAML string. + Audit policy for the cluster. Must be provided as a base64-encoded JSON/YAML string. + """ + authnWebhook: AuthnWebhook | None = None + """ + (Attributes) Authentication webhook configuration for the cluster. (see below for nested schema) + """ + authzWebhook: AuthzWebhook | None = None + """ + (Attributes) Authorization webhook configuration for the cluster. (see below for nested schema) + """ + id: str | None = None + """ + (String) The unique identifier of the cluster. + """ + internalLbCidrNames: list[str] | None = None + """ + only. + The names of the vpc prefixes to use as internal load balancer CIDR ranges. Internal load balancers are reachable within the VPC but not accessible from the internet. + The prefixes must exist in the cluster's VPC. This field is append-only. + """ + internalLbCidrNamesV6: list[str] | None = None + """ + (List of String) IPv6 Internal Load Balancer CIDR names. If any IPv6 field is set, then ALL IPv6 fields must be set. + IPv6 Internal Load Balancer CIDR names. If any IPv6 field is set, then ALL IPv6 fields must be set. + """ + kubeApiAccess: KubeApiAccess | None = None + """ + (Attributes) Access configuration for the cluster's Kubernetes API server, independent of public. Before you set this attribute, contact CoreWeave support to enable this feature for your organization. Changes, including clears, cannot be applied in the same update as a Kubernetes version change. (see below for nested schema) + """ + kubeApiAccessStatus: KubeApiAccessStatus | None = None + """ + place update plan, so providers configured from them receive unknown values during that plan. (see below for nested schema) + """ + kubelet: str | None = None + """ + (String) Selective overrides applied to every cluster Node's kubelet configuration, as a JSON object (e.g. jsonencode({ maxPods = 256 })). A Node reboot is required for changes to take effect, and unknown options are stored but ignored by CKS. See the Kubernetes kubelet configuration reference for supported options. + Selective overrides applied to every cluster Node's kubelet configuration, as a JSON object (e.g. `jsonencode({ maxPods = 256 })`). A Node reboot is required for changes to take effect, and unknown options are stored but ignored by CKS. See the [Kubernetes kubelet configuration reference](https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/) for supported options. + """ + name: str | None = None + """ + (String) The name of the cluster. Must not be longer than 30 characters. + The name of the cluster. Must not be longer than 30 characters. + """ + nodePortRange: NodePortRange | None = None + """ + (Attributes) Kubernetes Service NodePort range. NodePort range can be expanded in existing clusters but not shrunk. Updating the NodePort range to a smaller range will require a replacement of the cluster. (see below for nested schema) + """ + oidc: Oidc | None = None + """ + server. (see below for nested schema) + """ + podCidrName: str | None = None + """ + (String) The name of the vpc prefix to use as the pod CIDR range. The prefix must exist in the cluster's VPC. + The name of the vpc prefix to use as the pod CIDR range. The prefix must exist in the cluster's VPC. + """ + podCidrNameV6: str | None = None + """ + (String) IPv6 Pod CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + IPv6 Pod CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + """ + public: bool | None = None + """ + managed authentication. This setting is independent of kube_api_access. + Whether the cluster's Kubernetes API server is reachable through CoreWeave's public ingress, which supports CoreWeave-managed authentication. This setting is independent of `kube_api_access`. + """ + serviceAccountOidcIssuerUrl: str | None = None + """ + -service-account-issuer flag on the kube-apiserver. + The URL of the OIDC issuer for the cluster's service account tokens. This value corresponds to the `--service-account-issuer` flag on the kube-apiserver. + """ + serviceCidrName: str | None = None + """ + (String) The name of the vpc prefix to use as the service CIDR range. The prefix must exist in the cluster's VPC. + The name of the vpc prefix to use as the service CIDR range. The prefix must exist in the cluster's VPC. + """ + serviceCidrNameV6: str | None = None + """ + (String) IPv6 Service CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + IPv6 Service CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + """ + sharedStorageClusterId: str | None = None + """ + (String) The cluster_id of the cluster to share storage with. Must be enabled by CoreWeave support. Contact CoreWeave support if you are interested in this feature. + The `cluster_id` of the cluster to share storage with. Must be enabled by CoreWeave support. Contact CoreWeave support if you are interested in this feature. + """ + status: str | None = None + """ + (String) The current status of the cluster. + The current status of the cluster. + """ + tailscale: Tailscale | None = None + """ + (Attributes) Tailscale configuration for the cluster. Enables cluster access via a Tailscale VPN. (see below for nested schema) + """ + version: str | None = None + """ + (String) The version of Kubernetes to run on the cluster, in minor version format (e.g. 'v1.35'). Patch versions are automatically applied by CKS as they are released. + The version of Kubernetes to run on the cluster, in minor version format (e.g. 'v1.35'). Patch versions are automatically applied by CKS as they are released. + """ + vpcId: str | None = None + """ + (String) The ID of the VPC in which the cluster is located. Must be a VPC in the same Availability Zone as the cluster. + The ID of the VPC in which the cluster is located. Must be a VPC in the same Availability Zone as the cluster. + """ + zone: str | None = None + """ + (String) The Availability Zone in which the cluster is located. + The Availability Zone in which the cluster is located. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class Cluster(BaseModel): + apiVersion: Literal['cks.coreweave.upbound.io/v1beta1'] | None = ( + 'cks.coreweave.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['Cluster'] | None = 'Cluster' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + ClusterSpec defines the desired state of Cluster + """ + status: Status | None = None + """ + ClusterStatus defines the observed state of Cluster. + """ + + +class ClusterList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[Cluster] + """ + List of clusters. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/coreweave/containerregistry/__init__.py b/schemas/python/models/io/upbound/coreweave/containerregistry/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/containerregistry/accessconfiguration/__init__.py b/schemas/python/models/io/upbound/coreweave/containerregistry/accessconfiguration/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/containerregistry/accessconfiguration/v1beta1.py b/schemas/python/models/io/upbound/coreweave/containerregistry/accessconfiguration/v1beta1.py new file mode 100644 index 000000000..1572f7b12 --- /dev/null +++ b/schemas/python/models/io/upbound/coreweave/containerregistry/accessconfiguration/v1beta1.py @@ -0,0 +1,394 @@ +# generated by datamodel-codegen: +# filename: workdir/containerregistry_coreweave_upbound_io_v1beta1_accessconfiguration.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....k8s.apimachinery.pkg.apis.meta import v1 + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class NamespaceRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class NamespaceSelector(BaseModel): + matchControllerRef: bool | None = None + """ + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + """ + matchLabels: dict[str, str] | None = None + """ + MatchLabels ensures an object with matching labels is selected. + """ + policy: Policy | None = None + """ + Policies for selection. + """ + + +class Rules(BaseModel): + expression: str | None = None + """ + (String) CEL expression evaluated against the request identity and context. + CEL expression evaluated against the request identity and context. + """ + + +class PolicySets(BaseModel): + identitySelector: str | None = None + """ + (String) Identity class evaluated by this policy set. Supported values: COREWEAVE, WORKLOAD_FEDERATION, ANY_AUTHENTICATED, ANONYMOUS, COREWEAVE_KUBERNETES. COREWEAVE_KUBERNETES is deprecated; use WORKLOAD_FEDERATION. + Identity class evaluated by this policy set. Supported values: `COREWEAVE`, `WORKLOAD_FEDERATION`, `ANY_AUTHENTICATED`, `ANONYMOUS`, `COREWEAVE_KUBERNETES`. COREWEAVE_KUBERNETES is deprecated; use WORKLOAD_FEDERATION. + """ + rules: dict[str, Rules] | None = None + """ + (Attributes Map) Authoritative rules keyed by stable IDs. Omitted rules are removed. (see below for nested schema) + """ + + +class RequestIpAcl(BaseModel): + allowCidrs: list[str] | None = None + """ + mapped IPv6 are rejected. + Canonical IPv4 or IPv6 networks; host bits and IPv4-mapped IPv6 are rejected. + """ + denyCidrs: list[str] | None = None + """ + mapped IPv6 are rejected. + Canonical IPv4 or IPv6 networks; host bits and IPv4-mapped IPv6 are rejected. + """ + + +class Timeouts(BaseModel): + create: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + """ + delete: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs. + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs. + """ + read: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. + """ + update: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + """ + + +class ForProvider(BaseModel): + namespace: str | None = None + """ + images. Changing it replaces this policy resource. + Parent namespace name, such as example-images. Changing it replaces this policy resource. + """ + namespaceRef: NamespaceRef | None = None + """ + Reference to a Namespace in containerregistry to populate namespace. + """ + namespaceSelector: NamespaceSelector | None = None + """ + Selector for a Namespace in containerregistry to populate namespace. + """ + policySets: dict[str, PolicySets] | None = None + """ + (Attributes Map) Authoritative policy sets keyed by stable IDs. Omitted entries are removed. COREWEAVE_KUBERNETES is deprecated; use WORKLOAD_FEDERATION. (see below for nested schema) + """ + requestIpAcl: RequestIpAcl | None = None + """ + (Attributes) Optional request filter. At least one allow or deny network is required; omission removes the ACL. An ACL grants no authorization. (see below for nested schema) + """ + timeouts: Timeouts | None = None + """ + (Attributes) (see below for nested schema) + """ + + +class InitProvider(BaseModel): + namespace: str | None = None + """ + images. Changing it replaces this policy resource. + Parent namespace name, such as example-images. Changing it replaces this policy resource. + """ + namespaceRef: NamespaceRef | None = None + """ + Reference to a Namespace in containerregistry to populate namespace. + """ + namespaceSelector: NamespaceSelector | None = None + """ + Selector for a Namespace in containerregistry to populate namespace. + """ + policySets: dict[str, PolicySets] | None = None + """ + (Attributes Map) Authoritative policy sets keyed by stable IDs. Omitted entries are removed. COREWEAVE_KUBERNETES is deprecated; use WORKLOAD_FEDERATION. (see below for nested schema) + """ + requestIpAcl: RequestIpAcl | None = None + """ + (Attributes) Optional request filter. At least one allow or deny network is required; omission removes the ACL. An ACL grants no authorization. (see below for nested schema) + """ + timeouts: Timeouts | None = None + """ + (Attributes) (see below for nested schema) + """ + + +class ProviderConfigRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Spec(BaseModel): + deletionPolicy: Literal['Orphan', 'Delete'] | None = 'Delete' + """ + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + """ + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + accessConfigState: str | None = None + """ + (String) Current access policy rollout state. + Current access policy rollout state. + """ + createdAt: str | None = None + """ + (String) Creation timestamp in RFC3339 format. + Creation timestamp in RFC3339 format. + """ + etag: str | None = None + """ + (String) Current concurrency token. Changes when the server updates the resource. + Current concurrency token. Changes when the server updates the resource. + """ + id: str | None = None + name: str | None = None + """ + (String) Canonical API resource name. + Canonical API resource name. + """ + namespace: str | None = None + """ + images. Changing it replaces this policy resource. + Parent namespace name, such as example-images. Changing it replaces this policy resource. + """ + policySets: dict[str, PolicySets] | None = None + """ + (Attributes Map) Authoritative policy sets keyed by stable IDs. Omitted entries are removed. COREWEAVE_KUBERNETES is deprecated; use WORKLOAD_FEDERATION. (see below for nested schema) + """ + requestIpAcl: RequestIpAcl | None = None + """ + (Attributes) Optional request filter. At least one allow or deny network is required; omission removes the ACL. An ACL grants no authorization. (see below for nested schema) + """ + revision: float | None = None + """ + (Number) Current desired policy revision. + Current desired policy revision. + """ + timeouts: Timeouts | None = None + """ + (Attributes) (see below for nested schema) + """ + updatedAt: str | None = None + """ + (String) Last update timestamp in RFC3339 format. + Last update timestamp in RFC3339 format. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class AccessConfiguration(BaseModel): + apiVersion: Literal['containerregistry.coreweave.upbound.io/v1beta1'] | None = ( + 'containerregistry.coreweave.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['AccessConfiguration'] | None = 'AccessConfiguration' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + AccessConfigurationSpec defines the desired state of AccessConfiguration + """ + status: Status | None = None + """ + AccessConfigurationStatus defines the observed state of AccessConfiguration. + """ + + +class AccessConfigurationList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[AccessConfiguration] + """ + List of accessconfigurations. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/coreweave/containerregistry/lifecyclepolicy/__init__.py b/schemas/python/models/io/upbound/coreweave/containerregistry/lifecyclepolicy/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/containerregistry/lifecyclepolicy/v1beta1.py b/schemas/python/models/io/upbound/coreweave/containerregistry/lifecyclepolicy/v1beta1.py new file mode 100644 index 000000000..b3845188b --- /dev/null +++ b/schemas/python/models/io/upbound/coreweave/containerregistry/lifecyclepolicy/v1beta1.py @@ -0,0 +1,382 @@ +# generated by datamodel-codegen: +# filename: workdir/containerregistry_coreweave_upbound_io_v1beta1_lifecyclepolicy.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....k8s.apimachinery.pkg.apis.meta import v1 + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class NamespaceRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class NamespaceSelector(BaseModel): + matchControllerRef: bool | None = None + """ + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + """ + matchLabels: dict[str, str] | None = None + """ + MatchLabels ensures an object with matching labels is selected. + """ + policy: Policy | None = None + """ + Policies for selection. + """ + + +class Rules(BaseModel): + keepNewest: float | None = None + """ + (Number) Number of newest matching images to retain, from 1 to 100. + Number of newest matching images to retain, from 1 to 100. + """ + olderThan: str | None = None + """ + (String) Canonical positive protobuf duration, such as 86400s. + Canonical positive protobuf duration, such as 86400s. + """ + regex: str | None = None + """ + (String) Go RE2 expression matched against the complete repository name or repository:tag. Matching is anchored to the whole input. + Go RE2 expression matched against the complete repository name or repository:tag. Matching is anchored to the whole input. + """ + + +class Timeouts(BaseModel): + create: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + """ + delete: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs. + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs. + """ + read: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. + """ + update: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + """ + + +class ForProvider(BaseModel): + enabled: bool | None = None + """ + (Boolean) Whether lifecycle retention is enabled. Defaults to false. + Whether lifecycle retention is enabled. Defaults to false. + """ + namespace: str | None = None + """ + images. Changing it replaces this policy resource. + Parent namespace name, such as example-images. Changing it replaces this policy resource. + """ + namespaceRef: NamespaceRef | None = None + """ + Reference to a Namespace in containerregistry to populate namespace. + """ + namespaceSelector: NamespaceSelector | None = None + """ + Selector for a Namespace in containerregistry to populate namespace. + """ + rules: dict[str, Rules] | None = None + """ + (Attributes Map) Authoritative rules keyed by stable IDs. Omitted rules are removed. (see below for nested schema) + """ + timeouts: Timeouts | None = None + """ + (Attributes) (see below for nested schema) + """ + + +class InitProvider(BaseModel): + enabled: bool | None = None + """ + (Boolean) Whether lifecycle retention is enabled. Defaults to false. + Whether lifecycle retention is enabled. Defaults to false. + """ + namespace: str | None = None + """ + images. Changing it replaces this policy resource. + Parent namespace name, such as example-images. Changing it replaces this policy resource. + """ + namespaceRef: NamespaceRef | None = None + """ + Reference to a Namespace in containerregistry to populate namespace. + """ + namespaceSelector: NamespaceSelector | None = None + """ + Selector for a Namespace in containerregistry to populate namespace. + """ + rules: dict[str, Rules] | None = None + """ + (Attributes Map) Authoritative rules keyed by stable IDs. Omitted rules are removed. (see below for nested schema) + """ + timeouts: Timeouts | None = None + """ + (Attributes) (see below for nested schema) + """ + + +class ProviderConfigRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Spec(BaseModel): + deletionPolicy: Literal['Orphan', 'Delete'] | None = 'Delete' + """ + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + """ + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + appliedRevision: float | None = None + """ + (Number) Last lifecycle policy revision acknowledged by the worker. Acknowledgement does not indicate completed retention or garbage collection. + Last lifecycle policy revision acknowledged by the worker. Acknowledgement does not indicate completed retention or garbage collection. + """ + createdAt: str | None = None + """ + (String) Creation timestamp in RFC3339 format. + Creation timestamp in RFC3339 format. + """ + enabled: bool | None = None + """ + (Boolean) Whether lifecycle retention is enabled. Defaults to false. + Whether lifecycle retention is enabled. Defaults to false. + """ + etag: str | None = None + """ + (String) Current concurrency token. Changes when the server updates the resource. + Current concurrency token. Changes when the server updates the resource. + """ + id: str | None = None + name: str | None = None + """ + (String) Canonical API resource name. + Canonical API resource name. + """ + namespace: str | None = None + """ + images. Changing it replaces this policy resource. + Parent namespace name, such as example-images. Changing it replaces this policy resource. + """ + revision: float | None = None + """ + (Number) Current desired policy revision. + Current desired policy revision. + """ + rules: dict[str, Rules] | None = None + """ + (Attributes Map) Authoritative rules keyed by stable IDs. Omitted rules are removed. (see below for nested schema) + """ + timeouts: Timeouts | None = None + """ + (Attributes) (see below for nested schema) + """ + updatedAt: str | None = None + """ + (String) Last update timestamp in RFC3339 format. + Last update timestamp in RFC3339 format. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class LifecyclePolicy(BaseModel): + apiVersion: Literal['containerregistry.coreweave.upbound.io/v1beta1'] | None = ( + 'containerregistry.coreweave.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['LifecyclePolicy'] | None = 'LifecyclePolicy' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + LifecyclePolicySpec defines the desired state of LifecyclePolicy + """ + status: Status | None = None + """ + LifecyclePolicyStatus defines the observed state of LifecyclePolicy. + """ + + +class LifecyclePolicyList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[LifecyclePolicy] + """ + List of lifecyclepolicies. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/coreweave/containerregistry/namespace/__init__.py b/schemas/python/models/io/upbound/coreweave/containerregistry/namespace/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/containerregistry/namespace/v1beta1.py b/schemas/python/models/io/upbound/coreweave/containerregistry/namespace/v1beta1.py new file mode 100644 index 000000000..408f4cf48 --- /dev/null +++ b/schemas/python/models/io/upbound/coreweave/containerregistry/namespace/v1beta1.py @@ -0,0 +1,473 @@ +# generated by datamodel-codegen: +# filename: workdir/containerregistry_coreweave_upbound_io_v1beta1_namespace.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....k8s.apimachinery.pkg.apis.meta import v1 + + +class Rules(BaseModel): + expression: str | None = None + """ + (String) CEL expression evaluated against the request identity and context. + CEL expression evaluated against the request identity and context. + """ + + +class PolicySets(BaseModel): + identitySelector: str | None = None + """ + (String) Identity class evaluated by this policy set. Supported values: COREWEAVE, WORKLOAD_FEDERATION, ANY_AUTHENTICATED, ANONYMOUS, COREWEAVE_KUBERNETES. COREWEAVE_KUBERNETES is deprecated; use WORKLOAD_FEDERATION. + Identity class evaluated by this policy set. Supported values: `COREWEAVE`, `WORKLOAD_FEDERATION`, `ANY_AUTHENTICATED`, `ANONYMOUS`, `COREWEAVE_KUBERNETES`. COREWEAVE_KUBERNETES is deprecated; use WORKLOAD_FEDERATION. + """ + rules: dict[str, Rules] | None = None + """ + (Attributes Map) Authoritative rules keyed by stable IDs. Omitted rules are removed. (see below for nested schema) + """ + + +class RequestIpAcl(BaseModel): + allowCidrs: list[str] | None = None + """ + mapped IPv6 are rejected. + Canonical IPv4 or IPv6 networks; host bits and IPv4-mapped IPv6 are rejected. + """ + denyCidrs: list[str] | None = None + """ + mapped IPv6 are rejected. + Canonical IPv4 or IPv6 networks; host bits and IPv4-mapped IPv6 are rejected. + """ + + +class InitialAccessConfiguration(BaseModel): + policySets: dict[str, PolicySets] | None = None + """ + (Attributes Map) Authoritative policy sets keyed by stable IDs. Omitted entries are removed. COREWEAVE_KUBERNETES is deprecated; use WORKLOAD_FEDERATION. (see below for nested schema) + """ + requestIpAcl: RequestIpAcl | None = None + """ + (Attributes) Optional request filter. At least one allow or deny network is required; omission removes the ACL. An ACL grants no authorization. (see below for nested schema) + """ + + +class Timeouts(BaseModel): + create: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + """ + delete: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs. + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs. + """ + read: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. + """ + update: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + """ + + +class ForProvider(BaseModel): + forceDestroy: bool | None = None + """ + (Boolean) Irreversibly delete content on destroy. Apply this setting before destroying; never enabled automatically. + Irreversibly delete content on destroy. Apply this setting before destroying; never enabled automatically. + """ + initialAccessConfiguration: InitialAccessConfiguration | None = None + """ + only input. Omission selects the server default; {} atomically installs deny-all. Any change replaces the namespace. Import leaves this null; adding it after import replaces the namespace. (see below for nested schema) + """ + storageQuotaBytes: float | None = None + """ + (Number) Namespace ceiling in bytes. Omission/null clears the ceiling; zero disables pushes after evaluation. + Namespace ceiling in bytes. Omission/null clears the ceiling; zero disables pushes after evaluation. + """ + timeouts: Timeouts | None = None + """ + (Attributes) (see below for nested schema) + """ + zone: str | None = None + """ + case zone identifier. Changing it replaces the namespace. + Upper-case zone identifier. Changing it replaces the namespace. + """ + + +class InitProvider(BaseModel): + forceDestroy: bool | None = None + """ + (Boolean) Irreversibly delete content on destroy. Apply this setting before destroying; never enabled automatically. + Irreversibly delete content on destroy. Apply this setting before destroying; never enabled automatically. + """ + initialAccessConfiguration: InitialAccessConfiguration | None = None + """ + only input. Omission selects the server default; {} atomically installs deny-all. Any change replaces the namespace. Import leaves this null; adding it after import replaces the namespace. (see below for nested schema) + """ + storageQuotaBytes: float | None = None + """ + (Number) Namespace ceiling in bytes. Omission/null clears the ceiling; zero disables pushes after evaluation. + Namespace ceiling in bytes. Omission/null clears the ceiling; zero disables pushes after evaluation. + """ + timeouts: Timeouts | None = None + """ + (Attributes) (see below for nested schema) + """ + zone: str | None = None + """ + case zone identifier. Changing it replaces the namespace. + Upper-case zone identifier. Changing it replaces the namespace. + """ + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class ProviderConfigRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Spec(BaseModel): + deletionPolicy: Literal['Orphan', 'Delete'] | None = 'Delete' + """ + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + """ + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AccessMode(BaseModel): + mode: str | None = None + """ + (String) Effective access mode reported by the server. + Effective access mode reported by the server. + """ + reasons: list[str] | None = None + """ + reported reasons for the effective access mode. + Server-reported reasons for the effective access mode. + """ + updatedAt: str | None = None + """ + (String) Last update timestamp in RFC3339 format. + Last update timestamp in RFC3339 format. + """ + + +class ContentStatus(BaseModel): + blobCount: float | None = None + """ + (Number) Number of stored blobs. + Number of stored blobs. + """ + manifestCount: float | None = None + """ + (Number) Number of stored manifests. + Number of stored manifests. + """ + repositoryCount: float | None = None + """ + (Number) Number of repositories. + Number of repositories. + """ + tagCount: float | None = None + """ + (Number) Number of tags. + Number of tags. + """ + updatedAt: str | None = None + """ + (String) Last update timestamp in RFC3339 format. + Last update timestamp in RFC3339 format. + """ + usageBytes: float | None = None + """ + (Number) Total stored content size in bytes. + Total stored content size in bytes. + """ + + +class CreatedBy(BaseModel): + userUid: str | None = None + """ + (String) CoreWeave user identifier. + CoreWeave user identifier. + """ + username: str | None = None + """ + (String) CoreWeave username. + CoreWeave username. + """ + + +class UpdatedBy(BaseModel): + userUid: str | None = None + """ + (String) CoreWeave user identifier. + CoreWeave user identifier. + """ + username: str | None = None + """ + (String) CoreWeave username. + CoreWeave username. + """ + + +class AtProvider(BaseModel): + accessMode: AccessMode | None = None + """ + (Attributes) Current effective namespace access mode. (see below for nested schema) + """ + contentStatus: ContentStatus | None = None + """ + reported storage usage and content counts. These observations may lag content changes. (see below for nested schema) + """ + createdAt: str | None = None + """ + (String) Creation timestamp in RFC3339 format. + Creation timestamp in RFC3339 format. + """ + createdBy: CreatedBy | None = None + """ + (Attributes) Identity that created the namespace. (see below for nested schema) + """ + dnsName: str | None = None + """ + (String) Registry hostname used for OCI pushes and pulls. + Registry hostname used for OCI pushes and pulls. + """ + etag: str | None = None + """ + (String) Current concurrency token. Changes when the server updates the resource. + Current concurrency token. Changes when the server updates the resource. + """ + forceDestroy: bool | None = None + """ + (Boolean) Irreversibly delete content on destroy. Apply this setting before destroying; never enabled automatically. + Irreversibly delete content on destroy. Apply this setting before destroying; never enabled automatically. + """ + id: str | None = None + initialAccessConfiguration: InitialAccessConfiguration | None = None + """ + only input. Omission selects the server default; {} atomically installs deny-all. Any change replaces the namespace. Import leaves this null; adding it after import replaces the namespace. (see below for nested schema) + """ + orgId: str | None = None + """ + (String) Organization that owns the namespace. + Organization that owns the namespace. + """ + status: str | None = None + """ + (String) Current namespace provisioning state. + Current namespace provisioning state. + """ + storageQuotaBytes: float | None = None + """ + (Number) Namespace ceiling in bytes. Omission/null clears the ceiling; zero disables pushes after evaluation. + Namespace ceiling in bytes. Omission/null clears the ceiling; zero disables pushes after evaluation. + """ + timeouts: Timeouts | None = None + """ + (Attributes) (see below for nested schema) + """ + updatedAt: str | None = None + """ + (String) Last update timestamp in RFC3339 format. + Last update timestamp in RFC3339 format. + """ + updatedBy: UpdatedBy | None = None + """ + (Attributes) Identity that last updated the namespace. (see below for nested schema) + """ + zone: str | None = None + """ + case zone identifier. Changing it replaces the namespace. + Upper-case zone identifier. Changing it replaces the namespace. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class Namespace(BaseModel): + apiVersion: Literal['containerregistry.coreweave.upbound.io/v1beta1'] | None = ( + 'containerregistry.coreweave.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['Namespace'] | None = 'Namespace' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + NamespaceSpec defines the desired state of Namespace + """ + status: Status | None = None + """ + NamespaceStatus defines the observed state of Namespace. + """ + + +class NamespaceList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[Namespace] + """ + List of namespaces. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/coreweave/inference/__init__.py b/schemas/python/models/io/upbound/coreweave/inference/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/inference/capacityclaim/__init__.py b/schemas/python/models/io/upbound/coreweave/inference/capacityclaim/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/inference/capacityclaim/v1beta1.py b/schemas/python/models/io/upbound/coreweave/inference/capacityclaim/v1beta1.py new file mode 100644 index 000000000..53c09db78 --- /dev/null +++ b/schemas/python/models/io/upbound/coreweave/inference/capacityclaim/v1beta1.py @@ -0,0 +1,329 @@ +# generated by datamodel-codegen: +# filename: workdir/inference_coreweave_upbound_io_v1beta1_capacityclaim.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....k8s.apimachinery.pkg.apis.meta import v1 + + +class Resources(BaseModel): + capacityType: str | None = None + """ + (String) The capacity type for the capacity claim. Must be CAPACITY_TYPE_MANAGED. + The [capacity type](https://docs.coreweave.com/products/inference/scaling#capacity-claims) for the capacity claim. Must be `CAPACITY_TYPE_MANAGED`. + """ + instanceCount: float | None = None + """ + (Number) The number of instances to reserve. Must be at least 1. + The number of instances to reserve. Must be at least 1. + """ + instanceType: str | None = None + """ + 4x). Case-sensitive. + The instance type to reserve (e.g. `gb200-4x`). Case-sensitive. + """ + zones: list[str] | None = None + """ + WEST-04A), case-sensitive. At least one is required. + The availability zones where the capacity claim may use resources from (e.g. `US-WEST-04A`), case-sensitive. At least one is required. + """ + + +class ForProvider(BaseModel): + name: str | None = None + """ + (String) The name of the capacity claim. Must be a valid hostname label. + The name of the capacity claim. Must be a valid hostname label. + """ + resources: Resources | None = None + """ + (Attributes) Resource configuration for the capacity claim. (see below for nested schema) + """ + + +class InitProvider(BaseModel): + name: str | None = None + """ + (String) The name of the capacity claim. Must be a valid hostname label. + The name of the capacity claim. Must be a valid hostname label. + """ + resources: Resources | None = None + """ + (Attributes) Resource configuration for the capacity claim. (see below for nested schema) + """ + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class ProviderConfigRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Spec(BaseModel): + deletionPolicy: Literal['Orphan', 'Delete'] | None = 'Delete' + """ + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + """ + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class Condition(BaseModel): + lastUpdateTime: str | None = None + """ + (String) RFC3339 timestamp of the last condition transition. + RFC3339 timestamp of the last condition transition. + """ + message: str | None = None + """ + readable message about the condition's last transition. + A human-readable message about the condition's last transition. + """ + reason: str | None = None + """ + readable reason for the condition's last transition. + A short, machine-readable reason for the condition's last transition. + """ + status: str | None = None + """ + (String) The current status of the capacity claim. See the Inference API overview for status values. + The condition status (`True`, `False`, or `Unknown`). + """ + type: str | None = None + """ + (String) The condition type (e.g. Ready, Progressing). + The condition type (e.g. `Ready`, `Progressing`). + """ + + +class AtProvider(BaseModel): + allocatedInstances: float | None = None + """ + (Number) The number of instances currently allocated. + The number of instances currently allocated. + """ + conditions: list[Condition] | None = None + """ + (Attributes List) Detailed status conditions for the capacity claim. (see below for nested schema) + """ + createdAt: str | None = None + """ + (String) RFC3339 timestamp of when the capacity claim was created. + RFC3339 timestamp of when the capacity claim was created. + """ + id: str | None = None + """ + (String) The unique identifier of the capacity claim. + """ + name: str | None = None + """ + (String) The name of the capacity claim. Must be a valid hostname label. + The name of the capacity claim. Must be a valid hostname label. + """ + organizationId: str | None = None + """ + (String) The organization ID that owns the capacity claim. + The organization ID that owns the capacity claim. + """ + pendingInstances: float | None = None + """ + (Number) The number of instances pending allocation. + The number of instances pending allocation. + """ + resources: Resources | None = None + """ + (Attributes) Resource configuration for the capacity claim. (see below for nested schema) + """ + status: str | None = None + """ + (String) The current status of the capacity claim. See the Inference API overview for status values. + The current status of the capacity claim. See the [Inference API overview](https://docs.coreweave.com/products/inference/reference/api-overview#status-values) for status values. + """ + updatedAt: str | None = None + """ + (String) RFC3339 timestamp of when the capacity claim was last updated. + RFC3339 timestamp of when the capacity claim was last updated. + """ + + +class ConditionModel(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[ConditionModel] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class CapacityClaim(BaseModel): + apiVersion: Literal['inference.coreweave.upbound.io/v1beta1'] | None = ( + 'inference.coreweave.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['CapacityClaim'] | None = 'CapacityClaim' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + CapacityClaimSpec defines the desired state of CapacityClaim + """ + status: Status | None = None + """ + CapacityClaimStatus defines the observed state of CapacityClaim. + """ + + +class CapacityClaimList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[CapacityClaim] + """ + List of capacityclaims. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/coreweave/inference/deployment/__init__.py b/schemas/python/models/io/upbound/coreweave/inference/deployment/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/inference/deployment/v1beta1.py b/schemas/python/models/io/upbound/coreweave/inference/deployment/v1beta1.py new file mode 100644 index 000000000..a484cda1f --- /dev/null +++ b/schemas/python/models/io/upbound/coreweave/inference/deployment/v1beta1.py @@ -0,0 +1,507 @@ +# generated by datamodel-codegen: +# filename: workdir/inference_coreweave_upbound_io_v1beta1_deployment.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....k8s.apimachinery.pkg.apis.meta import v1 + + +class Autoscaling(BaseModel): + capacityClasses: list[str] | None = None + """ + (List of String) Ordered preference list of capacity classes to use. Order is significant: the first satisfiable class wins. Allowed values: CAPACITY_CLASS_RESERVED, CAPACITY_CLASS_ON_DEMAND. + Ordered preference list of [capacity classes](https://docs.coreweave.com/products/inference/scaling#capacity-claims) to use. Order is significant: the first satisfiable class wins. Allowed values: `CAPACITY_CLASS_RESERVED`, `CAPACITY_CLASS_ON_DEMAND`. + """ + concurrency: float | None = None + """ + (Number) Concurrency per instance target (≥1). Controls latency vs throughput tradeoffs. + Concurrency per instance target (≥1). Controls latency vs throughput tradeoffs. + """ + max: float | None = None + """ + (Number) Maximum number of instances. Must be ≥1. + Maximum number of instances. Must be ≥1. + """ + min: float | None = None + """ + (Number) Minimum number of instances. Must be ≥1. + Minimum number of instances. Must be ≥1. + """ + priority: float | None = None + """ + deployment scaling (0-1000). Higher values win when there is contention. + Priority for cross-deployment scaling (0-1000). Higher values win when there is contention. + """ + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class GatewayIdsRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class GatewayIdsSelector(BaseModel): + matchControllerRef: bool | None = None + """ + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + """ + matchLabels: dict[str, str] | None = None + """ + MatchLabels ensures an object with matching labels is selected. + """ + policy: Policy | None = None + """ + Policies for selection. + """ + + +class Model(BaseModel): + bucket: str | None = None + """ + (String) The CAIOS bucket the model is stored in. The inference service account must have bucket access. + The CAIOS bucket the model is stored in. The inference service account must have [bucket access](https://docs.coreweave.com/products/inference/models#grant-inference-access-to-your-bucket). + """ + name: str | None = None + """ + (String) The name of the deployment. Must be a valid hostname label. + The model name used in API requests (e.g. the `/models` endpoint). Length must be 4-63 characters. + """ + path: str | None = None + """ + (String) The CAIOS path to the model and its configuration files. + The CAIOS path to the model and its configuration files. + """ + + +class Resources(BaseModel): + gpuCount: float | None = None + """ + (Number) Number of GPUs per instance. Must be one of: 1, 2, 4, 8, 16. + Number of GPUs per instance. Must be one of: 1, 2, 4, 8, 16. + """ + instanceType: str | None = None + """ + (String) The instance type to use. + The instance type to use. + """ + + +class Runtime(BaseModel): + engine: str | None = None + """ + (String) The inference engine to use. + The inference engine to use. + """ + engineConfig: dict[str, str] | None = None + """ + specific configuration key/value pairs. + Engine-specific configuration key/value pairs. + """ + engineEnv: dict[str, str] | None = None + """ + specific environment variables to inject into the model runtime container. Variable names must come from the selected engine's server-side allow list, exposed by data.coreweave_inference_deployment_parameters..engine_env_options[].allowed_names; unsupported names are rejected by the API. + Engine-specific environment variables to inject into the model runtime container. Variable names must come from the selected engine's server-side allow list, exposed by `data.coreweave_inference_deployment_parameters..engine_env_options[].allowed_names`; unsupported names are rejected by the API. + """ + version: str | None = None + """ + (String) The version of the engine. If not set, defaults to the latest available version. Must follow semver format (e.g. 1.2.3). + The version of the engine. If not set, defaults to the latest available version. Must follow semver format (e.g. `1.2.3`). + """ + + +class Traffic(BaseModel): + weight: float | None = None + """ + 1000). Values are normalized into percentages across deployments with the same model name. + Traffic weight (0-1000). Values are normalized into percentages across deployments with the same model name. + """ + + +class ForProvider(BaseModel): + autoscaling: Autoscaling | None = None + """ + (Attributes) Autoscaling configuration. (see below for nested schema) + """ + disabled: bool | None = None + """ + (Boolean) Whether the deployment is disabled. + Whether the deployment is disabled. + """ + gatewayIds: list[str] | None = None + """ + (Set of String) The gateway IDs to associate the deployment with. At least one is required. + The [gateway](https://docs.coreweave.com/products/inference/gateways) IDs to associate the deployment with. At least one is required. + """ + gatewayIdsRefs: list[GatewayIdsRef] | None = None + """ + References to Gateway in inference to populate gatewayIds. + """ + gatewayIdsSelector: GatewayIdsSelector | None = None + """ + Selector for a list of Gateway in inference to populate gatewayIds. + """ + model: Model | None = None + """ + (Attributes) Model configuration. (see below for nested schema) + """ + name: str | None = None + """ + (String) The name of the deployment. Must be a valid hostname label. + The name of the deployment. Must be a valid hostname label. + """ + resources: Resources | None = None + """ + (Attributes) GPU resource configuration for the deployment. (see below for nested schema) + """ + runtime: Runtime | None = None + """ + (Attributes) Runtime selection and configuration. (see below for nested schema) + """ + traffic: Traffic | None = None + """ + (Attributes) Traffic configuration. Omit to accept the API default (weight 0, which normalizes to 100% when no other deployment shares the model name). After apply, weight is populated from the API. (see below for nested schema) + """ + + +class InitProvider(BaseModel): + autoscaling: Autoscaling | None = None + """ + (Attributes) Autoscaling configuration. (see below for nested schema) + """ + disabled: bool | None = None + """ + (Boolean) Whether the deployment is disabled. + Whether the deployment is disabled. + """ + gatewayIds: list[str] | None = None + """ + (Set of String) The gateway IDs to associate the deployment with. At least one is required. + The [gateway](https://docs.coreweave.com/products/inference/gateways) IDs to associate the deployment with. At least one is required. + """ + gatewayIdsRefs: list[GatewayIdsRef] | None = None + """ + References to Gateway in inference to populate gatewayIds. + """ + gatewayIdsSelector: GatewayIdsSelector | None = None + """ + Selector for a list of Gateway in inference to populate gatewayIds. + """ + model: Model | None = None + """ + (Attributes) Model configuration. (see below for nested schema) + """ + name: str | None = None + """ + (String) The name of the deployment. Must be a valid hostname label. + The name of the deployment. Must be a valid hostname label. + """ + resources: Resources | None = None + """ + (Attributes) GPU resource configuration for the deployment. (see below for nested schema) + """ + runtime: Runtime | None = None + """ + (Attributes) Runtime selection and configuration. (see below for nested schema) + """ + traffic: Traffic | None = None + """ + (Attributes) Traffic configuration. Omit to accept the API default (weight 0, which normalizes to 100% when no other deployment shares the model name). After apply, weight is populated from the API. (see below for nested schema) + """ + + +class ProviderConfigRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Spec(BaseModel): + deletionPolicy: Literal['Orphan', 'Delete'] | None = 'Delete' + """ + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + """ + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class Condition(BaseModel): + lastUpdateTime: str | None = None + """ + (String) RFC3339 timestamp of the last condition transition. + RFC3339 timestamp of the last condition transition. + """ + message: str | None = None + """ + readable message about the condition's last transition. + A human-readable message about the condition's last transition. + """ + reason: str | None = None + """ + readable reason for the condition's last transition. + A short, machine-readable reason for the condition's last transition. + """ + status: str | None = None + """ + (String) The current status of the deployment. See the Inference API overview for status values. Creation and updates that disable the deployment return once resources are applied rather than once the deployment is serving, so the status may not be ready immediately. An update to a serving deployment instead blocks until the rollout reaches STATUS_READY. Poll the API for live readiness. + The condition status (`True`, `False`, or `Unknown`). + """ + type: str | None = None + """ + (String) The condition type (e.g. Ready, Progressing). + The condition type (e.g. `Ready`, `Progressing`). + """ + + +class AtProvider(BaseModel): + autoscaling: Autoscaling | None = None + """ + (Attributes) Autoscaling configuration. (see below for nested schema) + """ + conditions: list[Condition] | None = None + """ + (Attributes List) Detailed status conditions for the deployment. (see below for nested schema) + """ + createdAt: str | None = None + """ + (String) RFC3339 timestamp of when the deployment was created. + RFC3339 timestamp of when the deployment was created. + """ + disabled: bool | None = None + """ + (Boolean) Whether the deployment is disabled. + Whether the deployment is disabled. + """ + gatewayIds: list[str] | None = None + """ + (Set of String) The gateway IDs to associate the deployment with. At least one is required. + The [gateway](https://docs.coreweave.com/products/inference/gateways) IDs to associate the deployment with. At least one is required. + """ + id: str | None = None + """ + (String) The unique identifier of the deployment. + """ + model: Model | None = None + """ + (Attributes) Model configuration. (see below for nested schema) + """ + name: str | None = None + """ + (String) The name of the deployment. Must be a valid hostname label. + The name of the deployment. Must be a valid hostname label. + """ + organizationId: str | None = None + """ + (String) The organization ID that owns the deployment. + The organization ID that owns the deployment. + """ + resources: Resources | None = None + """ + (Attributes) GPU resource configuration for the deployment. (see below for nested schema) + """ + runtime: Runtime | None = None + """ + (Attributes) Runtime selection and configuration. (see below for nested schema) + """ + status: str | None = None + """ + (String) The current status of the deployment. See the Inference API overview for status values. Creation and updates that disable the deployment return once resources are applied rather than once the deployment is serving, so the status may not be ready immediately. An update to a serving deployment instead blocks until the rollout reaches STATUS_READY. Poll the API for live readiness. + The current status of the deployment. See the [Inference API overview](https://docs.coreweave.com/products/inference/reference/api-overview) for status values. Creation and updates that disable the deployment return once resources are applied rather than once the deployment is serving, so the status may not be ready immediately. An update to a serving deployment instead blocks until the rollout reaches STATUS_READY. Poll the API for live readiness. + """ + traffic: Traffic | None = None + """ + (Attributes) Traffic configuration. Omit to accept the API default (weight 0, which normalizes to 100% when no other deployment shares the model name). After apply, weight is populated from the API. (see below for nested schema) + """ + updatedAt: str | None = None + """ + (String) RFC3339 timestamp of when the deployment was last updated. + RFC3339 timestamp of when the deployment was last updated. + """ + + +class ConditionModel(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[ConditionModel] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class Deployment(BaseModel): + apiVersion: Literal['inference.coreweave.upbound.io/v1beta1'] | None = ( + 'inference.coreweave.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['Deployment'] | None = 'Deployment' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + DeploymentSpec defines the desired state of Deployment + """ + status: Status | None = None + """ + DeploymentStatus defines the observed state of Deployment. + """ + + +class DeploymentList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[Deployment] + """ + List of deployments. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/coreweave/inference/gateway/__init__.py b/schemas/python/models/io/upbound/coreweave/inference/gateway/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/inference/gateway/v1beta1.py b/schemas/python/models/io/upbound/coreweave/inference/gateway/v1beta1.py new file mode 100644 index 000000000..5c726a916 --- /dev/null +++ b/schemas/python/models/io/upbound/coreweave/inference/gateway/v1beta1.py @@ -0,0 +1,456 @@ +# generated by datamodel-codegen: +# filename: workdir/inference_coreweave_upbound_io_v1beta1_gateway.yaml + +from __future__ import annotations + +from typing import Any, Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....k8s.apimachinery.pkg.apis.meta import v1 + + +class ApiKeySecretRef(BaseModel): + key: str + """ + The key to select. + """ + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class WeightsAndBiases(BaseModel): + apiKeySecretRef: ApiKeySecretRef | None = None + """ + (String, Sensitive) The organization API key for Weights & Biases. Requires server_url to also be set. + The organization API key for Weights & Biases. Requires `server_url` to also be set. + """ + enableRateLimiting: bool | None = None + """ + (Boolean) Whether to enable Weights & Biases controlled rate limiting. + Whether to enable Weights & Biases controlled rate limiting. + """ + enableUsageReports: bool | None = None + """ + (Boolean) Whether to send usage data to Weights & Biases. + Whether to send usage data to Weights & Biases. + """ + serverUrl: str | None = None + """ + (String) The Weights & Biases server URL. Defaults to the shared SaaS instance if not set. + The Weights & Biases server URL. Defaults to the shared SaaS instance if not set. + """ + + +class Auth(BaseModel): + coreweave: dict[str, Any] | None = None + """ + (Attributes) Use CoreWeave IAM authentication. (see below for nested schema) + """ + weightsAndBiases: WeightsAndBiases | None = None + """ + (Attributes) Use Weights & Biases authentication. (see below for nested schema) + """ + + +class EndpointConfiguration(BaseModel): + additionalDns: list[str] | None = None + """ + (Set of String) Additional DNS names for the gateway endpoint. These DNS names must be manually configured to point to the gateway endpoint. + Additional DNS names for the gateway endpoint. These DNS names must be manually configured to point to the gateway endpoint. + """ + allowedSourceIpRanges: list[str] | None = None + """ + length prefix for a single address (e.g. 203.0.113.5/32). + Client source IP ranges permitted to reach the gateway, in CIDR notation (IPv4 or IPv6). Up to 50 entries; an empty list applies no source restriction. Use a full-length prefix for a single address (e.g. `203.0.113.5/32`). + """ + edgeProxyMode: str | None = None + """ + (String) How client traffic reaches the gateway. Must be one of: EDGE_PROXY_MODE_MANAGED (traffic is proxied through CoreWeave's managed edge network: DDoS mitigation and WAF, with TLS terminated at the edge and the origin address kept out of public DNS) or EDGE_PROXY_MODE_DIRECT (clients connect straight to the gateway's load balancer, with no edge filtering and the load balancer address published in DNS). When unset, the platform default (currently EDGE_PROXY_MODE_MANAGED) applies. + How client traffic reaches the gateway. Must be one of: `EDGE_PROXY_MODE_MANAGED` (traffic is proxied through CoreWeave's managed edge network: DDoS mitigation and WAF, with TLS terminated at the edge and the origin address kept out of public DNS) or `EDGE_PROXY_MODE_DIRECT` (clients connect straight to the gateway's load balancer, with no edge filtering and the load balancer address published in DNS). When unset, the platform default (currently `EDGE_PROXY_MODE_MANAGED`) applies. + """ + + +class BodyBased(BaseModel): + apiType: str | None = None + """ + known API type for routing. Must be one of: API_TYPE_OPENAI. + The well-known API type for routing. Must be one of: `API_TYPE_OPENAI`. + """ + + +class HeaderBased(BaseModel): + headerName: str | None = None + """ + (String) The name of the header to use for routing. + The name of the header to use for routing. + """ + + +class Routing(BaseModel): + bodyBased: BodyBased | None = None + """ + based routing configuration. Routes requests based on the request body content. (see below for nested schema) + """ + headerBased: HeaderBased | None = None + """ + based routing configuration. Routes requests using a header value to match the model by name. (see below for nested schema) + """ + pathBased: dict[str, Any] | None = None + """ + based routing configuration. Routes requests based on the URL path. (see below for nested schema) + """ + + +class ForProvider(BaseModel): + auth: Auth | None = None + """ + (Attributes) The authentication configuration for the gateway. Exactly one of coreweave or weights_and_biases must be specified. (see below for nested schema) + """ + endpointConfiguration: EndpointConfiguration | None = None + """ + (Attributes) Additional endpoint configuration options. (see below for nested schema) + """ + name: str | None = None + """ + readable name of the gateway. Capped at 38 characters so the derived public FQDN fits within the 64-character X.509 Common Name limit. + The human-readable name of the gateway. Capped at 38 characters so the derived public FQDN fits within the 64-character X.509 Common Name limit. + """ + routing: Routing | None = None + """ + (Attributes) The routing configuration for the gateway. Exactly one of body_based, header_based, or path_based must be specified. (see below for nested schema) + """ + zones: list[str] | None = None + """ + (Set of String) The zones to make the gateway available in. Limits where deployments associated with the gateway may exist. + The zones to make the gateway available in. Limits where deployments associated with the gateway may exist. + """ + + +class InitProvider(BaseModel): + auth: Auth | None = None + """ + (Attributes) The authentication configuration for the gateway. Exactly one of coreweave or weights_and_biases must be specified. (see below for nested schema) + """ + endpointConfiguration: EndpointConfiguration | None = None + """ + (Attributes) Additional endpoint configuration options. (see below for nested schema) + """ + name: str | None = None + """ + readable name of the gateway. Capped at 38 characters so the derived public FQDN fits within the 64-character X.509 Common Name limit. + The human-readable name of the gateway. Capped at 38 characters so the derived public FQDN fits within the 64-character X.509 Common Name limit. + """ + routing: Routing | None = None + """ + (Attributes) The routing configuration for the gateway. Exactly one of body_based, header_based, or path_based must be specified. (see below for nested schema) + """ + zones: list[str] | None = None + """ + (Set of String) The zones to make the gateway available in. Limits where deployments associated with the gateway may exist. + The zones to make the gateway available in. Limits where deployments associated with the gateway may exist. + """ + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class ProviderConfigRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Spec(BaseModel): + deletionPolicy: Literal['Orphan', 'Delete'] | None = 'Delete' + """ + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + """ + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class WeightsAndBiasesModel(BaseModel): + enableRateLimiting: bool | None = None + """ + (Boolean) Whether to enable Weights & Biases controlled rate limiting. + Whether to enable Weights & Biases controlled rate limiting. + """ + enableUsageReports: bool | None = None + """ + (Boolean) Whether to send usage data to Weights & Biases. + Whether to send usage data to Weights & Biases. + """ + serverUrl: str | None = None + """ + (String) The Weights & Biases server URL. Defaults to the shared SaaS instance if not set. + The Weights & Biases server URL. Defaults to the shared SaaS instance if not set. + """ + + +class Condition(BaseModel): + lastUpdateTime: str | None = None + """ + (String) RFC3339 timestamp of the last condition transition. + RFC3339 timestamp of the last condition transition. + """ + message: str | None = None + """ + readable message about the condition's last transition. + A human-readable message about the condition's last transition. + """ + reason: str | None = None + """ + readable reason for the condition's last transition. + A short, machine-readable reason for the condition's last transition. + """ + status: str | None = None + """ + (String) The current status of the gateway. See the Inference API overview for status values. + The condition status (`True`, `False`, or `Unknown`). + """ + type: str | None = None + """ + (String) The condition type (e.g. Ready, Progressing). + The condition type (e.g. `Ready`, `Progressing`). + """ + + +class AtProvider(BaseModel): + auth: Auth | None = None + """ + (Attributes) The authentication configuration for the gateway. Exactly one of coreweave or weights_and_biases must be specified. (see below for nested schema) + """ + conditions: list[Condition] | None = None + """ + (Attributes List) Detailed status conditions for the gateway. (see below for nested schema) + """ + createdAt: str | None = None + """ + (String) RFC3339 timestamp of when the gateway was created. + RFC3339 timestamp of when the gateway was created. + """ + endpointConfiguration: EndpointConfiguration | None = None + """ + (Attributes) Additional endpoint configuration options. (see below for nested schema) + """ + endpoints: list[str] | None = None + """ + (Set of String) The endpoint URIs for the gateway. + The endpoint URIs for the gateway. + """ + id: str | None = None + """ + (String) The unique identifier of the gateway. + """ + name: str | None = None + """ + readable name of the gateway. Capped at 38 characters so the derived public FQDN fits within the 64-character X.509 Common Name limit. + The human-readable name of the gateway. Capped at 38 characters so the derived public FQDN fits within the 64-character X.509 Common Name limit. + """ + organizationId: str | None = None + """ + (String) The organization ID that owns the gateway. + The organization ID that owns the gateway. + """ + routing: Routing | None = None + """ + (Attributes) The routing configuration for the gateway. Exactly one of body_based, header_based, or path_based must be specified. (see below for nested schema) + """ + status: str | None = None + """ + (String) The current status of the gateway. See the Inference API overview for status values. + The current status of the gateway. See the [Inference API overview](https://docs.coreweave.com/products/inference/reference/api-overview) for status values. + """ + updatedAt: str | None = None + """ + (String) RFC3339 timestamp of when the gateway was last updated. + RFC3339 timestamp of when the gateway was last updated. + """ + zones: list[str] | None = None + """ + (Set of String) The zones to make the gateway available in. Limits where deployments associated with the gateway may exist. + The zones to make the gateway available in. Limits where deployments associated with the gateway may exist. + """ + + +class ConditionModel(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[ConditionModel] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class Gateway(BaseModel): + apiVersion: Literal['inference.coreweave.upbound.io/v1beta1'] | None = ( + 'inference.coreweave.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['Gateway'] | None = 'Gateway' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + GatewaySpec defines the desired state of Gateway + """ + status: Status | None = None + """ + GatewayStatus defines the observed state of Gateway. + """ + + +class GatewayList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[Gateway] + """ + List of gateways. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/coreweave/networking/__init__.py b/schemas/python/models/io/upbound/coreweave/networking/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/networking/vpc/__init__.py b/schemas/python/models/io/upbound/coreweave/networking/vpc/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/networking/vpc/v1beta1.py b/schemas/python/models/io/upbound/coreweave/networking/vpc/v1beta1.py new file mode 100644 index 000000000..237d2d88b --- /dev/null +++ b/schemas/python/models/io/upbound/coreweave/networking/vpc/v1beta1.py @@ -0,0 +1,399 @@ +# generated by datamodel-codegen: +# filename: workdir/networking_coreweave_upbound_io_v1beta1_vpc.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....k8s.apimachinery.pkg.apis.meta import v1 + + +class Dns(BaseModel): + servers: list[str] | None = None + """ + (Set of String) The DNS servers to be used by DHCP clients within the VPC. + The DNS servers to be used by DHCP clients within the VPC. + """ + + +class Dhcp(BaseModel): + dns: Dns | None = None + """ + (Attributes) Settings affecting DNS for DHCP within the VPC (see below for nested schema) + """ + + +class Egress(BaseModel): + disablePublicAccess: bool | None = None + """ + (Boolean) Specifies whether the VPC should be blocked from consuming public Internet. + Specifies whether the VPC should be blocked from consuming public Internet. + """ + + +class Ipam(BaseModel): + gatewayAddressPolicy: str | None = None + """ + (String) Describes which IP address from the prefix is allocated to the network gateway. Must be one of: UNSPECIFIED, EUI64, FIRST_IP, LAST_IP. + Describes which IP address from the prefix is allocated to the network gateway. Must be one of: `UNSPECIFIED`, `EUI64`, `FIRST_IP`, `LAST_IP`. + """ + prefixLength: float | None = None + """ + wide aggregate prefix. + The desired length for each Node's allocation from the VPC-wide aggregate prefix. + """ + + +class HostPrefix(BaseModel): + ipam: Ipam | None = None + """ + (Attributes) The configuration for a secondary host prefix. (see below for nested schema) + """ + name: str | None = None + """ + (String) The name of the VPC. Must not be longer than 30 characters. + The user-specified name of the host prefix. + """ + prefixes: list[str] | None = None + """ + wide aggregates from which host-specific prefixes are allocated. May be IPv4 or IPv6. + The VPC-wide aggregates from which host-specific prefixes are allocated. May be IPv4 or IPv6. + """ + type: str | None = None + """ + (String) Controls network connectivity from the prefix to the host. Must be one of: PRIMARY, ROUTED, ATTACHED. + Controls network connectivity from the prefix to the host. Must be one of: `PRIMARY`, `ROUTED`, `ATTACHED`. + """ + + +class Ingress(BaseModel): + disablePublicServices: bool | None = None + """ + facing networks, making them inaccessible from the Internet. + Specifies whether the VPC should prevent public prefixes advertised from Nodes from being imported into public-facing networks, making them inaccessible from the Internet. + """ + + +class VpcPrefix(BaseModel): + name: str | None = None + """ + (String) The name of the VPC. Must not be longer than 30 characters. + """ + value: str | None = None + """ + (String) + """ + + +class ForProvider(BaseModel): + dhcp: Dhcp | None = None + """ + (Attributes) Settings affecting DHCP behavior within the VPC. (see below for nested schema) + """ + egress: Egress | None = None + """ + (Attributes) Settings affecting traffic leaving the VPC. (see below for nested schema) + """ + hostPrefix: str | None = None + """ + adjacent nodes together, which improves distributed-training performance. A prefix smaller than the Zone default (a longer mask) doesn't carry this location information, so it produces less optimal placement. If you need a different size, CoreWeave can approve one for your account on request. For non-SUNK VPCs, any prefix size is accepted. However, NVL72 rack-level instances require a host prefix no smaller than the Zone's default host prefix. A smaller prefix forces dynamic address allocation, which breaks standard IMEX address mapping across the cluster. IMEX with Dynamic Resource Allocation (DRA) doesn't have this limitation. If left unspecified, a Zone-specific default value will be applied by the server. See Host prefixes for details. This field is immutable once set. + An IPv4 CIDR range used to allocate host addresses when booting compute into a VPC. For SUNK clusters, use a prefix no smaller than your Zone's default host prefix (a mask no longer than the default) so that host addresses reflect each node's physical location. SUNK uses this location information to place network-adjacent nodes together, which improves distributed-training performance. A prefix smaller than the Zone default (a longer mask) doesn't carry this location information, so it produces less optimal placement. If you need a different size, CoreWeave can approve one for your account on request. For non-SUNK VPCs, any prefix size is accepted. However, NVL72 rack-level instances require a host prefix no smaller than the Zone's default host prefix. A smaller prefix forces dynamic address allocation, which breaks standard IMEX address mapping across the cluster. IMEX with Dynamic Resource Allocation (DRA) doesn't have this limitation. If left unspecified, a Zone-specific default value will be applied by the server. See [Host prefixes](https://docs.coreweave.com/products/networking/vpc/create-manage-vpcs#host-prefixes) for details. This field is immutable once set. + """ + hostPrefixes: list[HostPrefix] | None = None + """ + adjacent nodes together, which improves distributed-training performance. A prefix smaller than the Zone default (a longer mask) doesn't carry this location information, so it produces less optimal placement. If you need a different size, CoreWeave can approve one for your account on request. For non-SUNK VPCs, any prefix size is accepted. However, NVL72 rack-level instances require a primary host prefix (type = PRIMARY) no smaller than the Zone's default host prefix. A smaller prefix forces dynamic address allocation, which breaks standard IMEX address mapping across the cluster. IMEX with Dynamic Resource Allocation (DRA) doesn't have this limitation. See Host prefixes for details. (see below for nested schema) + """ + ingress: Ingress | None = None + """ + (Attributes) Settings affecting traffic entering the VPC. (see below for nested schema) + """ + name: str | None = None + """ + (String) The name of the VPC. Must not be longer than 30 characters. + The name of the VPC. Must not be longer than 30 characters. + """ + vpcPrefixes: list[VpcPrefix] | None = None + """ + (Attributes Set) A list of additional prefixes associated with the VPC. For example, CKS clusters use these prefixes for Pod and service CIDR ranges. (see below for nested schema) + """ + zone: str | None = None + """ + (String) The Availability Zone in which the VPC is located. + The Availability Zone in which the VPC is located. + """ + + +class InitProvider(BaseModel): + dhcp: Dhcp | None = None + """ + (Attributes) Settings affecting DHCP behavior within the VPC. (see below for nested schema) + """ + egress: Egress | None = None + """ + (Attributes) Settings affecting traffic leaving the VPC. (see below for nested schema) + """ + hostPrefix: str | None = None + """ + adjacent nodes together, which improves distributed-training performance. A prefix smaller than the Zone default (a longer mask) doesn't carry this location information, so it produces less optimal placement. If you need a different size, CoreWeave can approve one for your account on request. For non-SUNK VPCs, any prefix size is accepted. However, NVL72 rack-level instances require a host prefix no smaller than the Zone's default host prefix. A smaller prefix forces dynamic address allocation, which breaks standard IMEX address mapping across the cluster. IMEX with Dynamic Resource Allocation (DRA) doesn't have this limitation. If left unspecified, a Zone-specific default value will be applied by the server. See Host prefixes for details. This field is immutable once set. + An IPv4 CIDR range used to allocate host addresses when booting compute into a VPC. For SUNK clusters, use a prefix no smaller than your Zone's default host prefix (a mask no longer than the default) so that host addresses reflect each node's physical location. SUNK uses this location information to place network-adjacent nodes together, which improves distributed-training performance. A prefix smaller than the Zone default (a longer mask) doesn't carry this location information, so it produces less optimal placement. If you need a different size, CoreWeave can approve one for your account on request. For non-SUNK VPCs, any prefix size is accepted. However, NVL72 rack-level instances require a host prefix no smaller than the Zone's default host prefix. A smaller prefix forces dynamic address allocation, which breaks standard IMEX address mapping across the cluster. IMEX with Dynamic Resource Allocation (DRA) doesn't have this limitation. If left unspecified, a Zone-specific default value will be applied by the server. See [Host prefixes](https://docs.coreweave.com/products/networking/vpc/create-manage-vpcs#host-prefixes) for details. This field is immutable once set. + """ + hostPrefixes: list[HostPrefix] | None = None + """ + adjacent nodes together, which improves distributed-training performance. A prefix smaller than the Zone default (a longer mask) doesn't carry this location information, so it produces less optimal placement. If you need a different size, CoreWeave can approve one for your account on request. For non-SUNK VPCs, any prefix size is accepted. However, NVL72 rack-level instances require a primary host prefix (type = PRIMARY) no smaller than the Zone's default host prefix. A smaller prefix forces dynamic address allocation, which breaks standard IMEX address mapping across the cluster. IMEX with Dynamic Resource Allocation (DRA) doesn't have this limitation. See Host prefixes for details. (see below for nested schema) + """ + ingress: Ingress | None = None + """ + (Attributes) Settings affecting traffic entering the VPC. (see below for nested schema) + """ + name: str | None = None + """ + (String) The name of the VPC. Must not be longer than 30 characters. + The name of the VPC. Must not be longer than 30 characters. + """ + vpcPrefixes: list[VpcPrefix] | None = None + """ + (Attributes Set) A list of additional prefixes associated with the VPC. For example, CKS clusters use these prefixes for Pod and service CIDR ranges. (see below for nested schema) + """ + zone: str | None = None + """ + (String) The Availability Zone in which the VPC is located. + The Availability Zone in which the VPC is located. + """ + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class ProviderConfigRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Spec(BaseModel): + deletionPolicy: Literal['Orphan', 'Delete'] | None = 'Delete' + """ + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + """ + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + dhcp: Dhcp | None = None + """ + (Attributes) Settings affecting DHCP behavior within the VPC. (see below for nested schema) + """ + egress: Egress | None = None + """ + (Attributes) Settings affecting traffic leaving the VPC. (see below for nested schema) + """ + hostPrefix: str | None = None + """ + adjacent nodes together, which improves distributed-training performance. A prefix smaller than the Zone default (a longer mask) doesn't carry this location information, so it produces less optimal placement. If you need a different size, CoreWeave can approve one for your account on request. For non-SUNK VPCs, any prefix size is accepted. However, NVL72 rack-level instances require a host prefix no smaller than the Zone's default host prefix. A smaller prefix forces dynamic address allocation, which breaks standard IMEX address mapping across the cluster. IMEX with Dynamic Resource Allocation (DRA) doesn't have this limitation. If left unspecified, a Zone-specific default value will be applied by the server. See Host prefixes for details. This field is immutable once set. + An IPv4 CIDR range used to allocate host addresses when booting compute into a VPC. For SUNK clusters, use a prefix no smaller than your Zone's default host prefix (a mask no longer than the default) so that host addresses reflect each node's physical location. SUNK uses this location information to place network-adjacent nodes together, which improves distributed-training performance. A prefix smaller than the Zone default (a longer mask) doesn't carry this location information, so it produces less optimal placement. If you need a different size, CoreWeave can approve one for your account on request. For non-SUNK VPCs, any prefix size is accepted. However, NVL72 rack-level instances require a host prefix no smaller than the Zone's default host prefix. A smaller prefix forces dynamic address allocation, which breaks standard IMEX address mapping across the cluster. IMEX with Dynamic Resource Allocation (DRA) doesn't have this limitation. If left unspecified, a Zone-specific default value will be applied by the server. See [Host prefixes](https://docs.coreweave.com/products/networking/vpc/create-manage-vpcs#host-prefixes) for details. This field is immutable once set. + """ + hostPrefixes: list[HostPrefix] | None = None + """ + adjacent nodes together, which improves distributed-training performance. A prefix smaller than the Zone default (a longer mask) doesn't carry this location information, so it produces less optimal placement. If you need a different size, CoreWeave can approve one for your account on request. For non-SUNK VPCs, any prefix size is accepted. However, NVL72 rack-level instances require a primary host prefix (type = PRIMARY) no smaller than the Zone's default host prefix. A smaller prefix forces dynamic address allocation, which breaks standard IMEX address mapping across the cluster. IMEX with Dynamic Resource Allocation (DRA) doesn't have this limitation. See Host prefixes for details. (see below for nested schema) + """ + id: str | None = None + """ + (String) The unique identifier for the VPC. + """ + ingress: Ingress | None = None + """ + (Attributes) Settings affecting traffic entering the VPC. (see below for nested schema) + """ + name: str | None = None + """ + (String) The name of the VPC. Must not be longer than 30 characters. + The name of the VPC. Must not be longer than 30 characters. + """ + vpcPrefixes: list[VpcPrefix] | None = None + """ + (Attributes Set) A list of additional prefixes associated with the VPC. For example, CKS clusters use these prefixes for Pod and service CIDR ranges. (see below for nested schema) + """ + zone: str | None = None + """ + (String) The Availability Zone in which the VPC is located. + The Availability Zone in which the VPC is located. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class VPC(BaseModel): + apiVersion: Literal['networking.coreweave.upbound.io/v1beta1'] | None = ( + 'networking.coreweave.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['VPC'] | None = 'VPC' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + VPCSpec defines the desired state of VPC + """ + status: Status | None = None + """ + VPCStatus defines the observed state of VPC. + """ + + +class VPCList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[VPC] + """ + List of vpcs. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/coreweave/objectstorage/__init__.py b/schemas/python/models/io/upbound/coreweave/objectstorage/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/objectstorage/accesskey/__init__.py b/schemas/python/models/io/upbound/coreweave/objectstorage/accesskey/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/objectstorage/accesskey/v1beta1.py b/schemas/python/models/io/upbound/coreweave/objectstorage/accesskey/v1beta1.py new file mode 100644 index 000000000..9770f0761 --- /dev/null +++ b/schemas/python/models/io/upbound/coreweave/objectstorage/accesskey/v1beta1.py @@ -0,0 +1,267 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_coreweave_upbound_io_v1beta1_accesskey.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....k8s.apimachinery.pkg.apis.meta import v1 + + +class ForProvider(BaseModel): + attributes: dict[str, str] | None = None + """ + 63 characters and must not start with cw-, role, or groups. Values must be Kubernetes label values of at most 63 characters (empty allowed). Changes replace the key. Omitted values are adopted during import. + Creation attributes, at most 15 entries. Keys must be lowercase DNS labels of 1-63 characters and must not start with cw-, role, or groups. Values must be Kubernetes label values of at most 63 characters (empty allowed). Changes replace the key. Omitted values are adopted during import. + """ + durationSeconds: float | None = None + """ + (Number) Required for creation; integer from 0 to 4294967295. Zero means permanent. Omit only when retaining an imported key whose original duration is unavailable. Changing this value replaces the key. + Required for creation; integer from 0 to 4294967295. Zero means permanent. Omit only when retaining an imported key whose original duration is unavailable. Changing this value replaces the key. + """ + + +class InitProvider(BaseModel): + attributes: dict[str, str] | None = None + """ + 63 characters and must not start with cw-, role, or groups. Values must be Kubernetes label values of at most 63 characters (empty allowed). Changes replace the key. Omitted values are adopted during import. + Creation attributes, at most 15 entries. Keys must be lowercase DNS labels of 1-63 characters and must not start with cw-, role, or groups. Values must be Kubernetes label values of at most 63 characters (empty allowed). Changes replace the key. Omitted values are adopted during import. + """ + durationSeconds: float | None = None + """ + (Number) Required for creation; integer from 0 to 4294967295. Zero means permanent. Omit only when retaining an imported key whose original duration is unavailable. Changing this value replaces the key. + Required for creation; integer from 0 to 4294967295. Zero means permanent. Omit only when retaining an imported key whose original duration is unavailable. Changing this value replaces the key. + """ + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class ProviderConfigRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Spec(BaseModel): + deletionPolicy: Literal['Orphan', 'Delete'] | None = 'Delete' + """ + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + """ + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + attributes: dict[str, str] | None = None + """ + 63 characters and must not start with cw-, role, or groups. Values must be Kubernetes label values of at most 63 characters (empty allowed). Changes replace the key. Omitted values are adopted during import. + Creation attributes, at most 15 entries. Keys must be lowercase DNS labels of 1-63 characters and must not start with cw-, role, or groups. Values must be Kubernetes label values of at most 63 characters (empty allowed). Changes replace the key. Omitted values are adopted during import. + """ + durationSeconds: float | None = None + """ + (Number) Required for creation; integer from 0 to 4294967295. Zero means permanent. Omit only when retaining an imported key whose original duration is unavailable. Changing this value replaces the key. + Required for creation; integer from 0 to 4294967295. Zero means permanent. Omit only when retaining an imported key whose original duration is unavailable. Changing this value replaces the key. + """ + expiry: str | None = None + """ + one API expiry). + Expiry in RFC 3339 UTC format, or null for a permanent key (including an absent or year-one API expiry). + """ + id: str | None = None + """ + key ID. Used for import and individual revocation. + """ + orgId: str | None = None + """ + (String) Organization cloud ID reported by the API. + Organization cloud ID reported by the API. + """ + principalName: str | None = None + """ + (String) Principal determined by the authenticated caller. + Principal determined by the authenticated caller. + """ + status: str | None = None + """ + only API status, such as ACTIVE, EXPIRED, or FULL_SUSPENDED. The provider never changes principal-wide status. + Read-only API status, such as ACTIVE, EXPIRED, or FULL_SUSPENDED. The provider never changes principal-wide status. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class AccessKey(BaseModel): + apiVersion: Literal['objectstorage.coreweave.upbound.io/v1beta1'] | None = ( + 'objectstorage.coreweave.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['AccessKey'] | None = 'AccessKey' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + AccessKeySpec defines the desired state of AccessKey + """ + status: Status | None = None + """ + AccessKeyStatus defines the observed state of AccessKey. + """ + + +class AccessKeyList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[AccessKey] + """ + List of accesskeys. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/coreweave/objectstorage/bucket/__init__.py b/schemas/python/models/io/upbound/coreweave/objectstorage/bucket/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/objectstorage/bucket/v1beta1.py b/schemas/python/models/io/upbound/coreweave/objectstorage/bucket/v1beta1.py new file mode 100644 index 000000000..883e46de7 --- /dev/null +++ b/schemas/python/models/io/upbound/coreweave/objectstorage/bucket/v1beta1.py @@ -0,0 +1,244 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_coreweave_upbound_io_v1beta1_bucket.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....k8s.apimachinery.pkg.apis.meta import v1 + + +class ForProvider(BaseModel): + tags: dict[str, str] | None = None + """ + (Map of String) Map of tags to assign to the bucket. + Map of tags to assign to the bucket. + """ + zone: str | None = None + """ + (String) The Availability Zone in which the bucket is located. + The Availability Zone in which the bucket is located. + """ + + +class InitProvider(BaseModel): + tags: dict[str, str] | None = None + """ + (Map of String) Map of tags to assign to the bucket. + Map of tags to assign to the bucket. + """ + zone: str | None = None + """ + (String) The Availability Zone in which the bucket is located. + The Availability Zone in which the bucket is located. + """ + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class ProviderConfigRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Spec(BaseModel): + deletionPolicy: Literal['Orphan', 'Delete'] | None = 'Delete' + """ + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + """ + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + id: str | None = None + tags: dict[str, str] | None = None + """ + (Map of String) Map of tags to assign to the bucket. + Map of tags to assign to the bucket. + """ + zone: str | None = None + """ + (String) The Availability Zone in which the bucket is located. + The Availability Zone in which the bucket is located. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class Bucket(BaseModel): + apiVersion: Literal['objectstorage.coreweave.upbound.io/v1beta1'] | None = ( + 'objectstorage.coreweave.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['Bucket'] | None = 'Bucket' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + BucketSpec defines the desired state of Bucket + """ + status: Status | None = None + """ + BucketStatus defines the observed state of Bucket. + """ + + +class BucketList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[Bucket] + """ + List of buckets. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/coreweave/objectstorage/bucketinventory/__init__.py b/schemas/python/models/io/upbound/coreweave/objectstorage/bucketinventory/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/objectstorage/bucketinventory/v1beta1.py b/schemas/python/models/io/upbound/coreweave/objectstorage/bucketinventory/v1beta1.py new file mode 100644 index 000000000..3152eb230 --- /dev/null +++ b/schemas/python/models/io/upbound/coreweave/objectstorage/bucketinventory/v1beta1.py @@ -0,0 +1,424 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_coreweave_upbound_io_v1beta1_bucketinventory.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....k8s.apimachinery.pkg.apis.meta import v1 + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class BucketRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class BucketSelector(BaseModel): + matchControllerRef: bool | None = None + """ + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + """ + matchLabels: dict[str, str] | None = None + """ + MatchLabels ensures an object with matching labels is selected. + """ + policy: Policy | None = None + """ + Policies for selection. + """ + + +class Bucket(BaseModel): + accountId: str | None = None + """ + (String) Account ID of the destination bucket owner. + Account ID of the destination bucket owner. + """ + bucketArn: str | None = None + """ + (String) ARN of the destination bucket. + ARN of the destination bucket. + """ + format: str | None = None + """ + (String) Output format: CSV, TSV, JSON, ORC, or Parquet. + Output format: `CSV`, `TSV`, `JSON`, `ORC`, or `Parquet`. + """ + prefix: str | None = None + """ + (String) Prefix prepended to the report output path. + Prefix prepended to the report output path. + """ + + +class Destination(BaseModel): + bucket: Bucket | None = None + """ + (String) Name of source bucket to which the inventory configuration applies + Required. Destination bucket for the report (may equal the source bucket). + """ + + +class Filter(BaseModel): + prefix: str | None = None + """ + (String) Prefix prepended to the report output path. + Source-object prefix to filter on. + """ + + +class Schedule(BaseModel): + frequency: str | None = None + """ + (String) How frequently the report is generated: Daily or Weekly. + How frequently the report is generated: `Daily` or `Weekly`. + """ + + +class ForProvider(BaseModel): + bucket: str | None = None + """ + (String) Name of source bucket to which the inventory configuration applies + Name of source bucket to which the inventory configuration applies + """ + bucketRef: BucketRef | None = None + """ + Reference to a Bucket in objectstorage to populate bucket. + """ + bucketSelector: BucketSelector | None = None + """ + Selector for a Bucket in objectstorage to populate bucket. + """ + destination: Destination | None = None + """ + (Block, Optional) Required. Where the inventory report is written. May be the same bucket as the source. The destination policy must grant the inventory service s3:PutObject and s3:AbortMultipartUpload on report objects. Use depends_on to apply that policy before the inventory configuration. Bucket policies are evaluated after organization policies; requests without a matching bucket grant are implicitly denied even if an organization policy allows them. The policy resource replaces the entire existing bucket policy, so retain all required statements. s3:PutBucketPolicy itself evaluates organization permissions only. See policy evaluation. (see below for nested schema) + Required. Where the inventory report is written. May be the same bucket as the source. The destination policy must grant the inventory service `s3:PutObject` and `s3:AbortMultipartUpload` on report objects. Use `depends_on` to apply that policy before the inventory configuration. Bucket policies are evaluated after organization policies; requests without a matching bucket grant are implicitly denied even if an organization policy allows them. The policy resource replaces the entire existing bucket policy, so retain all required statements. `s3:PutBucketPolicy` itself evaluates organization permissions only. See [policy evaluation](https://docs.coreweave.com/products/storage/object-storage/auth-access/policies#policy-evaluation). + """ + enabled: bool | None = None + """ + (Boolean) Whether the inventory configuration is enabled. Defaults to true. + Whether the inventory configuration is enabled. Defaults to `true`. + """ + filter: Filter | None = None + """ + (Block, Optional) Limits the inventory report to objects matching a prefix. (see below for nested schema) + Limits the inventory report to objects matching a prefix. + """ + includedObjectVersions: str | None = None + """ + (String) Object versions to include: All includes all versions; Current includes only current versions. + Object versions to include: `All` includes all versions; `Current` includes only current versions. + """ + name: str | None = None + """ + (String) Name of the inventory configuration. Must be unique within the bucket. + Name of the inventory configuration. Must be unique within the bucket. + """ + optionalFields: list[str] | None = None + """ + (Set of String) Additional report fields: Size, LastModifiedDate, LastAccessedDate, StorageClass, ETag, IsMultipartUploaded, EncryptionStatus, ChecksumAlgorithm. Omit to include no additional fields; an empty set is invalid. + Additional report fields: `Size`, `LastModifiedDate`, `LastAccessedDate`, `StorageClass`, `ETag`, `IsMultipartUploaded`, `EncryptionStatus`, `ChecksumAlgorithm`. Omit to include no additional fields; an empty set is invalid. + """ + schedule: Schedule | None = None + """ + (Block, Optional) Required. Schedule for generating the inventory report. (see below for nested schema) + Required. Schedule for generating the inventory report. + """ + + +class InitProvider(BaseModel): + bucket: str | None = None + """ + (String) Name of source bucket to which the inventory configuration applies + Name of source bucket to which the inventory configuration applies + """ + bucketRef: BucketRef | None = None + """ + Reference to a Bucket in objectstorage to populate bucket. + """ + bucketSelector: BucketSelector | None = None + """ + Selector for a Bucket in objectstorage to populate bucket. + """ + destination: Destination | None = None + """ + (Block, Optional) Required. Where the inventory report is written. May be the same bucket as the source. The destination policy must grant the inventory service s3:PutObject and s3:AbortMultipartUpload on report objects. Use depends_on to apply that policy before the inventory configuration. Bucket policies are evaluated after organization policies; requests without a matching bucket grant are implicitly denied even if an organization policy allows them. The policy resource replaces the entire existing bucket policy, so retain all required statements. s3:PutBucketPolicy itself evaluates organization permissions only. See policy evaluation. (see below for nested schema) + Required. Where the inventory report is written. May be the same bucket as the source. The destination policy must grant the inventory service `s3:PutObject` and `s3:AbortMultipartUpload` on report objects. Use `depends_on` to apply that policy before the inventory configuration. Bucket policies are evaluated after organization policies; requests without a matching bucket grant are implicitly denied even if an organization policy allows them. The policy resource replaces the entire existing bucket policy, so retain all required statements. `s3:PutBucketPolicy` itself evaluates organization permissions only. See [policy evaluation](https://docs.coreweave.com/products/storage/object-storage/auth-access/policies#policy-evaluation). + """ + enabled: bool | None = None + """ + (Boolean) Whether the inventory configuration is enabled. Defaults to true. + Whether the inventory configuration is enabled. Defaults to `true`. + """ + filter: Filter | None = None + """ + (Block, Optional) Limits the inventory report to objects matching a prefix. (see below for nested schema) + Limits the inventory report to objects matching a prefix. + """ + includedObjectVersions: str | None = None + """ + (String) Object versions to include: All includes all versions; Current includes only current versions. + Object versions to include: `All` includes all versions; `Current` includes only current versions. + """ + name: str | None = None + """ + (String) Name of the inventory configuration. Must be unique within the bucket. + Name of the inventory configuration. Must be unique within the bucket. + """ + optionalFields: list[str] | None = None + """ + (Set of String) Additional report fields: Size, LastModifiedDate, LastAccessedDate, StorageClass, ETag, IsMultipartUploaded, EncryptionStatus, ChecksumAlgorithm. Omit to include no additional fields; an empty set is invalid. + Additional report fields: `Size`, `LastModifiedDate`, `LastAccessedDate`, `StorageClass`, `ETag`, `IsMultipartUploaded`, `EncryptionStatus`, `ChecksumAlgorithm`. Omit to include no additional fields; an empty set is invalid. + """ + schedule: Schedule | None = None + """ + (Block, Optional) Required. Schedule for generating the inventory report. (see below for nested schema) + Required. Schedule for generating the inventory report. + """ + + +class ProviderConfigRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Spec(BaseModel): + deletionPolicy: Literal['Orphan', 'Delete'] | None = 'Delete' + """ + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + """ + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + bucket: str | None = None + """ + (String) Name of source bucket to which the inventory configuration applies + Name of source bucket to which the inventory configuration applies + """ + destination: Destination | None = None + """ + (Block, Optional) Required. Where the inventory report is written. May be the same bucket as the source. The destination policy must grant the inventory service s3:PutObject and s3:AbortMultipartUpload on report objects. Use depends_on to apply that policy before the inventory configuration. Bucket policies are evaluated after organization policies; requests without a matching bucket grant are implicitly denied even if an organization policy allows them. The policy resource replaces the entire existing bucket policy, so retain all required statements. s3:PutBucketPolicy itself evaluates organization permissions only. See policy evaluation. (see below for nested schema) + Required. Where the inventory report is written. May be the same bucket as the source. The destination policy must grant the inventory service `s3:PutObject` and `s3:AbortMultipartUpload` on report objects. Use `depends_on` to apply that policy before the inventory configuration. Bucket policies are evaluated after organization policies; requests without a matching bucket grant are implicitly denied even if an organization policy allows them. The policy resource replaces the entire existing bucket policy, so retain all required statements. `s3:PutBucketPolicy` itself evaluates organization permissions only. See [policy evaluation](https://docs.coreweave.com/products/storage/object-storage/auth-access/policies#policy-evaluation). + """ + enabled: bool | None = None + """ + (Boolean) Whether the inventory configuration is enabled. Defaults to true. + Whether the inventory configuration is enabled. Defaults to `true`. + """ + filter: Filter | None = None + """ + (Block, Optional) Limits the inventory report to objects matching a prefix. (see below for nested schema) + Limits the inventory report to objects matching a prefix. + """ + id: str | None = None + includedObjectVersions: str | None = None + """ + (String) Object versions to include: All includes all versions; Current includes only current versions. + Object versions to include: `All` includes all versions; `Current` includes only current versions. + """ + name: str | None = None + """ + (String) Name of the inventory configuration. Must be unique within the bucket. + Name of the inventory configuration. Must be unique within the bucket. + """ + optionalFields: list[str] | None = None + """ + (Set of String) Additional report fields: Size, LastModifiedDate, LastAccessedDate, StorageClass, ETag, IsMultipartUploaded, EncryptionStatus, ChecksumAlgorithm. Omit to include no additional fields; an empty set is invalid. + Additional report fields: `Size`, `LastModifiedDate`, `LastAccessedDate`, `StorageClass`, `ETag`, `IsMultipartUploaded`, `EncryptionStatus`, `ChecksumAlgorithm`. Omit to include no additional fields; an empty set is invalid. + """ + schedule: Schedule | None = None + """ + (Block, Optional) Required. Schedule for generating the inventory report. (see below for nested schema) + Required. Schedule for generating the inventory report. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class BucketInventory(BaseModel): + apiVersion: Literal['objectstorage.coreweave.upbound.io/v1beta1'] | None = ( + 'objectstorage.coreweave.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['BucketInventory'] | None = 'BucketInventory' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + BucketInventorySpec defines the desired state of BucketInventory + """ + status: Status | None = None + """ + BucketInventoryStatus defines the observed state of BucketInventory. + """ + + +class BucketInventoryList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[BucketInventory] + """ + List of bucketinventories. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/coreweave/objectstorage/bucketlifecycleconfiguration/__init__.py b/schemas/python/models/io/upbound/coreweave/objectstorage/bucketlifecycleconfiguration/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/objectstorage/bucketlifecycleconfiguration/v1beta1.py b/schemas/python/models/io/upbound/coreweave/objectstorage/bucketlifecycleconfiguration/v1beta1.py new file mode 100644 index 000000000..9360f44c6 --- /dev/null +++ b/schemas/python/models/io/upbound/coreweave/objectstorage/bucketlifecycleconfiguration/v1beta1.py @@ -0,0 +1,472 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_coreweave_upbound_io_v1beta1_bucketlifecycleconfiguration.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....k8s.apimachinery.pkg.apis.meta import v1 + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class BucketRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class BucketSelector(BaseModel): + matchControllerRef: bool | None = None + """ + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + """ + matchLabels: dict[str, str] | None = None + """ + MatchLabels ensures an object with matching labels is selected. + """ + policy: Policy | None = None + """ + Policies for selection. + """ + + +class AbortIncompleteMultipartUpload(BaseModel): + daysAfterInitiation: float | None = None + """ + (Number) Days after initiation to abort multipart uploads + Days after initiation to abort multipart uploads + """ + + +class Expiration(BaseModel): + date: str | None = None + """ + (String) ISO8601 date when objects expire + ISO8601 date when objects expire + """ + days: float | None = None + """ + (Number) Number of days after object creation for expiration + Number of days after object creation for expiration + """ + expiredObjectDeleteMarker: bool | None = None + """ + (Boolean) Whether to remove expired delete markers + Whether to remove expired delete markers + """ + + +class And(BaseModel): + objectSizeGreaterThan: float | None = None + """ + (Number) Minimum object size (in bytes) to which the rule applies. + Minimum object size (in bytes) to which the rule applies. + """ + objectSizeLessThan: float | None = None + """ + (Number) Maximum object size (in bytes) to which the rule applies. + Maximum object size (in bytes) to which the rule applies. + """ + prefix: str | None = None + """ + (String, Deprecated) Deprecated. Object key prefix to which the rule applies. CoreWeave AI Object Storage rejects requests that set this field; use filter.prefix instead. + Prefix identifying one or more objects to which the rule applies. + """ + tags: dict[str, str] | None = None + """ + (Map of String) Map for specifying tag keys and values. + Map for specifying tag keys and values. + """ + + +class Tag(BaseModel): + key: str | None = None + """ + (String) Tag key filter + Tag key filter + """ + value: str | None = None + """ + (String) Tag value filter + Tag value filter + """ + + +class Filter(BaseModel): + and_: And | None = Field(None, alias='and') + """ + (Block, Optional) Configuration block used to apply a logical AND to two or more predicates. The Lifecycle Rule will apply to any object matching all the predicates configured inside the and block. (see below for nested schema) + Configuration block used to apply a logical AND to two or more predicates. The Lifecycle Rule will apply to any object matching all the predicates configured inside the and block. + """ + objectSizeGreaterThan: float | None = None + """ + (Number) Minimum object size (in bytes) to which the rule applies. + Minimum object size (in bytes) to which the rule applies. + """ + objectSizeLessThan: float | None = None + """ + (Number) Maximum object size (in bytes) to which the rule applies. + Maximum object size (in bytes) to which the rule applies. + """ + prefix: str | None = None + """ + (String, Deprecated) Deprecated. Object key prefix to which the rule applies. CoreWeave AI Object Storage rejects requests that set this field; use filter.prefix instead. + Prefix filter + """ + tag: Tag | None = None + """ + (Block, Optional) (see below for nested schema) + """ + + +class NoncurrentVersionExpiration(BaseModel): + newerNoncurrentVersions: float | None = None + """ + (Number) Number of noncurrent versions to retain + Number of noncurrent versions to retain + """ + noncurrentDays: float | None = None + """ + (Number) Days after becoming noncurrent before deletion + Days after becoming noncurrent before deletion + """ + + +class NoncurrentVersionTransitionItem(BaseModel): + newerNoncurrentVersions: float | None = None + """ + (Number) Number of noncurrent versions to retain + Number of noncurrent versions to retain + """ + noncurrentDays: float | None = None + """ + (Number) Days after becoming noncurrent before deletion + Number of days after object becomes noncurrent before the transition may occur + """ + storageClass: str | None = None + """ + (String) Storage class to transition noncurrent objects to + Storage class to transition noncurrent objects to + """ + + +class TransitionItem(BaseModel): + date: str | None = None + """ + (String) ISO8601 date when objects expire + ISO8601 date when objects transition + """ + days: float | None = None + """ + (Number) Number of days after object creation for expiration + Number of days after object creation for transition + """ + storageClass: str | None = None + """ + (String) Storage class to transition noncurrent objects to + Storage class to transition objects to + """ + + +class RuleItem(BaseModel): + abortIncompleteMultipartUpload: AbortIncompleteMultipartUpload | None = None + """ + (Block, Optional) (see below for nested schema) + """ + expiration: Expiration | None = None + """ + (Block, Optional) (see below for nested schema) + """ + filter: Filter | None = None + """ + (Block, Optional) (see below for nested schema) + """ + id: str | None = None + """ + (String) Unique identifier for the rule + Unique identifier for the rule + """ + noncurrentVersionExpiration: NoncurrentVersionExpiration | None = None + """ + (Block, Optional) (see below for nested schema) + """ + noncurrentVersionTransition: list[NoncurrentVersionTransitionItem] | None = None + """ + (Block Set) (see below for nested schema) + """ + prefix: str | None = None + """ + (String, Deprecated) Deprecated. Object key prefix to which the rule applies. CoreWeave AI Object Storage rejects requests that set this field; use filter.prefix instead. + Deprecated. Object key prefix to which the rule applies. CoreWeave AI Object Storage rejects requests that set this field; use `filter.prefix` instead. + """ + status: str | None = None + """ + (String) Rule status: Enabled or Disabled + Rule status: Enabled or Disabled + """ + transition: list[TransitionItem] | None = None + """ + (Block Set) (see below for nested schema) + """ + + +class ForProvider(BaseModel): + bucket: str | None = None + """ + (String) Name of the bucket to apply lifecycle configuration to + Name of the bucket to apply lifecycle configuration to + """ + bucketRef: BucketRef | None = None + """ + Reference to a Bucket in objectstorage to populate bucket. + """ + bucketSelector: BucketSelector | None = None + """ + Selector for a Bucket in objectstorage to populate bucket. + """ + rule: list[RuleItem] | None = None + """ + (Block List) One or more lifecycle rule blocks (see below for nested schema) + One or more lifecycle rule blocks + """ + + +class InitProvider(BaseModel): + bucket: str | None = None + """ + (String) Name of the bucket to apply lifecycle configuration to + Name of the bucket to apply lifecycle configuration to + """ + bucketRef: BucketRef | None = None + """ + Reference to a Bucket in objectstorage to populate bucket. + """ + bucketSelector: BucketSelector | None = None + """ + Selector for a Bucket in objectstorage to populate bucket. + """ + rule: list[RuleItem] | None = None + """ + (Block List) One or more lifecycle rule blocks (see below for nested schema) + One or more lifecycle rule blocks + """ + + +class ProviderConfigRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Spec(BaseModel): + deletionPolicy: Literal['Orphan', 'Delete'] | None = 'Delete' + """ + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + """ + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + bucket: str | None = None + """ + (String) Name of the bucket to apply lifecycle configuration to + Name of the bucket to apply lifecycle configuration to + """ + id: str | None = None + """ + (String) Unique identifier for the rule + """ + rule: list[RuleItem] | None = None + """ + (Block List) One or more lifecycle rule blocks (see below for nested schema) + One or more lifecycle rule blocks + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class BucketLifecycleConfiguration(BaseModel): + apiVersion: Literal['objectstorage.coreweave.upbound.io/v1beta1'] | None = ( + 'objectstorage.coreweave.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['BucketLifecycleConfiguration'] | None = ( + 'BucketLifecycleConfiguration' + ) + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + BucketLifecycleConfigurationSpec defines the desired state of BucketLifecycleConfiguration + """ + status: Status | None = None + """ + BucketLifecycleConfigurationStatus defines the observed state of BucketLifecycleConfiguration. + """ + + +class BucketLifecycleConfigurationList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[BucketLifecycleConfiguration] + """ + List of bucketlifecycleconfigurations. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/coreweave/objectstorage/bucketpolicy/__init__.py b/schemas/python/models/io/upbound/coreweave/objectstorage/bucketpolicy/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/objectstorage/bucketpolicy/v1beta1.py b/schemas/python/models/io/upbound/coreweave/objectstorage/bucketpolicy/v1beta1.py new file mode 100644 index 000000000..ba11ee51b --- /dev/null +++ b/schemas/python/models/io/upbound/coreweave/objectstorage/bucketpolicy/v1beta1.py @@ -0,0 +1,287 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_coreweave_upbound_io_v1beta1_bucketpolicy.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....k8s.apimachinery.pkg.apis.meta import v1 + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class BucketRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class BucketSelector(BaseModel): + matchControllerRef: bool | None = None + """ + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + """ + matchLabels: dict[str, str] | None = None + """ + MatchLabels ensures an object with matching labels is selected. + """ + policy: Policy | None = None + """ + Policies for selection. + """ + + +class ForProvider(BaseModel): + bucket: str | None = None + """ + (String) The name of the bucket for which to apply this policy. + The name of the bucket for which to apply this policy. + """ + bucketRef: BucketRef | None = None + """ + Reference to a Bucket in objectstorage to populate bucket. + """ + bucketSelector: BucketSelector | None = None + """ + Selector for a Bucket in objectstorage to populate bucket. + """ + policy: str | None = None + """ + (String) Text of the policy. Must be valid JSON. The coreweave_object_storage_bucket_policy_document data source may be used, simply reference the .json attribute of the data source. + Text of the policy. Must be valid JSON. The coreweave_object_storage_bucket_policy_document data source may be used, simply reference the `.json` attribute of the data source. + """ + + +class InitProvider(BaseModel): + bucket: str | None = None + """ + (String) The name of the bucket for which to apply this policy. + The name of the bucket for which to apply this policy. + """ + bucketRef: BucketRef | None = None + """ + Reference to a Bucket in objectstorage to populate bucket. + """ + bucketSelector: BucketSelector | None = None + """ + Selector for a Bucket in objectstorage to populate bucket. + """ + policy: str | None = None + """ + (String) Text of the policy. Must be valid JSON. The coreweave_object_storage_bucket_policy_document data source may be used, simply reference the .json attribute of the data source. + Text of the policy. Must be valid JSON. The coreweave_object_storage_bucket_policy_document data source may be used, simply reference the `.json` attribute of the data source. + """ + + +class ProviderConfigRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Spec(BaseModel): + deletionPolicy: Literal['Orphan', 'Delete'] | None = 'Delete' + """ + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + """ + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + bucket: str | None = None + """ + (String) The name of the bucket for which to apply this policy. + The name of the bucket for which to apply this policy. + """ + id: str | None = None + policy: str | None = None + """ + (String) Text of the policy. Must be valid JSON. The coreweave_object_storage_bucket_policy_document data source may be used, simply reference the .json attribute of the data source. + Text of the policy. Must be valid JSON. The coreweave_object_storage_bucket_policy_document data source may be used, simply reference the `.json` attribute of the data source. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class BucketPolicy(BaseModel): + apiVersion: Literal['objectstorage.coreweave.upbound.io/v1beta1'] | None = ( + 'objectstorage.coreweave.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['BucketPolicy'] | None = 'BucketPolicy' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + BucketPolicySpec defines the desired state of BucketPolicy + """ + status: Status | None = None + """ + BucketPolicyStatus defines the observed state of BucketPolicy. + """ + + +class BucketPolicyList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[BucketPolicy] + """ + List of bucketpolicies. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/coreweave/objectstorage/bucketsettings/__init__.py b/schemas/python/models/io/upbound/coreweave/objectstorage/bucketsettings/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/objectstorage/bucketsettings/v1beta1.py b/schemas/python/models/io/upbound/coreweave/objectstorage/bucketsettings/v1beta1.py new file mode 100644 index 000000000..ca7fcbc28 --- /dev/null +++ b/schemas/python/models/io/upbound/coreweave/objectstorage/bucketsettings/v1beta1.py @@ -0,0 +1,332 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_coreweave_upbound_io_v1beta1_bucketsettings.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....k8s.apimachinery.pkg.apis.meta import v1 + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class BucketRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class BucketSelector(BaseModel): + matchControllerRef: bool | None = None + """ + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + """ + matchLabels: dict[str, str] | None = None + """ + MatchLabels ensures an object with matching labels is selected. + """ + policy: Policy | None = None + """ + Policies for selection. + """ + + +class ForProvider(BaseModel): + archiveAfterLastAccessDays: float | None = None + """ + side. Required when archive_enabled is true, and rejected otherwise. + Days since last access (or creation if never accessed) before a STANDARD object version is archived to STANDARD_IA. The default minimum is 60; your organization's entitlement may permit a different minimum, so the effective floor is validated server-side. Required when `archive_enabled` is true, and rejected otherwise. + """ + archiveEnabled: bool | None = None + """ + (Boolean) When true, idle STANDARD objects are archived to STANDARD_IA after archive_after_last_access_days without access. Your organization must be entitled to configure this setting. + When true, idle STANDARD objects are archived to STANDARD_IA after `archive_after_last_access_days` without access. Your organization must be entitled to configure this setting. + """ + auditLoggingEnabled: bool | None = None + """ + (Boolean) Whether audit logging is enabled for the bucket. Contact support to enable audit logging for your organization before enabling this setting. + Whether audit logging is enabled for the bucket. Contact support to enable audit logging for your organization before enabling this setting. + """ + bucket: str | None = None + """ + (String) The name of the bucket to manage settings for. + The name of the bucket to manage settings for. + """ + bucketRef: BucketRef | None = None + """ + Reference to a Bucket in objectstorage to populate bucket. + """ + bucketSelector: BucketSelector | None = None + """ + Selector for a Bucket in objectstorage to populate bucket. + """ + capacityCapBytes: float | None = None + """ + class bytes the bucket may store. New STANDARD writes are rejected once bucket usage would exceed this cap; 0 is a valid cap that blocks all new STANDARD writes. Omit to leave the cap unchanged. Removing this resource leaves any cap in place; the cap is cleared when the bucket itself is deleted. Your organization must be entitled to configure this setting. + Maximum number of STANDARD-class bytes the bucket may store. New STANDARD writes are rejected once bucket usage would exceed this cap; `0` is a valid cap that blocks all new STANDARD writes. Omit to leave the cap unchanged. Removing this resource leaves any cap in place; the cap is cleared when the bucket itself is deleted. Your organization must be entitled to configure this setting. + """ + + +class InitProvider(BaseModel): + archiveAfterLastAccessDays: float | None = None + """ + side. Required when archive_enabled is true, and rejected otherwise. + Days since last access (or creation if never accessed) before a STANDARD object version is archived to STANDARD_IA. The default minimum is 60; your organization's entitlement may permit a different minimum, so the effective floor is validated server-side. Required when `archive_enabled` is true, and rejected otherwise. + """ + archiveEnabled: bool | None = None + """ + (Boolean) When true, idle STANDARD objects are archived to STANDARD_IA after archive_after_last_access_days without access. Your organization must be entitled to configure this setting. + When true, idle STANDARD objects are archived to STANDARD_IA after `archive_after_last_access_days` without access. Your organization must be entitled to configure this setting. + """ + auditLoggingEnabled: bool | None = None + """ + (Boolean) Whether audit logging is enabled for the bucket. Contact support to enable audit logging for your organization before enabling this setting. + Whether audit logging is enabled for the bucket. Contact support to enable audit logging for your organization before enabling this setting. + """ + bucket: str | None = None + """ + (String) The name of the bucket to manage settings for. + The name of the bucket to manage settings for. + """ + bucketRef: BucketRef | None = None + """ + Reference to a Bucket in objectstorage to populate bucket. + """ + bucketSelector: BucketSelector | None = None + """ + Selector for a Bucket in objectstorage to populate bucket. + """ + capacityCapBytes: float | None = None + """ + class bytes the bucket may store. New STANDARD writes are rejected once bucket usage would exceed this cap; 0 is a valid cap that blocks all new STANDARD writes. Omit to leave the cap unchanged. Removing this resource leaves any cap in place; the cap is cleared when the bucket itself is deleted. Your organization must be entitled to configure this setting. + Maximum number of STANDARD-class bytes the bucket may store. New STANDARD writes are rejected once bucket usage would exceed this cap; `0` is a valid cap that blocks all new STANDARD writes. Omit to leave the cap unchanged. Removing this resource leaves any cap in place; the cap is cleared when the bucket itself is deleted. Your organization must be entitled to configure this setting. + """ + + +class ProviderConfigRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Spec(BaseModel): + deletionPolicy: Literal['Orphan', 'Delete'] | None = 'Delete' + """ + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + """ + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + archiveAfterLastAccessDays: float | None = None + """ + side. Required when archive_enabled is true, and rejected otherwise. + Days since last access (or creation if never accessed) before a STANDARD object version is archived to STANDARD_IA. The default minimum is 60; your organization's entitlement may permit a different minimum, so the effective floor is validated server-side. Required when `archive_enabled` is true, and rejected otherwise. + """ + archiveEnabled: bool | None = None + """ + (Boolean) When true, idle STANDARD objects are archived to STANDARD_IA after archive_after_last_access_days without access. Your organization must be entitled to configure this setting. + When true, idle STANDARD objects are archived to STANDARD_IA after `archive_after_last_access_days` without access. Your organization must be entitled to configure this setting. + """ + auditLoggingEnabled: bool | None = None + """ + (Boolean) Whether audit logging is enabled for the bucket. Contact support to enable audit logging for your organization before enabling this setting. + Whether audit logging is enabled for the bucket. Contact support to enable audit logging for your organization before enabling this setting. + """ + bucket: str | None = None + """ + (String) The name of the bucket to manage settings for. + The name of the bucket to manage settings for. + """ + capacityCapBytes: float | None = None + """ + class bytes the bucket may store. New STANDARD writes are rejected once bucket usage would exceed this cap; 0 is a valid cap that blocks all new STANDARD writes. Omit to leave the cap unchanged. Removing this resource leaves any cap in place; the cap is cleared when the bucket itself is deleted. Your organization must be entitled to configure this setting. + Maximum number of STANDARD-class bytes the bucket may store. New STANDARD writes are rejected once bucket usage would exceed this cap; `0` is a valid cap that blocks all new STANDARD writes. Omit to leave the cap unchanged. Removing this resource leaves any cap in place; the cap is cleared when the bucket itself is deleted. Your organization must be entitled to configure this setting. + """ + id: str | None = None + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class BucketSettings(BaseModel): + apiVersion: Literal['objectstorage.coreweave.upbound.io/v1beta1'] | None = ( + 'objectstorage.coreweave.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['BucketSettings'] | None = 'BucketSettings' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + BucketSettingsSpec defines the desired state of BucketSettings + """ + status: Status | None = None + """ + BucketSettingsStatus defines the observed state of BucketSettings. + """ + + +class BucketSettingsList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[BucketSettings] + """ + List of bucketsettings. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/coreweave/objectstorage/bucketversioning/__init__.py b/schemas/python/models/io/upbound/coreweave/objectstorage/bucketversioning/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/objectstorage/bucketversioning/v1beta1.py b/schemas/python/models/io/upbound/coreweave/objectstorage/bucketversioning/v1beta1.py new file mode 100644 index 000000000..263c84290 --- /dev/null +++ b/schemas/python/models/io/upbound/coreweave/objectstorage/bucketversioning/v1beta1.py @@ -0,0 +1,292 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_coreweave_upbound_io_v1beta1_bucketversioning.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....k8s.apimachinery.pkg.apis.meta import v1 + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class BucketRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class BucketSelector(BaseModel): + matchControllerRef: bool | None = None + """ + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + """ + matchLabels: dict[str, str] | None = None + """ + MatchLabels ensures an object with matching labels is selected. + """ + policy: Policy | None = None + """ + Policies for selection. + """ + + +class VersioningConfiguration(BaseModel): + status: str | None = None + """ + (String) Versioning state of the bucket. Valid values: Enabled, Suspended, or Disabled. Disabled should only be used when creating or importing resources that correspond to unversioned S3 buckets since the S3 API does not allow setting an Enabled/Suspended bucket to Disabled. + Versioning state of the bucket. Valid values: Enabled, Suspended, or Disabled. Disabled should only be used when creating or importing resources that correspond to unversioned S3 buckets since the S3 API does not allow setting an Enabled/Suspended bucket to Disabled. + """ + + +class ForProvider(BaseModel): + bucket: str | None = None + """ + (String) The bucket on which to enable or suspend versioning. + The bucket on which to enable or suspend versioning. + """ + bucketRef: BucketRef | None = None + """ + Reference to a Bucket in objectstorage to populate bucket. + """ + bucketSelector: BucketSelector | None = None + """ + Selector for a Bucket in objectstorage to populate bucket. + """ + versioningConfiguration: VersioningConfiguration | None = None + """ + (Block, Optional) (see below for nested schema) + """ + + +class InitProvider(BaseModel): + bucket: str | None = None + """ + (String) The bucket on which to enable or suspend versioning. + The bucket on which to enable or suspend versioning. + """ + bucketRef: BucketRef | None = None + """ + Reference to a Bucket in objectstorage to populate bucket. + """ + bucketSelector: BucketSelector | None = None + """ + Selector for a Bucket in objectstorage to populate bucket. + """ + versioningConfiguration: VersioningConfiguration | None = None + """ + (Block, Optional) (see below for nested schema) + """ + + +class ProviderConfigRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Spec(BaseModel): + deletionPolicy: Literal['Orphan', 'Delete'] | None = 'Delete' + """ + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + """ + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + bucket: str | None = None + """ + (String) The bucket on which to enable or suspend versioning. + The bucket on which to enable or suspend versioning. + """ + id: str | None = None + versioningConfiguration: VersioningConfiguration | None = None + """ + (Block, Optional) (see below for nested schema) + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class BucketVersioning(BaseModel): + apiVersion: Literal['objectstorage.coreweave.upbound.io/v1beta1'] | None = ( + 'objectstorage.coreweave.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['BucketVersioning'] | None = 'BucketVersioning' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + BucketVersioningSpec defines the desired state of BucketVersioning + """ + status: Status | None = None + """ + BucketVersioningStatus defines the observed state of BucketVersioning. + """ + + +class BucketVersioningList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[BucketVersioning] + """ + List of bucketversionings. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/coreweave/objectstorage/organizationaccesspolicy/__init__.py b/schemas/python/models/io/upbound/coreweave/objectstorage/organizationaccesspolicy/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/objectstorage/organizationaccesspolicy/v1beta1.py b/schemas/python/models/io/upbound/coreweave/objectstorage/organizationaccesspolicy/v1beta1.py new file mode 100644 index 000000000..ac469be4b --- /dev/null +++ b/schemas/python/models/io/upbound/coreweave/objectstorage/organizationaccesspolicy/v1beta1.py @@ -0,0 +1,254 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_coreweave_upbound_io_v1beta1_organizationaccesspolicy.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....k8s.apimachinery.pkg.apis.meta import v1 + + +class Statement(BaseModel): + actions: list[str] | None = None + """ + S3 (s3:) and AI Object Storage API (cwobject:). You can use wildcards (like s3:* or cwobject:*) to cover multiple actions at once. + Defines which operations the policy allows or denies. Organization access policies can include actions from two APIs - S3 (s3:*) and AI Object Storage API (cwobject:*). You can use wildcards (like s3:* or cwobject:*) to cover multiple actions at once. + """ + effect: str | None = None + """ + sensitive). Determines whether the statement grants or denies the specified actions on the listed resources for the designated principals. By default, all access is denied. + Must be either Allow or Deny (case-sensitive). Determines whether the statement grants or denies the specified actions on the listed resources for the designated principals. By default, all access is denied. + """ + name: str | None = None + """ + (String) The name of the organization access policy, must be unique. + A short, human-readable identifier for this specific policy statement, similar to Sid in bucket access policies. + """ + principals: list[str] | None = None + """ + form identifiers are supported. If you use a full ARN, the policy will fail with an error. See the AI Object Storage documentation for guidelines on defining principals. + Defines which users, roles, or groups the policy applies to. Only short-form identifiers are supported. If you use a full ARN, the policy will fail with an error. See the [AI Object Storage documentation](https://docs.coreweave.com/products/storage/object-storage/auth-access/organization-policies/about) for guidelines on defining principals. + """ + resources: list[str] | None = None + """ + (Set of String) Defines which resources the policy applies to. See the AI Object Storage documentation for guidelines on defining resources. + Defines which resources the policy applies to. See the [AI Object Storage documentation](https://docs.coreweave.com/products/storage/object-storage/auth-access/organization-policies/about) for guidelines on defining resources. + """ + + +class ForProvider(BaseModel): + statements: list[Statement] | None = None + """ + (Attributes Set) The list of access policy statements associated with this policy. At least one statement is required. (see below for nested schema) + """ + + +class InitProvider(BaseModel): + statements: list[Statement] | None = None + """ + (Attributes Set) The list of access policy statements associated with this policy. At least one statement is required. (see below for nested schema) + """ + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class ProviderConfigRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Spec(BaseModel): + deletionPolicy: Literal['Orphan', 'Delete'] | None = 'Delete' + """ + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + """ + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + id: str | None = None + statements: list[Statement] | None = None + """ + (Attributes Set) The list of access policy statements associated with this policy. At least one statement is required. (see below for nested schema) + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class OrganizationAccessPolicy(BaseModel): + apiVersion: Literal['objectstorage.coreweave.upbound.io/v1beta1'] | None = ( + 'objectstorage.coreweave.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['OrganizationAccessPolicy'] | None = 'OrganizationAccessPolicy' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + OrganizationAccessPolicySpec defines the desired state of OrganizationAccessPolicy + """ + status: Status | None = None + """ + OrganizationAccessPolicyStatus defines the observed state of OrganizationAccessPolicy. + """ + + +class OrganizationAccessPolicyList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[OrganizationAccessPolicy] + """ + List of organizationaccesspolicies. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/coreweave/providerconfig/__init__.py b/schemas/python/models/io/upbound/coreweave/providerconfig/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/providerconfig/v1beta1.py b/schemas/python/models/io/upbound/coreweave/providerconfig/v1beta1.py new file mode 100644 index 000000000..1acbf779b --- /dev/null +++ b/schemas/python/models/io/upbound/coreweave/providerconfig/v1beta1.py @@ -0,0 +1,197 @@ +# generated by datamodel-codegen: +# filename: workdir/coreweave_upbound_io_v1beta1_providerconfig.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel + +from ....k8s.apimachinery.pkg.apis.meta import v1 + + +class Env(BaseModel): + name: str + """ + Name is the name of an environment variable. + """ + + +class Fs(BaseModel): + path: str + """ + Path is a filesystem path. + """ + + +class SecretRef(BaseModel): + key: str + """ + The key to select. + """ + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Credentials(BaseModel): + env: Env | None = None + """ + Env is a reference to an environment variable that contains credentials + that must be used to connect to the provider. + """ + fs: Fs | None = None + """ + Fs is a reference to a filesystem location that contains credentials that + must be used to connect to the provider. + """ + secretRef: SecretRef | None = None + """ + A SecretRef is a reference to a secret key that contains the credentials + that must be used to connect to the provider. + """ + source: Literal['None', 'Secret', 'InjectedIdentity', 'Environment', 'Filesystem'] + """ + Source of the provider credentials. + """ + + +class ExponentialFailureRateLimiter(BaseModel): + baseDelay: str | None = None + """ + BaseDelay is the initial delay between retries. + """ + maxDelay: str | None = None + """ + MaxDelay is the maximum delay between retries. + """ + + +class ReconciliationPolicy(BaseModel): + exponentialFailureRateLimiter: ExponentialFailureRateLimiter | None = None + """ + ExponentialFailureRateLimiter, when set, overrides the parameters of the + exponential failure rate limiter used to schedule retries for the + managed resource that this policy applies to. + """ + + +class Spec(BaseModel): + credentials: Credentials + """ + Credentials required to authenticate to this provider. + """ + endpoint: str | None = None + """ + Endpoint is the CoreWeave API endpoint. Defaults to + https://api.coreweave.com/ when omitted. + """ + httpTimeout: str | None = None + """ + HTTPTimeout is the timeout of each CoreWeave API and Object Storage HTTP + attempt, as a Go duration such as "30s". When omitted, API attempts time + out after 10s and Object Storage attempts after 30s. + """ + reconciliationPolicy: ReconciliationPolicy | None = None + """ + ReconciliationPolicy configures how a managed resource is reconciled. + It currently allows overriding the controller's failure rate limiter + parameters on a per-resource basis via ExponentialFailureRateLimiter. + """ + s3Endpoint: str | None = None + """ + S3Endpoint is the CoreWeave Object Storage endpoint. Defaults to + https://cwobject.com when omitted. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + users: int | None = None + """ + Users of this provider configuration. + """ + + +class ProviderConfig(BaseModel): + apiVersion: Literal['coreweave.upbound.io/v1beta1'] | None = ( + 'coreweave.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['ProviderConfig'] | None = 'ProviderConfig' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + A ProviderConfigSpec defines the desired state of a ProviderConfig. + """ + status: Status | None = None + """ + A ProviderConfigStatus reflects the observed state of a ProviderConfig. + """ + + +class ProviderConfigList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[ProviderConfig] + """ + List of providerconfigs. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/coreweave/providerconfigusage/__init__.py b/schemas/python/models/io/upbound/coreweave/providerconfigusage/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/providerconfigusage/v1beta1.py b/schemas/python/models/io/upbound/coreweave/providerconfigusage/v1beta1.py new file mode 100644 index 000000000..cc818a5d9 --- /dev/null +++ b/schemas/python/models/io/upbound/coreweave/providerconfigusage/v1beta1.py @@ -0,0 +1,101 @@ +# generated by datamodel-codegen: +# filename: workdir/coreweave_upbound_io_v1beta1_providerconfigusage.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import BaseModel + +from ....k8s.apimachinery.pkg.apis.meta import v1 + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class ProviderConfigRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class ResourceRef(BaseModel): + apiVersion: str + """ + APIVersion of the referenced object. + """ + kind: str + """ + Kind of the referenced object. + """ + name: str + """ + Name of the referenced object. + """ + uid: str | None = None + """ + UID of the referenced object. + """ + + +class ProviderConfigUsage(BaseModel): + apiVersion: Literal['coreweave.upbound.io/v1beta1'] | None = ( + 'coreweave.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['ProviderConfigUsage'] | None = 'ProviderConfigUsage' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + providerConfigRef: ProviderConfigRef + """ + ProviderConfigReference to the provider config being used. + """ + resourceRef: ResourceRef + """ + ResourceReference to the managed resource using the provider config. + """ + + +class ProviderConfigUsageList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[ProviderConfigUsage] + """ + List of providerconfigusages. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/coreweave/sandbox/__init__.py b/schemas/python/models/io/upbound/coreweave/sandbox/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/sandbox/managedrunner/__init__.py b/schemas/python/models/io/upbound/coreweave/sandbox/managedrunner/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/sandbox/managedrunner/v1beta1.py b/schemas/python/models/io/upbound/coreweave/sandbox/managedrunner/v1beta1.py new file mode 100644 index 000000000..7243fc6c3 --- /dev/null +++ b/schemas/python/models/io/upbound/coreweave/sandbox/managedrunner/v1beta1.py @@ -0,0 +1,1590 @@ +# generated by datamodel-codegen: +# filename: workdir/sandbox_coreweave_upbound_io_v1beta1_managedrunner.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....k8s.apimachinery.pkg.apis.meta import v1 + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class ClusterIdRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class ClusterIdSelector(BaseModel): + matchControllerRef: bool | None = None + """ + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + """ + matchLabels: dict[str, str] | None = None + """ + MatchLabels ensures an object with matching labels is selected. + """ + policy: Policy | None = None + """ + Policies for selection. + """ + + +class BaseSecretRef(BaseModel): + key: str + """ + The key to select. + """ + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Image(BaseModel): + allowedImages: list[str] | None = None + """ + (Set of String) Allowed image references. Empty permits any image within the registry restrictions. + Allowed image references. Empty permits any image within the registry restrictions. + """ + allowedRegistries: list[str] | None = None + """ + (Set of String) Allowed registry prefixes. Empty permits any registry. + Allowed registry prefixes. Empty permits any registry. + """ + + +class Instance(BaseModel): + allowedInstanceTypes: list[str] | None = None + """ + (Set of String) Allowed instance types. Empty permits any offered by the runner. + Allowed instance types. Empty permits any offered by the runner. + """ + + +class Lifecycle(BaseModel): + defaultLifetimeSeconds: float | None = None + """ + (Number) Default sandbox lifetime in seconds; zero leaves the platform default. Maximum 30 days. + Default sandbox lifetime in seconds; zero leaves the platform default. Maximum 30 days. + """ + + +class Metadata(BaseModel): + deniedAnnotationPrefixes: list[str] | None = None + """ + (Set of String) Rejected annotation key prefixes. + Rejected annotation key prefixes. + """ + maxAnnotationCount: float | None = None + """ + (Number) Maximum annotations; zero means no limit. + Maximum annotations; zero means no limit. + """ + + +class Cidr(BaseModel): + cidr: str | None = None + """ + outs. (see below for nested schema) + IPv4 or IPv6 CIDR. + """ + except_: list[str] | None = Field(None, alias='except') + """ + (Set of String) Excluded subranges. + Excluded subranges. + """ + + +class Port(BaseModel): + endPort: float | None = None + """ + (Number) Inclusive end port; zero or omitted means a single port. + Inclusive end port; zero or omitted means a single port. + """ + port: float | None = None + """ + (Number) Starting port. + Starting port. + """ + protocol: str | None = None + """ + (String) TCP (default), UDP, or SCTP. + TCP (default), UDP, or SCTP. + """ + + +class Selector(BaseModel): + namespaceLabels: dict[str, str] | None = None + """ + (Map of String) Namespace labels to match. Omitted means the sandbox's own namespace. + Namespace labels to match. Omitted means the sandbox's own namespace. + """ + podLabels: dict[str, str] | None = None + """ + (Map of String) Pod labels to match (at least one required). + Pod labels to match (at least one required). + """ + + +class AllowedEgres(BaseModel): + any: bool | None = None + """ + shaped peer. + Set to true to select any address-shaped peer. + """ + cidr: Cidr | None = None + """ + outs. (see below for nested schema) + """ + dnsName: str | None = None + """ + (String, Deprecated) Deprecated alias for https_hostname. + Deprecated alias for https_hostname. + """ + dnsNameExcept: list[str] | None = None + """ + (Set of String, Deprecated) Deprecated alias for https_hostname_except. + Deprecated alias for https_hostname_except. + """ + httpsHostname: str | None = None + """ + (String) Exact HTTPS hostname or a single leftmost wildcard label; * is allowed only in allowed_egress. + Exact HTTPS hostname or a single leftmost wildcard label; `*` is allowed only in allowed_egress. + """ + httpsHostnameExcept: list[str] | None = None + """ + (Set of String) Hostnames excluded from an allowed_egress HTTPS envelope. + Hostnames excluded from an allowed_egress HTTPS envelope. + """ + ports: list[Port] | None = None + """ + (Attributes List) Allowed ports. Empty means all ports, except HTTPS hostname destinations which use HTTPS (TCP 443). (see below for nested schema) + """ + selector: Selector | None = None + """ + (Attributes) Explicit entitlement to reach cluster workloads by label. (see below for nested schema) + """ + tenant: str | None = None + """ + (String) Relational tenant selection. Values: TENANT_SCOPE_SAME_USER, TENANT_SCOPE_SAME_ORG, TENANT_SCOPE_SANDBOX_NETWORK. + Relational tenant selection. Values: `TENANT_SCOPE_SAME_USER`, `TENANT_SCOPE_SAME_ORG`, `TENANT_SCOPE_SANDBOX_NETWORK`. + """ + + +class AllowedIngres(BaseModel): + any: bool | None = None + """ + shaped peer. + Set to true to select any address-shaped peer. + """ + cidr: Cidr | None = None + """ + outs. (see below for nested schema) + """ + ports: list[Port] | None = None + """ + (Attributes List) Allowed ports. Empty means all ports, except HTTPS hostname destinations which use HTTPS (TCP 443). (see below for nested schema) + """ + tenant: str | None = None + """ + (String) Relational tenant selection. Values: TENANT_SCOPE_SAME_USER, TENANT_SCOPE_SAME_ORG, TENANT_SCOPE_SANDBOX_NETWORK. + Relational tenant selection. Values: `TENANT_SCOPE_SAME_USER`, `TENANT_SCOPE_SAME_ORG`, `TENANT_SCOPE_SANDBOX_NETWORK`. + """ + + +class DefaultEgres(BaseModel): + any: bool | None = None + """ + shaped peer. + Set to true to select any address-shaped peer. + """ + cidr: Cidr | None = None + """ + outs. (see below for nested schema) + """ + dnsName: str | None = None + """ + (String, Deprecated) Deprecated alias for https_hostname. + Deprecated alias for https_hostname. + """ + dnsNameExcept: list[str] | None = None + """ + (Set of String, Deprecated) Deprecated alias for https_hostname_except. + Deprecated alias for https_hostname_except. + """ + httpsHostname: str | None = None + """ + (String) Exact HTTPS hostname or a single leftmost wildcard label; * is allowed only in allowed_egress. + Exact HTTPS hostname or a single leftmost wildcard label; `*` is allowed only in allowed_egress. + """ + httpsHostnameExcept: list[str] | None = None + """ + (Set of String) Hostnames excluded from an allowed_egress HTTPS envelope. + Hostnames excluded from an allowed_egress HTTPS envelope. + """ + ports: list[Port] | None = None + """ + (Attributes List) Allowed ports. Empty means all ports, except HTTPS hostname destinations which use HTTPS (TCP 443). (see below for nested schema) + """ + selector: Selector | None = None + """ + (Attributes) Explicit entitlement to reach cluster workloads by label. (see below for nested schema) + """ + tenant: str | None = None + """ + (String) Relational tenant selection. Values: TENANT_SCOPE_SAME_USER, TENANT_SCOPE_SAME_ORG, TENANT_SCOPE_SANDBOX_NETWORK. + Relational tenant selection. Values: `TENANT_SCOPE_SAME_USER`, `TENANT_SCOPE_SAME_ORG`, `TENANT_SCOPE_SANDBOX_NETWORK`. + """ + + +class DefaultIngres(BaseModel): + any: bool | None = None + """ + shaped peer. + Set to true to select any address-shaped peer. + """ + cidr: Cidr | None = None + """ + outs. (see below for nested schema) + """ + ports: list[Port] | None = None + """ + (Attributes List) Allowed ports. Empty means all ports, except HTTPS hostname destinations which use HTTPS (TCP 443). (see below for nested schema) + """ + tenant: str | None = None + """ + (String) Relational tenant selection. Values: TENANT_SCOPE_SAME_USER, TENANT_SCOPE_SAME_ORG, TENANT_SCOPE_SANDBOX_NETWORK. + Relational tenant selection. Values: `TENANT_SCOPE_SAME_USER`, `TENANT_SCOPE_SAME_ORG`, `TENANT_SCOPE_SANDBOX_NETWORK`. + """ + + +class Network(BaseModel): + allowedEgress: list[AllowedEgres] | None = None + """ + (Attributes List) Allowed egress envelope. HTTPS hostname wildcard * is permitted here. Select exactly one peer kind per rule. (see below for nested schema) + """ + allowedIngress: list[AllowedIngres] | None = None + """ + visibility ports. Select exactly one peer kind per rule. (see below for nested schema) + """ + defaultEgress: list[DefaultEgres] | None = None + """ + (Attributes List) Egress applied when the sandbox specifies none. HTTPS hostname destinations are not permitted here. Select exactly one peer kind per rule. (see below for nested schema) + """ + defaultIngress: list[DefaultIngres] | None = None + """ + (Attributes List) Ingress applied when the sandbox specifies none. Select exactly one peer kind per rule. (see below for nested schema) + """ + denyDns: bool | None = None + """ + (Boolean, Deprecated) Deprecated alias for deny_https_hostname_rules. Does not disable DNS resolution. + Deprecated alias for deny_https_hostname_rules. Does not disable DNS resolution. + """ + denyHttpsHostnameRules: bool | None = None + """ + based HTTPS egress grants. Does not disable DNS resolution. + Forbid hostname-based HTTPS egress grants. Does not disable DNS resolution. + """ + dnsEgress: str | None = None + """ + based HTTPS grants. Values: DNS_EGRESS_MODE_ALLOW, DNS_EGRESS_MODE_DENY. + Outbound DNS traffic ceiling on UDP/TCP port 53. Unspecified permits DNS; DENY requires sandboxes to block it. Independent of hostname-based HTTPS grants. Values: `DNS_EGRESS_MODE_ALLOW`, `DNS_EGRESS_MODE_DENY`. + """ + + +class Resources(BaseModel): + cpuCeiling: str | None = None + """ + of-requests CPU ceiling across the sandbox. + Sum-of-requests CPU ceiling across the sandbox. + """ + defaultCpu: str | None = None + """ + (String) Default CPU per container. When a container declares neither requests nor limits, a positive default also sets its CPU limit. + Default CPU per container. When a container declares neither requests nor limits, a positive default also sets its CPU limit. + """ + defaultMemory: str | None = None + """ + (String) Default memory per container. When a container declares neither requests nor limits, a positive default also sets its memory limit. + Default memory per container. When a container declares neither requests nor limits, a positive default also sets its memory limit. + """ + maxCpu: str | None = None + """ + (String) Maximum CPU per container, as a Kubernetes quantity. + Maximum CPU per container, as a Kubernetes quantity. + """ + maxGpuCount: float | None = None + """ + (Number) Maximum GPUs per container. Omitted means no cap; explicit zero forbids GPUs. + Maximum GPUs per container. Omitted means no cap; explicit zero forbids GPUs. + """ + maxMemory: str | None = None + """ + (String) Maximum memory per container. + Maximum memory per container. + """ + memoryCeiling: str | None = None + """ + of-requests memory ceiling across the sandbox. + Sum-of-requests memory ceiling across the sandbox. + """ + minCpu: str | None = None + """ + (String) Minimum CPU per container. + Minimum CPU per container. + """ + minMemory: str | None = None + """ + (String) Minimum memory per container. + Minimum memory per container. + """ + requireLimits: bool | None = None + """ + (Boolean) Require every container to have requests and limits after defaults are applied. + Require every container to have requests and limits after defaults are applied. + """ + + +class RuntimeClassMapping(BaseModel): + kubernetesRuntimeClassName: str | None = None + """ + (String) Kubernetes RuntimeClass name. Set exactly one of kubernetes_runtime_class_name or node_default. + Kubernetes RuntimeClass name. Set exactly one of kubernetes_runtime_class_name or node_default. + """ + nodeDefault: bool | None = None + """ + mode placement outside the shared serverless pool. + Set to true to use the node's default container runtime. Permitted only for `RUNTIME_CLASS_CPU_DEFAULT` and `RUNTIME_CLASS_GPU_DEFAULT`, and only serves CKS-mode placement outside the shared serverless pool. + """ + runtimeClass: str | None = None + """ + (String) Portable runtime class provided by the target. Values: RUNTIME_CLASS_CPU_DEFAULT, RUNTIME_CLASS_CPU_NESTED_VIRT, RUNTIME_CLASS_CPU_SNAPSHOT_RESTORE, RUNTIME_CLASS_GPU_DEFAULT. + Portable runtime class provided by the target. Values: `RUNTIME_CLASS_CPU_DEFAULT`, `RUNTIME_CLASS_CPU_NESTED_VIRT`, `RUNTIME_CLASS_CPU_SNAPSHOT_RESTORE`, `RUNTIME_CLASS_GPU_DEFAULT`. + """ + + +class Security(BaseModel): + allowPrivileged: bool | None = None + """ + (Boolean) Permit privileged containers. + Permit privileged containers. + """ + allowedCapabilities: list[str] | None = None + """ + (Set of String) Linux capabilities containers may add. Empty permits none beyond defaults. + Linux capabilities containers may add. Empty permits none beyond defaults. + """ + allowedRuntimeClasses: list[str] | None = None + """ + selected runtime classes. Cannot be combined with runtime_class_mappings. + Runtime classes callers may explicitly select. Empty forbids caller-selected runtime classes. Cannot be combined with runtime_class_mappings. + """ + allowedSeccompProfiles: list[str] | None = None + """ + (Set of String) Permitted seccomp profiles, such as RuntimeDefault or Unconfined. + Permitted seccomp profiles, such as RuntimeDefault or Unconfined. + """ + defaultCpuRuntimeClass: str | None = None + """ + class allowlist. Cannot be combined with runtime_class_mappings. + Default CPU runtime class. Must fit a nonempty runtime-class allowlist. Cannot be combined with runtime_class_mappings. + """ + defaultGpuRuntimeClass: str | None = None + """ + class allowlist. Cannot be combined with runtime_class_mappings. + Default GPU runtime class. Must fit a nonempty runtime-class allowlist. Cannot be combined with runtime_class_mappings. + """ + runtimeClassMappings: list[RuntimeClassMapping] | None = None + """ + empty set switches the runner to mappings: a mapped class is available both for caller selection and as the automatic CPU or GPU default, an unmapped class is unavailable, and callers cannot pin a concrete runtime class. Omitting a default class disables automatic selection for that resource family. Each class appears at most once. Cannot be combined with allowed_runtime_classes, default_cpu_runtime_class, or default_gpu_runtime_class. (see below for nested schema) + """ + + +class Volumes(BaseModel): + allowedMedia: list[str] | None = None + """ + (Set of String) Allowed storage media. Empty permits any. + Allowed storage media. Empty permits any. + """ + maxSize: str | None = None + """ + (String) Maximum size per volume, for example 100Gi. + Maximum size per volume, for example 100Gi. + """ + + +class Constraints(BaseModel): + image: Image | None = None + """ + (Attributes) Image restrictions. (see below for nested schema) + """ + instance: Instance | None = None + """ + type restrictions. (see below for nested schema) + """ + lifecycle: Lifecycle | None = None + """ + (Attributes) Lifetime defaults. (see below for nested schema) + """ + metadata: Metadata | None = None + """ + (Attributes) Annotation restrictions. (see below for nested schema) + """ + network: Network | None = None + """ + (Attributes) Network envelopes and defaults. Empty allowed envelopes impose no restriction. (see below for nested schema) + """ + resources: Resources | None = None + """ + container bounds, defaults, and whole-sandbox ceilings. (see below for nested schema) + """ + security: Security | None = None + """ + class constraints. (see below for nested schema) + """ + volumes: Volumes | None = None + """ + (Attributes) Sandbox volume restrictions. (see below for nested schema) + """ + + +class SourceIpAllowlist(BaseModel): + cidrs: list[str] | None = None + """ + (Set of String) Canonical, nonredundant IPv4/IPv6 prefixes (at most 256). Do not include a prefix already covered by another entry. An empty set denies every public source. Omitting the enclosing source_ip_allowlist leaves access unrestricted. + Canonical, nonredundant IPv4/IPv6 prefixes (at most 256). Do not include a prefix already covered by another entry. An empty set denies every public source. Omitting the enclosing source_ip_allowlist leaves access unrestricted. + """ + + +class ControlPlaneAccess(BaseModel): + sourceIpAllowlist: SourceIpAllowlist | None = None + """ + (Attributes) Public source IP restriction. A present empty object denies every public source; an absent object imposes no source IP restriction. (see below for nested schema) + """ + + +class PolicyModel(BaseModel): + baseSecretRef: BaseSecretRef | None = None + """ + (String, Sensitive) Runtime defaults and attachments as a JSON object, for example jsonencode({ ... }). Typed constraints belong in constraints. + Runtime defaults and attachments as a JSON object, for example `jsonencode({ ... })`. Typed constraints belong in constraints. + """ + constraints: Constraints | None = None + """ + closed. (see below for nested schema) + """ + controlPlaneAccess: ControlPlaneAccess | None = None + """ + time controls in addition to authentication and tenant authorization. (see below for nested schema) + """ + displayName: str | None = None + """ + readable runner name. + Human-readable policy name. + """ + + +class ClusterIp(BaseModel): + annotations: dict[str, str] | None = None + """ + (Map of String) Service annotations. + Service annotations. + """ + + +class Custom(BaseModel): + advertisedUri: str | None = None + """ + (String) Stable absolute URI returned to direct clients. + Stable absolute URI returned to direct clients. + """ + serviceAnnotations: dict[str, str] | None = None + """ + (Map of String) Annotations on the backing ClusterIP service. + Annotations on the backing ClusterIP service. + """ + + +class LoadBalancer(BaseModel): + annotations: dict[str, str] | None = None + """ + (Map of String) Service annotations. + Service annotations. + """ + externalTrafficPolicy: str | None = None + """ + (String) External traffic policy. Values: RUNNER_DATA_PLANE_EXTERNAL_TRAFFIC_POLICY_CLUSTER, RUNNER_DATA_PLANE_EXTERNAL_TRAFFIC_POLICY_LOCAL. + External traffic policy. Values: `RUNNER_DATA_PLANE_EXTERNAL_TRAFFIC_POLICY_CLUSTER`, `RUNNER_DATA_PLANE_EXTERNAL_TRAFFIC_POLICY_LOCAL`. + """ + hostname: str | None = None + """ + (String) Endpoint DNS name included in the server certificate. The platform may assign one when empty. + Endpoint DNS name included in the server certificate. The platform may assign one when empty. + """ + loadBalancerClass: str | None = None + """ + (String) Kubernetes load balancer class. + Kubernetes load balancer class. + """ + scope: str | None = None + """ + (String) Load balancer scope. Values: RUNNER_DATA_PLANE_SERVICE_SCOPE_PUBLIC, RUNNER_DATA_PLANE_SERVICE_SCOPE_PRIVATE. + Load balancer scope. Values: `RUNNER_DATA_PLANE_SERVICE_SCOPE_PUBLIC`, `RUNNER_DATA_PLANE_SERVICE_SCOPE_PRIVATE`. + """ + sourceRanges: list[str] | None = None + """ + (Set of String) Allowed client source CIDRs. + Allowed client source CIDRs. + """ + + +class DataPlane(BaseModel): + clusterIp: ClusterIp | None = None + """ + (Attributes) Expose through a ClusterIP service. (see below for nested schema) + """ + custom: Custom | None = None + """ + managed network path. (see below for nested schema) + """ + disabled: bool | None = None + """ + (Boolean) Set to true to explicitly disable the direct endpoint. + Set to true to explicitly disable the direct endpoint. + """ + loadBalancer: LoadBalancer | None = None + """ + (Attributes) Expose through an L4 load balancer forwarding mutual TLS to the runner. (see below for nested schema) + """ + + +class ImagePull(BaseModel): + policy: str | None = None + """ + (Attributes) Policy governing every sandbox on this runner. Required even for the explicit empty posture policy = {}. Policy is updated with an etag to detect concurrent changes. (see below for nested schema) + Image pull policy. The platform default is IF_NOT_PRESENT. ALWAYS reauthorizes pull credentials on every start. Values: `SANDBOX_IMAGE_PULL_POLICY_IF_NOT_PRESENT`, `SANDBOX_IMAGE_PULL_POLICY_ALWAYS`. + """ + + +class Exclusion(BaseModel): + endTime: str | None = None + """ + (String) Exclusive RFC 3339 end timestamp, after start_time. + Exclusive RFC 3339 end timestamp, after start_time. + """ + reason: str | None = None + """ + (String) Reason for the exclusion. + Reason for the exclusion. + """ + startTime: str | None = None + """ + (String) Inclusive RFC 3339 start timestamp. + Inclusive RFC 3339 start timestamp. + """ + + +class Window(BaseModel): + cron: str | None = None + """ + field cron expression in UTC, for example 0 2 * * SAT. + Five-field cron expression in UTC, for example `0 2 * * SAT`. + """ + durationSeconds: float | None = None + """ + 604800). + Window duration in seconds (60-604800). + """ + + +class MaintenancePolicy(BaseModel): + exclusions: list[Exclusion] | None = None + """ + time periods during which updates cannot start. (see below for nested schema) + """ + windows: list[Window] | None = None + """ + (Attributes List) Recurring update windows. An empty list permits updates at any time outside exclusions. (see below for nested schema) + """ + + +class EnvSecretRef(BaseModel): + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class ResourcesModel(BaseModel): + cpuLimit: str | None = None + """ + (String) CPU limit. + CPU limit. + """ + cpuRequest: str | None = None + """ + (String) CPU request. + CPU request. + """ + memoryLimit: str | None = None + """ + (String) Memory limit. + Memory limit. + """ + memoryRequest: str | None = None + """ + (String) Memory request. + Memory request. + """ + + +class Scaling(BaseModel): + autoscalingEnabled: bool | None = None + """ + (Boolean) Enable runner autoscaling. + Enable runner autoscaling. + """ + maxReplicas: float | None = None + """ + (Number) Maximum replicas. + Maximum replicas. + """ + minReplicas: float | None = None + """ + (Number) Minimum replicas. + Minimum replicas. + """ + replicas: float | None = None + """ + (Number) Desired replicas when autoscaling is disabled. + Desired replicas when autoscaling is disabled. + """ + + +class Toleration(BaseModel): + effect: str | None = None + """ + (String) Taint effect. Empty matches all effects. + Taint effect. Empty matches all effects. + """ + key: str | None = None + """ + (String) Taint key. + Taint key. + """ + operator: str | None = None + """ + (String) Toleration operator (Equal or Exists). + Toleration operator (`Equal` or `Exists`). + """ + value: str | None = None + """ + (String) Taint value. + Taint value. + """ + + +class Overrides(BaseModel): + annotations: dict[str, str] | None = None + """ + (Map of String) Service annotations. + Annotations on runner pods. + """ + args: list[str] | None = None + """ + line arguments. + Ordered runner command-line arguments. + """ + cpuRuntimeClass: str | None = None + """ + (String) Runtime class for CPU sandboxes. + Runtime class for CPU sandboxes. + """ + envSecretRef: EnvSecretRef | None = None + """ + (Map of String, Sensitive) Runner environment overrides. + Runner environment overrides. + """ + gpuRuntimeClass: str | None = None + """ + (String) Runtime class for GPU sandboxes. + Runtime class for GPU sandboxes. + """ + labels: dict[str, str] | None = None + """ + (Map of String) Labels on runner pods. + Labels on runner pods. + """ + nodeSelector: dict[str, str] | None = None + """ + (Map of String) Node label selectors for the runner deployment. + Node label selectors for the runner deployment. + """ + resources: ResourcesModel | None = None + """ + container bounds, defaults, and whole-sandbox ceilings. (see below for nested schema) + """ + scaling: Scaling | None = None + """ + (Attributes) Runner replica and autoscaling configuration. (see below for nested schema) + """ + tolerations: list[Toleration] | None = None + """ + (Attributes List) Kubernetes tolerations for runner pods. (see below for nested schema) + """ + + +class TenantMetrics(BaseModel): + enabled: bool | None = None + """ + (Boolean) Enable the tenant metrics collector. + Enable the tenant metrics collector. + """ + image: str | None = None + """ + (Attributes) Image restrictions. (see below for nested schema) + Release-pinned collector image. Empty retains the deployment environment's image. + """ + + +class VolumesModel(BaseModel): + csiDriverAllowlist: list[str] | None = None + """ + (Set of String) Allowed CSI drivers. Empty uses the platform default (csi.vastdata.com). + Allowed CSI drivers. Empty uses the platform default (`csi.vastdata.com`). + """ + enabled: bool | None = None + """ + (Boolean) Enable the tenant metrics collector. + Enable registered volume mounts; the runner's PVC/PV permission preflight must also pass. + """ + + +class Spec(BaseModel): + dataPlane: DataPlane | None = None + """ + (Attributes) Direct sandbox data endpoint. Select exactly one of disabled, cluster_ip, load_balancer, or custom. Certificates are managed by the platform. (see below for nested schema) + """ + enforceResourceLimits: bool | None = None + """ + (Boolean) Require sandboxes to declare both memory and CPU limits. + Require sandboxes to declare both memory and CPU limits. + """ + imagePull: ImagePull | None = None + """ + (Attributes) Workload container image pull behavior. (see below for nested schema) + """ + maintenancePolicy: MaintenancePolicy | None = None + """ + (Attributes) Update scheduling in UTC. Exclusions take precedence over windows. (see below for nested schema) + """ + overrides: Overrides | None = None + """ + settable runner deployment overrides. (see below for nested schema) + """ + releaseChannel: str | None = None + """ + (String) Automatic update channel. Defaults to stable. Values: RELEASE_CHANNEL_STABLE, RELEASE_CHANNEL_RAPID. + Automatic update channel. Defaults to stable. Values: `RELEASE_CHANNEL_STABLE`, `RELEASE_CHANNEL_RAPID`. + """ + tenantMetrics: TenantMetrics | None = None + """ + sandbox tenant usage collection. Overrides corresponding deployment environment entries. (see below for nested schema) + """ + volumes: VolumesModel | None = None + """ + (Attributes) Sandbox volume restrictions. (see below for nested schema) + """ + + +class ForProvider(BaseModel): + clusterId: str | None = None + """ + (String) CKS cluster UUID. Changing it replaces the runner. + CKS cluster UUID. Changing it replaces the runner. + """ + clusterIdRef: ClusterIdRef | None = None + """ + Reference to a Cluster in cks to populate clusterId. + """ + clusterIdSelector: ClusterIdSelector | None = None + """ + Selector for a Cluster in cks to populate clusterId. + """ + displayName: str | None = None + """ + readable runner name. + Human-readable runner name. + """ + policy: PolicyModel | None = None + """ + (Attributes) Policy governing every sandbox on this runner. Required even for the explicit empty posture policy = {}. Policy is updated with an etag to detect concurrent changes. (see below for nested schema) + """ + runnerGroupId: str | None = None + """ + (String) Runner group for scheduling affinity. Defaults to default; omitting or setting this attribute to null resets a custom group to default. + Runner group for scheduling affinity. Defaults to `default`; omitting or setting this attribute to null resets a custom group to `default`. + """ + spec: Spec | None = None + """ + (Attributes) Desired runner configuration. When omitted, the server's defaults are adopted. Removing an optional setting inside this object resets that setting through an explicit update mask. (see below for nested schema) + """ + zone: str | None = None + """ + east-04a. Use lower(coreweave_cks_cluster.example.zone) when referencing a CKS cluster zone. Changing it replaces the runner. + Lowercase geographic zone of the runner, for example `us-east-04a`. Use `lower(coreweave_cks_cluster.example.zone)` when referencing a CKS cluster zone. Changing it replaces the runner. + """ + + +class PolicyModel1(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class ResourcesModel1(BaseModel): + cpuCeiling: str | None = None + """ + of-requests CPU ceiling across the sandbox. + Sum-of-requests CPU ceiling across the sandbox. + """ + defaultCpu: str | None = None + """ + (String) Default CPU per container. When a container declares neither requests nor limits, a positive default also sets its CPU limit. + Default CPU per container. When a container declares neither requests nor limits, a positive default also sets its CPU limit. + """ + defaultMemory: str | None = None + """ + (String) Default memory per container. When a container declares neither requests nor limits, a positive default also sets its memory limit. + Default memory per container. When a container declares neither requests nor limits, a positive default also sets its memory limit. + """ + maxCpu: str | None = None + """ + (String) Maximum CPU per container, as a Kubernetes quantity. + Maximum CPU per container, as a Kubernetes quantity. + """ + maxGpuCount: float | None = None + """ + (Number) Maximum GPUs per container. Omitted means no cap; explicit zero forbids GPUs. + Maximum GPUs per container. Omitted means no cap; explicit zero forbids GPUs. + """ + maxMemory: str | None = None + """ + (String) Maximum memory per container. + Maximum memory per container. + """ + memoryCeiling: str | None = None + """ + of-requests memory ceiling across the sandbox. + Sum-of-requests memory ceiling across the sandbox. + """ + minCpu: str | None = None + """ + (String) Minimum CPU per container. + Minimum CPU per container. + """ + minMemory: str | None = None + """ + (String) Minimum memory per container. + Minimum memory per container. + """ + requireLimits: bool | None = None + """ + (Boolean) Require every container to have requests and limits after defaults are applied. + Require every container to have requests and limits after defaults are applied. + """ + + +class VolumesModel1(BaseModel): + allowedMedia: list[str] | None = None + """ + (Set of String) Allowed storage media. Empty permits any. + Allowed storage media. Empty permits any. + """ + maxSize: str | None = None + """ + (String) Maximum size per volume, for example 100Gi. + Maximum size per volume, for example 100Gi. + """ + + +class PolicyModel2(BaseModel): + baseSecretRef: BaseSecretRef | None = None + """ + (String, Sensitive) Runtime defaults and attachments as a JSON object, for example jsonencode({ ... }). Typed constraints belong in constraints. + Runtime defaults and attachments as a JSON object, for example `jsonencode({ ... })`. Typed constraints belong in constraints. + """ + constraints: Constraints | None = None + """ + closed. (see below for nested schema) + """ + controlPlaneAccess: ControlPlaneAccess | None = None + """ + time controls in addition to authentication and tenant authorization. (see below for nested schema) + """ + displayName: str | None = None + """ + readable runner name. + Human-readable policy name. + """ + + +class ResourcesModel2(BaseModel): + cpuLimit: str | None = None + """ + (String) CPU limit. + CPU limit. + """ + cpuRequest: str | None = None + """ + (String) CPU request. + CPU request. + """ + memoryLimit: str | None = None + """ + (String) Memory limit. + Memory limit. + """ + memoryRequest: str | None = None + """ + (String) Memory request. + Memory request. + """ + + +class OverridesModel(BaseModel): + annotations: dict[str, str] | None = None + """ + (Map of String) Service annotations. + Annotations on runner pods. + """ + args: list[str] | None = None + """ + line arguments. + Ordered runner command-line arguments. + """ + cpuRuntimeClass: str | None = None + """ + (String) Runtime class for CPU sandboxes. + Runtime class for CPU sandboxes. + """ + envSecretRef: dict[str, str] | None = None + gpuRuntimeClass: str | None = None + """ + (String) Runtime class for GPU sandboxes. + Runtime class for GPU sandboxes. + """ + labels: dict[str, str] | None = None + """ + (Map of String) Labels on runner pods. + Labels on runner pods. + """ + nodeSelector: dict[str, str] | None = None + """ + (Map of String) Node label selectors for the runner deployment. + Node label selectors for the runner deployment. + """ + resources: ResourcesModel2 | None = None + """ + container bounds, defaults, and whole-sandbox ceilings. (see below for nested schema) + """ + scaling: Scaling | None = None + """ + (Attributes) Runner replica and autoscaling configuration. (see below for nested schema) + """ + tolerations: list[Toleration] | None = None + """ + (Attributes List) Kubernetes tolerations for runner pods. (see below for nested schema) + """ + + +class VolumesModel2(BaseModel): + csiDriverAllowlist: list[str] | None = None + """ + (Set of String) Allowed CSI drivers. Empty uses the platform default (csi.vastdata.com). + Allowed CSI drivers. Empty uses the platform default (`csi.vastdata.com`). + """ + enabled: bool | None = None + """ + (Boolean) Enable the tenant metrics collector. + Enable registered volume mounts; the runner's PVC/PV permission preflight must also pass. + """ + + +class InitProvider(BaseModel): + clusterId: str | None = None + """ + (String) CKS cluster UUID. Changing it replaces the runner. + CKS cluster UUID. Changing it replaces the runner. + """ + clusterIdRef: ClusterIdRef | None = None + """ + Reference to a Cluster in cks to populate clusterId. + """ + clusterIdSelector: ClusterIdSelector | None = None + """ + Selector for a Cluster in cks to populate clusterId. + """ + displayName: str | None = None + """ + readable runner name. + Human-readable runner name. + """ + policy: PolicyModel2 | None = None + """ + (Attributes) Policy governing every sandbox on this runner. Required even for the explicit empty posture policy = {}. Policy is updated with an etag to detect concurrent changes. (see below for nested schema) + """ + runnerGroupId: str | None = None + """ + (String) Runner group for scheduling affinity. Defaults to default; omitting or setting this attribute to null resets a custom group to default. + Runner group for scheduling affinity. Defaults to `default`; omitting or setting this attribute to null resets a custom group to `default`. + """ + spec: Spec | None = None + """ + (Attributes) Desired runner configuration. When omitted, the server's defaults are adopted. Removing an optional setting inside this object resets that setting through an explicit update mask. (see below for nested schema) + """ + zone: str | None = None + """ + east-04a. Use lower(coreweave_cks_cluster.example.zone) when referencing a CKS cluster zone. Changing it replaces the runner. + Lowercase geographic zone of the runner, for example `us-east-04a`. Use `lower(coreweave_cks_cluster.example.zone)` when referencing a CKS cluster zone. Changing it replaces the runner. + """ + + +class PolicyModel3(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class ProviderConfigRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: PolicyModel3 | None = None + """ + Policies for referencing. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class SpecModel(BaseModel): + deletionPolicy: Literal['Orphan', 'Delete'] | None = 'Delete' + """ + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + """ + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class ResourcesModel3(BaseModel): + cpuCeiling: str | None = None + """ + of-requests CPU ceiling across the sandbox. + Sum-of-requests CPU ceiling across the sandbox. + """ + defaultCpu: str | None = None + """ + (String) Default CPU per container. When a container declares neither requests nor limits, a positive default also sets its CPU limit. + Default CPU per container. When a container declares neither requests nor limits, a positive default also sets its CPU limit. + """ + defaultMemory: str | None = None + """ + (String) Default memory per container. When a container declares neither requests nor limits, a positive default also sets its memory limit. + Default memory per container. When a container declares neither requests nor limits, a positive default also sets its memory limit. + """ + maxCpu: str | None = None + """ + (String) Maximum CPU per container, as a Kubernetes quantity. + Maximum CPU per container, as a Kubernetes quantity. + """ + maxGpuCount: float | None = None + """ + (Number) Maximum GPUs per container. Omitted means no cap; explicit zero forbids GPUs. + Maximum GPUs per container. Omitted means no cap; explicit zero forbids GPUs. + """ + maxMemory: str | None = None + """ + (String) Maximum memory per container. + Maximum memory per container. + """ + memoryCeiling: str | None = None + """ + of-requests memory ceiling across the sandbox. + Sum-of-requests memory ceiling across the sandbox. + """ + minCpu: str | None = None + """ + (String) Minimum CPU per container. + Minimum CPU per container. + """ + minMemory: str | None = None + """ + (String) Minimum memory per container. + Minimum memory per container. + """ + requireLimits: bool | None = None + """ + (Boolean) Require every container to have requests and limits after defaults are applied. + Require every container to have requests and limits after defaults are applied. + """ + + +class VolumesModel3(BaseModel): + allowedMedia: list[str] | None = None + """ + (Set of String) Allowed storage media. Empty permits any. + Allowed storage media. Empty permits any. + """ + maxSize: str | None = None + """ + (String) Maximum size per volume, for example 100Gi. + Maximum size per volume, for example 100Gi. + """ + + +class PolicyModel4(BaseModel): + constraints: Constraints | None = None + """ + closed. (see below for nested schema) + """ + controlPlaneAccess: ControlPlaneAccess | None = None + """ + time controls in addition to authentication and tenant authorization. (see below for nested schema) + """ + displayName: str | None = None + """ + readable runner name. + Human-readable policy name. + """ + + +class ResourcesModel4(BaseModel): + cpuLimit: str | None = None + """ + (String) CPU limit. + CPU limit. + """ + cpuRequest: str | None = None + """ + (String) CPU request. + CPU request. + """ + memoryLimit: str | None = None + """ + (String) Memory limit. + Memory limit. + """ + memoryRequest: str | None = None + """ + (String) Memory request. + Memory request. + """ + + +class OverridesModel1(BaseModel): + annotations: dict[str, str] | None = None + """ + (Map of String) Service annotations. + Annotations on runner pods. + """ + args: list[str] | None = None + """ + line arguments. + Ordered runner command-line arguments. + """ + cpuRuntimeClass: str | None = None + """ + (String) Runtime class for CPU sandboxes. + Runtime class for CPU sandboxes. + """ + gpuRuntimeClass: str | None = None + """ + (String) Runtime class for GPU sandboxes. + Runtime class for GPU sandboxes. + """ + labels: dict[str, str] | None = None + """ + (Map of String) Labels on runner pods. + Labels on runner pods. + """ + nodeSelector: dict[str, str] | None = None + """ + (Map of String) Node label selectors for the runner deployment. + Node label selectors for the runner deployment. + """ + resources: ResourcesModel4 | None = None + """ + container bounds, defaults, and whole-sandbox ceilings. (see below for nested schema) + """ + scaling: Scaling | None = None + """ + (Attributes) Runner replica and autoscaling configuration. (see below for nested schema) + """ + tolerations: list[Toleration] | None = None + """ + (Attributes List) Kubernetes tolerations for runner pods. (see below for nested schema) + """ + + +class VolumesModel4(BaseModel): + csiDriverAllowlist: list[str] | None = None + """ + (Set of String) Allowed CSI drivers. Empty uses the platform default (csi.vastdata.com). + Allowed CSI drivers. Empty uses the platform default (`csi.vastdata.com`). + """ + enabled: bool | None = None + """ + (Boolean) Enable the tenant metrics collector. + Enable registered volume mounts; the runner's PVC/PV permission preflight must also pass. + """ + + +class SpecModel1(BaseModel): + dataPlane: DataPlane | None = None + """ + (Attributes) Direct sandbox data endpoint. Select exactly one of disabled, cluster_ip, load_balancer, or custom. Certificates are managed by the platform. (see below for nested schema) + """ + enforceResourceLimits: bool | None = None + """ + (Boolean) Require sandboxes to declare both memory and CPU limits. + Require sandboxes to declare both memory and CPU limits. + """ + imagePull: ImagePull | None = None + """ + (Attributes) Workload container image pull behavior. (see below for nested schema) + """ + maintenancePolicy: MaintenancePolicy | None = None + """ + (Attributes) Update scheduling in UTC. Exclusions take precedence over windows. (see below for nested schema) + """ + overrides: OverridesModel1 | None = None + """ + settable runner deployment overrides. (see below for nested schema) + """ + releaseChannel: str | None = None + """ + (String) Automatic update channel. Defaults to stable. Values: RELEASE_CHANNEL_STABLE, RELEASE_CHANNEL_RAPID. + Automatic update channel. Defaults to stable. Values: `RELEASE_CHANNEL_STABLE`, `RELEASE_CHANNEL_RAPID`. + """ + tenantMetrics: TenantMetrics | None = None + """ + sandbox tenant usage collection. Overrides corresponding deployment environment entries. (see below for nested schema) + """ + volumes: VolumesModel4 | None = None + """ + (Attributes) Sandbox volume restrictions. (see below for nested schema) + """ + + +class AtProvider(BaseModel): + activeConfigVersion: str | None = None + """ + (String) Configuration version currently running. + Configuration version currently running. + """ + activeRevision: float | None = None + """ + (Number) Revision currently running. + Revision currently running. + """ + clusterId: str | None = None + """ + (String) CKS cluster UUID. Changing it replaces the runner. + CKS cluster UUID. Changing it replaces the runner. + """ + clusterName: str | None = None + """ + (String) Cluster display name resolved by the server. + Cluster display name resolved by the server. + """ + connectionStatus: str | None = None + """ + (String) Observed live connection status. + Observed live connection status. + """ + createTime: str | None = None + """ + (String) Creation timestamp (RFC 3339). + Creation timestamp (RFC 3339). + """ + dataPlaneStatus: str | None = None + """ + (String) Observed direct endpoint state, URI, protocols, and certificate expiry as JSON, or null. + Observed direct endpoint state, URI, protocols, and certificate expiry as JSON, or null. + """ + displayName: str | None = None + """ + readable runner name. + Human-readable runner name. + """ + etag: str | None = None + """ + (String) Opaque policy revision used for optimistic concurrency. A concurrent policy edit fails the apply; refresh the plan before retrying. + Opaque policy revision used for optimistic concurrency. A concurrent policy edit fails the apply; refresh the plan before retrying. + """ + id: str | None = None + installError: str | None = None + """ + (String) Structured installation failure details as JSON, or null. + Structured installation failure details as JSON, or null. + """ + installStatus: str | None = None + """ + (String) Observed installation status. + Observed installation status. + """ + lastHeartbeatTime: str | None = None + """ + (String) Last runner heartbeat timestamp (RFC 3339). + Last runner heartbeat timestamp (RFC 3339). + """ + policy: PolicyModel4 | None = None + """ + (Attributes) Policy governing every sandbox on this runner. Required even for the explicit empty posture policy = {}. Policy is updated with an etag to detect concurrent changes. (see below for nested schema) + """ + rolloutInProgress: bool | None = None + """ + (Boolean) Whether a newer desired revision is still rolling out. + Whether a newer desired revision is still rolling out. + """ + runnerGroupId: str | None = None + """ + (String) Runner group for scheduling affinity. Defaults to default; omitting or setting this attribute to null resets a custom group to default. + Runner group for scheduling affinity. Defaults to `default`; omitting or setting this attribute to null resets a custom group to `default`. + """ + spec: SpecModel1 | None = None + """ + (Attributes) Desired runner configuration. When omitted, the server's defaults are adopted. Removing an optional setting inside this object resets that setting through an explicit update mask. (see below for nested schema) + """ + targetRevision: float | None = None + """ + (Number) Desired deployment revision. + Desired deployment revision. + """ + updateAvailable: bool | None = None + """ + (Boolean) Whether a newer version is available on the release channel. + Whether a newer version is available on the release channel. + """ + updateTime: str | None = None + """ + (String) Last configuration update timestamp (RFC 3339). + Last configuration update timestamp (RFC 3339). + """ + zone: str | None = None + """ + east-04a. Use lower(coreweave_cks_cluster.example.zone) when referencing a CKS cluster zone. Changing it replaces the runner. + Lowercase geographic zone of the runner, for example `us-east-04a`. Use `lower(coreweave_cks_cluster.example.zone)` when referencing a CKS cluster zone. Changing it replaces the runner. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class ManagedRunner(BaseModel): + apiVersion: Literal['sandbox.coreweave.upbound.io/v1beta1'] | None = ( + 'sandbox.coreweave.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['ManagedRunner'] | None = 'ManagedRunner' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: SpecModel + """ + ManagedRunnerSpec defines the desired state of ManagedRunner + """ + status: Status | None = None + """ + ManagedRunnerStatus defines the observed state of ManagedRunner. + """ + + +class ManagedRunnerList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[ManagedRunner] + """ + List of managedrunners. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/coreweave/workloadfederation/__init__.py b/schemas/python/models/io/upbound/coreweave/workloadfederation/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/workloadfederation/oidcconfig/__init__.py b/schemas/python/models/io/upbound/coreweave/workloadfederation/oidcconfig/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/coreweave/workloadfederation/oidcconfig/v1beta1.py b/schemas/python/models/io/upbound/coreweave/workloadfederation/oidcconfig/v1beta1.py new file mode 100644 index 000000000..62d799206 --- /dev/null +++ b/schemas/python/models/io/upbound/coreweave/workloadfederation/oidcconfig/v1beta1.py @@ -0,0 +1,312 @@ +# generated by datamodel-codegen: +# filename: workdir/workloadfederation_coreweave_upbound_io_v1beta1_oidcconfig.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....k8s.apimachinery.pkg.apis.meta import v1 + + +class ForProvider(BaseModel): + active: bool | None = None + """ + (Boolean) Whether tokens issued by this OIDC provider are accepted for workload identity federation. Defaults to true when omitted on creation. Once a value has been applied it is retained: removing the attribute from configuration keeps the last applied value rather than reverting to true, so a configuration that was deactivated stays deactivated. Set active = true explicitly to reactivate one. + Whether tokens issued by this OIDC provider are accepted for workload identity federation. Defaults to `true` when omitted on creation. Once a value has been applied it is retained: removing the attribute from configuration keeps the last applied value rather than reverting to `true`, so a configuration that was deactivated stays deactivated. Set `active = true` explicitly to reactivate one. + """ + audience: str | None = None + """ + (String) The expected audience claim in tokens issued by the external OIDC provider. + The expected audience claim in tokens issued by the external OIDC provider. + """ + description: str | None = None + """ + readable description of the OIDC configuration. + An optional human-readable description of the OIDC configuration. + """ + issuerUrl: str | None = None + """ + (String) The issuer URL of the external OIDC provider. HTTPS is required except for loopback development issuers. + The issuer URL of the external OIDC provider. HTTPS is required except for loopback development issuers. + """ + name: str | None = None + """ + readable name for the OIDC configuration. Must contain only letters, numbers, hyphens, and underscores. + A human-readable name for the OIDC configuration. Must contain only letters, numbers, hyphens, and underscores. + """ + + +class InitProvider(BaseModel): + active: bool | None = None + """ + (Boolean) Whether tokens issued by this OIDC provider are accepted for workload identity federation. Defaults to true when omitted on creation. Once a value has been applied it is retained: removing the attribute from configuration keeps the last applied value rather than reverting to true, so a configuration that was deactivated stays deactivated. Set active = true explicitly to reactivate one. + Whether tokens issued by this OIDC provider are accepted for workload identity federation. Defaults to `true` when omitted on creation. Once a value has been applied it is retained: removing the attribute from configuration keeps the last applied value rather than reverting to `true`, so a configuration that was deactivated stays deactivated. Set `active = true` explicitly to reactivate one. + """ + audience: str | None = None + """ + (String) The expected audience claim in tokens issued by the external OIDC provider. + The expected audience claim in tokens issued by the external OIDC provider. + """ + description: str | None = None + """ + readable description of the OIDC configuration. + An optional human-readable description of the OIDC configuration. + """ + issuerUrl: str | None = None + """ + (String) The issuer URL of the external OIDC provider. HTTPS is required except for loopback development issuers. + The issuer URL of the external OIDC provider. HTTPS is required except for loopback development issuers. + """ + name: str | None = None + """ + readable name for the OIDC configuration. Must contain only letters, numbers, hyphens, and underscores. + A human-readable name for the OIDC configuration. Must contain only letters, numbers, hyphens, and underscores. + """ + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class ProviderConfigRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Spec(BaseModel): + deletionPolicy: Literal['Orphan', 'Delete'] | None = 'Delete' + """ + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + """ + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + active: bool | None = None + """ + (Boolean) Whether tokens issued by this OIDC provider are accepted for workload identity federation. Defaults to true when omitted on creation. Once a value has been applied it is retained: removing the attribute from configuration keeps the last applied value rather than reverting to true, so a configuration that was deactivated stays deactivated. Set active = true explicitly to reactivate one. + Whether tokens issued by this OIDC provider are accepted for workload identity federation. Defaults to `true` when omitted on creation. Once a value has been applied it is retained: removing the attribute from configuration keeps the last applied value rather than reverting to `true`, so a configuration that was deactivated stays deactivated. Set `active = true` explicitly to reactivate one. + """ + audience: str | None = None + """ + (String) The expected audience claim in tokens issued by the external OIDC provider. + The expected audience claim in tokens issued by the external OIDC provider. + """ + createdAt: str | None = None + """ + (String) The RFC 3339 timestamp at which the OIDC configuration was created. + The RFC 3339 timestamp at which the OIDC configuration was created. + """ + deactivatedAt: str | None = None + """ + (String) The RFC 3339 timestamp at which the OIDC configuration was deactivated, or null while it is active. + The RFC 3339 timestamp at which the OIDC configuration was deactivated, or null while it is active. + """ + description: str | None = None + """ + readable description of the OIDC configuration. + An optional human-readable description of the OIDC configuration. + """ + id: str | None = None + """ + assigned unique identifier for the OIDC configuration. + """ + issuerUrl: str | None = None + """ + (String) The issuer URL of the external OIDC provider. HTTPS is required except for loopback development issuers. + The issuer URL of the external OIDC provider. HTTPS is required except for loopback development issuers. + """ + name: str | None = None + """ + readable name for the OIDC configuration. Must contain only letters, numbers, hyphens, and underscores. + A human-readable name for the OIDC configuration. Must contain only letters, numbers, hyphens, and underscores. + """ + organizationId: str | None = None + """ + (String) The unique identifier of the CoreWeave organization that owns the OIDC configuration. + The unique identifier of the CoreWeave organization that owns the OIDC configuration. + """ + updatedAt: str | None = None + """ + (String) The RFC 3339 timestamp at which the OIDC configuration was last updated. + The RFC 3339 timestamp at which the OIDC configuration was last updated. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class OIDCConfig(BaseModel): + apiVersion: Literal['workloadfederation.coreweave.upbound.io/v1beta1'] | None = ( + 'workloadfederation.coreweave.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['OIDCConfig'] | None = 'OIDCConfig' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + OIDCConfigSpec defines the desired state of OIDCConfig + """ + status: Status | None = None + """ + OIDCConfigStatus defines the observed state of OIDCConfig. + """ + + +class OIDCConfigList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[OIDCConfig] + """ + List of oidcconfigs. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/m/coreweave/__init__.py b/schemas/python/models/io/upbound/m/coreweave/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/cks/__init__.py b/schemas/python/models/io/upbound/m/coreweave/cks/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/cks/cluster/__init__.py b/schemas/python/models/io/upbound/m/coreweave/cks/cluster/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/cks/cluster/v1beta1.py b/schemas/python/models/io/upbound/m/coreweave/cks/cluster/v1beta1.py new file mode 100644 index 000000000..a33dd99c3 --- /dev/null +++ b/schemas/python/models/io/upbound/m/coreweave/cks/cluster/v1beta1.py @@ -0,0 +1,763 @@ +# generated by datamodel-codegen: +# filename: workdir/cks_coreweave_m_upbound_io_v1beta1_cluster.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......k8s.apimachinery.pkg.apis.meta import v1 + + +class AuthnWebhook(BaseModel): + ca: str | None = None + """ + encoded PEM-encoded certificate. + The CA certificate for the webhook server. Must be a base64-encoded PEM-encoded certificate. + """ + server: str | None = None + """ + (String) The URL of the webhook server. + The URL of the webhook server. + """ + + +class AuthzWebhook(BaseModel): + ca: str | None = None + """ + encoded PEM-encoded certificate. + The CA certificate for the webhook server. Must be a base64-encoded PEM-encoded certificate. + """ + server: str | None = None + """ + (String) The URL of the webhook server. + The URL of the webhook server. + """ + + +class Public(BaseModel): + allowCidrs: list[str] | None = None + """ + empty set denies every other source, so 0.0.0.0/0 alone allows only IPv4 sources and ::/0 alone allows only IPv6 sources. At most 1024 entries. Each must be an IPv4 or IPv6 network address with no host bits set, such as 203.0.113.0/24. + Source network prefixes allowed to reach the endpoint. An empty set allows all sources, subject to `deny_cidrs`. A non-empty set denies every other source, so `0.0.0.0/0` alone allows only IPv4 sources and `::/0` alone allows only IPv6 sources. At most 1024 entries. Each must be an IPv4 or IPv6 network address with no host bits set, such as `203.0.113.0/24`. + """ + denyCidrs: list[str] | None = None + """ + (Set of String) Source network prefixes denied access to the endpoint. Entries take precedence over allow_cidrs. At most 1024 entries. Each must be an IPv4 or IPv6 network address with no host bits set, such as 203.0.113.0/24. + Source network prefixes denied access to the endpoint. Entries take precedence over `allow_cidrs`. At most 1024 entries. Each must be an IPv4 or IPv6 network address with no host bits set, such as `203.0.113.0/24`. + """ + + +class KubeApiAccess(BaseModel): + public: Public | None = None + """ + managed authentication. This setting is independent of kube_api_access. + """ + + +class NodePortRange(BaseModel): + end: float | None = None + """ + (Number) + """ + start: float | None = None + """ + (Number) + """ + + +class Oidc(BaseModel): + adminGroupBinding: str | None = None + """ + admin role for bootstrap access to the cluster. + The OIDC group that is bound to the cluster-admin role for bootstrap access to the cluster. + """ + ca: str | None = None + """ + encoded PEM-encoded certificate. + The CA certificate for the OIDC issuer. Must be a base64-encoded PEM-encoded certificate. + """ + clientId: str | None = None + """ + (String) The client ID for the OIDC client. + The client ID for the OIDC client. + """ + groupsClaim: str | None = None + """ + (String) The claim to use as the groups. + The claim to use as the groups. + """ + groupsPrefix: str | None = None + """ + (String) The prefix to use for the groups. + The prefix to use for the groups. + """ + issuerUrl: str | None = None + """ + (String) The URL of the OIDC issuer. + The URL of the OIDC issuer. + """ + requiredClaim: str | None = None + """ + (String) The claim to require for authentication. + The claim to require for authentication. + """ + signingAlgs: list[str] | None = None + """ + (Set of String) A list of signing algorithms that the OpenID Connect discovery endpoint uses. + A list of signing algorithms that the OpenID Connect discovery endpoint uses. + """ + usernameClaim: str | None = None + """ + (String) The claim to use as the username. + The claim to use as the username. + """ + usernamePrefix: str | None = None + """ + (String) The prefix to use for the username. + The prefix to use for the username. + """ + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class SharedStorageClusterIdRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + namespace: str | None = None + """ + Namespace of the referenced object + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class SharedStorageClusterIdSelector(BaseModel): + matchControllerRef: bool | None = None + """ + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + """ + matchLabels: dict[str, str] | None = None + """ + MatchLabels ensures an object with matching labels is selected. + """ + namespace: str | None = None + """ + Namespace for the selector + """ + policy: Policy | None = None + """ + Policies for selection. + """ + + +class Tailscale(BaseModel): + clientId: str | None = None + """ + (String) The client ID for the OIDC client. + The Tailscale Client ID for the federated identity. + """ + + +class VpcIdRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + namespace: str | None = None + """ + Namespace of the referenced object + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class VpcIdSelector(BaseModel): + matchControllerRef: bool | None = None + """ + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + """ + matchLabels: dict[str, str] | None = None + """ + MatchLabels ensures an object with matching labels is selected. + """ + namespace: str | None = None + """ + Namespace for the selector + """ + policy: Policy | None = None + """ + Policies for selection. + """ + + +class ForProvider(BaseModel): + additionalServerSans: list[str] | None = None + """ + (Set of String) Additional Subject Alternative Names (SANs) to include in the Kubernetes API server TLS certificate. Maximum 10 entries. + Additional Subject Alternative Names (SANs) to include in the Kubernetes API server TLS certificate. Maximum 10 entries. + """ + auditPolicy: str | None = None + """ + encoded JSON/YAML string. + Audit policy for the cluster. Must be provided as a base64-encoded JSON/YAML string. + """ + authnWebhook: AuthnWebhook | None = None + """ + (Attributes) Authentication webhook configuration for the cluster. (see below for nested schema) + """ + authzWebhook: AuthzWebhook | None = None + """ + (Attributes) Authorization webhook configuration for the cluster. (see below for nested schema) + """ + internalLbCidrNames: list[str] | None = None + """ + only. + The names of the vpc prefixes to use as internal load balancer CIDR ranges. Internal load balancers are reachable within the VPC but not accessible from the internet. + The prefixes must exist in the cluster's VPC. This field is append-only. + """ + internalLbCidrNamesV6: list[str] | None = None + """ + (List of String) IPv6 Internal Load Balancer CIDR names. If any IPv6 field is set, then ALL IPv6 fields must be set. + IPv6 Internal Load Balancer CIDR names. If any IPv6 field is set, then ALL IPv6 fields must be set. + """ + kubeApiAccess: KubeApiAccess | None = None + """ + (Attributes) Access configuration for the cluster's Kubernetes API server, independent of public. Before you set this attribute, contact CoreWeave support to enable this feature for your organization. Changes, including clears, cannot be applied in the same update as a Kubernetes version change. (see below for nested schema) + """ + kubelet: str | None = None + """ + (String) Selective overrides applied to every cluster Node's kubelet configuration, as a JSON object (e.g. jsonencode({ maxPods = 256 })). A Node reboot is required for changes to take effect, and unknown options are stored but ignored by CKS. See the Kubernetes kubelet configuration reference for supported options. + Selective overrides applied to every cluster Node's kubelet configuration, as a JSON object (e.g. `jsonencode({ maxPods = 256 })`). A Node reboot is required for changes to take effect, and unknown options are stored but ignored by CKS. See the [Kubernetes kubelet configuration reference](https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/) for supported options. + """ + name: str | None = None + """ + (String) The name of the cluster. Must not be longer than 30 characters. + The name of the cluster. Must not be longer than 30 characters. + """ + nodePortRange: NodePortRange | None = None + """ + (Attributes) Kubernetes Service NodePort range. NodePort range can be expanded in existing clusters but not shrunk. Updating the NodePort range to a smaller range will require a replacement of the cluster. (see below for nested schema) + """ + oidc: Oidc | None = None + """ + server. (see below for nested schema) + """ + podCidrName: str | None = None + """ + (String) The name of the vpc prefix to use as the pod CIDR range. The prefix must exist in the cluster's VPC. + The name of the vpc prefix to use as the pod CIDR range. The prefix must exist in the cluster's VPC. + """ + podCidrNameV6: str | None = None + """ + (String) IPv6 Pod CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + IPv6 Pod CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + """ + public: bool | None = None + """ + managed authentication. This setting is independent of kube_api_access. + Whether the cluster's Kubernetes API server is reachable through CoreWeave's public ingress, which supports CoreWeave-managed authentication. This setting is independent of `kube_api_access`. + """ + serviceCidrName: str | None = None + """ + (String) The name of the vpc prefix to use as the service CIDR range. The prefix must exist in the cluster's VPC. + The name of the vpc prefix to use as the service CIDR range. The prefix must exist in the cluster's VPC. + """ + serviceCidrNameV6: str | None = None + """ + (String) IPv6 Service CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + IPv6 Service CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + """ + sharedStorageClusterId: str | None = None + """ + (String) The cluster_id of the cluster to share storage with. Must be enabled by CoreWeave support. Contact CoreWeave support if you are interested in this feature. + The `cluster_id` of the cluster to share storage with. Must be enabled by CoreWeave support. Contact CoreWeave support if you are interested in this feature. + """ + sharedStorageClusterIdRef: SharedStorageClusterIdRef | None = None + """ + Reference to a Cluster in cks to populate sharedStorageClusterId. + """ + sharedStorageClusterIdSelector: SharedStorageClusterIdSelector | None = None + """ + Selector for a Cluster in cks to populate sharedStorageClusterId. + """ + tailscale: Tailscale | None = None + """ + (Attributes) Tailscale configuration for the cluster. Enables cluster access via a Tailscale VPN. (see below for nested schema) + """ + version: str | None = None + """ + (String) The version of Kubernetes to run on the cluster, in minor version format (e.g. 'v1.35'). Patch versions are automatically applied by CKS as they are released. + The version of Kubernetes to run on the cluster, in minor version format (e.g. 'v1.35'). Patch versions are automatically applied by CKS as they are released. + """ + vpcId: str | None = None + """ + (String) The ID of the VPC in which the cluster is located. Must be a VPC in the same Availability Zone as the cluster. + The ID of the VPC in which the cluster is located. Must be a VPC in the same Availability Zone as the cluster. + """ + vpcIdRef: VpcIdRef | None = None + """ + Reference to a VPC in networking to populate vpcId. + """ + vpcIdSelector: VpcIdSelector | None = None + """ + Selector for a VPC in networking to populate vpcId. + """ + zone: str | None = None + """ + (String) The Availability Zone in which the cluster is located. + The Availability Zone in which the cluster is located. + """ + + +class InitProvider(BaseModel): + additionalServerSans: list[str] | None = None + """ + (Set of String) Additional Subject Alternative Names (SANs) to include in the Kubernetes API server TLS certificate. Maximum 10 entries. + Additional Subject Alternative Names (SANs) to include in the Kubernetes API server TLS certificate. Maximum 10 entries. + """ + auditPolicy: str | None = None + """ + encoded JSON/YAML string. + Audit policy for the cluster. Must be provided as a base64-encoded JSON/YAML string. + """ + authnWebhook: AuthnWebhook | None = None + """ + (Attributes) Authentication webhook configuration for the cluster. (see below for nested schema) + """ + authzWebhook: AuthzWebhook | None = None + """ + (Attributes) Authorization webhook configuration for the cluster. (see below for nested schema) + """ + internalLbCidrNames: list[str] | None = None + """ + only. + The names of the vpc prefixes to use as internal load balancer CIDR ranges. Internal load balancers are reachable within the VPC but not accessible from the internet. + The prefixes must exist in the cluster's VPC. This field is append-only. + """ + internalLbCidrNamesV6: list[str] | None = None + """ + (List of String) IPv6 Internal Load Balancer CIDR names. If any IPv6 field is set, then ALL IPv6 fields must be set. + IPv6 Internal Load Balancer CIDR names. If any IPv6 field is set, then ALL IPv6 fields must be set. + """ + kubeApiAccess: KubeApiAccess | None = None + """ + (Attributes) Access configuration for the cluster's Kubernetes API server, independent of public. Before you set this attribute, contact CoreWeave support to enable this feature for your organization. Changes, including clears, cannot be applied in the same update as a Kubernetes version change. (see below for nested schema) + """ + kubelet: str | None = None + """ + (String) Selective overrides applied to every cluster Node's kubelet configuration, as a JSON object (e.g. jsonencode({ maxPods = 256 })). A Node reboot is required for changes to take effect, and unknown options are stored but ignored by CKS. See the Kubernetes kubelet configuration reference for supported options. + Selective overrides applied to every cluster Node's kubelet configuration, as a JSON object (e.g. `jsonencode({ maxPods = 256 })`). A Node reboot is required for changes to take effect, and unknown options are stored but ignored by CKS. See the [Kubernetes kubelet configuration reference](https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/) for supported options. + """ + name: str | None = None + """ + (String) The name of the cluster. Must not be longer than 30 characters. + The name of the cluster. Must not be longer than 30 characters. + """ + nodePortRange: NodePortRange | None = None + """ + (Attributes) Kubernetes Service NodePort range. NodePort range can be expanded in existing clusters but not shrunk. Updating the NodePort range to a smaller range will require a replacement of the cluster. (see below for nested schema) + """ + oidc: Oidc | None = None + """ + server. (see below for nested schema) + """ + podCidrName: str | None = None + """ + (String) The name of the vpc prefix to use as the pod CIDR range. The prefix must exist in the cluster's VPC. + The name of the vpc prefix to use as the pod CIDR range. The prefix must exist in the cluster's VPC. + """ + podCidrNameV6: str | None = None + """ + (String) IPv6 Pod CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + IPv6 Pod CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + """ + public: bool | None = None + """ + managed authentication. This setting is independent of kube_api_access. + Whether the cluster's Kubernetes API server is reachable through CoreWeave's public ingress, which supports CoreWeave-managed authentication. This setting is independent of `kube_api_access`. + """ + serviceCidrName: str | None = None + """ + (String) The name of the vpc prefix to use as the service CIDR range. The prefix must exist in the cluster's VPC. + The name of the vpc prefix to use as the service CIDR range. The prefix must exist in the cluster's VPC. + """ + serviceCidrNameV6: str | None = None + """ + (String) IPv6 Service CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + IPv6 Service CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + """ + sharedStorageClusterId: str | None = None + """ + (String) The cluster_id of the cluster to share storage with. Must be enabled by CoreWeave support. Contact CoreWeave support if you are interested in this feature. + The `cluster_id` of the cluster to share storage with. Must be enabled by CoreWeave support. Contact CoreWeave support if you are interested in this feature. + """ + sharedStorageClusterIdRef: SharedStorageClusterIdRef | None = None + """ + Reference to a Cluster in cks to populate sharedStorageClusterId. + """ + sharedStorageClusterIdSelector: SharedStorageClusterIdSelector | None = None + """ + Selector for a Cluster in cks to populate sharedStorageClusterId. + """ + tailscale: Tailscale | None = None + """ + (Attributes) Tailscale configuration for the cluster. Enables cluster access via a Tailscale VPN. (see below for nested schema) + """ + version: str | None = None + """ + (String) The version of Kubernetes to run on the cluster, in minor version format (e.g. 'v1.35'). Patch versions are automatically applied by CKS as they are released. + The version of Kubernetes to run on the cluster, in minor version format (e.g. 'v1.35'). Patch versions are automatically applied by CKS as they are released. + """ + vpcId: str | None = None + """ + (String) The ID of the VPC in which the cluster is located. Must be a VPC in the same Availability Zone as the cluster. + The ID of the VPC in which the cluster is located. Must be a VPC in the same Availability Zone as the cluster. + """ + vpcIdRef: VpcIdRef | None = None + """ + Reference to a VPC in networking to populate vpcId. + """ + vpcIdSelector: VpcIdSelector | None = None + """ + Selector for a VPC in networking to populate vpcId. + """ + zone: str | None = None + """ + (String) The Availability Zone in which the cluster is located. + The Availability Zone in which the cluster is located. + """ + + +class ProviderConfigRef(BaseModel): + kind: str + """ + Kind of the referenced object. + """ + name: str + """ + Name of the referenced object. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + + +class Spec(BaseModel): + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'kind': 'ClusterProviderConfig', 'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class PublicModel(BaseModel): + endpoint: str | None = None + """ + (String) The HTTPS URL of the public Kubernetes API endpoint, suitable for a kubeconfig server. null until the endpoint is available. + The HTTPS URL of the public Kubernetes API endpoint, suitable for a kubeconfig `server`. `null` until the endpoint is available. + """ + status: str | None = None + """ + (String) The current status of the cluster. + Acceptance of the endpoint's route and access policy. The value is one of the following: `STATUS_UNSPECIFIED`, `STATUS_UNKNOWN`, `STATUS_PENDING`, `STATUS_ACCEPTED`, `STATUS_REJECTED`, `STATUS_ERROR`. `STATUS_ACCEPTED` does not confirm that the endpoint is reachable or that CIDR rules are enforced. + """ + + +class KubeApiAccessStatus(BaseModel): + caData: str | None = None + """ + encoded PEM CA bundle for the Kubernetes API server. Use base64decode() to obtain the PEM text. null until the API reports a CA. + The base64-encoded PEM CA bundle for the Kubernetes API server. Use `base64decode()` to obtain the PEM text. `null` until the API reports a CA. + """ + public: PublicModel | None = None + """ + managed authentication. This setting is independent of kube_api_access. + """ + + +class AtProvider(BaseModel): + additionalServerSans: list[str] | None = None + """ + (Set of String) Additional Subject Alternative Names (SANs) to include in the Kubernetes API server TLS certificate. Maximum 10 entries. + Additional Subject Alternative Names (SANs) to include in the Kubernetes API server TLS certificate. Maximum 10 entries. + """ + apiServerEndpoint: str | None = None + """ + server. + The endpoint for the cluster's api-server. + """ + auditPolicy: str | None = None + """ + encoded JSON/YAML string. + Audit policy for the cluster. Must be provided as a base64-encoded JSON/YAML string. + """ + authnWebhook: AuthnWebhook | None = None + """ + (Attributes) Authentication webhook configuration for the cluster. (see below for nested schema) + """ + authzWebhook: AuthzWebhook | None = None + """ + (Attributes) Authorization webhook configuration for the cluster. (see below for nested schema) + """ + id: str | None = None + """ + (String) The unique identifier of the cluster. + """ + internalLbCidrNames: list[str] | None = None + """ + only. + The names of the vpc prefixes to use as internal load balancer CIDR ranges. Internal load balancers are reachable within the VPC but not accessible from the internet. + The prefixes must exist in the cluster's VPC. This field is append-only. + """ + internalLbCidrNamesV6: list[str] | None = None + """ + (List of String) IPv6 Internal Load Balancer CIDR names. If any IPv6 field is set, then ALL IPv6 fields must be set. + IPv6 Internal Load Balancer CIDR names. If any IPv6 field is set, then ALL IPv6 fields must be set. + """ + kubeApiAccess: KubeApiAccess | None = None + """ + (Attributes) Access configuration for the cluster's Kubernetes API server, independent of public. Before you set this attribute, contact CoreWeave support to enable this feature for your organization. Changes, including clears, cannot be applied in the same update as a Kubernetes version change. (see below for nested schema) + """ + kubeApiAccessStatus: KubeApiAccessStatus | None = None + """ + place update plan, so providers configured from them receive unknown values during that plan. (see below for nested schema) + """ + kubelet: str | None = None + """ + (String) Selective overrides applied to every cluster Node's kubelet configuration, as a JSON object (e.g. jsonencode({ maxPods = 256 })). A Node reboot is required for changes to take effect, and unknown options are stored but ignored by CKS. See the Kubernetes kubelet configuration reference for supported options. + Selective overrides applied to every cluster Node's kubelet configuration, as a JSON object (e.g. `jsonencode({ maxPods = 256 })`). A Node reboot is required for changes to take effect, and unknown options are stored but ignored by CKS. See the [Kubernetes kubelet configuration reference](https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/) for supported options. + """ + name: str | None = None + """ + (String) The name of the cluster. Must not be longer than 30 characters. + The name of the cluster. Must not be longer than 30 characters. + """ + nodePortRange: NodePortRange | None = None + """ + (Attributes) Kubernetes Service NodePort range. NodePort range can be expanded in existing clusters but not shrunk. Updating the NodePort range to a smaller range will require a replacement of the cluster. (see below for nested schema) + """ + oidc: Oidc | None = None + """ + server. (see below for nested schema) + """ + podCidrName: str | None = None + """ + (String) The name of the vpc prefix to use as the pod CIDR range. The prefix must exist in the cluster's VPC. + The name of the vpc prefix to use as the pod CIDR range. The prefix must exist in the cluster's VPC. + """ + podCidrNameV6: str | None = None + """ + (String) IPv6 Pod CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + IPv6 Pod CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + """ + public: bool | None = None + """ + managed authentication. This setting is independent of kube_api_access. + Whether the cluster's Kubernetes API server is reachable through CoreWeave's public ingress, which supports CoreWeave-managed authentication. This setting is independent of `kube_api_access`. + """ + serviceAccountOidcIssuerUrl: str | None = None + """ + -service-account-issuer flag on the kube-apiserver. + The URL of the OIDC issuer for the cluster's service account tokens. This value corresponds to the `--service-account-issuer` flag on the kube-apiserver. + """ + serviceCidrName: str | None = None + """ + (String) The name of the vpc prefix to use as the service CIDR range. The prefix must exist in the cluster's VPC. + The name of the vpc prefix to use as the service CIDR range. The prefix must exist in the cluster's VPC. + """ + serviceCidrNameV6: str | None = None + """ + (String) IPv6 Service CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + IPv6 Service CIDR name. If any IPv6 field is set, then ALL IPv6 fields must be set. + """ + sharedStorageClusterId: str | None = None + """ + (String) The cluster_id of the cluster to share storage with. Must be enabled by CoreWeave support. Contact CoreWeave support if you are interested in this feature. + The `cluster_id` of the cluster to share storage with. Must be enabled by CoreWeave support. Contact CoreWeave support if you are interested in this feature. + """ + status: str | None = None + """ + (String) The current status of the cluster. + The current status of the cluster. + """ + tailscale: Tailscale | None = None + """ + (Attributes) Tailscale configuration for the cluster. Enables cluster access via a Tailscale VPN. (see below for nested schema) + """ + version: str | None = None + """ + (String) The version of Kubernetes to run on the cluster, in minor version format (e.g. 'v1.35'). Patch versions are automatically applied by CKS as they are released. + The version of Kubernetes to run on the cluster, in minor version format (e.g. 'v1.35'). Patch versions are automatically applied by CKS as they are released. + """ + vpcId: str | None = None + """ + (String) The ID of the VPC in which the cluster is located. Must be a VPC in the same Availability Zone as the cluster. + The ID of the VPC in which the cluster is located. Must be a VPC in the same Availability Zone as the cluster. + """ + zone: str | None = None + """ + (String) The Availability Zone in which the cluster is located. + The Availability Zone in which the cluster is located. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class Cluster(BaseModel): + apiVersion: Literal['cks.coreweave.m.upbound.io/v1beta1'] | None = ( + 'cks.coreweave.m.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['Cluster'] | None = 'Cluster' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + ClusterSpec defines the desired state of Cluster + """ + status: Status | None = None + """ + ClusterStatus defines the observed state of Cluster. + """ + + +class ClusterList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[Cluster] + """ + List of clusters. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/m/coreweave/clusterproviderconfig/__init__.py b/schemas/python/models/io/upbound/m/coreweave/clusterproviderconfig/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/clusterproviderconfig/v1beta1.py b/schemas/python/models/io/upbound/m/coreweave/clusterproviderconfig/v1beta1.py new file mode 100644 index 000000000..a03760b9a --- /dev/null +++ b/schemas/python/models/io/upbound/m/coreweave/clusterproviderconfig/v1beta1.py @@ -0,0 +1,201 @@ +# generated by datamodel-codegen: +# filename: workdir/coreweave_m_upbound_io_v1beta1_clusterproviderconfig.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel + +from .....k8s.apimachinery.pkg.apis.meta import v1 + + +class Env(BaseModel): + name: str + """ + Name is the name of an environment variable. + """ + + +class Fs(BaseModel): + path: str + """ + Path is a filesystem path. + """ + + +class SecretRef(BaseModel): + key: str + """ + The key to select. + """ + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Credentials(BaseModel): + env: Env | None = None + """ + Env is a reference to an environment variable that contains credentials + that must be used to connect to the provider. + """ + fs: Fs | None = None + """ + Fs is a reference to a filesystem location that contains credentials that + must be used to connect to the provider. + """ + secretRef: SecretRef | None = None + """ + A SecretRef is a reference to a secret key that contains the credentials + that must be used to connect to the provider. + """ + source: Literal['None', 'Secret', 'InjectedIdentity', 'Environment', 'Filesystem'] + """ + Source of the provider credentials. + """ + + +class ExponentialFailureRateLimiter(BaseModel): + baseDelay: str | None = None + """ + BaseDelay is the initial delay between retries. + """ + maxDelay: str | None = None + """ + MaxDelay is the maximum delay between retries. + """ + + +class ReconciliationPolicy(BaseModel): + exponentialFailureRateLimiter: ExponentialFailureRateLimiter | None = None + """ + ExponentialFailureRateLimiter, when set, overrides the parameters of the + exponential failure rate limiter used to schedule retries for the + managed resource that this policy applies to. + """ + + +class Spec(BaseModel): + credentials: Credentials + """ + Credentials required to authenticate to this provider. + """ + endpoint: str | None = None + """ + Endpoint is the CoreWeave API endpoint. Defaults to + https://api.coreweave.com/ when omitted. + """ + httpTimeout: str | None = None + """ + HTTPTimeout is the timeout of each CoreWeave API and Object Storage HTTP + attempt, as a Go duration such as "30s". When omitted, API attempts time + out after 10s and Object Storage attempts after 30s. + """ + reconciliationPolicy: ReconciliationPolicy | None = None + """ + ReconciliationPolicy configures how a managed resource is reconciled. + It currently allows overriding the controller's failure rate limiter + parameters on a per-resource basis via ExponentialFailureRateLimiter. + """ + s3Endpoint: str | None = None + """ + S3Endpoint is the CoreWeave Object Storage endpoint. Defaults to + https://cwobject.com when omitted. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + users: int | None = None + """ + Users of this provider configuration. + """ + + +class ClusterProviderConfig(BaseModel): + apiVersion: Literal['coreweave.m.upbound.io/v1beta1'] | None = ( + 'coreweave.m.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['ClusterProviderConfig'] | None = 'ClusterProviderConfig' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + A ProviderConfigSpec defines the desired state of a cluster-scoped + ClusterProviderConfig. Its credential secret references carry an explicit + namespace, because a cluster-scoped config can reference secrets in any + namespace. The namespaced ProviderConfig uses NamespacedProviderConfigSpec + instead, which omits the namespace. + """ + status: Status | None = None + """ + A ProviderConfigStatus reflects the observed state of a ProviderConfig. + """ + + +class ClusterProviderConfigList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[ClusterProviderConfig] + """ + List of clusterproviderconfigs. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/m/coreweave/containerregistry/__init__.py b/schemas/python/models/io/upbound/m/coreweave/containerregistry/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/containerregistry/accessconfiguration/__init__.py b/schemas/python/models/io/upbound/m/coreweave/containerregistry/accessconfiguration/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/containerregistry/accessconfiguration/v1beta1.py b/schemas/python/models/io/upbound/m/coreweave/containerregistry/accessconfiguration/v1beta1.py new file mode 100644 index 000000000..9e7e227db --- /dev/null +++ b/schemas/python/models/io/upbound/m/coreweave/containerregistry/accessconfiguration/v1beta1.py @@ -0,0 +1,384 @@ +# generated by datamodel-codegen: +# filename: workdir/containerregistry_coreweave_m_upbound_io_v1beta1_accessconfiguration.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......k8s.apimachinery.pkg.apis.meta import v1 + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class NamespaceRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + namespace: str | None = None + """ + Namespace of the referenced object + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class NamespaceSelector(BaseModel): + matchControllerRef: bool | None = None + """ + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + """ + matchLabels: dict[str, str] | None = None + """ + MatchLabels ensures an object with matching labels is selected. + """ + namespace: str | None = None + """ + Namespace for the selector + """ + policy: Policy | None = None + """ + Policies for selection. + """ + + +class Rules(BaseModel): + expression: str | None = None + """ + (String) CEL expression evaluated against the request identity and context. + CEL expression evaluated against the request identity and context. + """ + + +class PolicySets(BaseModel): + identitySelector: str | None = None + """ + (String) Identity class evaluated by this policy set. Supported values: COREWEAVE, WORKLOAD_FEDERATION, ANY_AUTHENTICATED, ANONYMOUS, COREWEAVE_KUBERNETES. COREWEAVE_KUBERNETES is deprecated; use WORKLOAD_FEDERATION. + Identity class evaluated by this policy set. Supported values: `COREWEAVE`, `WORKLOAD_FEDERATION`, `ANY_AUTHENTICATED`, `ANONYMOUS`, `COREWEAVE_KUBERNETES`. COREWEAVE_KUBERNETES is deprecated; use WORKLOAD_FEDERATION. + """ + rules: dict[str, Rules] | None = None + """ + (Attributes Map) Authoritative rules keyed by stable IDs. Omitted rules are removed. (see below for nested schema) + """ + + +class RequestIpAcl(BaseModel): + allowCidrs: list[str] | None = None + """ + mapped IPv6 are rejected. + Canonical IPv4 or IPv6 networks; host bits and IPv4-mapped IPv6 are rejected. + """ + denyCidrs: list[str] | None = None + """ + mapped IPv6 are rejected. + Canonical IPv4 or IPv6 networks; host bits and IPv4-mapped IPv6 are rejected. + """ + + +class Timeouts(BaseModel): + create: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + """ + delete: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs. + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs. + """ + read: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. + """ + update: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + """ + + +class ForProvider(BaseModel): + namespace: str | None = None + """ + images. Changing it replaces this policy resource. + Parent namespace name, such as example-images. Changing it replaces this policy resource. + """ + namespaceRef: NamespaceRef | None = None + """ + Reference to a Namespace in containerregistry to populate namespace. + """ + namespaceSelector: NamespaceSelector | None = None + """ + Selector for a Namespace in containerregistry to populate namespace. + """ + policySets: dict[str, PolicySets] | None = None + """ + (Attributes Map) Authoritative policy sets keyed by stable IDs. Omitted entries are removed. COREWEAVE_KUBERNETES is deprecated; use WORKLOAD_FEDERATION. (see below for nested schema) + """ + requestIpAcl: RequestIpAcl | None = None + """ + (Attributes) Optional request filter. At least one allow or deny network is required; omission removes the ACL. An ACL grants no authorization. (see below for nested schema) + """ + timeouts: Timeouts | None = None + """ + (Attributes) (see below for nested schema) + """ + + +class InitProvider(BaseModel): + namespace: str | None = None + """ + images. Changing it replaces this policy resource. + Parent namespace name, such as example-images. Changing it replaces this policy resource. + """ + namespaceRef: NamespaceRef | None = None + """ + Reference to a Namespace in containerregistry to populate namespace. + """ + namespaceSelector: NamespaceSelector | None = None + """ + Selector for a Namespace in containerregistry to populate namespace. + """ + policySets: dict[str, PolicySets] | None = None + """ + (Attributes Map) Authoritative policy sets keyed by stable IDs. Omitted entries are removed. COREWEAVE_KUBERNETES is deprecated; use WORKLOAD_FEDERATION. (see below for nested schema) + """ + requestIpAcl: RequestIpAcl | None = None + """ + (Attributes) Optional request filter. At least one allow or deny network is required; omission removes the ACL. An ACL grants no authorization. (see below for nested schema) + """ + timeouts: Timeouts | None = None + """ + (Attributes) (see below for nested schema) + """ + + +class ProviderConfigRef(BaseModel): + kind: str + """ + Kind of the referenced object. + """ + name: str + """ + Name of the referenced object. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + + +class Spec(BaseModel): + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'kind': 'ClusterProviderConfig', 'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + accessConfigState: str | None = None + """ + (String) Current access policy rollout state. + Current access policy rollout state. + """ + createdAt: str | None = None + """ + (String) Creation timestamp in RFC3339 format. + Creation timestamp in RFC3339 format. + """ + etag: str | None = None + """ + (String) Current concurrency token. Changes when the server updates the resource. + Current concurrency token. Changes when the server updates the resource. + """ + id: str | None = None + name: str | None = None + """ + (String) Canonical API resource name. + Canonical API resource name. + """ + namespace: str | None = None + """ + images. Changing it replaces this policy resource. + Parent namespace name, such as example-images. Changing it replaces this policy resource. + """ + policySets: dict[str, PolicySets] | None = None + """ + (Attributes Map) Authoritative policy sets keyed by stable IDs. Omitted entries are removed. COREWEAVE_KUBERNETES is deprecated; use WORKLOAD_FEDERATION. (see below for nested schema) + """ + requestIpAcl: RequestIpAcl | None = None + """ + (Attributes) Optional request filter. At least one allow or deny network is required; omission removes the ACL. An ACL grants no authorization. (see below for nested schema) + """ + revision: float | None = None + """ + (Number) Current desired policy revision. + Current desired policy revision. + """ + timeouts: Timeouts | None = None + """ + (Attributes) (see below for nested schema) + """ + updatedAt: str | None = None + """ + (String) Last update timestamp in RFC3339 format. + Last update timestamp in RFC3339 format. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class AccessConfiguration(BaseModel): + apiVersion: Literal['containerregistry.coreweave.m.upbound.io/v1beta1'] | None = ( + 'containerregistry.coreweave.m.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['AccessConfiguration'] | None = 'AccessConfiguration' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + AccessConfigurationSpec defines the desired state of AccessConfiguration + """ + status: Status | None = None + """ + AccessConfigurationStatus defines the observed state of AccessConfiguration. + """ + + +class AccessConfigurationList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[AccessConfiguration] + """ + List of accessconfigurations. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/m/coreweave/containerregistry/lifecyclepolicy/__init__.py b/schemas/python/models/io/upbound/m/coreweave/containerregistry/lifecyclepolicy/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/containerregistry/lifecyclepolicy/v1beta1.py b/schemas/python/models/io/upbound/m/coreweave/containerregistry/lifecyclepolicy/v1beta1.py new file mode 100644 index 000000000..54f69c8e8 --- /dev/null +++ b/schemas/python/models/io/upbound/m/coreweave/containerregistry/lifecyclepolicy/v1beta1.py @@ -0,0 +1,372 @@ +# generated by datamodel-codegen: +# filename: workdir/containerregistry_coreweave_m_upbound_io_v1beta1_lifecyclepolicy.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......k8s.apimachinery.pkg.apis.meta import v1 + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class NamespaceRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + namespace: str | None = None + """ + Namespace of the referenced object + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class NamespaceSelector(BaseModel): + matchControllerRef: bool | None = None + """ + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + """ + matchLabels: dict[str, str] | None = None + """ + MatchLabels ensures an object with matching labels is selected. + """ + namespace: str | None = None + """ + Namespace for the selector + """ + policy: Policy | None = None + """ + Policies for selection. + """ + + +class Rules(BaseModel): + keepNewest: float | None = None + """ + (Number) Number of newest matching images to retain, from 1 to 100. + Number of newest matching images to retain, from 1 to 100. + """ + olderThan: str | None = None + """ + (String) Canonical positive protobuf duration, such as 86400s. + Canonical positive protobuf duration, such as 86400s. + """ + regex: str | None = None + """ + (String) Go RE2 expression matched against the complete repository name or repository:tag. Matching is anchored to the whole input. + Go RE2 expression matched against the complete repository name or repository:tag. Matching is anchored to the whole input. + """ + + +class Timeouts(BaseModel): + create: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + """ + delete: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs. + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs. + """ + read: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. + """ + update: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + """ + + +class ForProvider(BaseModel): + enabled: bool | None = None + """ + (Boolean) Whether lifecycle retention is enabled. Defaults to false. + Whether lifecycle retention is enabled. Defaults to false. + """ + namespace: str | None = None + """ + images. Changing it replaces this policy resource. + Parent namespace name, such as example-images. Changing it replaces this policy resource. + """ + namespaceRef: NamespaceRef | None = None + """ + Reference to a Namespace in containerregistry to populate namespace. + """ + namespaceSelector: NamespaceSelector | None = None + """ + Selector for a Namespace in containerregistry to populate namespace. + """ + rules: dict[str, Rules] | None = None + """ + (Attributes Map) Authoritative rules keyed by stable IDs. Omitted rules are removed. (see below for nested schema) + """ + timeouts: Timeouts | None = None + """ + (Attributes) (see below for nested schema) + """ + + +class InitProvider(BaseModel): + enabled: bool | None = None + """ + (Boolean) Whether lifecycle retention is enabled. Defaults to false. + Whether lifecycle retention is enabled. Defaults to false. + """ + namespace: str | None = None + """ + images. Changing it replaces this policy resource. + Parent namespace name, such as example-images. Changing it replaces this policy resource. + """ + namespaceRef: NamespaceRef | None = None + """ + Reference to a Namespace in containerregistry to populate namespace. + """ + namespaceSelector: NamespaceSelector | None = None + """ + Selector for a Namespace in containerregistry to populate namespace. + """ + rules: dict[str, Rules] | None = None + """ + (Attributes Map) Authoritative rules keyed by stable IDs. Omitted rules are removed. (see below for nested schema) + """ + timeouts: Timeouts | None = None + """ + (Attributes) (see below for nested schema) + """ + + +class ProviderConfigRef(BaseModel): + kind: str + """ + Kind of the referenced object. + """ + name: str + """ + Name of the referenced object. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + + +class Spec(BaseModel): + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'kind': 'ClusterProviderConfig', 'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + appliedRevision: float | None = None + """ + (Number) Last lifecycle policy revision acknowledged by the worker. Acknowledgement does not indicate completed retention or garbage collection. + Last lifecycle policy revision acknowledged by the worker. Acknowledgement does not indicate completed retention or garbage collection. + """ + createdAt: str | None = None + """ + (String) Creation timestamp in RFC3339 format. + Creation timestamp in RFC3339 format. + """ + enabled: bool | None = None + """ + (Boolean) Whether lifecycle retention is enabled. Defaults to false. + Whether lifecycle retention is enabled. Defaults to false. + """ + etag: str | None = None + """ + (String) Current concurrency token. Changes when the server updates the resource. + Current concurrency token. Changes when the server updates the resource. + """ + id: str | None = None + name: str | None = None + """ + (String) Canonical API resource name. + Canonical API resource name. + """ + namespace: str | None = None + """ + images. Changing it replaces this policy resource. + Parent namespace name, such as example-images. Changing it replaces this policy resource. + """ + revision: float | None = None + """ + (Number) Current desired policy revision. + Current desired policy revision. + """ + rules: dict[str, Rules] | None = None + """ + (Attributes Map) Authoritative rules keyed by stable IDs. Omitted rules are removed. (see below for nested schema) + """ + timeouts: Timeouts | None = None + """ + (Attributes) (see below for nested schema) + """ + updatedAt: str | None = None + """ + (String) Last update timestamp in RFC3339 format. + Last update timestamp in RFC3339 format. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class LifecyclePolicy(BaseModel): + apiVersion: Literal['containerregistry.coreweave.m.upbound.io/v1beta1'] | None = ( + 'containerregistry.coreweave.m.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['LifecyclePolicy'] | None = 'LifecyclePolicy' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + LifecyclePolicySpec defines the desired state of LifecyclePolicy + """ + status: Status | None = None + """ + LifecyclePolicyStatus defines the observed state of LifecyclePolicy. + """ + + +class LifecyclePolicyList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[LifecyclePolicy] + """ + List of lifecyclepolicies. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/m/coreweave/containerregistry/namespace/__init__.py b/schemas/python/models/io/upbound/m/coreweave/containerregistry/namespace/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/containerregistry/namespace/v1beta1.py b/schemas/python/models/io/upbound/m/coreweave/containerregistry/namespace/v1beta1.py new file mode 100644 index 000000000..d02efd9d7 --- /dev/null +++ b/schemas/python/models/io/upbound/m/coreweave/containerregistry/namespace/v1beta1.py @@ -0,0 +1,438 @@ +# generated by datamodel-codegen: +# filename: workdir/containerregistry_coreweave_m_upbound_io_v1beta1_namespace.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......k8s.apimachinery.pkg.apis.meta import v1 + + +class Rules(BaseModel): + expression: str | None = None + """ + (String) CEL expression evaluated against the request identity and context. + CEL expression evaluated against the request identity and context. + """ + + +class PolicySets(BaseModel): + identitySelector: str | None = None + """ + (String) Identity class evaluated by this policy set. Supported values: COREWEAVE, WORKLOAD_FEDERATION, ANY_AUTHENTICATED, ANONYMOUS, COREWEAVE_KUBERNETES. COREWEAVE_KUBERNETES is deprecated; use WORKLOAD_FEDERATION. + Identity class evaluated by this policy set. Supported values: `COREWEAVE`, `WORKLOAD_FEDERATION`, `ANY_AUTHENTICATED`, `ANONYMOUS`, `COREWEAVE_KUBERNETES`. COREWEAVE_KUBERNETES is deprecated; use WORKLOAD_FEDERATION. + """ + rules: dict[str, Rules] | None = None + """ + (Attributes Map) Authoritative rules keyed by stable IDs. Omitted rules are removed. (see below for nested schema) + """ + + +class RequestIpAcl(BaseModel): + allowCidrs: list[str] | None = None + """ + mapped IPv6 are rejected. + Canonical IPv4 or IPv6 networks; host bits and IPv4-mapped IPv6 are rejected. + """ + denyCidrs: list[str] | None = None + """ + mapped IPv6 are rejected. + Canonical IPv4 or IPv6 networks; host bits and IPv4-mapped IPv6 are rejected. + """ + + +class InitialAccessConfiguration(BaseModel): + policySets: dict[str, PolicySets] | None = None + """ + (Attributes Map) Authoritative policy sets keyed by stable IDs. Omitted entries are removed. COREWEAVE_KUBERNETES is deprecated; use WORKLOAD_FEDERATION. (see below for nested schema) + """ + requestIpAcl: RequestIpAcl | None = None + """ + (Attributes) Optional request filter. At least one allow or deny network is required; omission removes the ACL. An ACL grants no authorization. (see below for nested schema) + """ + + +class Timeouts(BaseModel): + create: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + """ + delete: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs. + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs. + """ + read: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. + """ + update: str | None = None + """ + (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). + """ + + +class ForProvider(BaseModel): + forceDestroy: bool | None = None + """ + (Boolean) Irreversibly delete content on destroy. Apply this setting before destroying; never enabled automatically. + Irreversibly delete content on destroy. Apply this setting before destroying; never enabled automatically. + """ + initialAccessConfiguration: InitialAccessConfiguration | None = None + """ + only input. Omission selects the server default; {} atomically installs deny-all. Any change replaces the namespace. Import leaves this null; adding it after import replaces the namespace. (see below for nested schema) + """ + storageQuotaBytes: float | None = None + """ + (Number) Namespace ceiling in bytes. Omission/null clears the ceiling; zero disables pushes after evaluation. + Namespace ceiling in bytes. Omission/null clears the ceiling; zero disables pushes after evaluation. + """ + timeouts: Timeouts | None = None + """ + (Attributes) (see below for nested schema) + """ + zone: str | None = None + """ + case zone identifier. Changing it replaces the namespace. + Upper-case zone identifier. Changing it replaces the namespace. + """ + + +class InitProvider(BaseModel): + forceDestroy: bool | None = None + """ + (Boolean) Irreversibly delete content on destroy. Apply this setting before destroying; never enabled automatically. + Irreversibly delete content on destroy. Apply this setting before destroying; never enabled automatically. + """ + initialAccessConfiguration: InitialAccessConfiguration | None = None + """ + only input. Omission selects the server default; {} atomically installs deny-all. Any change replaces the namespace. Import leaves this null; adding it after import replaces the namespace. (see below for nested schema) + """ + storageQuotaBytes: float | None = None + """ + (Number) Namespace ceiling in bytes. Omission/null clears the ceiling; zero disables pushes after evaluation. + Namespace ceiling in bytes. Omission/null clears the ceiling; zero disables pushes after evaluation. + """ + timeouts: Timeouts | None = None + """ + (Attributes) (see below for nested schema) + """ + zone: str | None = None + """ + case zone identifier. Changing it replaces the namespace. + Upper-case zone identifier. Changing it replaces the namespace. + """ + + +class ProviderConfigRef(BaseModel): + kind: str + """ + Kind of the referenced object. + """ + name: str + """ + Name of the referenced object. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + + +class Spec(BaseModel): + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'kind': 'ClusterProviderConfig', 'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AccessMode(BaseModel): + mode: str | None = None + """ + (String) Effective access mode reported by the server. + Effective access mode reported by the server. + """ + reasons: list[str] | None = None + """ + reported reasons for the effective access mode. + Server-reported reasons for the effective access mode. + """ + updatedAt: str | None = None + """ + (String) Last update timestamp in RFC3339 format. + Last update timestamp in RFC3339 format. + """ + + +class ContentStatus(BaseModel): + blobCount: float | None = None + """ + (Number) Number of stored blobs. + Number of stored blobs. + """ + manifestCount: float | None = None + """ + (Number) Number of stored manifests. + Number of stored manifests. + """ + repositoryCount: float | None = None + """ + (Number) Number of repositories. + Number of repositories. + """ + tagCount: float | None = None + """ + (Number) Number of tags. + Number of tags. + """ + updatedAt: str | None = None + """ + (String) Last update timestamp in RFC3339 format. + Last update timestamp in RFC3339 format. + """ + usageBytes: float | None = None + """ + (Number) Total stored content size in bytes. + Total stored content size in bytes. + """ + + +class CreatedBy(BaseModel): + userUid: str | None = None + """ + (String) CoreWeave user identifier. + CoreWeave user identifier. + """ + username: str | None = None + """ + (String) CoreWeave username. + CoreWeave username. + """ + + +class UpdatedBy(BaseModel): + userUid: str | None = None + """ + (String) CoreWeave user identifier. + CoreWeave user identifier. + """ + username: str | None = None + """ + (String) CoreWeave username. + CoreWeave username. + """ + + +class AtProvider(BaseModel): + accessMode: AccessMode | None = None + """ + (Attributes) Current effective namespace access mode. (see below for nested schema) + """ + contentStatus: ContentStatus | None = None + """ + reported storage usage and content counts. These observations may lag content changes. (see below for nested schema) + """ + createdAt: str | None = None + """ + (String) Creation timestamp in RFC3339 format. + Creation timestamp in RFC3339 format. + """ + createdBy: CreatedBy | None = None + """ + (Attributes) Identity that created the namespace. (see below for nested schema) + """ + dnsName: str | None = None + """ + (String) Registry hostname used for OCI pushes and pulls. + Registry hostname used for OCI pushes and pulls. + """ + etag: str | None = None + """ + (String) Current concurrency token. Changes when the server updates the resource. + Current concurrency token. Changes when the server updates the resource. + """ + forceDestroy: bool | None = None + """ + (Boolean) Irreversibly delete content on destroy. Apply this setting before destroying; never enabled automatically. + Irreversibly delete content on destroy. Apply this setting before destroying; never enabled automatically. + """ + id: str | None = None + initialAccessConfiguration: InitialAccessConfiguration | None = None + """ + only input. Omission selects the server default; {} atomically installs deny-all. Any change replaces the namespace. Import leaves this null; adding it after import replaces the namespace. (see below for nested schema) + """ + orgId: str | None = None + """ + (String) Organization that owns the namespace. + Organization that owns the namespace. + """ + status: str | None = None + """ + (String) Current namespace provisioning state. + Current namespace provisioning state. + """ + storageQuotaBytes: float | None = None + """ + (Number) Namespace ceiling in bytes. Omission/null clears the ceiling; zero disables pushes after evaluation. + Namespace ceiling in bytes. Omission/null clears the ceiling; zero disables pushes after evaluation. + """ + timeouts: Timeouts | None = None + """ + (Attributes) (see below for nested schema) + """ + updatedAt: str | None = None + """ + (String) Last update timestamp in RFC3339 format. + Last update timestamp in RFC3339 format. + """ + updatedBy: UpdatedBy | None = None + """ + (Attributes) Identity that last updated the namespace. (see below for nested schema) + """ + zone: str | None = None + """ + case zone identifier. Changing it replaces the namespace. + Upper-case zone identifier. Changing it replaces the namespace. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class Namespace(BaseModel): + apiVersion: Literal['containerregistry.coreweave.m.upbound.io/v1beta1'] | None = ( + 'containerregistry.coreweave.m.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['Namespace'] | None = 'Namespace' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + NamespaceSpec defines the desired state of Namespace + """ + status: Status | None = None + """ + NamespaceStatus defines the observed state of Namespace. + """ + + +class NamespaceList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[Namespace] + """ + List of namespaces. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/m/coreweave/inference/__init__.py b/schemas/python/models/io/upbound/m/coreweave/inference/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/inference/capacityclaim/__init__.py b/schemas/python/models/io/upbound/m/coreweave/inference/capacityclaim/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/inference/capacityclaim/v1beta1.py b/schemas/python/models/io/upbound/m/coreweave/inference/capacityclaim/v1beta1.py new file mode 100644 index 000000000..99b807477 --- /dev/null +++ b/schemas/python/models/io/upbound/m/coreweave/inference/capacityclaim/v1beta1.py @@ -0,0 +1,294 @@ +# generated by datamodel-codegen: +# filename: workdir/inference_coreweave_m_upbound_io_v1beta1_capacityclaim.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......k8s.apimachinery.pkg.apis.meta import v1 + + +class Resources(BaseModel): + capacityType: str | None = None + """ + (String) The capacity type for the capacity claim. Must be CAPACITY_TYPE_MANAGED. + The [capacity type](https://docs.coreweave.com/products/inference/scaling#capacity-claims) for the capacity claim. Must be `CAPACITY_TYPE_MANAGED`. + """ + instanceCount: float | None = None + """ + (Number) The number of instances to reserve. Must be at least 1. + The number of instances to reserve. Must be at least 1. + """ + instanceType: str | None = None + """ + 4x). Case-sensitive. + The instance type to reserve (e.g. `gb200-4x`). Case-sensitive. + """ + zones: list[str] | None = None + """ + WEST-04A), case-sensitive. At least one is required. + The availability zones where the capacity claim may use resources from (e.g. `US-WEST-04A`), case-sensitive. At least one is required. + """ + + +class ForProvider(BaseModel): + name: str | None = None + """ + (String) The name of the capacity claim. Must be a valid hostname label. + The name of the capacity claim. Must be a valid hostname label. + """ + resources: Resources | None = None + """ + (Attributes) Resource configuration for the capacity claim. (see below for nested schema) + """ + + +class InitProvider(BaseModel): + name: str | None = None + """ + (String) The name of the capacity claim. Must be a valid hostname label. + The name of the capacity claim. Must be a valid hostname label. + """ + resources: Resources | None = None + """ + (Attributes) Resource configuration for the capacity claim. (see below for nested schema) + """ + + +class ProviderConfigRef(BaseModel): + kind: str + """ + Kind of the referenced object. + """ + name: str + """ + Name of the referenced object. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + + +class Spec(BaseModel): + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'kind': 'ClusterProviderConfig', 'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class Condition(BaseModel): + lastUpdateTime: str | None = None + """ + (String) RFC3339 timestamp of the last condition transition. + RFC3339 timestamp of the last condition transition. + """ + message: str | None = None + """ + readable message about the condition's last transition. + A human-readable message about the condition's last transition. + """ + reason: str | None = None + """ + readable reason for the condition's last transition. + A short, machine-readable reason for the condition's last transition. + """ + status: str | None = None + """ + (String) The current status of the capacity claim. See the Inference API overview for status values. + The condition status (`True`, `False`, or `Unknown`). + """ + type: str | None = None + """ + (String) The condition type (e.g. Ready, Progressing). + The condition type (e.g. `Ready`, `Progressing`). + """ + + +class AtProvider(BaseModel): + allocatedInstances: float | None = None + """ + (Number) The number of instances currently allocated. + The number of instances currently allocated. + """ + conditions: list[Condition] | None = None + """ + (Attributes List) Detailed status conditions for the capacity claim. (see below for nested schema) + """ + createdAt: str | None = None + """ + (String) RFC3339 timestamp of when the capacity claim was created. + RFC3339 timestamp of when the capacity claim was created. + """ + id: str | None = None + """ + (String) The unique identifier of the capacity claim. + """ + name: str | None = None + """ + (String) The name of the capacity claim. Must be a valid hostname label. + The name of the capacity claim. Must be a valid hostname label. + """ + organizationId: str | None = None + """ + (String) The organization ID that owns the capacity claim. + The organization ID that owns the capacity claim. + """ + pendingInstances: float | None = None + """ + (Number) The number of instances pending allocation. + The number of instances pending allocation. + """ + resources: Resources | None = None + """ + (Attributes) Resource configuration for the capacity claim. (see below for nested schema) + """ + status: str | None = None + """ + (String) The current status of the capacity claim. See the Inference API overview for status values. + The current status of the capacity claim. See the [Inference API overview](https://docs.coreweave.com/products/inference/reference/api-overview#status-values) for status values. + """ + updatedAt: str | None = None + """ + (String) RFC3339 timestamp of when the capacity claim was last updated. + RFC3339 timestamp of when the capacity claim was last updated. + """ + + +class ConditionModel(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[ConditionModel] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class CapacityClaim(BaseModel): + apiVersion: Literal['inference.coreweave.m.upbound.io/v1beta1'] | None = ( + 'inference.coreweave.m.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['CapacityClaim'] | None = 'CapacityClaim' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + CapacityClaimSpec defines the desired state of CapacityClaim + """ + status: Status | None = None + """ + CapacityClaimStatus defines the observed state of CapacityClaim. + """ + + +class CapacityClaimList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[CapacityClaim] + """ + List of capacityclaims. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/m/coreweave/inference/deployment/__init__.py b/schemas/python/models/io/upbound/m/coreweave/inference/deployment/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/inference/deployment/v1beta1.py b/schemas/python/models/io/upbound/m/coreweave/inference/deployment/v1beta1.py new file mode 100644 index 000000000..cc5d3932a --- /dev/null +++ b/schemas/python/models/io/upbound/m/coreweave/inference/deployment/v1beta1.py @@ -0,0 +1,497 @@ +# generated by datamodel-codegen: +# filename: workdir/inference_coreweave_m_upbound_io_v1beta1_deployment.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......k8s.apimachinery.pkg.apis.meta import v1 + + +class Autoscaling(BaseModel): + capacityClasses: list[str] | None = None + """ + (List of String) Ordered preference list of capacity classes to use. Order is significant: the first satisfiable class wins. Allowed values: CAPACITY_CLASS_RESERVED, CAPACITY_CLASS_ON_DEMAND. + Ordered preference list of [capacity classes](https://docs.coreweave.com/products/inference/scaling#capacity-claims) to use. Order is significant: the first satisfiable class wins. Allowed values: `CAPACITY_CLASS_RESERVED`, `CAPACITY_CLASS_ON_DEMAND`. + """ + concurrency: float | None = None + """ + (Number) Concurrency per instance target (≥1). Controls latency vs throughput tradeoffs. + Concurrency per instance target (≥1). Controls latency vs throughput tradeoffs. + """ + max: float | None = None + """ + (Number) Maximum number of instances. Must be ≥1. + Maximum number of instances. Must be ≥1. + """ + min: float | None = None + """ + (Number) Minimum number of instances. Must be ≥1. + Minimum number of instances. Must be ≥1. + """ + priority: float | None = None + """ + deployment scaling (0-1000). Higher values win when there is contention. + Priority for cross-deployment scaling (0-1000). Higher values win when there is contention. + """ + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class GatewayIdsRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + namespace: str | None = None + """ + Namespace of the referenced object + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class GatewayIdsSelector(BaseModel): + matchControllerRef: bool | None = None + """ + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + """ + matchLabels: dict[str, str] | None = None + """ + MatchLabels ensures an object with matching labels is selected. + """ + namespace: str | None = None + """ + Namespace for the selector + """ + policy: Policy | None = None + """ + Policies for selection. + """ + + +class Model(BaseModel): + bucket: str | None = None + """ + (String) The CAIOS bucket the model is stored in. The inference service account must have bucket access. + The CAIOS bucket the model is stored in. The inference service account must have [bucket access](https://docs.coreweave.com/products/inference/models#grant-inference-access-to-your-bucket). + """ + name: str | None = None + """ + (String) The name of the deployment. Must be a valid hostname label. + The model name used in API requests (e.g. the `/models` endpoint). Length must be 4-63 characters. + """ + path: str | None = None + """ + (String) The CAIOS path to the model and its configuration files. + The CAIOS path to the model and its configuration files. + """ + + +class Resources(BaseModel): + gpuCount: float | None = None + """ + (Number) Number of GPUs per instance. Must be one of: 1, 2, 4, 8, 16. + Number of GPUs per instance. Must be one of: 1, 2, 4, 8, 16. + """ + instanceType: str | None = None + """ + (String) The instance type to use. + The instance type to use. + """ + + +class Runtime(BaseModel): + engine: str | None = None + """ + (String) The inference engine to use. + The inference engine to use. + """ + engineConfig: dict[str, str] | None = None + """ + specific configuration key/value pairs. + Engine-specific configuration key/value pairs. + """ + engineEnv: dict[str, str] | None = None + """ + specific environment variables to inject into the model runtime container. Variable names must come from the selected engine's server-side allow list, exposed by data.coreweave_inference_deployment_parameters..engine_env_options[].allowed_names; unsupported names are rejected by the API. + Engine-specific environment variables to inject into the model runtime container. Variable names must come from the selected engine's server-side allow list, exposed by `data.coreweave_inference_deployment_parameters..engine_env_options[].allowed_names`; unsupported names are rejected by the API. + """ + version: str | None = None + """ + (String) The version of the engine. If not set, defaults to the latest available version. Must follow semver format (e.g. 1.2.3). + The version of the engine. If not set, defaults to the latest available version. Must follow semver format (e.g. `1.2.3`). + """ + + +class Traffic(BaseModel): + weight: float | None = None + """ + 1000). Values are normalized into percentages across deployments with the same model name. + Traffic weight (0-1000). Values are normalized into percentages across deployments with the same model name. + """ + + +class ForProvider(BaseModel): + autoscaling: Autoscaling | None = None + """ + (Attributes) Autoscaling configuration. (see below for nested schema) + """ + disabled: bool | None = None + """ + (Boolean) Whether the deployment is disabled. + Whether the deployment is disabled. + """ + gatewayIds: list[str] | None = None + """ + (Set of String) The gateway IDs to associate the deployment with. At least one is required. + The [gateway](https://docs.coreweave.com/products/inference/gateways) IDs to associate the deployment with. At least one is required. + """ + gatewayIdsRefs: list[GatewayIdsRef] | None = None + """ + References to Gateway in inference to populate gatewayIds. + """ + gatewayIdsSelector: GatewayIdsSelector | None = None + """ + Selector for a list of Gateway in inference to populate gatewayIds. + """ + model: Model | None = None + """ + (Attributes) Model configuration. (see below for nested schema) + """ + name: str | None = None + """ + (String) The name of the deployment. Must be a valid hostname label. + The name of the deployment. Must be a valid hostname label. + """ + resources: Resources | None = None + """ + (Attributes) GPU resource configuration for the deployment. (see below for nested schema) + """ + runtime: Runtime | None = None + """ + (Attributes) Runtime selection and configuration. (see below for nested schema) + """ + traffic: Traffic | None = None + """ + (Attributes) Traffic configuration. Omit to accept the API default (weight 0, which normalizes to 100% when no other deployment shares the model name). After apply, weight is populated from the API. (see below for nested schema) + """ + + +class InitProvider(BaseModel): + autoscaling: Autoscaling | None = None + """ + (Attributes) Autoscaling configuration. (see below for nested schema) + """ + disabled: bool | None = None + """ + (Boolean) Whether the deployment is disabled. + Whether the deployment is disabled. + """ + gatewayIds: list[str] | None = None + """ + (Set of String) The gateway IDs to associate the deployment with. At least one is required. + The [gateway](https://docs.coreweave.com/products/inference/gateways) IDs to associate the deployment with. At least one is required. + """ + gatewayIdsRefs: list[GatewayIdsRef] | None = None + """ + References to Gateway in inference to populate gatewayIds. + """ + gatewayIdsSelector: GatewayIdsSelector | None = None + """ + Selector for a list of Gateway in inference to populate gatewayIds. + """ + model: Model | None = None + """ + (Attributes) Model configuration. (see below for nested schema) + """ + name: str | None = None + """ + (String) The name of the deployment. Must be a valid hostname label. + The name of the deployment. Must be a valid hostname label. + """ + resources: Resources | None = None + """ + (Attributes) GPU resource configuration for the deployment. (see below for nested schema) + """ + runtime: Runtime | None = None + """ + (Attributes) Runtime selection and configuration. (see below for nested schema) + """ + traffic: Traffic | None = None + """ + (Attributes) Traffic configuration. Omit to accept the API default (weight 0, which normalizes to 100% when no other deployment shares the model name). After apply, weight is populated from the API. (see below for nested schema) + """ + + +class ProviderConfigRef(BaseModel): + kind: str + """ + Kind of the referenced object. + """ + name: str + """ + Name of the referenced object. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + + +class Spec(BaseModel): + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'kind': 'ClusterProviderConfig', 'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class Condition(BaseModel): + lastUpdateTime: str | None = None + """ + (String) RFC3339 timestamp of the last condition transition. + RFC3339 timestamp of the last condition transition. + """ + message: str | None = None + """ + readable message about the condition's last transition. + A human-readable message about the condition's last transition. + """ + reason: str | None = None + """ + readable reason for the condition's last transition. + A short, machine-readable reason for the condition's last transition. + """ + status: str | None = None + """ + (String) The current status of the deployment. See the Inference API overview for status values. Creation and updates that disable the deployment return once resources are applied rather than once the deployment is serving, so the status may not be ready immediately. An update to a serving deployment instead blocks until the rollout reaches STATUS_READY. Poll the API for live readiness. + The condition status (`True`, `False`, or `Unknown`). + """ + type: str | None = None + """ + (String) The condition type (e.g. Ready, Progressing). + The condition type (e.g. `Ready`, `Progressing`). + """ + + +class AtProvider(BaseModel): + autoscaling: Autoscaling | None = None + """ + (Attributes) Autoscaling configuration. (see below for nested schema) + """ + conditions: list[Condition] | None = None + """ + (Attributes List) Detailed status conditions for the deployment. (see below for nested schema) + """ + createdAt: str | None = None + """ + (String) RFC3339 timestamp of when the deployment was created. + RFC3339 timestamp of when the deployment was created. + """ + disabled: bool | None = None + """ + (Boolean) Whether the deployment is disabled. + Whether the deployment is disabled. + """ + gatewayIds: list[str] | None = None + """ + (Set of String) The gateway IDs to associate the deployment with. At least one is required. + The [gateway](https://docs.coreweave.com/products/inference/gateways) IDs to associate the deployment with. At least one is required. + """ + id: str | None = None + """ + (String) The unique identifier of the deployment. + """ + model: Model | None = None + """ + (Attributes) Model configuration. (see below for nested schema) + """ + name: str | None = None + """ + (String) The name of the deployment. Must be a valid hostname label. + The name of the deployment. Must be a valid hostname label. + """ + organizationId: str | None = None + """ + (String) The organization ID that owns the deployment. + The organization ID that owns the deployment. + """ + resources: Resources | None = None + """ + (Attributes) GPU resource configuration for the deployment. (see below for nested schema) + """ + runtime: Runtime | None = None + """ + (Attributes) Runtime selection and configuration. (see below for nested schema) + """ + status: str | None = None + """ + (String) The current status of the deployment. See the Inference API overview for status values. Creation and updates that disable the deployment return once resources are applied rather than once the deployment is serving, so the status may not be ready immediately. An update to a serving deployment instead blocks until the rollout reaches STATUS_READY. Poll the API for live readiness. + The current status of the deployment. See the [Inference API overview](https://docs.coreweave.com/products/inference/reference/api-overview) for status values. Creation and updates that disable the deployment return once resources are applied rather than once the deployment is serving, so the status may not be ready immediately. An update to a serving deployment instead blocks until the rollout reaches STATUS_READY. Poll the API for live readiness. + """ + traffic: Traffic | None = None + """ + (Attributes) Traffic configuration. Omit to accept the API default (weight 0, which normalizes to 100% when no other deployment shares the model name). After apply, weight is populated from the API. (see below for nested schema) + """ + updatedAt: str | None = None + """ + (String) RFC3339 timestamp of when the deployment was last updated. + RFC3339 timestamp of when the deployment was last updated. + """ + + +class ConditionModel(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[ConditionModel] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class Deployment(BaseModel): + apiVersion: Literal['inference.coreweave.m.upbound.io/v1beta1'] | None = ( + 'inference.coreweave.m.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['Deployment'] | None = 'Deployment' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + DeploymentSpec defines the desired state of Deployment + """ + status: Status | None = None + """ + DeploymentStatus defines the observed state of Deployment. + """ + + +class DeploymentList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[Deployment] + """ + List of deployments. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/m/coreweave/inference/gateway/__init__.py b/schemas/python/models/io/upbound/m/coreweave/inference/gateway/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/inference/gateway/v1beta1.py b/schemas/python/models/io/upbound/m/coreweave/inference/gateway/v1beta1.py new file mode 100644 index 000000000..41b4e79e6 --- /dev/null +++ b/schemas/python/models/io/upbound/m/coreweave/inference/gateway/v1beta1.py @@ -0,0 +1,414 @@ +# generated by datamodel-codegen: +# filename: workdir/inference_coreweave_m_upbound_io_v1beta1_gateway.yaml + +from __future__ import annotations + +from typing import Any, Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......k8s.apimachinery.pkg.apis.meta import v1 + + +class ApiKeySecretRef(BaseModel): + key: str + name: str + """ + Name of the secret. + """ + + +class WeightsAndBiases(BaseModel): + apiKeySecretRef: ApiKeySecretRef | None = None + """ + (String, Sensitive) The organization API key for Weights & Biases. Requires server_url to also be set. + The organization API key for Weights & Biases. Requires `server_url` to also be set. + """ + enableRateLimiting: bool | None = None + """ + (Boolean) Whether to enable Weights & Biases controlled rate limiting. + Whether to enable Weights & Biases controlled rate limiting. + """ + enableUsageReports: bool | None = None + """ + (Boolean) Whether to send usage data to Weights & Biases. + Whether to send usage data to Weights & Biases. + """ + serverUrl: str | None = None + """ + (String) The Weights & Biases server URL. Defaults to the shared SaaS instance if not set. + The Weights & Biases server URL. Defaults to the shared SaaS instance if not set. + """ + + +class Auth(BaseModel): + coreweave: dict[str, Any] | None = None + """ + (Attributes) Use CoreWeave IAM authentication. (see below for nested schema) + """ + weightsAndBiases: WeightsAndBiases | None = None + """ + (Attributes) Use Weights & Biases authentication. (see below for nested schema) + """ + + +class EndpointConfiguration(BaseModel): + additionalDns: list[str] | None = None + """ + (Set of String) Additional DNS names for the gateway endpoint. These DNS names must be manually configured to point to the gateway endpoint. + Additional DNS names for the gateway endpoint. These DNS names must be manually configured to point to the gateway endpoint. + """ + allowedSourceIpRanges: list[str] | None = None + """ + length prefix for a single address (e.g. 203.0.113.5/32). + Client source IP ranges permitted to reach the gateway, in CIDR notation (IPv4 or IPv6). Up to 50 entries; an empty list applies no source restriction. Use a full-length prefix for a single address (e.g. `203.0.113.5/32`). + """ + edgeProxyMode: str | None = None + """ + (String) How client traffic reaches the gateway. Must be one of: EDGE_PROXY_MODE_MANAGED (traffic is proxied through CoreWeave's managed edge network: DDoS mitigation and WAF, with TLS terminated at the edge and the origin address kept out of public DNS) or EDGE_PROXY_MODE_DIRECT (clients connect straight to the gateway's load balancer, with no edge filtering and the load balancer address published in DNS). When unset, the platform default (currently EDGE_PROXY_MODE_MANAGED) applies. + How client traffic reaches the gateway. Must be one of: `EDGE_PROXY_MODE_MANAGED` (traffic is proxied through CoreWeave's managed edge network: DDoS mitigation and WAF, with TLS terminated at the edge and the origin address kept out of public DNS) or `EDGE_PROXY_MODE_DIRECT` (clients connect straight to the gateway's load balancer, with no edge filtering and the load balancer address published in DNS). When unset, the platform default (currently `EDGE_PROXY_MODE_MANAGED`) applies. + """ + + +class BodyBased(BaseModel): + apiType: str | None = None + """ + known API type for routing. Must be one of: API_TYPE_OPENAI. + The well-known API type for routing. Must be one of: `API_TYPE_OPENAI`. + """ + + +class HeaderBased(BaseModel): + headerName: str | None = None + """ + (String) The name of the header to use for routing. + The name of the header to use for routing. + """ + + +class Routing(BaseModel): + bodyBased: BodyBased | None = None + """ + based routing configuration. Routes requests based on the request body content. (see below for nested schema) + """ + headerBased: HeaderBased | None = None + """ + based routing configuration. Routes requests using a header value to match the model by name. (see below for nested schema) + """ + pathBased: dict[str, Any] | None = None + """ + based routing configuration. Routes requests based on the URL path. (see below for nested schema) + """ + + +class ForProvider(BaseModel): + auth: Auth | None = None + """ + (Attributes) The authentication configuration for the gateway. Exactly one of coreweave or weights_and_biases must be specified. (see below for nested schema) + """ + endpointConfiguration: EndpointConfiguration | None = None + """ + (Attributes) Additional endpoint configuration options. (see below for nested schema) + """ + name: str | None = None + """ + readable name of the gateway. Capped at 38 characters so the derived public FQDN fits within the 64-character X.509 Common Name limit. + The human-readable name of the gateway. Capped at 38 characters so the derived public FQDN fits within the 64-character X.509 Common Name limit. + """ + routing: Routing | None = None + """ + (Attributes) The routing configuration for the gateway. Exactly one of body_based, header_based, or path_based must be specified. (see below for nested schema) + """ + zones: list[str] | None = None + """ + (Set of String) The zones to make the gateway available in. Limits where deployments associated with the gateway may exist. + The zones to make the gateway available in. Limits where deployments associated with the gateway may exist. + """ + + +class InitProvider(BaseModel): + auth: Auth | None = None + """ + (Attributes) The authentication configuration for the gateway. Exactly one of coreweave or weights_and_biases must be specified. (see below for nested schema) + """ + endpointConfiguration: EndpointConfiguration | None = None + """ + (Attributes) Additional endpoint configuration options. (see below for nested schema) + """ + name: str | None = None + """ + readable name of the gateway. Capped at 38 characters so the derived public FQDN fits within the 64-character X.509 Common Name limit. + The human-readable name of the gateway. Capped at 38 characters so the derived public FQDN fits within the 64-character X.509 Common Name limit. + """ + routing: Routing | None = None + """ + (Attributes) The routing configuration for the gateway. Exactly one of body_based, header_based, or path_based must be specified. (see below for nested schema) + """ + zones: list[str] | None = None + """ + (Set of String) The zones to make the gateway available in. Limits where deployments associated with the gateway may exist. + The zones to make the gateway available in. Limits where deployments associated with the gateway may exist. + """ + + +class ProviderConfigRef(BaseModel): + kind: str + """ + Kind of the referenced object. + """ + name: str + """ + Name of the referenced object. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + + +class Spec(BaseModel): + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'kind': 'ClusterProviderConfig', 'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class WeightsAndBiasesModel(BaseModel): + enableRateLimiting: bool | None = None + """ + (Boolean) Whether to enable Weights & Biases controlled rate limiting. + Whether to enable Weights & Biases controlled rate limiting. + """ + enableUsageReports: bool | None = None + """ + (Boolean) Whether to send usage data to Weights & Biases. + Whether to send usage data to Weights & Biases. + """ + serverUrl: str | None = None + """ + (String) The Weights & Biases server URL. Defaults to the shared SaaS instance if not set. + The Weights & Biases server URL. Defaults to the shared SaaS instance if not set. + """ + + +class Condition(BaseModel): + lastUpdateTime: str | None = None + """ + (String) RFC3339 timestamp of the last condition transition. + RFC3339 timestamp of the last condition transition. + """ + message: str | None = None + """ + readable message about the condition's last transition. + A human-readable message about the condition's last transition. + """ + reason: str | None = None + """ + readable reason for the condition's last transition. + A short, machine-readable reason for the condition's last transition. + """ + status: str | None = None + """ + (String) The current status of the gateway. See the Inference API overview for status values. + The condition status (`True`, `False`, or `Unknown`). + """ + type: str | None = None + """ + (String) The condition type (e.g. Ready, Progressing). + The condition type (e.g. `Ready`, `Progressing`). + """ + + +class AtProvider(BaseModel): + auth: Auth | None = None + """ + (Attributes) The authentication configuration for the gateway. Exactly one of coreweave or weights_and_biases must be specified. (see below for nested schema) + """ + conditions: list[Condition] | None = None + """ + (Attributes List) Detailed status conditions for the gateway. (see below for nested schema) + """ + createdAt: str | None = None + """ + (String) RFC3339 timestamp of when the gateway was created. + RFC3339 timestamp of when the gateway was created. + """ + endpointConfiguration: EndpointConfiguration | None = None + """ + (Attributes) Additional endpoint configuration options. (see below for nested schema) + """ + endpoints: list[str] | None = None + """ + (Set of String) The endpoint URIs for the gateway. + The endpoint URIs for the gateway. + """ + id: str | None = None + """ + (String) The unique identifier of the gateway. + """ + name: str | None = None + """ + readable name of the gateway. Capped at 38 characters so the derived public FQDN fits within the 64-character X.509 Common Name limit. + The human-readable name of the gateway. Capped at 38 characters so the derived public FQDN fits within the 64-character X.509 Common Name limit. + """ + organizationId: str | None = None + """ + (String) The organization ID that owns the gateway. + The organization ID that owns the gateway. + """ + routing: Routing | None = None + """ + (Attributes) The routing configuration for the gateway. Exactly one of body_based, header_based, or path_based must be specified. (see below for nested schema) + """ + status: str | None = None + """ + (String) The current status of the gateway. See the Inference API overview for status values. + The current status of the gateway. See the [Inference API overview](https://docs.coreweave.com/products/inference/reference/api-overview) for status values. + """ + updatedAt: str | None = None + """ + (String) RFC3339 timestamp of when the gateway was last updated. + RFC3339 timestamp of when the gateway was last updated. + """ + zones: list[str] | None = None + """ + (Set of String) The zones to make the gateway available in. Limits where deployments associated with the gateway may exist. + The zones to make the gateway available in. Limits where deployments associated with the gateway may exist. + """ + + +class ConditionModel(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[ConditionModel] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class Gateway(BaseModel): + apiVersion: Literal['inference.coreweave.m.upbound.io/v1beta1'] | None = ( + 'inference.coreweave.m.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['Gateway'] | None = 'Gateway' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + GatewaySpec defines the desired state of Gateway + """ + status: Status | None = None + """ + GatewayStatus defines the observed state of Gateway. + """ + + +class GatewayList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[Gateway] + """ + List of gateways. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/m/coreweave/networking/__init__.py b/schemas/python/models/io/upbound/m/coreweave/networking/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/networking/vpc/__init__.py b/schemas/python/models/io/upbound/m/coreweave/networking/vpc/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/networking/vpc/v1beta1.py b/schemas/python/models/io/upbound/m/coreweave/networking/vpc/v1beta1.py new file mode 100644 index 000000000..610fa2aef --- /dev/null +++ b/schemas/python/models/io/upbound/m/coreweave/networking/vpc/v1beta1.py @@ -0,0 +1,364 @@ +# generated by datamodel-codegen: +# filename: workdir/networking_coreweave_m_upbound_io_v1beta1_vpc.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......k8s.apimachinery.pkg.apis.meta import v1 + + +class Dns(BaseModel): + servers: list[str] | None = None + """ + (Set of String) The DNS servers to be used by DHCP clients within the VPC. + The DNS servers to be used by DHCP clients within the VPC. + """ + + +class Dhcp(BaseModel): + dns: Dns | None = None + """ + (Attributes) Settings affecting DNS for DHCP within the VPC (see below for nested schema) + """ + + +class Egress(BaseModel): + disablePublicAccess: bool | None = None + """ + (Boolean) Specifies whether the VPC should be blocked from consuming public Internet. + Specifies whether the VPC should be blocked from consuming public Internet. + """ + + +class Ipam(BaseModel): + gatewayAddressPolicy: str | None = None + """ + (String) Describes which IP address from the prefix is allocated to the network gateway. Must be one of: UNSPECIFIED, EUI64, FIRST_IP, LAST_IP. + Describes which IP address from the prefix is allocated to the network gateway. Must be one of: `UNSPECIFIED`, `EUI64`, `FIRST_IP`, `LAST_IP`. + """ + prefixLength: float | None = None + """ + wide aggregate prefix. + The desired length for each Node's allocation from the VPC-wide aggregate prefix. + """ + + +class HostPrefix(BaseModel): + ipam: Ipam | None = None + """ + (Attributes) The configuration for a secondary host prefix. (see below for nested schema) + """ + name: str | None = None + """ + (String) The name of the VPC. Must not be longer than 30 characters. + The user-specified name of the host prefix. + """ + prefixes: list[str] | None = None + """ + wide aggregates from which host-specific prefixes are allocated. May be IPv4 or IPv6. + The VPC-wide aggregates from which host-specific prefixes are allocated. May be IPv4 or IPv6. + """ + type: str | None = None + """ + (String) Controls network connectivity from the prefix to the host. Must be one of: PRIMARY, ROUTED, ATTACHED. + Controls network connectivity from the prefix to the host. Must be one of: `PRIMARY`, `ROUTED`, `ATTACHED`. + """ + + +class Ingress(BaseModel): + disablePublicServices: bool | None = None + """ + facing networks, making them inaccessible from the Internet. + Specifies whether the VPC should prevent public prefixes advertised from Nodes from being imported into public-facing networks, making them inaccessible from the Internet. + """ + + +class VpcPrefix(BaseModel): + name: str | None = None + """ + (String) The name of the VPC. Must not be longer than 30 characters. + """ + value: str | None = None + """ + (String) + """ + + +class ForProvider(BaseModel): + dhcp: Dhcp | None = None + """ + (Attributes) Settings affecting DHCP behavior within the VPC. (see below for nested schema) + """ + egress: Egress | None = None + """ + (Attributes) Settings affecting traffic leaving the VPC. (see below for nested schema) + """ + hostPrefix: str | None = None + """ + adjacent nodes together, which improves distributed-training performance. A prefix smaller than the Zone default (a longer mask) doesn't carry this location information, so it produces less optimal placement. If you need a different size, CoreWeave can approve one for your account on request. For non-SUNK VPCs, any prefix size is accepted. However, NVL72 rack-level instances require a host prefix no smaller than the Zone's default host prefix. A smaller prefix forces dynamic address allocation, which breaks standard IMEX address mapping across the cluster. IMEX with Dynamic Resource Allocation (DRA) doesn't have this limitation. If left unspecified, a Zone-specific default value will be applied by the server. See Host prefixes for details. This field is immutable once set. + An IPv4 CIDR range used to allocate host addresses when booting compute into a VPC. For SUNK clusters, use a prefix no smaller than your Zone's default host prefix (a mask no longer than the default) so that host addresses reflect each node's physical location. SUNK uses this location information to place network-adjacent nodes together, which improves distributed-training performance. A prefix smaller than the Zone default (a longer mask) doesn't carry this location information, so it produces less optimal placement. If you need a different size, CoreWeave can approve one for your account on request. For non-SUNK VPCs, any prefix size is accepted. However, NVL72 rack-level instances require a host prefix no smaller than the Zone's default host prefix. A smaller prefix forces dynamic address allocation, which breaks standard IMEX address mapping across the cluster. IMEX with Dynamic Resource Allocation (DRA) doesn't have this limitation. If left unspecified, a Zone-specific default value will be applied by the server. See [Host prefixes](https://docs.coreweave.com/products/networking/vpc/create-manage-vpcs#host-prefixes) for details. This field is immutable once set. + """ + hostPrefixes: list[HostPrefix] | None = None + """ + adjacent nodes together, which improves distributed-training performance. A prefix smaller than the Zone default (a longer mask) doesn't carry this location information, so it produces less optimal placement. If you need a different size, CoreWeave can approve one for your account on request. For non-SUNK VPCs, any prefix size is accepted. However, NVL72 rack-level instances require a primary host prefix (type = PRIMARY) no smaller than the Zone's default host prefix. A smaller prefix forces dynamic address allocation, which breaks standard IMEX address mapping across the cluster. IMEX with Dynamic Resource Allocation (DRA) doesn't have this limitation. See Host prefixes for details. (see below for nested schema) + """ + ingress: Ingress | None = None + """ + (Attributes) Settings affecting traffic entering the VPC. (see below for nested schema) + """ + name: str | None = None + """ + (String) The name of the VPC. Must not be longer than 30 characters. + The name of the VPC. Must not be longer than 30 characters. + """ + vpcPrefixes: list[VpcPrefix] | None = None + """ + (Attributes Set) A list of additional prefixes associated with the VPC. For example, CKS clusters use these prefixes for Pod and service CIDR ranges. (see below for nested schema) + """ + zone: str | None = None + """ + (String) The Availability Zone in which the VPC is located. + The Availability Zone in which the VPC is located. + """ + + +class InitProvider(BaseModel): + dhcp: Dhcp | None = None + """ + (Attributes) Settings affecting DHCP behavior within the VPC. (see below for nested schema) + """ + egress: Egress | None = None + """ + (Attributes) Settings affecting traffic leaving the VPC. (see below for nested schema) + """ + hostPrefix: str | None = None + """ + adjacent nodes together, which improves distributed-training performance. A prefix smaller than the Zone default (a longer mask) doesn't carry this location information, so it produces less optimal placement. If you need a different size, CoreWeave can approve one for your account on request. For non-SUNK VPCs, any prefix size is accepted. However, NVL72 rack-level instances require a host prefix no smaller than the Zone's default host prefix. A smaller prefix forces dynamic address allocation, which breaks standard IMEX address mapping across the cluster. IMEX with Dynamic Resource Allocation (DRA) doesn't have this limitation. If left unspecified, a Zone-specific default value will be applied by the server. See Host prefixes for details. This field is immutable once set. + An IPv4 CIDR range used to allocate host addresses when booting compute into a VPC. For SUNK clusters, use a prefix no smaller than your Zone's default host prefix (a mask no longer than the default) so that host addresses reflect each node's physical location. SUNK uses this location information to place network-adjacent nodes together, which improves distributed-training performance. A prefix smaller than the Zone default (a longer mask) doesn't carry this location information, so it produces less optimal placement. If you need a different size, CoreWeave can approve one for your account on request. For non-SUNK VPCs, any prefix size is accepted. However, NVL72 rack-level instances require a host prefix no smaller than the Zone's default host prefix. A smaller prefix forces dynamic address allocation, which breaks standard IMEX address mapping across the cluster. IMEX with Dynamic Resource Allocation (DRA) doesn't have this limitation. If left unspecified, a Zone-specific default value will be applied by the server. See [Host prefixes](https://docs.coreweave.com/products/networking/vpc/create-manage-vpcs#host-prefixes) for details. This field is immutable once set. + """ + hostPrefixes: list[HostPrefix] | None = None + """ + adjacent nodes together, which improves distributed-training performance. A prefix smaller than the Zone default (a longer mask) doesn't carry this location information, so it produces less optimal placement. If you need a different size, CoreWeave can approve one for your account on request. For non-SUNK VPCs, any prefix size is accepted. However, NVL72 rack-level instances require a primary host prefix (type = PRIMARY) no smaller than the Zone's default host prefix. A smaller prefix forces dynamic address allocation, which breaks standard IMEX address mapping across the cluster. IMEX with Dynamic Resource Allocation (DRA) doesn't have this limitation. See Host prefixes for details. (see below for nested schema) + """ + ingress: Ingress | None = None + """ + (Attributes) Settings affecting traffic entering the VPC. (see below for nested schema) + """ + name: str | None = None + """ + (String) The name of the VPC. Must not be longer than 30 characters. + The name of the VPC. Must not be longer than 30 characters. + """ + vpcPrefixes: list[VpcPrefix] | None = None + """ + (Attributes Set) A list of additional prefixes associated with the VPC. For example, CKS clusters use these prefixes for Pod and service CIDR ranges. (see below for nested schema) + """ + zone: str | None = None + """ + (String) The Availability Zone in which the VPC is located. + The Availability Zone in which the VPC is located. + """ + + +class ProviderConfigRef(BaseModel): + kind: str + """ + Kind of the referenced object. + """ + name: str + """ + Name of the referenced object. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + + +class Spec(BaseModel): + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'kind': 'ClusterProviderConfig', 'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + dhcp: Dhcp | None = None + """ + (Attributes) Settings affecting DHCP behavior within the VPC. (see below for nested schema) + """ + egress: Egress | None = None + """ + (Attributes) Settings affecting traffic leaving the VPC. (see below for nested schema) + """ + hostPrefix: str | None = None + """ + adjacent nodes together, which improves distributed-training performance. A prefix smaller than the Zone default (a longer mask) doesn't carry this location information, so it produces less optimal placement. If you need a different size, CoreWeave can approve one for your account on request. For non-SUNK VPCs, any prefix size is accepted. However, NVL72 rack-level instances require a host prefix no smaller than the Zone's default host prefix. A smaller prefix forces dynamic address allocation, which breaks standard IMEX address mapping across the cluster. IMEX with Dynamic Resource Allocation (DRA) doesn't have this limitation. If left unspecified, a Zone-specific default value will be applied by the server. See Host prefixes for details. This field is immutable once set. + An IPv4 CIDR range used to allocate host addresses when booting compute into a VPC. For SUNK clusters, use a prefix no smaller than your Zone's default host prefix (a mask no longer than the default) so that host addresses reflect each node's physical location. SUNK uses this location information to place network-adjacent nodes together, which improves distributed-training performance. A prefix smaller than the Zone default (a longer mask) doesn't carry this location information, so it produces less optimal placement. If you need a different size, CoreWeave can approve one for your account on request. For non-SUNK VPCs, any prefix size is accepted. However, NVL72 rack-level instances require a host prefix no smaller than the Zone's default host prefix. A smaller prefix forces dynamic address allocation, which breaks standard IMEX address mapping across the cluster. IMEX with Dynamic Resource Allocation (DRA) doesn't have this limitation. If left unspecified, a Zone-specific default value will be applied by the server. See [Host prefixes](https://docs.coreweave.com/products/networking/vpc/create-manage-vpcs#host-prefixes) for details. This field is immutable once set. + """ + hostPrefixes: list[HostPrefix] | None = None + """ + adjacent nodes together, which improves distributed-training performance. A prefix smaller than the Zone default (a longer mask) doesn't carry this location information, so it produces less optimal placement. If you need a different size, CoreWeave can approve one for your account on request. For non-SUNK VPCs, any prefix size is accepted. However, NVL72 rack-level instances require a primary host prefix (type = PRIMARY) no smaller than the Zone's default host prefix. A smaller prefix forces dynamic address allocation, which breaks standard IMEX address mapping across the cluster. IMEX with Dynamic Resource Allocation (DRA) doesn't have this limitation. See Host prefixes for details. (see below for nested schema) + """ + id: str | None = None + """ + (String) The unique identifier for the VPC. + """ + ingress: Ingress | None = None + """ + (Attributes) Settings affecting traffic entering the VPC. (see below for nested schema) + """ + name: str | None = None + """ + (String) The name of the VPC. Must not be longer than 30 characters. + The name of the VPC. Must not be longer than 30 characters. + """ + vpcPrefixes: list[VpcPrefix] | None = None + """ + (Attributes Set) A list of additional prefixes associated with the VPC. For example, CKS clusters use these prefixes for Pod and service CIDR ranges. (see below for nested schema) + """ + zone: str | None = None + """ + (String) The Availability Zone in which the VPC is located. + The Availability Zone in which the VPC is located. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class VPC(BaseModel): + apiVersion: Literal['networking.coreweave.m.upbound.io/v1beta1'] | None = ( + 'networking.coreweave.m.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['VPC'] | None = 'VPC' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + VPCSpec defines the desired state of VPC + """ + status: Status | None = None + """ + VPCStatus defines the observed state of VPC. + """ + + +class VPCList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[VPC] + """ + List of vpcs. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/m/coreweave/objectstorage/__init__.py b/schemas/python/models/io/upbound/m/coreweave/objectstorage/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/objectstorage/accesskey/__init__.py b/schemas/python/models/io/upbound/m/coreweave/objectstorage/accesskey/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/objectstorage/accesskey/v1beta1.py b/schemas/python/models/io/upbound/m/coreweave/objectstorage/accesskey/v1beta1.py new file mode 100644 index 000000000..05355b30e --- /dev/null +++ b/schemas/python/models/io/upbound/m/coreweave/objectstorage/accesskey/v1beta1.py @@ -0,0 +1,232 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_coreweave_m_upbound_io_v1beta1_accesskey.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......k8s.apimachinery.pkg.apis.meta import v1 + + +class ForProvider(BaseModel): + attributes: dict[str, str] | None = None + """ + 63 characters and must not start with cw-, role, or groups. Values must be Kubernetes label values of at most 63 characters (empty allowed). Changes replace the key. Omitted values are adopted during import. + Creation attributes, at most 15 entries. Keys must be lowercase DNS labels of 1-63 characters and must not start with cw-, role, or groups. Values must be Kubernetes label values of at most 63 characters (empty allowed). Changes replace the key. Omitted values are adopted during import. + """ + durationSeconds: float | None = None + """ + (Number) Required for creation; integer from 0 to 4294967295. Zero means permanent. Omit only when retaining an imported key whose original duration is unavailable. Changing this value replaces the key. + Required for creation; integer from 0 to 4294967295. Zero means permanent. Omit only when retaining an imported key whose original duration is unavailable. Changing this value replaces the key. + """ + + +class InitProvider(BaseModel): + attributes: dict[str, str] | None = None + """ + 63 characters and must not start with cw-, role, or groups. Values must be Kubernetes label values of at most 63 characters (empty allowed). Changes replace the key. Omitted values are adopted during import. + Creation attributes, at most 15 entries. Keys must be lowercase DNS labels of 1-63 characters and must not start with cw-, role, or groups. Values must be Kubernetes label values of at most 63 characters (empty allowed). Changes replace the key. Omitted values are adopted during import. + """ + durationSeconds: float | None = None + """ + (Number) Required for creation; integer from 0 to 4294967295. Zero means permanent. Omit only when retaining an imported key whose original duration is unavailable. Changing this value replaces the key. + Required for creation; integer from 0 to 4294967295. Zero means permanent. Omit only when retaining an imported key whose original duration is unavailable. Changing this value replaces the key. + """ + + +class ProviderConfigRef(BaseModel): + kind: str + """ + Kind of the referenced object. + """ + name: str + """ + Name of the referenced object. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + + +class Spec(BaseModel): + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'kind': 'ClusterProviderConfig', 'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + attributes: dict[str, str] | None = None + """ + 63 characters and must not start with cw-, role, or groups. Values must be Kubernetes label values of at most 63 characters (empty allowed). Changes replace the key. Omitted values are adopted during import. + Creation attributes, at most 15 entries. Keys must be lowercase DNS labels of 1-63 characters and must not start with cw-, role, or groups. Values must be Kubernetes label values of at most 63 characters (empty allowed). Changes replace the key. Omitted values are adopted during import. + """ + durationSeconds: float | None = None + """ + (Number) Required for creation; integer from 0 to 4294967295. Zero means permanent. Omit only when retaining an imported key whose original duration is unavailable. Changing this value replaces the key. + Required for creation; integer from 0 to 4294967295. Zero means permanent. Omit only when retaining an imported key whose original duration is unavailable. Changing this value replaces the key. + """ + expiry: str | None = None + """ + one API expiry). + Expiry in RFC 3339 UTC format, or null for a permanent key (including an absent or year-one API expiry). + """ + id: str | None = None + """ + key ID. Used for import and individual revocation. + """ + orgId: str | None = None + """ + (String) Organization cloud ID reported by the API. + Organization cloud ID reported by the API. + """ + principalName: str | None = None + """ + (String) Principal determined by the authenticated caller. + Principal determined by the authenticated caller. + """ + status: str | None = None + """ + only API status, such as ACTIVE, EXPIRED, or FULL_SUSPENDED. The provider never changes principal-wide status. + Read-only API status, such as ACTIVE, EXPIRED, or FULL_SUSPENDED. The provider never changes principal-wide status. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class AccessKey(BaseModel): + apiVersion: Literal['objectstorage.coreweave.m.upbound.io/v1beta1'] | None = ( + 'objectstorage.coreweave.m.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['AccessKey'] | None = 'AccessKey' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + AccessKeySpec defines the desired state of AccessKey + """ + status: Status | None = None + """ + AccessKeyStatus defines the observed state of AccessKey. + """ + + +class AccessKeyList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[AccessKey] + """ + List of accesskeys. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucket/__init__.py b/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucket/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucket/v1beta1.py b/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucket/v1beta1.py new file mode 100644 index 000000000..603b5b5e5 --- /dev/null +++ b/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucket/v1beta1.py @@ -0,0 +1,209 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_coreweave_m_upbound_io_v1beta1_bucket.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......k8s.apimachinery.pkg.apis.meta import v1 + + +class ForProvider(BaseModel): + tags: dict[str, str] | None = None + """ + (Map of String) Map of tags to assign to the bucket. + Map of tags to assign to the bucket. + """ + zone: str | None = None + """ + (String) The Availability Zone in which the bucket is located. + The Availability Zone in which the bucket is located. + """ + + +class InitProvider(BaseModel): + tags: dict[str, str] | None = None + """ + (Map of String) Map of tags to assign to the bucket. + Map of tags to assign to the bucket. + """ + zone: str | None = None + """ + (String) The Availability Zone in which the bucket is located. + The Availability Zone in which the bucket is located. + """ + + +class ProviderConfigRef(BaseModel): + kind: str + """ + Kind of the referenced object. + """ + name: str + """ + Name of the referenced object. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + + +class Spec(BaseModel): + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'kind': 'ClusterProviderConfig', 'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + id: str | None = None + tags: dict[str, str] | None = None + """ + (Map of String) Map of tags to assign to the bucket. + Map of tags to assign to the bucket. + """ + zone: str | None = None + """ + (String) The Availability Zone in which the bucket is located. + The Availability Zone in which the bucket is located. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class Bucket(BaseModel): + apiVersion: Literal['objectstorage.coreweave.m.upbound.io/v1beta1'] | None = ( + 'objectstorage.coreweave.m.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['Bucket'] | None = 'Bucket' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + BucketSpec defines the desired state of Bucket + """ + status: Status | None = None + """ + BucketStatus defines the observed state of Bucket. + """ + + +class BucketList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[Bucket] + """ + List of buckets. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketinventory/__init__.py b/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketinventory/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketinventory/v1beta1.py b/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketinventory/v1beta1.py new file mode 100644 index 000000000..273fc00e7 --- /dev/null +++ b/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketinventory/v1beta1.py @@ -0,0 +1,414 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_coreweave_m_upbound_io_v1beta1_bucketinventory.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......k8s.apimachinery.pkg.apis.meta import v1 + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class BucketRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + namespace: str | None = None + """ + Namespace of the referenced object + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class BucketSelector(BaseModel): + matchControllerRef: bool | None = None + """ + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + """ + matchLabels: dict[str, str] | None = None + """ + MatchLabels ensures an object with matching labels is selected. + """ + namespace: str | None = None + """ + Namespace for the selector + """ + policy: Policy | None = None + """ + Policies for selection. + """ + + +class Bucket(BaseModel): + accountId: str | None = None + """ + (String) Account ID of the destination bucket owner. + Account ID of the destination bucket owner. + """ + bucketArn: str | None = None + """ + (String) ARN of the destination bucket. + ARN of the destination bucket. + """ + format: str | None = None + """ + (String) Output format: CSV, TSV, JSON, ORC, or Parquet. + Output format: `CSV`, `TSV`, `JSON`, `ORC`, or `Parquet`. + """ + prefix: str | None = None + """ + (String) Prefix prepended to the report output path. + Prefix prepended to the report output path. + """ + + +class Destination(BaseModel): + bucket: Bucket | None = None + """ + (String) Name of source bucket to which the inventory configuration applies + Required. Destination bucket for the report (may equal the source bucket). + """ + + +class Filter(BaseModel): + prefix: str | None = None + """ + (String) Prefix prepended to the report output path. + Source-object prefix to filter on. + """ + + +class Schedule(BaseModel): + frequency: str | None = None + """ + (String) How frequently the report is generated: Daily or Weekly. + How frequently the report is generated: `Daily` or `Weekly`. + """ + + +class ForProvider(BaseModel): + bucket: str | None = None + """ + (String) Name of source bucket to which the inventory configuration applies + Name of source bucket to which the inventory configuration applies + """ + bucketRef: BucketRef | None = None + """ + Reference to a Bucket in objectstorage to populate bucket. + """ + bucketSelector: BucketSelector | None = None + """ + Selector for a Bucket in objectstorage to populate bucket. + """ + destination: Destination | None = None + """ + (Block, Optional) Required. Where the inventory report is written. May be the same bucket as the source. The destination policy must grant the inventory service s3:PutObject and s3:AbortMultipartUpload on report objects. Use depends_on to apply that policy before the inventory configuration. Bucket policies are evaluated after organization policies; requests without a matching bucket grant are implicitly denied even if an organization policy allows them. The policy resource replaces the entire existing bucket policy, so retain all required statements. s3:PutBucketPolicy itself evaluates organization permissions only. See policy evaluation. (see below for nested schema) + Required. Where the inventory report is written. May be the same bucket as the source. The destination policy must grant the inventory service `s3:PutObject` and `s3:AbortMultipartUpload` on report objects. Use `depends_on` to apply that policy before the inventory configuration. Bucket policies are evaluated after organization policies; requests without a matching bucket grant are implicitly denied even if an organization policy allows them. The policy resource replaces the entire existing bucket policy, so retain all required statements. `s3:PutBucketPolicy` itself evaluates organization permissions only. See [policy evaluation](https://docs.coreweave.com/products/storage/object-storage/auth-access/policies#policy-evaluation). + """ + enabled: bool | None = None + """ + (Boolean) Whether the inventory configuration is enabled. Defaults to true. + Whether the inventory configuration is enabled. Defaults to `true`. + """ + filter: Filter | None = None + """ + (Block, Optional) Limits the inventory report to objects matching a prefix. (see below for nested schema) + Limits the inventory report to objects matching a prefix. + """ + includedObjectVersions: str | None = None + """ + (String) Object versions to include: All includes all versions; Current includes only current versions. + Object versions to include: `All` includes all versions; `Current` includes only current versions. + """ + name: str | None = None + """ + (String) Name of the inventory configuration. Must be unique within the bucket. + Name of the inventory configuration. Must be unique within the bucket. + """ + optionalFields: list[str] | None = None + """ + (Set of String) Additional report fields: Size, LastModifiedDate, LastAccessedDate, StorageClass, ETag, IsMultipartUploaded, EncryptionStatus, ChecksumAlgorithm. Omit to include no additional fields; an empty set is invalid. + Additional report fields: `Size`, `LastModifiedDate`, `LastAccessedDate`, `StorageClass`, `ETag`, `IsMultipartUploaded`, `EncryptionStatus`, `ChecksumAlgorithm`. Omit to include no additional fields; an empty set is invalid. + """ + schedule: Schedule | None = None + """ + (Block, Optional) Required. Schedule for generating the inventory report. (see below for nested schema) + Required. Schedule for generating the inventory report. + """ + + +class InitProvider(BaseModel): + bucket: str | None = None + """ + (String) Name of source bucket to which the inventory configuration applies + Name of source bucket to which the inventory configuration applies + """ + bucketRef: BucketRef | None = None + """ + Reference to a Bucket in objectstorage to populate bucket. + """ + bucketSelector: BucketSelector | None = None + """ + Selector for a Bucket in objectstorage to populate bucket. + """ + destination: Destination | None = None + """ + (Block, Optional) Required. Where the inventory report is written. May be the same bucket as the source. The destination policy must grant the inventory service s3:PutObject and s3:AbortMultipartUpload on report objects. Use depends_on to apply that policy before the inventory configuration. Bucket policies are evaluated after organization policies; requests without a matching bucket grant are implicitly denied even if an organization policy allows them. The policy resource replaces the entire existing bucket policy, so retain all required statements. s3:PutBucketPolicy itself evaluates organization permissions only. See policy evaluation. (see below for nested schema) + Required. Where the inventory report is written. May be the same bucket as the source. The destination policy must grant the inventory service `s3:PutObject` and `s3:AbortMultipartUpload` on report objects. Use `depends_on` to apply that policy before the inventory configuration. Bucket policies are evaluated after organization policies; requests without a matching bucket grant are implicitly denied even if an organization policy allows them. The policy resource replaces the entire existing bucket policy, so retain all required statements. `s3:PutBucketPolicy` itself evaluates organization permissions only. See [policy evaluation](https://docs.coreweave.com/products/storage/object-storage/auth-access/policies#policy-evaluation). + """ + enabled: bool | None = None + """ + (Boolean) Whether the inventory configuration is enabled. Defaults to true. + Whether the inventory configuration is enabled. Defaults to `true`. + """ + filter: Filter | None = None + """ + (Block, Optional) Limits the inventory report to objects matching a prefix. (see below for nested schema) + Limits the inventory report to objects matching a prefix. + """ + includedObjectVersions: str | None = None + """ + (String) Object versions to include: All includes all versions; Current includes only current versions. + Object versions to include: `All` includes all versions; `Current` includes only current versions. + """ + name: str | None = None + """ + (String) Name of the inventory configuration. Must be unique within the bucket. + Name of the inventory configuration. Must be unique within the bucket. + """ + optionalFields: list[str] | None = None + """ + (Set of String) Additional report fields: Size, LastModifiedDate, LastAccessedDate, StorageClass, ETag, IsMultipartUploaded, EncryptionStatus, ChecksumAlgorithm. Omit to include no additional fields; an empty set is invalid. + Additional report fields: `Size`, `LastModifiedDate`, `LastAccessedDate`, `StorageClass`, `ETag`, `IsMultipartUploaded`, `EncryptionStatus`, `ChecksumAlgorithm`. Omit to include no additional fields; an empty set is invalid. + """ + schedule: Schedule | None = None + """ + (Block, Optional) Required. Schedule for generating the inventory report. (see below for nested schema) + Required. Schedule for generating the inventory report. + """ + + +class ProviderConfigRef(BaseModel): + kind: str + """ + Kind of the referenced object. + """ + name: str + """ + Name of the referenced object. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + + +class Spec(BaseModel): + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'kind': 'ClusterProviderConfig', 'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + bucket: str | None = None + """ + (String) Name of source bucket to which the inventory configuration applies + Name of source bucket to which the inventory configuration applies + """ + destination: Destination | None = None + """ + (Block, Optional) Required. Where the inventory report is written. May be the same bucket as the source. The destination policy must grant the inventory service s3:PutObject and s3:AbortMultipartUpload on report objects. Use depends_on to apply that policy before the inventory configuration. Bucket policies are evaluated after organization policies; requests without a matching bucket grant are implicitly denied even if an organization policy allows them. The policy resource replaces the entire existing bucket policy, so retain all required statements. s3:PutBucketPolicy itself evaluates organization permissions only. See policy evaluation. (see below for nested schema) + Required. Where the inventory report is written. May be the same bucket as the source. The destination policy must grant the inventory service `s3:PutObject` and `s3:AbortMultipartUpload` on report objects. Use `depends_on` to apply that policy before the inventory configuration. Bucket policies are evaluated after organization policies; requests without a matching bucket grant are implicitly denied even if an organization policy allows them. The policy resource replaces the entire existing bucket policy, so retain all required statements. `s3:PutBucketPolicy` itself evaluates organization permissions only. See [policy evaluation](https://docs.coreweave.com/products/storage/object-storage/auth-access/policies#policy-evaluation). + """ + enabled: bool | None = None + """ + (Boolean) Whether the inventory configuration is enabled. Defaults to true. + Whether the inventory configuration is enabled. Defaults to `true`. + """ + filter: Filter | None = None + """ + (Block, Optional) Limits the inventory report to objects matching a prefix. (see below for nested schema) + Limits the inventory report to objects matching a prefix. + """ + id: str | None = None + includedObjectVersions: str | None = None + """ + (String) Object versions to include: All includes all versions; Current includes only current versions. + Object versions to include: `All` includes all versions; `Current` includes only current versions. + """ + name: str | None = None + """ + (String) Name of the inventory configuration. Must be unique within the bucket. + Name of the inventory configuration. Must be unique within the bucket. + """ + optionalFields: list[str] | None = None + """ + (Set of String) Additional report fields: Size, LastModifiedDate, LastAccessedDate, StorageClass, ETag, IsMultipartUploaded, EncryptionStatus, ChecksumAlgorithm. Omit to include no additional fields; an empty set is invalid. + Additional report fields: `Size`, `LastModifiedDate`, `LastAccessedDate`, `StorageClass`, `ETag`, `IsMultipartUploaded`, `EncryptionStatus`, `ChecksumAlgorithm`. Omit to include no additional fields; an empty set is invalid. + """ + schedule: Schedule | None = None + """ + (Block, Optional) Required. Schedule for generating the inventory report. (see below for nested schema) + Required. Schedule for generating the inventory report. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class BucketInventory(BaseModel): + apiVersion: Literal['objectstorage.coreweave.m.upbound.io/v1beta1'] | None = ( + 'objectstorage.coreweave.m.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['BucketInventory'] | None = 'BucketInventory' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + BucketInventorySpec defines the desired state of BucketInventory + """ + status: Status | None = None + """ + BucketInventoryStatus defines the observed state of BucketInventory. + """ + + +class BucketInventoryList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[BucketInventory] + """ + List of bucketinventories. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketlifecycleconfiguration/__init__.py b/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketlifecycleconfiguration/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketlifecycleconfiguration/v1beta1.py b/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketlifecycleconfiguration/v1beta1.py new file mode 100644 index 000000000..9c436fce8 --- /dev/null +++ b/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketlifecycleconfiguration/v1beta1.py @@ -0,0 +1,462 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_coreweave_m_upbound_io_v1beta1_bucketlifecycleconfiguration.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......k8s.apimachinery.pkg.apis.meta import v1 + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class BucketRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + namespace: str | None = None + """ + Namespace of the referenced object + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class BucketSelector(BaseModel): + matchControllerRef: bool | None = None + """ + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + """ + matchLabels: dict[str, str] | None = None + """ + MatchLabels ensures an object with matching labels is selected. + """ + namespace: str | None = None + """ + Namespace for the selector + """ + policy: Policy | None = None + """ + Policies for selection. + """ + + +class AbortIncompleteMultipartUpload(BaseModel): + daysAfterInitiation: float | None = None + """ + (Number) Days after initiation to abort multipart uploads + Days after initiation to abort multipart uploads + """ + + +class Expiration(BaseModel): + date: str | None = None + """ + (String) ISO8601 date when objects expire + ISO8601 date when objects expire + """ + days: float | None = None + """ + (Number) Number of days after object creation for expiration + Number of days after object creation for expiration + """ + expiredObjectDeleteMarker: bool | None = None + """ + (Boolean) Whether to remove expired delete markers + Whether to remove expired delete markers + """ + + +class And(BaseModel): + objectSizeGreaterThan: float | None = None + """ + (Number) Minimum object size (in bytes) to which the rule applies. + Minimum object size (in bytes) to which the rule applies. + """ + objectSizeLessThan: float | None = None + """ + (Number) Maximum object size (in bytes) to which the rule applies. + Maximum object size (in bytes) to which the rule applies. + """ + prefix: str | None = None + """ + (String, Deprecated) Deprecated. Object key prefix to which the rule applies. CoreWeave AI Object Storage rejects requests that set this field; use filter.prefix instead. + Prefix identifying one or more objects to which the rule applies. + """ + tags: dict[str, str] | None = None + """ + (Map of String) Map for specifying tag keys and values. + Map for specifying tag keys and values. + """ + + +class Tag(BaseModel): + key: str | None = None + """ + (String) Tag key filter + Tag key filter + """ + value: str | None = None + """ + (String) Tag value filter + Tag value filter + """ + + +class Filter(BaseModel): + and_: And | None = Field(None, alias='and') + """ + (Block, Optional) Configuration block used to apply a logical AND to two or more predicates. The Lifecycle Rule will apply to any object matching all the predicates configured inside the and block. (see below for nested schema) + Configuration block used to apply a logical AND to two or more predicates. The Lifecycle Rule will apply to any object matching all the predicates configured inside the and block. + """ + objectSizeGreaterThan: float | None = None + """ + (Number) Minimum object size (in bytes) to which the rule applies. + Minimum object size (in bytes) to which the rule applies. + """ + objectSizeLessThan: float | None = None + """ + (Number) Maximum object size (in bytes) to which the rule applies. + Maximum object size (in bytes) to which the rule applies. + """ + prefix: str | None = None + """ + (String, Deprecated) Deprecated. Object key prefix to which the rule applies. CoreWeave AI Object Storage rejects requests that set this field; use filter.prefix instead. + Prefix filter + """ + tag: Tag | None = None + """ + (Block, Optional) (see below for nested schema) + """ + + +class NoncurrentVersionExpiration(BaseModel): + newerNoncurrentVersions: float | None = None + """ + (Number) Number of noncurrent versions to retain + Number of noncurrent versions to retain + """ + noncurrentDays: float | None = None + """ + (Number) Days after becoming noncurrent before deletion + Days after becoming noncurrent before deletion + """ + + +class NoncurrentVersionTransitionItem(BaseModel): + newerNoncurrentVersions: float | None = None + """ + (Number) Number of noncurrent versions to retain + Number of noncurrent versions to retain + """ + noncurrentDays: float | None = None + """ + (Number) Days after becoming noncurrent before deletion + Number of days after object becomes noncurrent before the transition may occur + """ + storageClass: str | None = None + """ + (String) Storage class to transition noncurrent objects to + Storage class to transition noncurrent objects to + """ + + +class TransitionItem(BaseModel): + date: str | None = None + """ + (String) ISO8601 date when objects expire + ISO8601 date when objects transition + """ + days: float | None = None + """ + (Number) Number of days after object creation for expiration + Number of days after object creation for transition + """ + storageClass: str | None = None + """ + (String) Storage class to transition noncurrent objects to + Storage class to transition objects to + """ + + +class RuleItem(BaseModel): + abortIncompleteMultipartUpload: AbortIncompleteMultipartUpload | None = None + """ + (Block, Optional) (see below for nested schema) + """ + expiration: Expiration | None = None + """ + (Block, Optional) (see below for nested schema) + """ + filter: Filter | None = None + """ + (Block, Optional) (see below for nested schema) + """ + id: str | None = None + """ + (String) Unique identifier for the rule + Unique identifier for the rule + """ + noncurrentVersionExpiration: NoncurrentVersionExpiration | None = None + """ + (Block, Optional) (see below for nested schema) + """ + noncurrentVersionTransition: list[NoncurrentVersionTransitionItem] | None = None + """ + (Block Set) (see below for nested schema) + """ + prefix: str | None = None + """ + (String, Deprecated) Deprecated. Object key prefix to which the rule applies. CoreWeave AI Object Storage rejects requests that set this field; use filter.prefix instead. + Deprecated. Object key prefix to which the rule applies. CoreWeave AI Object Storage rejects requests that set this field; use `filter.prefix` instead. + """ + status: str | None = None + """ + (String) Rule status: Enabled or Disabled + Rule status: Enabled or Disabled + """ + transition: list[TransitionItem] | None = None + """ + (Block Set) (see below for nested schema) + """ + + +class ForProvider(BaseModel): + bucket: str | None = None + """ + (String) Name of the bucket to apply lifecycle configuration to + Name of the bucket to apply lifecycle configuration to + """ + bucketRef: BucketRef | None = None + """ + Reference to a Bucket in objectstorage to populate bucket. + """ + bucketSelector: BucketSelector | None = None + """ + Selector for a Bucket in objectstorage to populate bucket. + """ + rule: list[RuleItem] | None = None + """ + (Block List) One or more lifecycle rule blocks (see below for nested schema) + One or more lifecycle rule blocks + """ + + +class InitProvider(BaseModel): + bucket: str | None = None + """ + (String) Name of the bucket to apply lifecycle configuration to + Name of the bucket to apply lifecycle configuration to + """ + bucketRef: BucketRef | None = None + """ + Reference to a Bucket in objectstorage to populate bucket. + """ + bucketSelector: BucketSelector | None = None + """ + Selector for a Bucket in objectstorage to populate bucket. + """ + rule: list[RuleItem] | None = None + """ + (Block List) One or more lifecycle rule blocks (see below for nested schema) + One or more lifecycle rule blocks + """ + + +class ProviderConfigRef(BaseModel): + kind: str + """ + Kind of the referenced object. + """ + name: str + """ + Name of the referenced object. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + + +class Spec(BaseModel): + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'kind': 'ClusterProviderConfig', 'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + bucket: str | None = None + """ + (String) Name of the bucket to apply lifecycle configuration to + Name of the bucket to apply lifecycle configuration to + """ + id: str | None = None + """ + (String) Unique identifier for the rule + """ + rule: list[RuleItem] | None = None + """ + (Block List) One or more lifecycle rule blocks (see below for nested schema) + One or more lifecycle rule blocks + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class BucketLifecycleConfiguration(BaseModel): + apiVersion: Literal['objectstorage.coreweave.m.upbound.io/v1beta1'] | None = ( + 'objectstorage.coreweave.m.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['BucketLifecycleConfiguration'] | None = ( + 'BucketLifecycleConfiguration' + ) + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + BucketLifecycleConfigurationSpec defines the desired state of BucketLifecycleConfiguration + """ + status: Status | None = None + """ + BucketLifecycleConfigurationStatus defines the observed state of BucketLifecycleConfiguration. + """ + + +class BucketLifecycleConfigurationList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[BucketLifecycleConfiguration] + """ + List of bucketlifecycleconfigurations. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketpolicy/__init__.py b/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketpolicy/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketpolicy/v1beta1.py b/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketpolicy/v1beta1.py new file mode 100644 index 000000000..d26189a60 --- /dev/null +++ b/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketpolicy/v1beta1.py @@ -0,0 +1,277 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_coreweave_m_upbound_io_v1beta1_bucketpolicy.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......k8s.apimachinery.pkg.apis.meta import v1 + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class BucketRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + namespace: str | None = None + """ + Namespace of the referenced object + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class BucketSelector(BaseModel): + matchControllerRef: bool | None = None + """ + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + """ + matchLabels: dict[str, str] | None = None + """ + MatchLabels ensures an object with matching labels is selected. + """ + namespace: str | None = None + """ + Namespace for the selector + """ + policy: Policy | None = None + """ + Policies for selection. + """ + + +class ForProvider(BaseModel): + bucket: str | None = None + """ + (String) The name of the bucket for which to apply this policy. + The name of the bucket for which to apply this policy. + """ + bucketRef: BucketRef | None = None + """ + Reference to a Bucket in objectstorage to populate bucket. + """ + bucketSelector: BucketSelector | None = None + """ + Selector for a Bucket in objectstorage to populate bucket. + """ + policy: str | None = None + """ + (String) Text of the policy. Must be valid JSON. The coreweave_object_storage_bucket_policy_document data source may be used, simply reference the .json attribute of the data source. + Text of the policy. Must be valid JSON. The coreweave_object_storage_bucket_policy_document data source may be used, simply reference the `.json` attribute of the data source. + """ + + +class InitProvider(BaseModel): + bucket: str | None = None + """ + (String) The name of the bucket for which to apply this policy. + The name of the bucket for which to apply this policy. + """ + bucketRef: BucketRef | None = None + """ + Reference to a Bucket in objectstorage to populate bucket. + """ + bucketSelector: BucketSelector | None = None + """ + Selector for a Bucket in objectstorage to populate bucket. + """ + policy: str | None = None + """ + (String) Text of the policy. Must be valid JSON. The coreweave_object_storage_bucket_policy_document data source may be used, simply reference the .json attribute of the data source. + Text of the policy. Must be valid JSON. The coreweave_object_storage_bucket_policy_document data source may be used, simply reference the `.json` attribute of the data source. + """ + + +class ProviderConfigRef(BaseModel): + kind: str + """ + Kind of the referenced object. + """ + name: str + """ + Name of the referenced object. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + + +class Spec(BaseModel): + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'kind': 'ClusterProviderConfig', 'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + bucket: str | None = None + """ + (String) The name of the bucket for which to apply this policy. + The name of the bucket for which to apply this policy. + """ + id: str | None = None + policy: str | None = None + """ + (String) Text of the policy. Must be valid JSON. The coreweave_object_storage_bucket_policy_document data source may be used, simply reference the .json attribute of the data source. + Text of the policy. Must be valid JSON. The coreweave_object_storage_bucket_policy_document data source may be used, simply reference the `.json` attribute of the data source. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class BucketPolicy(BaseModel): + apiVersion: Literal['objectstorage.coreweave.m.upbound.io/v1beta1'] | None = ( + 'objectstorage.coreweave.m.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['BucketPolicy'] | None = 'BucketPolicy' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + BucketPolicySpec defines the desired state of BucketPolicy + """ + status: Status | None = None + """ + BucketPolicyStatus defines the observed state of BucketPolicy. + """ + + +class BucketPolicyList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[BucketPolicy] + """ + List of bucketpolicies. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketsettings/__init__.py b/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketsettings/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketsettings/v1beta1.py b/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketsettings/v1beta1.py new file mode 100644 index 000000000..87335f987 --- /dev/null +++ b/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketsettings/v1beta1.py @@ -0,0 +1,322 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_coreweave_m_upbound_io_v1beta1_bucketsettings.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......k8s.apimachinery.pkg.apis.meta import v1 + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class BucketRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + namespace: str | None = None + """ + Namespace of the referenced object + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class BucketSelector(BaseModel): + matchControllerRef: bool | None = None + """ + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + """ + matchLabels: dict[str, str] | None = None + """ + MatchLabels ensures an object with matching labels is selected. + """ + namespace: str | None = None + """ + Namespace for the selector + """ + policy: Policy | None = None + """ + Policies for selection. + """ + + +class ForProvider(BaseModel): + archiveAfterLastAccessDays: float | None = None + """ + side. Required when archive_enabled is true, and rejected otherwise. + Days since last access (or creation if never accessed) before a STANDARD object version is archived to STANDARD_IA. The default minimum is 60; your organization's entitlement may permit a different minimum, so the effective floor is validated server-side. Required when `archive_enabled` is true, and rejected otherwise. + """ + archiveEnabled: bool | None = None + """ + (Boolean) When true, idle STANDARD objects are archived to STANDARD_IA after archive_after_last_access_days without access. Your organization must be entitled to configure this setting. + When true, idle STANDARD objects are archived to STANDARD_IA after `archive_after_last_access_days` without access. Your organization must be entitled to configure this setting. + """ + auditLoggingEnabled: bool | None = None + """ + (Boolean) Whether audit logging is enabled for the bucket. Contact support to enable audit logging for your organization before enabling this setting. + Whether audit logging is enabled for the bucket. Contact support to enable audit logging for your organization before enabling this setting. + """ + bucket: str | None = None + """ + (String) The name of the bucket to manage settings for. + The name of the bucket to manage settings for. + """ + bucketRef: BucketRef | None = None + """ + Reference to a Bucket in objectstorage to populate bucket. + """ + bucketSelector: BucketSelector | None = None + """ + Selector for a Bucket in objectstorage to populate bucket. + """ + capacityCapBytes: float | None = None + """ + class bytes the bucket may store. New STANDARD writes are rejected once bucket usage would exceed this cap; 0 is a valid cap that blocks all new STANDARD writes. Omit to leave the cap unchanged. Removing this resource leaves any cap in place; the cap is cleared when the bucket itself is deleted. Your organization must be entitled to configure this setting. + Maximum number of STANDARD-class bytes the bucket may store. New STANDARD writes are rejected once bucket usage would exceed this cap; `0` is a valid cap that blocks all new STANDARD writes. Omit to leave the cap unchanged. Removing this resource leaves any cap in place; the cap is cleared when the bucket itself is deleted. Your organization must be entitled to configure this setting. + """ + + +class InitProvider(BaseModel): + archiveAfterLastAccessDays: float | None = None + """ + side. Required when archive_enabled is true, and rejected otherwise. + Days since last access (or creation if never accessed) before a STANDARD object version is archived to STANDARD_IA. The default minimum is 60; your organization's entitlement may permit a different minimum, so the effective floor is validated server-side. Required when `archive_enabled` is true, and rejected otherwise. + """ + archiveEnabled: bool | None = None + """ + (Boolean) When true, idle STANDARD objects are archived to STANDARD_IA after archive_after_last_access_days without access. Your organization must be entitled to configure this setting. + When true, idle STANDARD objects are archived to STANDARD_IA after `archive_after_last_access_days` without access. Your organization must be entitled to configure this setting. + """ + auditLoggingEnabled: bool | None = None + """ + (Boolean) Whether audit logging is enabled for the bucket. Contact support to enable audit logging for your organization before enabling this setting. + Whether audit logging is enabled for the bucket. Contact support to enable audit logging for your organization before enabling this setting. + """ + bucket: str | None = None + """ + (String) The name of the bucket to manage settings for. + The name of the bucket to manage settings for. + """ + bucketRef: BucketRef | None = None + """ + Reference to a Bucket in objectstorage to populate bucket. + """ + bucketSelector: BucketSelector | None = None + """ + Selector for a Bucket in objectstorage to populate bucket. + """ + capacityCapBytes: float | None = None + """ + class bytes the bucket may store. New STANDARD writes are rejected once bucket usage would exceed this cap; 0 is a valid cap that blocks all new STANDARD writes. Omit to leave the cap unchanged. Removing this resource leaves any cap in place; the cap is cleared when the bucket itself is deleted. Your organization must be entitled to configure this setting. + Maximum number of STANDARD-class bytes the bucket may store. New STANDARD writes are rejected once bucket usage would exceed this cap; `0` is a valid cap that blocks all new STANDARD writes. Omit to leave the cap unchanged. Removing this resource leaves any cap in place; the cap is cleared when the bucket itself is deleted. Your organization must be entitled to configure this setting. + """ + + +class ProviderConfigRef(BaseModel): + kind: str + """ + Kind of the referenced object. + """ + name: str + """ + Name of the referenced object. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + + +class Spec(BaseModel): + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'kind': 'ClusterProviderConfig', 'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + archiveAfterLastAccessDays: float | None = None + """ + side. Required when archive_enabled is true, and rejected otherwise. + Days since last access (or creation if never accessed) before a STANDARD object version is archived to STANDARD_IA. The default minimum is 60; your organization's entitlement may permit a different minimum, so the effective floor is validated server-side. Required when `archive_enabled` is true, and rejected otherwise. + """ + archiveEnabled: bool | None = None + """ + (Boolean) When true, idle STANDARD objects are archived to STANDARD_IA after archive_after_last_access_days without access. Your organization must be entitled to configure this setting. + When true, idle STANDARD objects are archived to STANDARD_IA after `archive_after_last_access_days` without access. Your organization must be entitled to configure this setting. + """ + auditLoggingEnabled: bool | None = None + """ + (Boolean) Whether audit logging is enabled for the bucket. Contact support to enable audit logging for your organization before enabling this setting. + Whether audit logging is enabled for the bucket. Contact support to enable audit logging for your organization before enabling this setting. + """ + bucket: str | None = None + """ + (String) The name of the bucket to manage settings for. + The name of the bucket to manage settings for. + """ + capacityCapBytes: float | None = None + """ + class bytes the bucket may store. New STANDARD writes are rejected once bucket usage would exceed this cap; 0 is a valid cap that blocks all new STANDARD writes. Omit to leave the cap unchanged. Removing this resource leaves any cap in place; the cap is cleared when the bucket itself is deleted. Your organization must be entitled to configure this setting. + Maximum number of STANDARD-class bytes the bucket may store. New STANDARD writes are rejected once bucket usage would exceed this cap; `0` is a valid cap that blocks all new STANDARD writes. Omit to leave the cap unchanged. Removing this resource leaves any cap in place; the cap is cleared when the bucket itself is deleted. Your organization must be entitled to configure this setting. + """ + id: str | None = None + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class BucketSettings(BaseModel): + apiVersion: Literal['objectstorage.coreweave.m.upbound.io/v1beta1'] | None = ( + 'objectstorage.coreweave.m.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['BucketSettings'] | None = 'BucketSettings' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + BucketSettingsSpec defines the desired state of BucketSettings + """ + status: Status | None = None + """ + BucketSettingsStatus defines the observed state of BucketSettings. + """ + + +class BucketSettingsList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[BucketSettings] + """ + List of bucketsettings. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketversioning/__init__.py b/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketversioning/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketversioning/v1beta1.py b/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketversioning/v1beta1.py new file mode 100644 index 000000000..9405db184 --- /dev/null +++ b/schemas/python/models/io/upbound/m/coreweave/objectstorage/bucketversioning/v1beta1.py @@ -0,0 +1,282 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_coreweave_m_upbound_io_v1beta1_bucketversioning.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......k8s.apimachinery.pkg.apis.meta import v1 + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class BucketRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + namespace: str | None = None + """ + Namespace of the referenced object + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class BucketSelector(BaseModel): + matchControllerRef: bool | None = None + """ + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + """ + matchLabels: dict[str, str] | None = None + """ + MatchLabels ensures an object with matching labels is selected. + """ + namespace: str | None = None + """ + Namespace for the selector + """ + policy: Policy | None = None + """ + Policies for selection. + """ + + +class VersioningConfiguration(BaseModel): + status: str | None = None + """ + (String) Versioning state of the bucket. Valid values: Enabled, Suspended, or Disabled. Disabled should only be used when creating or importing resources that correspond to unversioned S3 buckets since the S3 API does not allow setting an Enabled/Suspended bucket to Disabled. + Versioning state of the bucket. Valid values: Enabled, Suspended, or Disabled. Disabled should only be used when creating or importing resources that correspond to unversioned S3 buckets since the S3 API does not allow setting an Enabled/Suspended bucket to Disabled. + """ + + +class ForProvider(BaseModel): + bucket: str | None = None + """ + (String) The bucket on which to enable or suspend versioning. + The bucket on which to enable or suspend versioning. + """ + bucketRef: BucketRef | None = None + """ + Reference to a Bucket in objectstorage to populate bucket. + """ + bucketSelector: BucketSelector | None = None + """ + Selector for a Bucket in objectstorage to populate bucket. + """ + versioningConfiguration: VersioningConfiguration | None = None + """ + (Block, Optional) (see below for nested schema) + """ + + +class InitProvider(BaseModel): + bucket: str | None = None + """ + (String) The bucket on which to enable or suspend versioning. + The bucket on which to enable or suspend versioning. + """ + bucketRef: BucketRef | None = None + """ + Reference to a Bucket in objectstorage to populate bucket. + """ + bucketSelector: BucketSelector | None = None + """ + Selector for a Bucket in objectstorage to populate bucket. + """ + versioningConfiguration: VersioningConfiguration | None = None + """ + (Block, Optional) (see below for nested schema) + """ + + +class ProviderConfigRef(BaseModel): + kind: str + """ + Kind of the referenced object. + """ + name: str + """ + Name of the referenced object. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + + +class Spec(BaseModel): + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'kind': 'ClusterProviderConfig', 'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + bucket: str | None = None + """ + (String) The bucket on which to enable or suspend versioning. + The bucket on which to enable or suspend versioning. + """ + id: str | None = None + versioningConfiguration: VersioningConfiguration | None = None + """ + (Block, Optional) (see below for nested schema) + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class BucketVersioning(BaseModel): + apiVersion: Literal['objectstorage.coreweave.m.upbound.io/v1beta1'] | None = ( + 'objectstorage.coreweave.m.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['BucketVersioning'] | None = 'BucketVersioning' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + BucketVersioningSpec defines the desired state of BucketVersioning + """ + status: Status | None = None + """ + BucketVersioningStatus defines the observed state of BucketVersioning. + """ + + +class BucketVersioningList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[BucketVersioning] + """ + List of bucketversionings. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/m/coreweave/objectstorage/organizationaccesspolicy/__init__.py b/schemas/python/models/io/upbound/m/coreweave/objectstorage/organizationaccesspolicy/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/objectstorage/organizationaccesspolicy/v1beta1.py b/schemas/python/models/io/upbound/m/coreweave/objectstorage/organizationaccesspolicy/v1beta1.py new file mode 100644 index 000000000..171151f71 --- /dev/null +++ b/schemas/python/models/io/upbound/m/coreweave/objectstorage/organizationaccesspolicy/v1beta1.py @@ -0,0 +1,219 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_coreweave_m_upbound_io_v1beta1_organizationaccesspolicy.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......k8s.apimachinery.pkg.apis.meta import v1 + + +class Statement(BaseModel): + actions: list[str] | None = None + """ + S3 (s3:) and AI Object Storage API (cwobject:). You can use wildcards (like s3:* or cwobject:*) to cover multiple actions at once. + Defines which operations the policy allows or denies. Organization access policies can include actions from two APIs - S3 (s3:*) and AI Object Storage API (cwobject:*). You can use wildcards (like s3:* or cwobject:*) to cover multiple actions at once. + """ + effect: str | None = None + """ + sensitive). Determines whether the statement grants or denies the specified actions on the listed resources for the designated principals. By default, all access is denied. + Must be either Allow or Deny (case-sensitive). Determines whether the statement grants or denies the specified actions on the listed resources for the designated principals. By default, all access is denied. + """ + name: str | None = None + """ + (String) The name of the organization access policy, must be unique. + A short, human-readable identifier for this specific policy statement, similar to Sid in bucket access policies. + """ + principals: list[str] | None = None + """ + form identifiers are supported. If you use a full ARN, the policy will fail with an error. See the AI Object Storage documentation for guidelines on defining principals. + Defines which users, roles, or groups the policy applies to. Only short-form identifiers are supported. If you use a full ARN, the policy will fail with an error. See the [AI Object Storage documentation](https://docs.coreweave.com/products/storage/object-storage/auth-access/organization-policies/about) for guidelines on defining principals. + """ + resources: list[str] | None = None + """ + (Set of String) Defines which resources the policy applies to. See the AI Object Storage documentation for guidelines on defining resources. + Defines which resources the policy applies to. See the [AI Object Storage documentation](https://docs.coreweave.com/products/storage/object-storage/auth-access/organization-policies/about) for guidelines on defining resources. + """ + + +class ForProvider(BaseModel): + statements: list[Statement] | None = None + """ + (Attributes Set) The list of access policy statements associated with this policy. At least one statement is required. (see below for nested schema) + """ + + +class InitProvider(BaseModel): + statements: list[Statement] | None = None + """ + (Attributes Set) The list of access policy statements associated with this policy. At least one statement is required. (see below for nested schema) + """ + + +class ProviderConfigRef(BaseModel): + kind: str + """ + Kind of the referenced object. + """ + name: str + """ + Name of the referenced object. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + + +class Spec(BaseModel): + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'kind': 'ClusterProviderConfig', 'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + id: str | None = None + statements: list[Statement] | None = None + """ + (Attributes Set) The list of access policy statements associated with this policy. At least one statement is required. (see below for nested schema) + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class OrganizationAccessPolicy(BaseModel): + apiVersion: Literal['objectstorage.coreweave.m.upbound.io/v1beta1'] | None = ( + 'objectstorage.coreweave.m.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['OrganizationAccessPolicy'] | None = 'OrganizationAccessPolicy' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + OrganizationAccessPolicySpec defines the desired state of OrganizationAccessPolicy + """ + status: Status | None = None + """ + OrganizationAccessPolicyStatus defines the observed state of OrganizationAccessPolicy. + """ + + +class OrganizationAccessPolicyList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[OrganizationAccessPolicy] + """ + List of organizationaccesspolicies. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/m/coreweave/providerconfig/__init__.py b/schemas/python/models/io/upbound/m/coreweave/providerconfig/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/providerconfig/v1beta1.py b/schemas/python/models/io/upbound/m/coreweave/providerconfig/v1beta1.py new file mode 100644 index 000000000..5f5c489dd --- /dev/null +++ b/schemas/python/models/io/upbound/m/coreweave/providerconfig/v1beta1.py @@ -0,0 +1,194 @@ +# generated by datamodel-codegen: +# filename: workdir/coreweave_m_upbound_io_v1beta1_providerconfig.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel + +from .....k8s.apimachinery.pkg.apis.meta import v1 + + +class Env(BaseModel): + name: str + """ + Name is the name of an environment variable. + """ + + +class Fs(BaseModel): + path: str + """ + Path is a filesystem path. + """ + + +class SecretRef(BaseModel): + key: str + name: str + """ + Name of the secret. + """ + + +class Credentials(BaseModel): + env: Env | None = None + """ + Env is a reference to an environment variable that contains credentials + that must be used to connect to the provider. + """ + fs: Fs | None = None + """ + Fs is a reference to a filesystem location that contains credentials that + must be used to connect to the provider. + """ + secretRef: SecretRef | None = None + """ + A SecretRef is a reference to a secret key in the same namespace as the + referencing managed resource that contains the credentials that must be + used to connect to the provider. + """ + source: Literal['None', 'Secret', 'InjectedIdentity', 'Environment', 'Filesystem'] + """ + Source of the provider credentials. + """ + + +class ExponentialFailureRateLimiter(BaseModel): + baseDelay: str | None = None + """ + BaseDelay is the initial delay between retries. + """ + maxDelay: str | None = None + """ + MaxDelay is the maximum delay between retries. + """ + + +class ReconciliationPolicy(BaseModel): + exponentialFailureRateLimiter: ExponentialFailureRateLimiter | None = None + """ + ExponentialFailureRateLimiter, when set, overrides the parameters of the + exponential failure rate limiter used to schedule retries for the + managed resource that this policy applies to. + """ + + +class Spec(BaseModel): + credentials: Credentials + """ + Credentials required to authenticate to this provider. + """ + endpoint: str | None = None + """ + Endpoint is the CoreWeave API endpoint. Defaults to + https://api.coreweave.com/ when omitted. + """ + httpTimeout: str | None = None + """ + HTTPTimeout is the timeout of each CoreWeave API and Object Storage HTTP + attempt, as a Go duration such as "30s". When omitted, API attempts time + out after 10s and Object Storage attempts after 30s. + """ + reconciliationPolicy: ReconciliationPolicy | None = None + """ + ReconciliationPolicy configures how a managed resource is reconciled. + It currently allows overriding the controller's failure rate limiter + parameters on a per-resource basis via ExponentialFailureRateLimiter. + """ + s3Endpoint: str | None = None + """ + S3Endpoint is the CoreWeave Object Storage endpoint. Defaults to + https://cwobject.com when omitted. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + users: int | None = None + """ + Users of this provider configuration. + """ + + +class ProviderConfig(BaseModel): + apiVersion: Literal['coreweave.m.upbound.io/v1beta1'] | None = ( + 'coreweave.m.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['ProviderConfig'] | None = 'ProviderConfig' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + A NamespacedProviderConfigSpec defines the desired state of a namespaced + ProviderConfig. It mirrors ProviderConfigSpec but its credential secret + references omit the namespace: they implicitly resolve to the namespace of + the referencing managed resource. + """ + status: Status | None = None + """ + A ProviderConfigStatus reflects the observed state of a ProviderConfig. + """ + + +class ProviderConfigList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[ProviderConfig] + """ + List of providerconfigs. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/m/coreweave/providerconfigusage/__init__.py b/schemas/python/models/io/upbound/m/coreweave/providerconfigusage/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/providerconfigusage/v1beta1.py b/schemas/python/models/io/upbound/m/coreweave/providerconfigusage/v1beta1.py new file mode 100644 index 000000000..ed957e6ba --- /dev/null +++ b/schemas/python/models/io/upbound/m/coreweave/providerconfigusage/v1beta1.py @@ -0,0 +1,84 @@ +# generated by datamodel-codegen: +# filename: workdir/coreweave_m_upbound_io_v1beta1_providerconfigusage.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import BaseModel + +from .....k8s.apimachinery.pkg.apis.meta import v1 + + +class ProviderConfigRef(BaseModel): + kind: str + """ + Kind of the referenced object. + """ + name: str + """ + Name of the referenced object. + """ + + +class ResourceRef(BaseModel): + apiVersion: str + """ + APIVersion of the referenced object. + """ + kind: str + """ + Kind of the referenced object. + """ + name: str + """ + Name of the referenced object. + """ + uid: str | None = None + """ + UID of the referenced object. + """ + + +class ProviderConfigUsage(BaseModel): + apiVersion: Literal['coreweave.m.upbound.io/v1beta1'] | None = ( + 'coreweave.m.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['ProviderConfigUsage'] | None = 'ProviderConfigUsage' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + providerConfigRef: ProviderConfigRef + """ + ProviderConfigReference to the provider config being used. + """ + resourceRef: ResourceRef + """ + ResourceReference to the managed resource using the provider config. + """ + + +class ProviderConfigUsageList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[ProviderConfigUsage] + """ + List of providerconfigusages. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/m/coreweave/sandbox/__init__.py b/schemas/python/models/io/upbound/m/coreweave/sandbox/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/sandbox/managedrunner/__init__.py b/schemas/python/models/io/upbound/m/coreweave/sandbox/managedrunner/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/sandbox/managedrunner/v1beta1.py b/schemas/python/models/io/upbound/m/coreweave/sandbox/managedrunner/v1beta1.py new file mode 100644 index 000000000..1835aa083 --- /dev/null +++ b/schemas/python/models/io/upbound/m/coreweave/sandbox/managedrunner/v1beta1.py @@ -0,0 +1,1552 @@ +# generated by datamodel-codegen: +# filename: workdir/sandbox_coreweave_m_upbound_io_v1beta1_managedrunner.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......k8s.apimachinery.pkg.apis.meta import v1 + + +class Policy(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class ClusterIdRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + namespace: str | None = None + """ + Namespace of the referenced object + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class ClusterIdSelector(BaseModel): + matchControllerRef: bool | None = None + """ + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + """ + matchLabels: dict[str, str] | None = None + """ + MatchLabels ensures an object with matching labels is selected. + """ + namespace: str | None = None + """ + Namespace for the selector + """ + policy: Policy | None = None + """ + Policies for selection. + """ + + +class BaseSecretRef(BaseModel): + key: str + name: str + """ + Name of the secret. + """ + + +class Image(BaseModel): + allowedImages: list[str] | None = None + """ + (Set of String) Allowed image references. Empty permits any image within the registry restrictions. + Allowed image references. Empty permits any image within the registry restrictions. + """ + allowedRegistries: list[str] | None = None + """ + (Set of String) Allowed registry prefixes. Empty permits any registry. + Allowed registry prefixes. Empty permits any registry. + """ + + +class Instance(BaseModel): + allowedInstanceTypes: list[str] | None = None + """ + (Set of String) Allowed instance types. Empty permits any offered by the runner. + Allowed instance types. Empty permits any offered by the runner. + """ + + +class Lifecycle(BaseModel): + defaultLifetimeSeconds: float | None = None + """ + (Number) Default sandbox lifetime in seconds; zero leaves the platform default. Maximum 30 days. + Default sandbox lifetime in seconds; zero leaves the platform default. Maximum 30 days. + """ + + +class Metadata(BaseModel): + deniedAnnotationPrefixes: list[str] | None = None + """ + (Set of String) Rejected annotation key prefixes. + Rejected annotation key prefixes. + """ + maxAnnotationCount: float | None = None + """ + (Number) Maximum annotations; zero means no limit. + Maximum annotations; zero means no limit. + """ + + +class Cidr(BaseModel): + cidr: str | None = None + """ + outs. (see below for nested schema) + IPv4 or IPv6 CIDR. + """ + except_: list[str] | None = Field(None, alias='except') + """ + (Set of String) Excluded subranges. + Excluded subranges. + """ + + +class Port(BaseModel): + endPort: float | None = None + """ + (Number) Inclusive end port; zero or omitted means a single port. + Inclusive end port; zero or omitted means a single port. + """ + port: float | None = None + """ + (Number) Starting port. + Starting port. + """ + protocol: str | None = None + """ + (String) TCP (default), UDP, or SCTP. + TCP (default), UDP, or SCTP. + """ + + +class Selector(BaseModel): + namespaceLabels: dict[str, str] | None = None + """ + (Map of String) Namespace labels to match. Omitted means the sandbox's own namespace. + Namespace labels to match. Omitted means the sandbox's own namespace. + """ + podLabels: dict[str, str] | None = None + """ + (Map of String) Pod labels to match (at least one required). + Pod labels to match (at least one required). + """ + + +class AllowedEgres(BaseModel): + any: bool | None = None + """ + shaped peer. + Set to true to select any address-shaped peer. + """ + cidr: Cidr | None = None + """ + outs. (see below for nested schema) + """ + dnsName: str | None = None + """ + (String, Deprecated) Deprecated alias for https_hostname. + Deprecated alias for https_hostname. + """ + dnsNameExcept: list[str] | None = None + """ + (Set of String, Deprecated) Deprecated alias for https_hostname_except. + Deprecated alias for https_hostname_except. + """ + httpsHostname: str | None = None + """ + (String) Exact HTTPS hostname or a single leftmost wildcard label; * is allowed only in allowed_egress. + Exact HTTPS hostname or a single leftmost wildcard label; `*` is allowed only in allowed_egress. + """ + httpsHostnameExcept: list[str] | None = None + """ + (Set of String) Hostnames excluded from an allowed_egress HTTPS envelope. + Hostnames excluded from an allowed_egress HTTPS envelope. + """ + ports: list[Port] | None = None + """ + (Attributes List) Allowed ports. Empty means all ports, except HTTPS hostname destinations which use HTTPS (TCP 443). (see below for nested schema) + """ + selector: Selector | None = None + """ + (Attributes) Explicit entitlement to reach cluster workloads by label. (see below for nested schema) + """ + tenant: str | None = None + """ + (String) Relational tenant selection. Values: TENANT_SCOPE_SAME_USER, TENANT_SCOPE_SAME_ORG, TENANT_SCOPE_SANDBOX_NETWORK. + Relational tenant selection. Values: `TENANT_SCOPE_SAME_USER`, `TENANT_SCOPE_SAME_ORG`, `TENANT_SCOPE_SANDBOX_NETWORK`. + """ + + +class AllowedIngres(BaseModel): + any: bool | None = None + """ + shaped peer. + Set to true to select any address-shaped peer. + """ + cidr: Cidr | None = None + """ + outs. (see below for nested schema) + """ + ports: list[Port] | None = None + """ + (Attributes List) Allowed ports. Empty means all ports, except HTTPS hostname destinations which use HTTPS (TCP 443). (see below for nested schema) + """ + tenant: str | None = None + """ + (String) Relational tenant selection. Values: TENANT_SCOPE_SAME_USER, TENANT_SCOPE_SAME_ORG, TENANT_SCOPE_SANDBOX_NETWORK. + Relational tenant selection. Values: `TENANT_SCOPE_SAME_USER`, `TENANT_SCOPE_SAME_ORG`, `TENANT_SCOPE_SANDBOX_NETWORK`. + """ + + +class DefaultEgres(BaseModel): + any: bool | None = None + """ + shaped peer. + Set to true to select any address-shaped peer. + """ + cidr: Cidr | None = None + """ + outs. (see below for nested schema) + """ + dnsName: str | None = None + """ + (String, Deprecated) Deprecated alias for https_hostname. + Deprecated alias for https_hostname. + """ + dnsNameExcept: list[str] | None = None + """ + (Set of String, Deprecated) Deprecated alias for https_hostname_except. + Deprecated alias for https_hostname_except. + """ + httpsHostname: str | None = None + """ + (String) Exact HTTPS hostname or a single leftmost wildcard label; * is allowed only in allowed_egress. + Exact HTTPS hostname or a single leftmost wildcard label; `*` is allowed only in allowed_egress. + """ + httpsHostnameExcept: list[str] | None = None + """ + (Set of String) Hostnames excluded from an allowed_egress HTTPS envelope. + Hostnames excluded from an allowed_egress HTTPS envelope. + """ + ports: list[Port] | None = None + """ + (Attributes List) Allowed ports. Empty means all ports, except HTTPS hostname destinations which use HTTPS (TCP 443). (see below for nested schema) + """ + selector: Selector | None = None + """ + (Attributes) Explicit entitlement to reach cluster workloads by label. (see below for nested schema) + """ + tenant: str | None = None + """ + (String) Relational tenant selection. Values: TENANT_SCOPE_SAME_USER, TENANT_SCOPE_SAME_ORG, TENANT_SCOPE_SANDBOX_NETWORK. + Relational tenant selection. Values: `TENANT_SCOPE_SAME_USER`, `TENANT_SCOPE_SAME_ORG`, `TENANT_SCOPE_SANDBOX_NETWORK`. + """ + + +class DefaultIngres(BaseModel): + any: bool | None = None + """ + shaped peer. + Set to true to select any address-shaped peer. + """ + cidr: Cidr | None = None + """ + outs. (see below for nested schema) + """ + ports: list[Port] | None = None + """ + (Attributes List) Allowed ports. Empty means all ports, except HTTPS hostname destinations which use HTTPS (TCP 443). (see below for nested schema) + """ + tenant: str | None = None + """ + (String) Relational tenant selection. Values: TENANT_SCOPE_SAME_USER, TENANT_SCOPE_SAME_ORG, TENANT_SCOPE_SANDBOX_NETWORK. + Relational tenant selection. Values: `TENANT_SCOPE_SAME_USER`, `TENANT_SCOPE_SAME_ORG`, `TENANT_SCOPE_SANDBOX_NETWORK`. + """ + + +class Network(BaseModel): + allowedEgress: list[AllowedEgres] | None = None + """ + (Attributes List) Allowed egress envelope. HTTPS hostname wildcard * is permitted here. Select exactly one peer kind per rule. (see below for nested schema) + """ + allowedIngress: list[AllowedIngres] | None = None + """ + visibility ports. Select exactly one peer kind per rule. (see below for nested schema) + """ + defaultEgress: list[DefaultEgres] | None = None + """ + (Attributes List) Egress applied when the sandbox specifies none. HTTPS hostname destinations are not permitted here. Select exactly one peer kind per rule. (see below for nested schema) + """ + defaultIngress: list[DefaultIngres] | None = None + """ + (Attributes List) Ingress applied when the sandbox specifies none. Select exactly one peer kind per rule. (see below for nested schema) + """ + denyDns: bool | None = None + """ + (Boolean, Deprecated) Deprecated alias for deny_https_hostname_rules. Does not disable DNS resolution. + Deprecated alias for deny_https_hostname_rules. Does not disable DNS resolution. + """ + denyHttpsHostnameRules: bool | None = None + """ + based HTTPS egress grants. Does not disable DNS resolution. + Forbid hostname-based HTTPS egress grants. Does not disable DNS resolution. + """ + dnsEgress: str | None = None + """ + based HTTPS grants. Values: DNS_EGRESS_MODE_ALLOW, DNS_EGRESS_MODE_DENY. + Outbound DNS traffic ceiling on UDP/TCP port 53. Unspecified permits DNS; DENY requires sandboxes to block it. Independent of hostname-based HTTPS grants. Values: `DNS_EGRESS_MODE_ALLOW`, `DNS_EGRESS_MODE_DENY`. + """ + + +class Resources(BaseModel): + cpuCeiling: str | None = None + """ + of-requests CPU ceiling across the sandbox. + Sum-of-requests CPU ceiling across the sandbox. + """ + defaultCpu: str | None = None + """ + (String) Default CPU per container. When a container declares neither requests nor limits, a positive default also sets its CPU limit. + Default CPU per container. When a container declares neither requests nor limits, a positive default also sets its CPU limit. + """ + defaultMemory: str | None = None + """ + (String) Default memory per container. When a container declares neither requests nor limits, a positive default also sets its memory limit. + Default memory per container. When a container declares neither requests nor limits, a positive default also sets its memory limit. + """ + maxCpu: str | None = None + """ + (String) Maximum CPU per container, as a Kubernetes quantity. + Maximum CPU per container, as a Kubernetes quantity. + """ + maxGpuCount: float | None = None + """ + (Number) Maximum GPUs per container. Omitted means no cap; explicit zero forbids GPUs. + Maximum GPUs per container. Omitted means no cap; explicit zero forbids GPUs. + """ + maxMemory: str | None = None + """ + (String) Maximum memory per container. + Maximum memory per container. + """ + memoryCeiling: str | None = None + """ + of-requests memory ceiling across the sandbox. + Sum-of-requests memory ceiling across the sandbox. + """ + minCpu: str | None = None + """ + (String) Minimum CPU per container. + Minimum CPU per container. + """ + minMemory: str | None = None + """ + (String) Minimum memory per container. + Minimum memory per container. + """ + requireLimits: bool | None = None + """ + (Boolean) Require every container to have requests and limits after defaults are applied. + Require every container to have requests and limits after defaults are applied. + """ + + +class RuntimeClassMapping(BaseModel): + kubernetesRuntimeClassName: str | None = None + """ + (String) Kubernetes RuntimeClass name. Set exactly one of kubernetes_runtime_class_name or node_default. + Kubernetes RuntimeClass name. Set exactly one of kubernetes_runtime_class_name or node_default. + """ + nodeDefault: bool | None = None + """ + mode placement outside the shared serverless pool. + Set to true to use the node's default container runtime. Permitted only for `RUNTIME_CLASS_CPU_DEFAULT` and `RUNTIME_CLASS_GPU_DEFAULT`, and only serves CKS-mode placement outside the shared serverless pool. + """ + runtimeClass: str | None = None + """ + (String) Portable runtime class provided by the target. Values: RUNTIME_CLASS_CPU_DEFAULT, RUNTIME_CLASS_CPU_NESTED_VIRT, RUNTIME_CLASS_CPU_SNAPSHOT_RESTORE, RUNTIME_CLASS_GPU_DEFAULT. + Portable runtime class provided by the target. Values: `RUNTIME_CLASS_CPU_DEFAULT`, `RUNTIME_CLASS_CPU_NESTED_VIRT`, `RUNTIME_CLASS_CPU_SNAPSHOT_RESTORE`, `RUNTIME_CLASS_GPU_DEFAULT`. + """ + + +class Security(BaseModel): + allowPrivileged: bool | None = None + """ + (Boolean) Permit privileged containers. + Permit privileged containers. + """ + allowedCapabilities: list[str] | None = None + """ + (Set of String) Linux capabilities containers may add. Empty permits none beyond defaults. + Linux capabilities containers may add. Empty permits none beyond defaults. + """ + allowedRuntimeClasses: list[str] | None = None + """ + selected runtime classes. Cannot be combined with runtime_class_mappings. + Runtime classes callers may explicitly select. Empty forbids caller-selected runtime classes. Cannot be combined with runtime_class_mappings. + """ + allowedSeccompProfiles: list[str] | None = None + """ + (Set of String) Permitted seccomp profiles, such as RuntimeDefault or Unconfined. + Permitted seccomp profiles, such as RuntimeDefault or Unconfined. + """ + defaultCpuRuntimeClass: str | None = None + """ + class allowlist. Cannot be combined with runtime_class_mappings. + Default CPU runtime class. Must fit a nonempty runtime-class allowlist. Cannot be combined with runtime_class_mappings. + """ + defaultGpuRuntimeClass: str | None = None + """ + class allowlist. Cannot be combined with runtime_class_mappings. + Default GPU runtime class. Must fit a nonempty runtime-class allowlist. Cannot be combined with runtime_class_mappings. + """ + runtimeClassMappings: list[RuntimeClassMapping] | None = None + """ + empty set switches the runner to mappings: a mapped class is available both for caller selection and as the automatic CPU or GPU default, an unmapped class is unavailable, and callers cannot pin a concrete runtime class. Omitting a default class disables automatic selection for that resource family. Each class appears at most once. Cannot be combined with allowed_runtime_classes, default_cpu_runtime_class, or default_gpu_runtime_class. (see below for nested schema) + """ + + +class Volumes(BaseModel): + allowedMedia: list[str] | None = None + """ + (Set of String) Allowed storage media. Empty permits any. + Allowed storage media. Empty permits any. + """ + maxSize: str | None = None + """ + (String) Maximum size per volume, for example 100Gi. + Maximum size per volume, for example 100Gi. + """ + + +class Constraints(BaseModel): + image: Image | None = None + """ + (Attributes) Image restrictions. (see below for nested schema) + """ + instance: Instance | None = None + """ + type restrictions. (see below for nested schema) + """ + lifecycle: Lifecycle | None = None + """ + (Attributes) Lifetime defaults. (see below for nested schema) + """ + metadata: Metadata | None = None + """ + (Attributes) Annotation restrictions. (see below for nested schema) + """ + network: Network | None = None + """ + (Attributes) Network envelopes and defaults. Empty allowed envelopes impose no restriction. (see below for nested schema) + """ + resources: Resources | None = None + """ + container bounds, defaults, and whole-sandbox ceilings. (see below for nested schema) + """ + security: Security | None = None + """ + class constraints. (see below for nested schema) + """ + volumes: Volumes | None = None + """ + (Attributes) Sandbox volume restrictions. (see below for nested schema) + """ + + +class SourceIpAllowlist(BaseModel): + cidrs: list[str] | None = None + """ + (Set of String) Canonical, nonredundant IPv4/IPv6 prefixes (at most 256). Do not include a prefix already covered by another entry. An empty set denies every public source. Omitting the enclosing source_ip_allowlist leaves access unrestricted. + Canonical, nonredundant IPv4/IPv6 prefixes (at most 256). Do not include a prefix already covered by another entry. An empty set denies every public source. Omitting the enclosing source_ip_allowlist leaves access unrestricted. + """ + + +class ControlPlaneAccess(BaseModel): + sourceIpAllowlist: SourceIpAllowlist | None = None + """ + (Attributes) Public source IP restriction. A present empty object denies every public source; an absent object imposes no source IP restriction. (see below for nested schema) + """ + + +class PolicyModel(BaseModel): + baseSecretRef: BaseSecretRef | None = None + """ + (String, Sensitive) Runtime defaults and attachments as a JSON object, for example jsonencode({ ... }). Typed constraints belong in constraints. + Runtime defaults and attachments as a JSON object, for example `jsonencode({ ... })`. Typed constraints belong in constraints. + """ + constraints: Constraints | None = None + """ + closed. (see below for nested schema) + """ + controlPlaneAccess: ControlPlaneAccess | None = None + """ + time controls in addition to authentication and tenant authorization. (see below for nested schema) + """ + displayName: str | None = None + """ + readable runner name. + Human-readable policy name. + """ + + +class ClusterIp(BaseModel): + annotations: dict[str, str] | None = None + """ + (Map of String) Service annotations. + Service annotations. + """ + + +class Custom(BaseModel): + advertisedUri: str | None = None + """ + (String) Stable absolute URI returned to direct clients. + Stable absolute URI returned to direct clients. + """ + serviceAnnotations: dict[str, str] | None = None + """ + (Map of String) Annotations on the backing ClusterIP service. + Annotations on the backing ClusterIP service. + """ + + +class LoadBalancer(BaseModel): + annotations: dict[str, str] | None = None + """ + (Map of String) Service annotations. + Service annotations. + """ + externalTrafficPolicy: str | None = None + """ + (String) External traffic policy. Values: RUNNER_DATA_PLANE_EXTERNAL_TRAFFIC_POLICY_CLUSTER, RUNNER_DATA_PLANE_EXTERNAL_TRAFFIC_POLICY_LOCAL. + External traffic policy. Values: `RUNNER_DATA_PLANE_EXTERNAL_TRAFFIC_POLICY_CLUSTER`, `RUNNER_DATA_PLANE_EXTERNAL_TRAFFIC_POLICY_LOCAL`. + """ + hostname: str | None = None + """ + (String) Endpoint DNS name included in the server certificate. The platform may assign one when empty. + Endpoint DNS name included in the server certificate. The platform may assign one when empty. + """ + loadBalancerClass: str | None = None + """ + (String) Kubernetes load balancer class. + Kubernetes load balancer class. + """ + scope: str | None = None + """ + (String) Load balancer scope. Values: RUNNER_DATA_PLANE_SERVICE_SCOPE_PUBLIC, RUNNER_DATA_PLANE_SERVICE_SCOPE_PRIVATE. + Load balancer scope. Values: `RUNNER_DATA_PLANE_SERVICE_SCOPE_PUBLIC`, `RUNNER_DATA_PLANE_SERVICE_SCOPE_PRIVATE`. + """ + sourceRanges: list[str] | None = None + """ + (Set of String) Allowed client source CIDRs. + Allowed client source CIDRs. + """ + + +class DataPlane(BaseModel): + clusterIp: ClusterIp | None = None + """ + (Attributes) Expose through a ClusterIP service. (see below for nested schema) + """ + custom: Custom | None = None + """ + managed network path. (see below for nested schema) + """ + disabled: bool | None = None + """ + (Boolean) Set to true to explicitly disable the direct endpoint. + Set to true to explicitly disable the direct endpoint. + """ + loadBalancer: LoadBalancer | None = None + """ + (Attributes) Expose through an L4 load balancer forwarding mutual TLS to the runner. (see below for nested schema) + """ + + +class ImagePull(BaseModel): + policy: str | None = None + """ + (Attributes) Policy governing every sandbox on this runner. Required even for the explicit empty posture policy = {}. Policy is updated with an etag to detect concurrent changes. (see below for nested schema) + Image pull policy. The platform default is IF_NOT_PRESENT. ALWAYS reauthorizes pull credentials on every start. Values: `SANDBOX_IMAGE_PULL_POLICY_IF_NOT_PRESENT`, `SANDBOX_IMAGE_PULL_POLICY_ALWAYS`. + """ + + +class Exclusion(BaseModel): + endTime: str | None = None + """ + (String) Exclusive RFC 3339 end timestamp, after start_time. + Exclusive RFC 3339 end timestamp, after start_time. + """ + reason: str | None = None + """ + (String) Reason for the exclusion. + Reason for the exclusion. + """ + startTime: str | None = None + """ + (String) Inclusive RFC 3339 start timestamp. + Inclusive RFC 3339 start timestamp. + """ + + +class Window(BaseModel): + cron: str | None = None + """ + field cron expression in UTC, for example 0 2 * * SAT. + Five-field cron expression in UTC, for example `0 2 * * SAT`. + """ + durationSeconds: float | None = None + """ + 604800). + Window duration in seconds (60-604800). + """ + + +class MaintenancePolicy(BaseModel): + exclusions: list[Exclusion] | None = None + """ + time periods during which updates cannot start. (see below for nested schema) + """ + windows: list[Window] | None = None + """ + (Attributes List) Recurring update windows. An empty list permits updates at any time outside exclusions. (see below for nested schema) + """ + + +class EnvSecretRef(BaseModel): + name: str + """ + Name of the secret. + """ + + +class ResourcesModel(BaseModel): + cpuLimit: str | None = None + """ + (String) CPU limit. + CPU limit. + """ + cpuRequest: str | None = None + """ + (String) CPU request. + CPU request. + """ + memoryLimit: str | None = None + """ + (String) Memory limit. + Memory limit. + """ + memoryRequest: str | None = None + """ + (String) Memory request. + Memory request. + """ + + +class Scaling(BaseModel): + autoscalingEnabled: bool | None = None + """ + (Boolean) Enable runner autoscaling. + Enable runner autoscaling. + """ + maxReplicas: float | None = None + """ + (Number) Maximum replicas. + Maximum replicas. + """ + minReplicas: float | None = None + """ + (Number) Minimum replicas. + Minimum replicas. + """ + replicas: float | None = None + """ + (Number) Desired replicas when autoscaling is disabled. + Desired replicas when autoscaling is disabled. + """ + + +class Toleration(BaseModel): + effect: str | None = None + """ + (String) Taint effect. Empty matches all effects. + Taint effect. Empty matches all effects. + """ + key: str | None = None + """ + (String) Taint key. + Taint key. + """ + operator: str | None = None + """ + (String) Toleration operator (Equal or Exists). + Toleration operator (`Equal` or `Exists`). + """ + value: str | None = None + """ + (String) Taint value. + Taint value. + """ + + +class Overrides(BaseModel): + annotations: dict[str, str] | None = None + """ + (Map of String) Service annotations. + Annotations on runner pods. + """ + args: list[str] | None = None + """ + line arguments. + Ordered runner command-line arguments. + """ + cpuRuntimeClass: str | None = None + """ + (String) Runtime class for CPU sandboxes. + Runtime class for CPU sandboxes. + """ + envSecretRef: EnvSecretRef | None = None + """ + (Map of String, Sensitive) Runner environment overrides. + Runner environment overrides. + """ + gpuRuntimeClass: str | None = None + """ + (String) Runtime class for GPU sandboxes. + Runtime class for GPU sandboxes. + """ + labels: dict[str, str] | None = None + """ + (Map of String) Labels on runner pods. + Labels on runner pods. + """ + nodeSelector: dict[str, str] | None = None + """ + (Map of String) Node label selectors for the runner deployment. + Node label selectors for the runner deployment. + """ + resources: ResourcesModel | None = None + """ + container bounds, defaults, and whole-sandbox ceilings. (see below for nested schema) + """ + scaling: Scaling | None = None + """ + (Attributes) Runner replica and autoscaling configuration. (see below for nested schema) + """ + tolerations: list[Toleration] | None = None + """ + (Attributes List) Kubernetes tolerations for runner pods. (see below for nested schema) + """ + + +class TenantMetrics(BaseModel): + enabled: bool | None = None + """ + (Boolean) Enable the tenant metrics collector. + Enable the tenant metrics collector. + """ + image: str | None = None + """ + (Attributes) Image restrictions. (see below for nested schema) + Release-pinned collector image. Empty retains the deployment environment's image. + """ + + +class VolumesModel(BaseModel): + csiDriverAllowlist: list[str] | None = None + """ + (Set of String) Allowed CSI drivers. Empty uses the platform default (csi.vastdata.com). + Allowed CSI drivers. Empty uses the platform default (`csi.vastdata.com`). + """ + enabled: bool | None = None + """ + (Boolean) Enable the tenant metrics collector. + Enable registered volume mounts; the runner's PVC/PV permission preflight must also pass. + """ + + +class Spec(BaseModel): + dataPlane: DataPlane | None = None + """ + (Attributes) Direct sandbox data endpoint. Select exactly one of disabled, cluster_ip, load_balancer, or custom. Certificates are managed by the platform. (see below for nested schema) + """ + enforceResourceLimits: bool | None = None + """ + (Boolean) Require sandboxes to declare both memory and CPU limits. + Require sandboxes to declare both memory and CPU limits. + """ + imagePull: ImagePull | None = None + """ + (Attributes) Workload container image pull behavior. (see below for nested schema) + """ + maintenancePolicy: MaintenancePolicy | None = None + """ + (Attributes) Update scheduling in UTC. Exclusions take precedence over windows. (see below for nested schema) + """ + overrides: Overrides | None = None + """ + settable runner deployment overrides. (see below for nested schema) + """ + releaseChannel: str | None = None + """ + (String) Automatic update channel. Defaults to stable. Values: RELEASE_CHANNEL_STABLE, RELEASE_CHANNEL_RAPID. + Automatic update channel. Defaults to stable. Values: `RELEASE_CHANNEL_STABLE`, `RELEASE_CHANNEL_RAPID`. + """ + tenantMetrics: TenantMetrics | None = None + """ + sandbox tenant usage collection. Overrides corresponding deployment environment entries. (see below for nested schema) + """ + volumes: VolumesModel | None = None + """ + (Attributes) Sandbox volume restrictions. (see below for nested schema) + """ + + +class ForProvider(BaseModel): + clusterId: str | None = None + """ + (String) CKS cluster UUID. Changing it replaces the runner. + CKS cluster UUID. Changing it replaces the runner. + """ + clusterIdRef: ClusterIdRef | None = None + """ + Reference to a Cluster in cks to populate clusterId. + """ + clusterIdSelector: ClusterIdSelector | None = None + """ + Selector for a Cluster in cks to populate clusterId. + """ + displayName: str | None = None + """ + readable runner name. + Human-readable runner name. + """ + policy: PolicyModel | None = None + """ + (Attributes) Policy governing every sandbox on this runner. Required even for the explicit empty posture policy = {}. Policy is updated with an etag to detect concurrent changes. (see below for nested schema) + """ + runnerGroupId: str | None = None + """ + (String) Runner group for scheduling affinity. Defaults to default; omitting or setting this attribute to null resets a custom group to default. + Runner group for scheduling affinity. Defaults to `default`; omitting or setting this attribute to null resets a custom group to `default`. + """ + spec: Spec | None = None + """ + (Attributes) Desired runner configuration. When omitted, the server's defaults are adopted. Removing an optional setting inside this object resets that setting through an explicit update mask. (see below for nested schema) + """ + zone: str | None = None + """ + east-04a. Use lower(coreweave_cks_cluster.example.zone) when referencing a CKS cluster zone. Changing it replaces the runner. + Lowercase geographic zone of the runner, for example `us-east-04a`. Use `lower(coreweave_cks_cluster.example.zone)` when referencing a CKS cluster zone. Changing it replaces the runner. + """ + + +class PolicyModel1(BaseModel): + resolution: Literal['Required', 'Optional'] | None = 'Required' + """ + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + """ + resolve: Literal['Always', 'IfNotPresent'] | None = None + """ + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + """ + + +class ResourcesModel1(BaseModel): + cpuCeiling: str | None = None + """ + of-requests CPU ceiling across the sandbox. + Sum-of-requests CPU ceiling across the sandbox. + """ + defaultCpu: str | None = None + """ + (String) Default CPU per container. When a container declares neither requests nor limits, a positive default also sets its CPU limit. + Default CPU per container. When a container declares neither requests nor limits, a positive default also sets its CPU limit. + """ + defaultMemory: str | None = None + """ + (String) Default memory per container. When a container declares neither requests nor limits, a positive default also sets its memory limit. + Default memory per container. When a container declares neither requests nor limits, a positive default also sets its memory limit. + """ + maxCpu: str | None = None + """ + (String) Maximum CPU per container, as a Kubernetes quantity. + Maximum CPU per container, as a Kubernetes quantity. + """ + maxGpuCount: float | None = None + """ + (Number) Maximum GPUs per container. Omitted means no cap; explicit zero forbids GPUs. + Maximum GPUs per container. Omitted means no cap; explicit zero forbids GPUs. + """ + maxMemory: str | None = None + """ + (String) Maximum memory per container. + Maximum memory per container. + """ + memoryCeiling: str | None = None + """ + of-requests memory ceiling across the sandbox. + Sum-of-requests memory ceiling across the sandbox. + """ + minCpu: str | None = None + """ + (String) Minimum CPU per container. + Minimum CPU per container. + """ + minMemory: str | None = None + """ + (String) Minimum memory per container. + Minimum memory per container. + """ + requireLimits: bool | None = None + """ + (Boolean) Require every container to have requests and limits after defaults are applied. + Require every container to have requests and limits after defaults are applied. + """ + + +class VolumesModel1(BaseModel): + allowedMedia: list[str] | None = None + """ + (Set of String) Allowed storage media. Empty permits any. + Allowed storage media. Empty permits any. + """ + maxSize: str | None = None + """ + (String) Maximum size per volume, for example 100Gi. + Maximum size per volume, for example 100Gi. + """ + + +class PolicyModel2(BaseModel): + baseSecretRef: BaseSecretRef | None = None + """ + (String, Sensitive) Runtime defaults and attachments as a JSON object, for example jsonencode({ ... }). Typed constraints belong in constraints. + Runtime defaults and attachments as a JSON object, for example `jsonencode({ ... })`. Typed constraints belong in constraints. + """ + constraints: Constraints | None = None + """ + closed. (see below for nested schema) + """ + controlPlaneAccess: ControlPlaneAccess | None = None + """ + time controls in addition to authentication and tenant authorization. (see below for nested schema) + """ + displayName: str | None = None + """ + readable runner name. + Human-readable policy name. + """ + + +class ResourcesModel2(BaseModel): + cpuLimit: str | None = None + """ + (String) CPU limit. + CPU limit. + """ + cpuRequest: str | None = None + """ + (String) CPU request. + CPU request. + """ + memoryLimit: str | None = None + """ + (String) Memory limit. + Memory limit. + """ + memoryRequest: str | None = None + """ + (String) Memory request. + Memory request. + """ + + +class OverridesModel(BaseModel): + annotations: dict[str, str] | None = None + """ + (Map of String) Service annotations. + Annotations on runner pods. + """ + args: list[str] | None = None + """ + line arguments. + Ordered runner command-line arguments. + """ + cpuRuntimeClass: str | None = None + """ + (String) Runtime class for CPU sandboxes. + Runtime class for CPU sandboxes. + """ + envSecretRef: dict[str, str] | None = None + gpuRuntimeClass: str | None = None + """ + (String) Runtime class for GPU sandboxes. + Runtime class for GPU sandboxes. + """ + labels: dict[str, str] | None = None + """ + (Map of String) Labels on runner pods. + Labels on runner pods. + """ + nodeSelector: dict[str, str] | None = None + """ + (Map of String) Node label selectors for the runner deployment. + Node label selectors for the runner deployment. + """ + resources: ResourcesModel2 | None = None + """ + container bounds, defaults, and whole-sandbox ceilings. (see below for nested schema) + """ + scaling: Scaling | None = None + """ + (Attributes) Runner replica and autoscaling configuration. (see below for nested schema) + """ + tolerations: list[Toleration] | None = None + """ + (Attributes List) Kubernetes tolerations for runner pods. (see below for nested schema) + """ + + +class VolumesModel2(BaseModel): + csiDriverAllowlist: list[str] | None = None + """ + (Set of String) Allowed CSI drivers. Empty uses the platform default (csi.vastdata.com). + Allowed CSI drivers. Empty uses the platform default (`csi.vastdata.com`). + """ + enabled: bool | None = None + """ + (Boolean) Enable the tenant metrics collector. + Enable registered volume mounts; the runner's PVC/PV permission preflight must also pass. + """ + + +class InitProvider(BaseModel): + clusterId: str | None = None + """ + (String) CKS cluster UUID. Changing it replaces the runner. + CKS cluster UUID. Changing it replaces the runner. + """ + clusterIdRef: ClusterIdRef | None = None + """ + Reference to a Cluster in cks to populate clusterId. + """ + clusterIdSelector: ClusterIdSelector | None = None + """ + Selector for a Cluster in cks to populate clusterId. + """ + displayName: str | None = None + """ + readable runner name. + Human-readable runner name. + """ + policy: PolicyModel2 | None = None + """ + (Attributes) Policy governing every sandbox on this runner. Required even for the explicit empty posture policy = {}. Policy is updated with an etag to detect concurrent changes. (see below for nested schema) + """ + runnerGroupId: str | None = None + """ + (String) Runner group for scheduling affinity. Defaults to default; omitting or setting this attribute to null resets a custom group to default. + Runner group for scheduling affinity. Defaults to `default`; omitting or setting this attribute to null resets a custom group to `default`. + """ + spec: Spec | None = None + """ + (Attributes) Desired runner configuration. When omitted, the server's defaults are adopted. Removing an optional setting inside this object resets that setting through an explicit update mask. (see below for nested schema) + """ + zone: str | None = None + """ + east-04a. Use lower(coreweave_cks_cluster.example.zone) when referencing a CKS cluster zone. Changing it replaces the runner. + Lowercase geographic zone of the runner, for example `us-east-04a`. Use `lower(coreweave_cks_cluster.example.zone)` when referencing a CKS cluster zone. Changing it replaces the runner. + """ + + +class ProviderConfigRef(BaseModel): + kind: str + """ + Kind of the referenced object. + """ + name: str + """ + Name of the referenced object. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + + +class SpecModel(BaseModel): + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'kind': 'ClusterProviderConfig', 'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class ResourcesModel3(BaseModel): + cpuCeiling: str | None = None + """ + of-requests CPU ceiling across the sandbox. + Sum-of-requests CPU ceiling across the sandbox. + """ + defaultCpu: str | None = None + """ + (String) Default CPU per container. When a container declares neither requests nor limits, a positive default also sets its CPU limit. + Default CPU per container. When a container declares neither requests nor limits, a positive default also sets its CPU limit. + """ + defaultMemory: str | None = None + """ + (String) Default memory per container. When a container declares neither requests nor limits, a positive default also sets its memory limit. + Default memory per container. When a container declares neither requests nor limits, a positive default also sets its memory limit. + """ + maxCpu: str | None = None + """ + (String) Maximum CPU per container, as a Kubernetes quantity. + Maximum CPU per container, as a Kubernetes quantity. + """ + maxGpuCount: float | None = None + """ + (Number) Maximum GPUs per container. Omitted means no cap; explicit zero forbids GPUs. + Maximum GPUs per container. Omitted means no cap; explicit zero forbids GPUs. + """ + maxMemory: str | None = None + """ + (String) Maximum memory per container. + Maximum memory per container. + """ + memoryCeiling: str | None = None + """ + of-requests memory ceiling across the sandbox. + Sum-of-requests memory ceiling across the sandbox. + """ + minCpu: str | None = None + """ + (String) Minimum CPU per container. + Minimum CPU per container. + """ + minMemory: str | None = None + """ + (String) Minimum memory per container. + Minimum memory per container. + """ + requireLimits: bool | None = None + """ + (Boolean) Require every container to have requests and limits after defaults are applied. + Require every container to have requests and limits after defaults are applied. + """ + + +class VolumesModel3(BaseModel): + allowedMedia: list[str] | None = None + """ + (Set of String) Allowed storage media. Empty permits any. + Allowed storage media. Empty permits any. + """ + maxSize: str | None = None + """ + (String) Maximum size per volume, for example 100Gi. + Maximum size per volume, for example 100Gi. + """ + + +class PolicyModel3(BaseModel): + constraints: Constraints | None = None + """ + closed. (see below for nested schema) + """ + controlPlaneAccess: ControlPlaneAccess | None = None + """ + time controls in addition to authentication and tenant authorization. (see below for nested schema) + """ + displayName: str | None = None + """ + readable runner name. + Human-readable policy name. + """ + + +class ResourcesModel4(BaseModel): + cpuLimit: str | None = None + """ + (String) CPU limit. + CPU limit. + """ + cpuRequest: str | None = None + """ + (String) CPU request. + CPU request. + """ + memoryLimit: str | None = None + """ + (String) Memory limit. + Memory limit. + """ + memoryRequest: str | None = None + """ + (String) Memory request. + Memory request. + """ + + +class OverridesModel1(BaseModel): + annotations: dict[str, str] | None = None + """ + (Map of String) Service annotations. + Annotations on runner pods. + """ + args: list[str] | None = None + """ + line arguments. + Ordered runner command-line arguments. + """ + cpuRuntimeClass: str | None = None + """ + (String) Runtime class for CPU sandboxes. + Runtime class for CPU sandboxes. + """ + gpuRuntimeClass: str | None = None + """ + (String) Runtime class for GPU sandboxes. + Runtime class for GPU sandboxes. + """ + labels: dict[str, str] | None = None + """ + (Map of String) Labels on runner pods. + Labels on runner pods. + """ + nodeSelector: dict[str, str] | None = None + """ + (Map of String) Node label selectors for the runner deployment. + Node label selectors for the runner deployment. + """ + resources: ResourcesModel4 | None = None + """ + container bounds, defaults, and whole-sandbox ceilings. (see below for nested schema) + """ + scaling: Scaling | None = None + """ + (Attributes) Runner replica and autoscaling configuration. (see below for nested schema) + """ + tolerations: list[Toleration] | None = None + """ + (Attributes List) Kubernetes tolerations for runner pods. (see below for nested schema) + """ + + +class VolumesModel4(BaseModel): + csiDriverAllowlist: list[str] | None = None + """ + (Set of String) Allowed CSI drivers. Empty uses the platform default (csi.vastdata.com). + Allowed CSI drivers. Empty uses the platform default (`csi.vastdata.com`). + """ + enabled: bool | None = None + """ + (Boolean) Enable the tenant metrics collector. + Enable registered volume mounts; the runner's PVC/PV permission preflight must also pass. + """ + + +class SpecModel1(BaseModel): + dataPlane: DataPlane | None = None + """ + (Attributes) Direct sandbox data endpoint. Select exactly one of disabled, cluster_ip, load_balancer, or custom. Certificates are managed by the platform. (see below for nested schema) + """ + enforceResourceLimits: bool | None = None + """ + (Boolean) Require sandboxes to declare both memory and CPU limits. + Require sandboxes to declare both memory and CPU limits. + """ + imagePull: ImagePull | None = None + """ + (Attributes) Workload container image pull behavior. (see below for nested schema) + """ + maintenancePolicy: MaintenancePolicy | None = None + """ + (Attributes) Update scheduling in UTC. Exclusions take precedence over windows. (see below for nested schema) + """ + overrides: OverridesModel1 | None = None + """ + settable runner deployment overrides. (see below for nested schema) + """ + releaseChannel: str | None = None + """ + (String) Automatic update channel. Defaults to stable. Values: RELEASE_CHANNEL_STABLE, RELEASE_CHANNEL_RAPID. + Automatic update channel. Defaults to stable. Values: `RELEASE_CHANNEL_STABLE`, `RELEASE_CHANNEL_RAPID`. + """ + tenantMetrics: TenantMetrics | None = None + """ + sandbox tenant usage collection. Overrides corresponding deployment environment entries. (see below for nested schema) + """ + volumes: VolumesModel4 | None = None + """ + (Attributes) Sandbox volume restrictions. (see below for nested schema) + """ + + +class AtProvider(BaseModel): + activeConfigVersion: str | None = None + """ + (String) Configuration version currently running. + Configuration version currently running. + """ + activeRevision: float | None = None + """ + (Number) Revision currently running. + Revision currently running. + """ + clusterId: str | None = None + """ + (String) CKS cluster UUID. Changing it replaces the runner. + CKS cluster UUID. Changing it replaces the runner. + """ + clusterName: str | None = None + """ + (String) Cluster display name resolved by the server. + Cluster display name resolved by the server. + """ + connectionStatus: str | None = None + """ + (String) Observed live connection status. + Observed live connection status. + """ + createTime: str | None = None + """ + (String) Creation timestamp (RFC 3339). + Creation timestamp (RFC 3339). + """ + dataPlaneStatus: str | None = None + """ + (String) Observed direct endpoint state, URI, protocols, and certificate expiry as JSON, or null. + Observed direct endpoint state, URI, protocols, and certificate expiry as JSON, or null. + """ + displayName: str | None = None + """ + readable runner name. + Human-readable runner name. + """ + etag: str | None = None + """ + (String) Opaque policy revision used for optimistic concurrency. A concurrent policy edit fails the apply; refresh the plan before retrying. + Opaque policy revision used for optimistic concurrency. A concurrent policy edit fails the apply; refresh the plan before retrying. + """ + id: str | None = None + installError: str | None = None + """ + (String) Structured installation failure details as JSON, or null. + Structured installation failure details as JSON, or null. + """ + installStatus: str | None = None + """ + (String) Observed installation status. + Observed installation status. + """ + lastHeartbeatTime: str | None = None + """ + (String) Last runner heartbeat timestamp (RFC 3339). + Last runner heartbeat timestamp (RFC 3339). + """ + policy: PolicyModel3 | None = None + """ + (Attributes) Policy governing every sandbox on this runner. Required even for the explicit empty posture policy = {}. Policy is updated with an etag to detect concurrent changes. (see below for nested schema) + """ + rolloutInProgress: bool | None = None + """ + (Boolean) Whether a newer desired revision is still rolling out. + Whether a newer desired revision is still rolling out. + """ + runnerGroupId: str | None = None + """ + (String) Runner group for scheduling affinity. Defaults to default; omitting or setting this attribute to null resets a custom group to default. + Runner group for scheduling affinity. Defaults to `default`; omitting or setting this attribute to null resets a custom group to `default`. + """ + spec: SpecModel1 | None = None + """ + (Attributes) Desired runner configuration. When omitted, the server's defaults are adopted. Removing an optional setting inside this object resets that setting through an explicit update mask. (see below for nested schema) + """ + targetRevision: float | None = None + """ + (Number) Desired deployment revision. + Desired deployment revision. + """ + updateAvailable: bool | None = None + """ + (Boolean) Whether a newer version is available on the release channel. + Whether a newer version is available on the release channel. + """ + updateTime: str | None = None + """ + (String) Last configuration update timestamp (RFC 3339). + Last configuration update timestamp (RFC 3339). + """ + zone: str | None = None + """ + east-04a. Use lower(coreweave_cks_cluster.example.zone) when referencing a CKS cluster zone. Changing it replaces the runner. + Lowercase geographic zone of the runner, for example `us-east-04a`. Use `lower(coreweave_cks_cluster.example.zone)` when referencing a CKS cluster zone. Changing it replaces the runner. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class ManagedRunner(BaseModel): + apiVersion: Literal['sandbox.coreweave.m.upbound.io/v1beta1'] | None = ( + 'sandbox.coreweave.m.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['ManagedRunner'] | None = 'ManagedRunner' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: SpecModel + """ + ManagedRunnerSpec defines the desired state of ManagedRunner + """ + status: Status | None = None + """ + ManagedRunnerStatus defines the observed state of ManagedRunner. + """ + + +class ManagedRunnerList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[ManagedRunner] + """ + List of managedrunners. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/schemas/python/models/io/upbound/m/coreweave/workloadfederation/__init__.py b/schemas/python/models/io/upbound/m/coreweave/workloadfederation/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/workloadfederation/oidcconfig/__init__.py b/schemas/python/models/io/upbound/m/coreweave/workloadfederation/oidcconfig/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/io/upbound/m/coreweave/workloadfederation/oidcconfig/v1beta1.py b/schemas/python/models/io/upbound/m/coreweave/workloadfederation/oidcconfig/v1beta1.py new file mode 100644 index 000000000..b10f26e3e --- /dev/null +++ b/schemas/python/models/io/upbound/m/coreweave/workloadfederation/oidcconfig/v1beta1.py @@ -0,0 +1,277 @@ +# generated by datamodel-codegen: +# filename: workdir/workloadfederation_coreweave_m_upbound_io_v1beta1_oidcconfig.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......k8s.apimachinery.pkg.apis.meta import v1 + + +class ForProvider(BaseModel): + active: bool | None = None + """ + (Boolean) Whether tokens issued by this OIDC provider are accepted for workload identity federation. Defaults to true when omitted on creation. Once a value has been applied it is retained: removing the attribute from configuration keeps the last applied value rather than reverting to true, so a configuration that was deactivated stays deactivated. Set active = true explicitly to reactivate one. + Whether tokens issued by this OIDC provider are accepted for workload identity federation. Defaults to `true` when omitted on creation. Once a value has been applied it is retained: removing the attribute from configuration keeps the last applied value rather than reverting to `true`, so a configuration that was deactivated stays deactivated. Set `active = true` explicitly to reactivate one. + """ + audience: str | None = None + """ + (String) The expected audience claim in tokens issued by the external OIDC provider. + The expected audience claim in tokens issued by the external OIDC provider. + """ + description: str | None = None + """ + readable description of the OIDC configuration. + An optional human-readable description of the OIDC configuration. + """ + issuerUrl: str | None = None + """ + (String) The issuer URL of the external OIDC provider. HTTPS is required except for loopback development issuers. + The issuer URL of the external OIDC provider. HTTPS is required except for loopback development issuers. + """ + name: str | None = None + """ + readable name for the OIDC configuration. Must contain only letters, numbers, hyphens, and underscores. + A human-readable name for the OIDC configuration. Must contain only letters, numbers, hyphens, and underscores. + """ + + +class InitProvider(BaseModel): + active: bool | None = None + """ + (Boolean) Whether tokens issued by this OIDC provider are accepted for workload identity federation. Defaults to true when omitted on creation. Once a value has been applied it is retained: removing the attribute from configuration keeps the last applied value rather than reverting to true, so a configuration that was deactivated stays deactivated. Set active = true explicitly to reactivate one. + Whether tokens issued by this OIDC provider are accepted for workload identity federation. Defaults to `true` when omitted on creation. Once a value has been applied it is retained: removing the attribute from configuration keeps the last applied value rather than reverting to `true`, so a configuration that was deactivated stays deactivated. Set `active = true` explicitly to reactivate one. + """ + audience: str | None = None + """ + (String) The expected audience claim in tokens issued by the external OIDC provider. + The expected audience claim in tokens issued by the external OIDC provider. + """ + description: str | None = None + """ + readable description of the OIDC configuration. + An optional human-readable description of the OIDC configuration. + """ + issuerUrl: str | None = None + """ + (String) The issuer URL of the external OIDC provider. HTTPS is required except for loopback development issuers. + The issuer URL of the external OIDC provider. HTTPS is required except for loopback development issuers. + """ + name: str | None = None + """ + readable name for the OIDC configuration. Must contain only letters, numbers, hyphens, and underscores. + A human-readable name for the OIDC configuration. Must contain only letters, numbers, hyphens, and underscores. + """ + + +class ProviderConfigRef(BaseModel): + kind: str + """ + Kind of the referenced object. + """ + name: str + """ + Name of the referenced object. + """ + + +class WriteConnectionSecretToRef(BaseModel): + name: str + """ + Name of the secret. + """ + + +class Spec(BaseModel): + forProvider: ForProvider + initProvider: InitProvider | None = None + """ + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + """ + managementPolicies: ( + list[Literal['Observe', 'Create', 'Update', 'Delete', 'LateInitialize', '*']] + | None + ) = ['*'] + """ + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + """ + providerConfigRef: ProviderConfigRef | None = Field( + {'kind': 'ClusterProviderConfig', 'name': 'default'}, validate_default=True + ) + """ + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + """ + writeConnectionSecretToRef: WriteConnectionSecretToRef | None = None + """ + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + """ + + +class AtProvider(BaseModel): + active: bool | None = None + """ + (Boolean) Whether tokens issued by this OIDC provider are accepted for workload identity federation. Defaults to true when omitted on creation. Once a value has been applied it is retained: removing the attribute from configuration keeps the last applied value rather than reverting to true, so a configuration that was deactivated stays deactivated. Set active = true explicitly to reactivate one. + Whether tokens issued by this OIDC provider are accepted for workload identity federation. Defaults to `true` when omitted on creation. Once a value has been applied it is retained: removing the attribute from configuration keeps the last applied value rather than reverting to `true`, so a configuration that was deactivated stays deactivated. Set `active = true` explicitly to reactivate one. + """ + audience: str | None = None + """ + (String) The expected audience claim in tokens issued by the external OIDC provider. + The expected audience claim in tokens issued by the external OIDC provider. + """ + createdAt: str | None = None + """ + (String) The RFC 3339 timestamp at which the OIDC configuration was created. + The RFC 3339 timestamp at which the OIDC configuration was created. + """ + deactivatedAt: str | None = None + """ + (String) The RFC 3339 timestamp at which the OIDC configuration was deactivated, or null while it is active. + The RFC 3339 timestamp at which the OIDC configuration was deactivated, or null while it is active. + """ + description: str | None = None + """ + readable description of the OIDC configuration. + An optional human-readable description of the OIDC configuration. + """ + id: str | None = None + """ + assigned unique identifier for the OIDC configuration. + """ + issuerUrl: str | None = None + """ + (String) The issuer URL of the external OIDC provider. HTTPS is required except for loopback development issuers. + The issuer URL of the external OIDC provider. HTTPS is required except for loopback development issuers. + """ + name: str | None = None + """ + readable name for the OIDC configuration. Must contain only letters, numbers, hyphens, and underscores. + A human-readable name for the OIDC configuration. Must contain only letters, numbers, hyphens, and underscores. + """ + organizationId: str | None = None + """ + (String) The unique identifier of the CoreWeave organization that owns the OIDC configuration. + The unique identifier of the CoreWeave organization that owns the OIDC configuration. + """ + updatedAt: str | None = None + """ + (String) The RFC 3339 timestamp at which the OIDC configuration was last updated. + The RFC 3339 timestamp at which the OIDC configuration was last updated. + """ + + +class Condition(BaseModel): + lastTransitionTime: AwareDatetime + """ + LastTransitionTime is the last time this condition transitioned from one + status to another. + """ + message: str | None = None + """ + A Message containing details about this condition's last transition from + one status to another, if any. + """ + observedGeneration: int | None = None + """ + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + """ + reason: str + """ + A Reason for this condition's last transition from one status to another. + """ + status: str + """ + Status of this condition; is it currently True, False, or Unknown? + """ + type: str + """ + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + """ + + +class Status(BaseModel): + atProvider: AtProvider | None = None + conditions: list[Condition] | None = None + """ + Conditions of the resource. + """ + lastHandledReconcileAt: str | None = None + """ + LastHandledReconcileAt holds the value of the most recent + reconcile-requested-at annotation token that the controller has + processed. Users can compare this to the annotation to determine + whether a reconcile request has been handled. + """ + observedGeneration: int | None = None + """ + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + """ + + +class OIDCConfig(BaseModel): + apiVersion: Literal['workloadfederation.coreweave.m.upbound.io/v1beta1'] | None = ( + 'workloadfederation.coreweave.m.upbound.io/v1beta1' + ) + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + kind: Literal['OIDCConfig'] | None = 'OIDCConfig' + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ObjectMeta | None = None + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + spec: Spec + """ + OIDCConfigSpec defines the desired state of OIDCConfig + """ + status: Status | None = None + """ + OIDCConfigStatus defines the observed state of OIDCConfig. + """ + + +class OIDCConfigList(BaseModel): + apiVersion: str | None = None + """ + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + """ + items: list[OIDCConfig] + """ + List of oidcconfigs. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + """ + kind: str | None = None + """ + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ + metadata: v1.ListMeta | None = None + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + """ \ No newline at end of file diff --git a/uv.lock b/uv.lock index 657b0953a..a96521e52 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 5 +revision = 3 requires-python = ">=3.11, <3.14" resolution-markers = [ "python_full_version >= '3.13'", @@ -11,6 +11,7 @@ members = [ "compose-aks-cluster", "compose-capacity-reservation", "compose-civo-cluster", + "compose-coreweave-cluster", "compose-eks-cluster", "compose-gke-cluster", "compose-inference-class", @@ -331,6 +332,25 @@ requires-dist = [ { name = "grpcio", specifier = ">=1.73.1" }, ] +[[package]] +name = "compose-coreweave-cluster" +version = "0.0.0" +source = { editable = "functions/compose-coreweave-cluster" } +dependencies = [ + { name = "click" }, + { name = "crossplane-function-sdk-python" }, + { name = "crossplane-models" }, + { name = "grpcio" }, +] + +[package.metadata] +requires-dist = [ + { name = "click", specifier = ">=8.1.0" }, + { name = "crossplane-function-sdk-python", specifier = ">=0.14.0" }, + { name = "crossplane-models", editable = "schemas/python" }, + { name = "grpcio", specifier = ">=1.73.1" }, +] + [[package]] name = "compose-eks-cluster" version = "0.0.0"