diff --git a/.github/workflows/e2e-clouds.yml b/.github/workflows/e2e-clouds.yml index 850c80b5c..92eca937f 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, nebius, upcloud, vultr, existing, existing-filtered] steps: # Two kind clusters and the serving stack need more disk than the runner diff --git a/apis/inferenceclasses/definition.yaml b/apis/inferenceclasses/definition.yaml index c75f231c9..e303c9ca6 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.upcloud) || + has(self.provisioning.upcloud.accelerator) || + !(has(self.devices) && self.devices.exists(d, (!has(d.claim) || d.claim == 'DRA') && d.driver != 'dra.cpu')) + message: >- + spec.provisioning.upcloud.accelerator is required when a device + claims a DRA driver other than dra.cpu. + - rule: >- + !has(self.provisioning) || !has(self.provisioning.upcloud) || + !has(self.provisioning.upcloud.accelerator) || + (has(self.devices) && self.devices.exists(d, (!has(d.claim) || d.claim == 'DRA') && d.driver != 'dra.cpu')) + message: >- + spec.provisioning.upcloud.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 != 'UpCloud' || has(self.upcloud)" + message: spec.provisioning.upcloud is required when spec.provisioning.provider is UpCloud. properties: provider: type: string - enum: [GKE, EKS, AKS, Nebius, Vultr, Civo] + enum: [GKE, EKS, AKS, Nebius, Vultr, Civo, UpCloud] gke: type: object required: [machineType] @@ -423,6 +439,50 @@ spec: type: integer minimum: 1 maximum: 16 + upcloud: + type: object + required: [plan] + properties: + plan: + type: string + description: >- + UpCloud server plan (e.g. GPU-8xCPU-64GB-1xL40S, + PREMIUM-8xCPU-32GB). The plan 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 + diskSizeGb: + type: integer + default: 100 + minimum: 10 + 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: a standard + node image, 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-l40s, + nvidia-h100). 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 0e0c8ca3c..85f37bd39 100644 --- a/apis/inferenceclusters/definition.yaml +++ b/apis/inferenceclusters/definition.yaml @@ -32,6 +32,8 @@ spec: x-kubernetes-validations: - rule: "self.cluster.source != 'Nebius' || !has(self.nodePools) || self.nodePools.all(p, !has(p.fabric) || p.fabric.type != 'InfiniBand' || has(p.fabric.infiniband))" message: fabric.infiniband is required when fabric.type is InfiniBand and cluster.source is Nebius. + - rule: "self.cluster.source != 'UpCloud' || !has(self.nodePools) || !self.nodePools.exists(p, has(p.maxNodeCount)) || (has(self.cluster.upcloud) && has(self.cluster.upcloud.autoscaler))" + message: cluster.upcloud.autoscaler is required when a node pool sets maxNodeCount and cluster.source is UpCloud. properties: cluster: type: object @@ -51,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 != 'UpCloud' || has(self.upcloud)" + message: spec.cluster.upcloud is required when spec.cluster.source is UpCloud. properties: source: type: string description: >- Cluster provisioning method. - enum: [GKE, EKS, AKS, Nebius, Vultr, Civo, Existing] + enum: [GKE, EKS, AKS, Nebius, Vultr, Civo, UpCloud, Existing] existing: type: object description: >- @@ -373,6 +377,77 @@ spec: default: default minLength: 1 maxLength: 253 + upcloud: + type: object + description: >- + UpCloud Managed Kubernetes (UKS) cluster configuration. + Required when source is UpCloud. + required: [zone] + properties: + zone: + type: string + description: >- + UpCloud zone for the cluster (e.g. fi-hel2, + de-fra1). GPU plans are currently available in + fi-hel2 only. + minLength: 1 + maxLength: 32 + kubernetesVersion: + type: string + default: "1.36" + description: >- + UKS Kubernetes version as major.minor (e.g. 1.36); + list current versions with upctl kubernetes + versions. Defaults to the newest UKS version. + Choose 1.34 or newer so Dynamic Resource Allocation + (how GPUs bind to pods) is generally available. + minLength: 1 + maxLength: 16 + credentials: + type: object + description: >- + UpCloud ProviderConfig or ClusterProviderConfig used + to authenticate to the UpCloud API. Defaults to the + ClusterProviderConfig named default. + properties: + type: + type: string + default: ClusterProviderConfig + enum: + - ProviderConfig + - ClusterProviderConfig + name: + type: string + default: default + minLength: 1 + maxLength: 253 + autoscaler: + type: object + description: >- + Credentials for the Kubernetes cluster autoscaler + that scales pools with maxNodeCount set. UpCloud + provisions no API credentials on UKS clusters, so + the referenced Secret is copied to the cluster for + the autoscaler to read. Required when any pool sets + maxNodeCount. + required: [secretRef] + properties: + secretRef: + type: object + description: >- + Reference to a Secret in the modelplane-system + namespace holding an UpCloud API token. + required: [name] + properties: + name: + type: string + minLength: 1 + maxLength: 253 + key: + type: string + default: token + minLength: 1 + maxLength: 253 stack: type: string default: Standard @@ -459,6 +534,12 @@ spec: items: type: object required: [name, className] + x-kubernetes-validations: + - rule: "self.name != 'system'" + message: >- + system is reserved for the system node pool every + provisioned cluster injects; a pool by that name would + take its place. properties: name: type: string @@ -619,6 +700,18 @@ spec: certificate. An InferenceGateway validates the gateway's serving certificate against it. Written once cert-manager on the cluster has issued. + serviceAnnotations: + type: object + description: >- + Annotations every gateway's LoadBalancer Service on + this cluster carries, applied through a per-Gateway + EnvoyProxy. {gateway} in a value is replaced with the + Gateway's name by the function composing it. Set only + on clouds whose load balancers need them. + maxProperties: 8 + additionalProperties: + type: string + maxLength: 1024 cache: type: object description: >- diff --git a/apis/servingstacks/definition.yaml b/apis/servingstacks/definition.yaml index 40c30446a..172cabfd2 100644 --- a/apis/servingstacks/definition.yaml +++ b/apis/servingstacks/definition.yaml @@ -62,6 +62,7 @@ spec: - Nebius - Vultr - Civo + - UpCloud - Existing draDrivers: type: array @@ -229,6 +230,17 @@ spec: description: The CA certificate, PEM encoded. minLength: 1 maxLength: 16384 + serviceAnnotations: + type: object + description: >- + Annotations for the gateway's LoadBalancer Service, + applied through a per-Gateway EnvoyProxy. {gateway} in + a value is replaced with the Gateway's name. Projected + from the InferenceCluster, not user input. + maxProperties: 8 + additionalProperties: + type: string + maxLength: 1024 type: object status: description: ServingStackStatus defines the observed state of ServingStack. diff --git a/apis/upcloudclusters/composition.yaml b/apis/upcloudclusters/composition.yaml new file mode 100644 index 000000000..d5cbe6823 --- /dev/null +++ b/apis/upcloudclusters/composition.yaml @@ -0,0 +1,13 @@ +apiVersion: apiextensions.crossplane.io/v1 +kind: Composition +metadata: + name: upcloudclusters.infrastructure.modelplane.ai +spec: + compositeTypeRef: + apiVersion: infrastructure.modelplane.ai/v1alpha1 + kind: UpCloudCluster + mode: Pipeline + pipeline: + - functionRef: + name: modelplane-modelplanecompose-upcloud-cluster + step: compose-upcloud-cluster diff --git a/apis/upcloudclusters/definition.yaml b/apis/upcloudclusters/definition.yaml new file mode 100644 index 000000000..d20b520d5 --- /dev/null +++ b/apis/upcloudclusters/definition.yaml @@ -0,0 +1,271 @@ +apiVersion: apiextensions.crossplane.io/v2 +kind: CompositeResourceDefinition +metadata: + name: upcloudclusters.infrastructure.modelplane.ai +spec: + group: infrastructure.modelplane.ai + names: + categories: + - crossplane + - modelplane + - infrastructure + kind: UpCloudCluster + plural: upcloudclusters + scope: Namespaced + versions: + - name: v1alpha1 + referenceable: true + additionalPrinterColumns: + - name: ZONE + type: string + jsonPath: .spec.zone + schema: + openAPIV3Schema: + description: >- + An UpCloudCluster provisions an UpCloud Managed Kubernetes (UKS) + cluster on a dedicated SDN network, with node groups for GPU + inference and system workloads. It outputs a Secret containing the + cluster kubeconfig. The kubeconfig embeds static client + certificates, so consumers need nothing beyond it to reach the + cluster. UKS has no server-side node group autoscaler; pools with + maxNodeCount set are scaled by the Kubernetes cluster autoscaler + installed on the cluster, which authenticates to the UpCloud API + with the token Secret spec.autoscaler references. UpCloud honors + only nodeCount changes on an existing node group; any other node + group change replaces the group. + properties: + spec: + description: UpCloudClusterSpec defines the desired state of UpCloudCluster. + required: + - zone + - nodePools + x-kubernetes-validations: + - rule: "!self.nodePools.exists(p, has(p.maxNodeCount)) || has(self.autoscaler)" + message: >- + autoscaler is required when any node pool sets maxNodeCount: + the cluster autoscaler authenticates to the UpCloud API with + the token Secret it references. + properties: + zone: + type: string + description: >- + UpCloud zone for the cluster and its network (e.g. fi-hel2, + de-fra1). GPU plans are currently available in fi-hel2 + only; list zones with upctl zone list. + minLength: 1 + maxLength: 32 + kubernetesVersion: + type: string + default: "1.36" + description: >- + UKS Kubernetes version as major.minor (e.g. 1.36); list + current versions with upctl kubernetes versions. Defaults + to the newest UKS version. Choose 1.34 or newer so Dynamic + Resource Allocation (how devices bind to pods) is generally + available, and 1.36 or newer for a CPU pool: its cores are + claimed as consumable capacity, which Kubernetes enables by + default from 1.36 (DRAConsumableCapacity). + minLength: 1 + maxLength: 16 + credentials: + type: object + description: >- + UpCloud ProviderConfig or ClusterProviderConfig used to + authenticate to the UpCloud API. Defaults to the + ClusterProviderConfig named default. + properties: + type: + type: string + default: ClusterProviderConfig + enum: + - ProviderConfig + - ClusterProviderConfig + name: + type: string + default: default + minLength: 1 + maxLength: 253 + autoscaler: + type: object + description: >- + Credentials for the Kubernetes cluster autoscaler that + scales pools with maxNodeCount set. UpCloud provisions no + API credentials on UKS clusters, so the referenced Secret + is copied to the cluster for the autoscaler to read. + Required when any pool sets maxNodeCount. + required: + - secretRef + properties: + secretRef: + type: object + description: >- + Reference to a Secret in this UpCloudCluster's + namespace holding an UpCloud API token. + required: + - name + properties: + name: + type: string + minLength: 1 + maxLength: 253 + key: + type: string + default: token + minLength: 1 + maxLength: 253 + nodePools: + type: array + description: >- + Node pools for the cluster. At least one System pool is + required for controllers and infrastructure workloads. + minItems: 1 + maxItems: 8 + x-kubernetes-list-type: map + x-kubernetes-list-map-keys: + - name + items: + type: object + required: + - name + - role + - plan + 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 injected system node pool. + properties: + name: + type: string + description: >- + Unique name for this node pool. Used as the UKS node + group name, so it must be lowercase alphanumeric and + dashes. + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + role: + type: string + description: >- + Determines what workloads this pool runs. System + pools host controllers, gateways, and infrastructure. + GPU pools host inference workloads and are tainted to + exclude non-GPU pods. CPU pools host CPU inference + workloads: a non-GPU plan and the modelplane.ai/cpu + label and taint. + enum: + - System + - GPU + - CPU + plan: + type: string + description: >- + UpCloud server plan for the pool's nodes (e.g. + GPU-8xCPU-64GB-1xL40S, PREMIUM-4xCPU-16GB). This is + the instance type used by other clouds; list plans + with upctl server plans. + minLength: 1 + maxLength: 63 + diskSizeGb: + type: integer + default: 100 + description: >- + Node disk size in GB. Honored for GPU and Cloud + Native plans, whose storage UpCloud unbundles from + the plan; Starter and Premium plans bundle a fixed + disk and ignore it. UKS's default GPU plan disk is + too small to hold an inference serving image. + minimum: 10 + maximum: 4096 + nodeCount: + type: integer + default: 1 + description: >- + Number of nodes. Fixed unless maxNodeCount enables + autoscaling. + minimum: 1 + maximum: 120 + minNodeCount: + type: integer + description: >- + Minimum number of nodes for autoscaling. Defaults to + nodeCount when maxNodeCount is set. Requires + maxNodeCount. + minimum: 1 + maximum: 120 + maxNodeCount: + type: integer + description: >- + Maximum number of nodes for autoscaling. When set the + node pool autoscales between minNodeCount (or + nodeCount) and this. UKS has no server-side + autoscaler, so the Kubernetes cluster autoscaler is + installed on the cluster to drive the pool's node + count through the UpCloud API, which requires + spec.autoscaler. Omit for fixed-size pools. + minimum: 1 + maximum: 120 + gpu: + type: object + description: >- + GPU configuration. Required when role is GPU. + required: + - acceleratorType + properties: + acceleratorType: + type: string + description: >- + GPU accelerator type (e.g. nvidia-l40s, + nvidia-h100). Used to label GPU nodes; the actual + GPU and count are determined by the plan. + minLength: 1 + maxLength: 63 + type: object + status: + description: UpCloudClusterStatus defines the observed state of UpCloudCluster. + properties: + clusterId: + type: string + description: >- + UUID of the UKS cluster at UpCloud, once observed. + compose-inference-cluster builds account-unique gateway + load balancer names from it. + maxLength: 36 + 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 UpCloudCluster. + 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, CA certificate, and static client + certificates. + 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 + type: object + required: + - spec + type: object + served: true diff --git a/crossplane-project.yaml b/crossplane-project.yaml index 3b8fafbc9..b5dd86792 100644 --- a/crossplane-project.yaml +++ b/crossplane-project.yaml @@ -83,6 +83,10 @@ spec: tarball: name: compose-telemetry-destination pathPrefix: _output/functions/compose-telemetry-destination + - source: Tarball + tarball: + name: compose-upcloud-cluster + pathPrefix: _output/functions/compose-upcloud-cluster - source: Tarball tarball: name: compose-usages @@ -188,3 +192,9 @@ spec: kind: Provider package: xpkg.upbound.io/upbound/provider-vultr version: v1.0.1 + - type: xpkg + xpkg: + apiVersion: pkg.crossplane.io/v1 + kind: Provider + package: xpkg.upbound.io/crossplane-contrib/provider-upcloud + version: v1.0.2 diff --git a/docs/content/getting-started/build-the-platform.md b/docs/content/getting-started/build-the-platform.md index 885244cd8..82f195117 100644 --- a/docs/content/getting-started/build-the-platform.md +++ b/docs/content/getting-started/build-the-platform.md @@ -51,6 +51,10 @@ against this capacity without knowing which cluster it runs on. - A Civo account with access to GPU node sizes - A Civo API key {{< /tab >}} +{{< tab "UpCloud" >}} +- An UpCloud account with access to GPU plans (quota is granted per account; ask UpCloud support to raise it) +- An UpCloud API token +{{< /tab >}} {{< /tabs >}} ## Configure cloud credentials @@ -181,6 +185,23 @@ Apply the `ClusterProviderConfig` referencing your secret: {{< manifests "getting-started/clusterproviderconfig-civo.yaml" >}} {{< /tab >}} + +{{< tab "UpCloud" >}} +Create a Kubernetes secret from your API token, as the JSON `creds` key +the provider parses: + +{{< editCode >}} +```bash +kubectl create secret generic upcloud-credentials \ + --from-literal=creds='{"token": "$@$@"}' \ + -n crossplane-system +``` +{{< /editCode >}} + +Apply the `ClusterProviderConfig` referencing your secret: + +{{< manifests "getting-started/clusterproviderconfig-upcloud.yaml" >}} +{{< /tab >}} {{}} ## Publish hardware and register the cluster @@ -256,6 +277,16 @@ GPU Operator installs it on first boot): kubectl wait --for=condition=Ready ic/civo-nyc1 --timeout=20m ``` {{< /tab >}} + +{{< tab "UpCloud" >}} +{{< manifests "getting-started/upcloud/platform.yaml" >}} + +Modelplane provisions the cluster. This takes about 15 minutes: + +```bash +kubectl wait --for=condition=Ready ic/upcloud-fi-hel2 --timeout=20m +``` +{{< /tab >}} {{< /tabs >}} {{< hint "note" >}} @@ -312,6 +343,9 @@ for an example with TLS and authentication. {{< tab "Civo" >}} {{< manifests "getting-started/civo/inference-gateway.yaml" >}} {{< /tab >}} +{{< tab "UpCloud" >}} +{{< manifests "getting-started/upcloud/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 97916e4c7..41f013964 100644 --- a/docs/content/getting-started/deploying-a-model.md +++ b/docs/content/getting-started/deploying-a-model.md @@ -33,6 +33,9 @@ The device selector matches against the capacity declared in the {{< tab "Nebius" >}} {{< manifests "getting-started/nebius/model-deployment.yaml" >}} {{< /tab >}} +{{< tab "UpCloud" >}} +{{< manifests "getting-started/upcloud/model-deployment.yaml" >}} +{{< /tab >}} {{< /tabs >}} Wait until `REPLICAS` shows `1`: diff --git a/docs/content/platform/inference-class.md b/docs/content/platform/inference-class.md index 6d8a7acd8..58618b6fe 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 "UpCloud L40S" >}} +{{< manifests "concepts/inference-class-upcloud-l40s.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 55f2eef83..fc8561de8 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 `UpCloud` (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`, `UpCloud`).** 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 @@ -168,6 +168,9 @@ is planned. {{< tab "Civo" >}} {{< manifests path="concepts/inference-cluster-civo.yaml" apply="false" >}} {{< /tab >}} +{{< tab "UpCloud" >}} +{{< manifests path="concepts/inference-cluster-upcloud.yaml" apply="false" >}} +{{< /tab >}} {{< tab "Existing" >}} {{< manifests path="concepts/inference-cluster-existing.yaml" apply="false" >}} {{< /tab >}} @@ -183,11 +186,13 @@ 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. -- **`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 - on either. Deploy single-node engines without a `ModelCache` and let - them pull weights directly from the model source. +- **`Vultr`**, **`Civo`** and **`UpCloud`**: none. VKE's built-in RWX class + (Vultr File System) isn't usable on GPU nodes, Civo's `civo-volume` class + is `ReadWriteOnce` only, UpCloud's File Storage NFS has no CSI driver (it + only supports statically provisioned volumes), and Modelplane doesn't + provision an alternative on any of them. Deploy single-node engines + without a `ModelCache` and let them pull weights directly from the model + source. - **`Existing`**: bring your own. Create an RWX StorageClass on the cluster, with any backend that supports automatic PVC provisioning (WekaIO, NetApp Trident, `FSx` for NetApp, and similar), and name it in diff --git a/docs/content/platform/providers.md b/docs/content/platform/providers.md index b7bcc7204..2f743ba1c 100644 --- a/docs/content/platform/providers.md +++ b/docs/content/platform/providers.md @@ -12,7 +12,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 `provisioning.provider`. GKE, EKS, AKS, Nebius mk8s, Vultr VKE, Civo K3s work this way today. + from an `InferenceCluster`, selected through `provisioning.provider`. GKE, EKS, AKS, Nebius mk8s, Vultr VKE, Civo K3s, UpCloud UKS 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 @@ -51,6 +51,7 @@ native provisioning. | OVHcloud | {{< accel nvidia >}} | Planned | ✓ | {{< repolink "https://github.com/edixos/provider-ovh" "edixos/provider-ovh" "community" >}} | | Scaleway (Kapsule) | {{< accel nvidia >}} | Planned | ✓ | {{< repolink "https://github.com/scaleway/crossplane-provider-scaleway" "crossplane-provider-scaleway" "official" >}} | | Tencent Cloud (TKE) | {{< accel nvidia >}} | Planned | ✓ | {{< repolink "https://github.com/crossplane-contrib/provider-tencentcloud" "provider-tencentcloud" "community" >}} | +| UpCloud (UKS) | {{< accel nvidia >}} | ✓ | ✓ | {{< repolink "https://github.com/crossplane-contrib/provider-upcloud" "provider-upcloud" "community" >}} | | Voltage Park | {{< accel nvidia >}} | Planned | ✓ | none yet | | Vultr (VKE) | {{< accel nvidia >}} {{< accel amd >}} | ✓ | ✓ | {{< repolink "https://github.com/upbound/provider-upjet-vultr" "provider-upjet-vultr" "community" >}} | {{< /table >}} diff --git a/docs/manifests/concepts/inference-class-upcloud-l40s.yaml b/docs/manifests/concepts/inference-class-upcloud-l40s.yaml new file mode 100644 index 000000000..bd3b2ac30 --- /dev/null +++ b/docs/manifests/concepts/inference-class-upcloud-l40s.yaml @@ -0,0 +1,39 @@ +# An InferenceClass describing UpCloud's GPU-8xCPU-64GB-1xL40S plan with +# 1x NVIDIA L40S. +# +# The provisioning block tells Modelplane how to create a node group of +# this class on UpCloud Managed Kubernetes. UpCloud sizes nodes by server +# plan; the plan determines the GPU, vCPU, and memory shape of each node. +# 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: upcloud-l40s-1x +spec: + description: "UpCloud GPU-8xCPU-64GB-1xL40S, 1x NVIDIA L40S 48GB" + provisioning: + provider: UpCloud + upcloud: + # GPU plans are zone-gated: at the time of writing they are offered + # in fi-hel2 only, and each account's GPU quota is granted by + # UpCloud support. List the plans with: + # upctl server plans + plan: GPU-8xCPU-64GB-1xL40S + accelerator: + type: nvidia-l40s + count: 1 + devices: + - name: gpu + claim: DRA + driver: gpu.nvidia.com + deviceClassName: gpu.nvidia.com + count: 1 + attributes: + architecture: { string: Ada Lovelace } + cudaComputeCapability: { version: "8.9.0" } + capacity: + # The L40S's real usable VRAM, what the NVIDIA DRA driver reports, + # not its nominal 48GB. A nodeSelector asking for >= 48Gi would never bind. + memory: { value: "46068Mi" } diff --git a/docs/manifests/concepts/inference-cluster-upcloud.yaml b/docs/manifests/concepts/inference-cluster-upcloud.yaml new file mode 100644 index 000000000..604c7ddc2 --- /dev/null +++ b/docs/manifests/concepts/inference-cluster-upcloud.yaml @@ -0,0 +1,68 @@ +# An InferenceCluster backed by an UpCloud Managed Kubernetes (UKS) cluster. +# +# Modelplane provisions the full cluster (SDN network, control plane, +# system + GPU node groups) and installs the inference stack (cert-manager, +# Envoy Gateway, Prometheus, NVIDIA DRA driver, LeaderWorkerSet, Gateway +# API). UKS GPU node images ship the NVIDIA driver and container toolkit, +# so the stack installs no GPU Operator. +# +# The system node pool that hosts control-plane components is provisioned +# automatically and is not declared here. Only GPU node pools - each +# referencing an InferenceClass that describes the hardware shape and how +# to provision it - need to be declared. +# +# The UKS kubeconfig embeds static client certificates, so Modelplane +# needs nothing beyond it to authenticate to the cluster. The UpCloud API +# token on the ClusterProviderConfig named default provisions the cluster. +# +# UKS has no server-side autoscaler, so pools with maxNodeCount set are +# scaled by the Kubernetes cluster autoscaler, which Modelplane installs +# on the cluster. UpCloud provisions no API credentials there, so the +# autoscaler block names a Secret in modelplane-system holding an UpCloud +# API token (key: token) that Modelplane copies to the cluster: +# +# kubectl create secret generic upcloud-autoscaler \ +# --from-literal=token= -n modelplane-system +# +# Omit the autoscaler block and maxNodeCount for fixed-size pools. +# +# ModelCache RWX storage: none. UpCloud File Storage is managed NFS +# without a CSI driver, so volumes can only be provisioned statically, +# and Modelplane provisions no alternative. Deploy single-node engines +# without a ModelCache and let them pull weights directly from the model +# source. +# +# Delete this InferenceCluster with foreground cascading deletion for a +# clean teardown: +# +# kubectl delete inferencecluster upcloud-fi-hel2 --cascade=foreground +# +# The inference stack runs on the UKS cluster and must uninstall while +# the cluster's API server and kubeconfig still exist - otherwise its +# Helm releases hang, and a load balancer one of them created can leak +# and block the network from deleting. Foreground deletion holds the +# cluster until the stack is uninstalled. Background deletion (the +# kubectl default) tears everything down at once and can orphan cloud +# resources. +apiVersion: modelplane.ai/v1alpha1 +kind: InferenceCluster +metadata: + name: upcloud-fi-hel2 + labels: + modelplane.ai/region: fi-hel2 +spec: + cluster: + source: UpCloud + upcloud: + # GPU plans are currently offered in fi-hel2 only. + zone: fi-hel2 + autoscaler: + secretRef: + name: upcloud-autoscaler + + nodePools: + - name: gpu-l40s + className: upcloud-l40s-1x + nodeCount: 1 + minNodeCount: 1 + maxNodeCount: 4 diff --git a/docs/manifests/getting-started/clusterproviderconfig-upcloud.yaml b/docs/manifests/getting-started/clusterproviderconfig-upcloud.yaml new file mode 100644 index 000000000..f67e86cdd --- /dev/null +++ b/docs/manifests/getting-started/clusterproviderconfig-upcloud.yaml @@ -0,0 +1,16 @@ +# Points the UpCloud provider at the API token Secret you created. Named +# default, so InferenceClusters with an UpCloud source use it without +# further configuration. The token provisions clusters - UKS kubeconfigs +# embed static client certificates, so consumers never need it to reach +# the clusters Modelplane provisions. +apiVersion: provider.m.upcloud.com/v1beta1 +kind: ClusterProviderConfig +metadata: + name: default +spec: + credentials: + source: Secret + secretRef: + namespace: crossplane-system + name: upcloud-credentials + key: creds diff --git a/docs/manifests/getting-started/upcloud/inference-gateway.yaml b/docs/manifests/getting-started/upcloud/inference-gateway.yaml new file mode 100644 index 000000000..32fd6bf8f --- /dev/null +++ b/docs/manifests/getting-started/upcloud/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: upcloud-fi-hel2 diff --git a/docs/manifests/getting-started/upcloud/model-deployment.yaml b/docs/manifests/getting-started/upcloud/model-deployment.yaml new file mode 100644 index 000000000..251bec3ed --- /dev/null +++ b/docs/manifests/getting-started/upcloud/model-deployment.yaml @@ -0,0 +1,31 @@ +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 L40S satisfies >= 20Gi. 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/upcloud/platform.yaml b/docs/manifests/getting-started/upcloud/platform.yaml new file mode 100644 index 000000000..f078fd189 --- /dev/null +++ b/docs/manifests/getting-started/upcloud/platform.yaml @@ -0,0 +1,43 @@ +apiVersion: modelplane.ai/v1alpha1 +kind: InferenceClass +metadata: + name: l40s-1x +spec: + # A 1x L40S server plan. UpCloud GPU plans are zone-gated (fi-hel2 at + # the time of writing) and quota is granted per account; list what + # yours offers with `upctl server plans` before picking another plan. + description: "UpCloud GPU-8xCPU-64GB-1xL40S, 1x NVIDIA L40S 48GB" + provisioning: + provider: UpCloud + upcloud: + plan: GPU-8xCPU-64GB-1xL40S + accelerator: + type: nvidia-l40s + count: 1 + devices: + - name: gpu + claim: DRA + driver: gpu.nvidia.com + deviceClassName: gpu.nvidia.com + count: 1 + attributes: + architecture: { string: Ada Lovelace } + cudaComputeCapability: { version: "8.9.0" } + capacity: + memory: { value: "46068Mi" } # L40S's real reported VRAM (not the nominal 48GB) +--- +apiVersion: modelplane.ai/v1alpha1 +kind: InferenceCluster +metadata: + name: upcloud-fi-hel2 + labels: + modelplane.ai/region: fi-hel2 +spec: + cluster: + source: UpCloud + upcloud: + zone: fi-hel2 + nodePools: + - name: gpu-l40s + className: l40s-1x + nodeCount: 1 diff --git a/docs/manifests/reference/upcloudclusters.yaml b/docs/manifests/reference/upcloudclusters.yaml new file mode 100644 index 000000000..fce2fbf02 --- /dev/null +++ b/docs/manifests/reference/upcloudclusters.yaml @@ -0,0 +1,22 @@ +apiVersion: infrastructure.modelplane.ai/v1alpha1 +kind: UpCloudCluster +metadata: + name: inference-fi-hel2 + namespace: platform +spec: + zone: fi-hel2 + autoscaler: + secretRef: + name: upcloud-autoscaler + nodePools: + - name: workers + role: System + plan: PREMIUM-4xCPU-16GB + nodeCount: 2 + - name: gpu-l40s + role: GPU + plan: GPU-8xCPU-64GB-1xL40S + nodeCount: 1 + maxNodeCount: 8 + gpu: + acceleratorType: nvidia-l40s diff --git a/docs/utils/vale/styles/config/vocabularies/Modelplane/accept.txt b/docs/utils/vale/styles/config/vocabularies/Modelplane/accept.txt index 6c4278346..deac6cc87 100644 --- a/docs/utils/vale/styles/config/vocabularies/Modelplane/accept.txt +++ b/docs/utils/vale/styles/config/vocabularies/Modelplane/accept.txt @@ -595,6 +595,9 @@ Crusoe Civo K3s edixos +UpCloud +UKS +upctl # On-premises NVIDIA systems DGX @@ -1217,6 +1220,9 @@ Crusoe Civo K3s edixos +UpCloud +UKS +upctl # On-premises NVIDIA systems DGX diff --git a/e2e/README.md b/e2e/README.md index 446e5458c..ba07e0880 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|nebius|upcloud|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, Nebius, UpCloud, 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 51ec14334..9e4fc3093 100644 --- a/e2e/clouds/__init__.py +++ b/e2e/clouds/__init__.py @@ -292,6 +292,40 @@ class Cloud: "dcgm-exporter/mp-dcgm-exporter": 2, }, ), + # The hand-written UpCloud half (stacks/clouds/upcloud.py) matches + # Nebius's shape: UKS GPU node images ship the NVIDIA driver and + # container toolkit, so the half installs no gpu-operator, and its + # charts keep default names. The labels and taint mirror what + # compose-upcloud-cluster stamps on GPU node groups. The OS release + # labels match a live UKS 1.36 GPU node (Debian 13); nothing in the + # UpCloud half reads them (no GPU operator), they just keep the fake + # nodes shaped like the real ones. + "upcloud": Cloud( + cloud="UpCloud", + labels={ + "node.kubernetes.io/instance-type": "GPU-8xCPU-64GB-1xL40S", + "modelplane.ai/pool": "gpu-fake", + "modelplane.ai/gpu": "nvidia-l40s", + "nvidia.com/gpu.present": "true", + "feature.node.kubernetes.io/pci-10de.present": "true", + "feature.node.kubernetes.io/system-os_release.ID": "debian", + "feature.node.kubernetes.io/system-os_release.VERSION_ID": "13", + }, + taint_value="true", + cpu_labels={ + "node.kubernetes.io/instance-type": "PREMIUM-8xCPU-32GB", + "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, + "node-feature-discovery/mp-node-feature-discovery-worker": 3, + "monitoring/mp-kube-prometheus-stack-prometheus-node-exporter": 5, + "dcgm-exporter/mp-dcgm-exporter": 2, + }, + ), # The hand-written Vultr half (stacks/clouds/vultr.py) has no NFD: Vultr # pre-installs the NVIDIA GPU Operator (and with it NFD) on every VKE GPU # cluster, so the stack must not run a second instance. That platform diff --git a/e2e/test_legs.py b/e2e/test_legs.py index 4c435704e..65f9203ab 100644 --- a/e2e/test_legs.py +++ b/e2e/test_legs.py @@ -41,6 +41,7 @@ "aks": "compose-aks-cluster", "civo": "compose-civo-cluster", "nebius": "compose-nebius-cluster", + "upcloud": "compose-upcloud-cluster", "vultr": "compose-vultr-cluster", } diff --git a/flake.nix b/flake.nix index d1f6a70db..b5b46641b 100644 --- a/flake.nix +++ b/flake.nix @@ -68,6 +68,7 @@ "compose-model-replica" "compose-model-route" "compose-model-service" + "compose-upcloud-cluster" "compose-usages" ]; diff --git a/functions/compose-inference-cluster/function/fn.py b/functions/compose-inference-cluster/function/fn.py index 822c54424..dcb8303fb 100644 --- a/functions/compose-inference-cluster/function/fn.py +++ b/functions/compose-inference-cluster/function/fn.py @@ -31,6 +31,7 @@ The system pool is not exposed in the user-facing API. """ +import json from typing import Final, Literal import grpc @@ -48,6 +49,7 @@ from models.ai.modelplane.infrastructure.gkecluster import v1alpha1 as gkev1alpha1 from models.ai.modelplane.infrastructure.nebiuscluster import v1alpha1 as nebiusv1alpha1 from models.ai.modelplane.infrastructure.servingstack import v1alpha1 as ssv1alpha1 +from models.ai.modelplane.infrastructure.upcloudcluster import v1alpha1 as upcloudv1alpha1 from models.ai.modelplane.infrastructure.vultrcluster import v1alpha1 as vultrv1alpha1 from models.ai.modelplane.modelcache import v1alpha1 as mcv1alpha1 from models.io.crossplane.apiextensions.managedresourceactivationpolicy import ( @@ -64,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", "UpCloud", "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_UPCLOUD: Final = "UpCloud" CLUSTER_SOURCE_EXISTING: Final = "Existing" # Condition types and reasons for the InferenceCluster XR. @@ -102,6 +105,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_UPCLOUD: frozenset({"gpu.nvidia.com", "dra.cpu"}), } # The only driver whose pools the cluster agent can observe (see @@ -245,6 +249,15 @@ "networks.vpc.civo.m.upbound.io", "firewalls.vpc.civo.m.upbound.io", ) +_ACTIVATE_UPCLOUD = ( + "kubernetesclusters.uks.m.upcloud.com", + "kubernetesnodegroups.uks.m.upcloud.com", + "networks.network.m.upcloud.com", +) + +# Annotation UpCloud's cloud controller reads load balancer configuration +# from on a LoadBalancer Service. +_UPCLOUD_LB_CONFIG_ANNOTATION = "service.beta.kubernetes.io/upcloud-load-balancer-config" def _name(meta: metav1.ObjectMeta | None) -> str: @@ -327,6 +340,11 @@ def __init__(self, req: fnv1.RunFunctionRequest, rsp: fnv1.RunFunctionResponse) self.classes: dict[str, iclv1alpha1.InferenceClass] = {} # Client CA per InferenceGateway, keyed by gateway name. self.gateway_cas: dict[str, str] = {} + # Annotations every gateway LoadBalancer Service on this cluster + # must carry, with {gateway} standing in for the Gateway's name. + # Set by clouds that need them, projected onto the ServingStack + # and published in status for compose-inference-gateway. + self.gateway_service_annotations: dict[str, str] | None = None def compose(self) -> None: # Crossplane discards a function's desired resources on any reconcile @@ -371,6 +389,8 @@ def compose(self) -> None: self.compose_vultr(cluster.vultr) elif source == CLUSTER_SOURCE_CIVO: self.compose_civo(cluster.civo) + elif source == CLUSTER_SOURCE_UPCLOUD: + self.compose_upcloud(cluster.upcloud) elif source == CLUSTER_SOURCE_EXISTING: self.compose_existing(cluster.existing) else: @@ -1032,6 +1052,54 @@ def compose_civo(self, civo: v1alpha1.Civo | None) -> None: self.write_status(self.schedulable_pools()) self.derive_conditions(cluster_ready=civo_ready) + def compose_upcloud(self, upcloud: v1alpha1.Upcloud | None) -> None: + """Compose an InferenceCluster backed by a Modelplane-provisioned + UKS cluster. Composes the UpCloudCluster XR, waits for it to be + ready, then wires its kubeconfig into the backend. + + The UKS kubeconfig embeds static client certificates, so the + kubeconfig alone is enough to reach the cluster and no identity is + layered on the ClusterProviderConfig. + """ + if not upcloud: + response.warning(self.rsp, "UpCloud configuration is required when source is UpCloud") + return + + self.compose_activation(_ACTIVATE_UPCLOUD) + if self._activation_ready(_ACTIVATE_UPCLOUD) or "upcloud-cluster" in self.req.observed.resources: + self.rsp.desired.resources["activation"].ready = fnv1.READY_TRUE + self.compose_upcloud_cluster(upcloud) + + # Available as soon as the UKS cluster's UUID is observed, well + # before any gateway composes its LoadBalancer Service, so no + # Service is ever created without its load balancer name. + self.gateway_service_annotations = self.upcloud_gateway_service_annotations() + + upcloud_ready = ( + resource.get_condition(self.req.observed.resources.get("upcloud-cluster"), "Ready").status == "True" + ) + kubeconfig = self.observed_upcloud_secret(_SECRET_TYPE_KUBECONFIG) + backend_exists = BACKEND_RESOURCE_KEY in self.req.observed.resources + + if upcloud_ready and kubeconfig: + self.compose_cluster_provider_config(kubeconfig.name, kubeconfig.key) + + backend_secrets = self.resolve_upcloud_backend_secrets( + upcloud_ready=upcloud_ready, backend_exists=backend_exists + ) + if backend_secrets or backend_exists: + if backend_secrets: + self.compose_serving_stack(backend_secrets, CLUSTER_SOURCE_UPCLOUD) + self.compose_upcloud_usage() + + if upcloud_ready: + self.rsp.desired.resources["upcloud-cluster"].ready = fnv1.READY_TRUE + if not backend_exists: + response.normal(self.rsp, "UpCloud cluster ready, composing backend") + + self.write_status(self.schedulable_pools()) + self.derive_conditions(cluster_ready=upcloud_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.""" @@ -1089,6 +1157,8 @@ def compose_serving_stack( gateway.clientCAs = [ ssv1alpha1.ClientCA(name=name, certificate=cert) for name, cert in sorted(self.gateway_cas.items()) ] + if self.gateway_service_annotations: + gateway.serviceAnnotations = self.gateway_service_annotations spec = ssv1alpha1.Spec( secrets=backend_secrets, stack=self.xr.spec.stack, @@ -1169,8 +1239,16 @@ def write_status(self, schedulable_pools: list[v1alpha1.SchedulablePool]) -> Non if cache_storage_class: status.cache = v1alpha1.CacheModel(storageClassName=cache_storage_class) gateway_address = self.observed_gateway_address() + # The service annotations are published independently of the + # address: compose-inference-gateway reads them before its Gateway's + # Service exists, which is before this cluster's own gateway has an + # address. + if self.gateway_service_annotations: + status.gateway = v1alpha1.Gateway(serviceAnnotations=self.gateway_service_annotations) if gateway_address: - status.gateway = v1alpha1.Gateway(address=gateway_address) + if status.gateway is None: + status.gateway = v1alpha1.Gateway() + status.gateway.address = gateway_address # Republished from the ServingStack so an InferenceGateway can # validate this cluster's gateway without reading a ServingStack, # which is machine-generated and not something another composition @@ -1904,6 +1982,177 @@ 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_upcloud_cluster(self, upcloud: v1alpha1.Upcloud) -> None: + """Compose an UpCloudCluster XR. + + Combines the cluster-level config (zone, autoscaler credentials) + with GPU node pools derived from the user's node pools + referenced + classes. The system pool is injected by compose-upcloud-cluster. + """ + upcloud_node_pools: list[upcloudv1alpha1.NodePool] = [] + + for pool in self.xr.spec.nodePools or []: + cls = self.classes.get(pool.className) + if not cls or not cls.spec.provisioning or not cls.spec.provisioning.upcloud: + msg = f"InferenceClass {pool.className} has no UpCloud provisioning block" + response.set_conditions( + self.rsp, + resource.Condition( + typ=CONDITION_TYPE_CLUSTER_READY, + status="False", + reason=CONDITION_REASON_INVALID_NODE_POOL, + message=msg, + ), + ) + response.warning(self.rsp, msg) + return + prov = cls.spec.provisioning.upcloud + # A class with no accelerator describes a CPU pool (see the GKE + # builder above). + node_pool = upcloudv1alpha1.NodePool( + name=pool.name, + role="GPU" if prov.accelerator else "CPU", + plan=prov.plan, + diskSizeGb=prov.diskSizeGb, + nodeCount=pool.nodeCount, + ) + if prov.accelerator: + node_pool.gpu = upcloudv1alpha1.Gpu( + acceleratorType=prov.accelerator.type, + ) + # Only set the autoscaling bounds when the pool opts in, so + # fixed-size pools stay fixed (resource.update serializes with + # exclude_unset, keeping unset bounds out of the UpCloudCluster + # spec rather than emitting maxNodeCount: null). Fabric is not + # mapped: UKS has no EFA or InfiniBand analog. + if pool.maxNodeCount is not None: + node_pool.maxNodeCount = pool.maxNodeCount + if pool.minNodeCount is not None: + node_pool.minNodeCount = pool.minNodeCount + upcloud_node_pools.append(node_pool) + + upcloud_spec = upcloudv1alpha1.Spec( + zone=upcloud.zone, + kubernetesVersion=upcloud.kubernetesVersion, + nodePools=upcloud_node_pools, + ) + if upcloud.credentials: + upcloud_spec.credentials = upcloudv1alpha1.Credentials( + type=upcloud.credentials.type, + name=upcloud.credentials.name, + ) + # The autoscaler's token Secret is in modelplane-system, the + # namespace the UpCloudCluster is composed into, so the ref passes + # through unchanged. + if upcloud.autoscaler: + upcloud_spec.autoscaler = upcloudv1alpha1.Autoscaler( + secretRef=upcloudv1alpha1.SecretRef( + name=upcloud.autoscaler.secretRef.name, + key=upcloud.autoscaler.secretRef.key, + ), + ) + resource.update( + self.rsp.desired.resources["upcloud-cluster"], + upcloudv1alpha1.UpCloudCluster( + metadata=metav1.ObjectMeta( + name=_name(self.xr.metadata), + namespace=_NAMESPACE_SYSTEM, + ), + spec=upcloud_spec, + ), + ) + + def compose_upcloud_usage(self) -> None: + """Block UpCloudCluster deletion until the backend is deleted.""" + resource.update( + self.rsp.desired.resources["usage-upcloud-by-backend"], + usagev1beta1.Usage( + metadata=metav1.ObjectMeta(namespace=_NAMESPACE_SYSTEM), + spec=usagev1beta1.Spec( + of=usagev1beta1.Of( + apiVersion="infrastructure.modelplane.ai/v1alpha1", + kind="UpCloudCluster", + 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-upcloud-by-backend"].ready = fnv1.READY_TRUE + + def resolve_upcloud_backend_secrets( + self, *, upcloud_ready: bool, backend_exists: bool + ) -> list[ssv1alpha1.Secret] | None: + """Resolve secrets for the backend from UpCloudCluster status. Falls + back to the observed backend's spec.secrets if UpCloudCluster + secrets aren't available but the backend already exists.""" + upcloud_secrets = self.observed_upcloud_secrets() + + if upcloud_ready and upcloud_secrets: + return [ssv1alpha1.Secret(type=s.type, name=s.name, key=s.key) for s in upcloud_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 upcloud_gateway_service_annotations(self) -> dict[str, str] | None: + """Annotations every gateway LoadBalancer Service on a UKS cluster + must carry. + + UpCloud's cloud controller derives a load balancer's name by + truncating to 64 characters + with no unique suffix, so Modelplane's gateway Services, which agree + on that whole prefix, collide and every load balancer after the + first fails with RESOURCE_ALREADY_EXISTS. Naming each load balancer + through the config annotation sidesteps the truncation: the cluster + UUID keeps names account-unique and the Gateway's name, substituted + for {gateway}, keeps them unique within the cluster. + """ + upcloud_observed = self.req.observed.resources.get("upcloud-cluster") + if not upcloud_observed: + return None + observed_upcloud = upcloudv1alpha1.UpCloudCluster.model_validate( + resource.struct_to_dict(upcloud_observed.resource) + ) + if not observed_upcloud.status or not observed_upcloud.status.clusterId: + return None + name = f"{observed_upcloud.status.clusterId}-{{gateway}}" + # The cloud controller hardcodes every frontend to HTTP mode, which + # can't carry the cluster gateway's TLS: the load balancer parses + # the handshake as HTTP and resets the connection. TCP passthrough + # suits both gateways; Envoy is the HTTP layer. + return {_UPCLOUD_LB_CONFIG_ANNOTATION: json.dumps({"name": name, "frontends": [{"mode": "tcp"}]})} + + def observed_upcloud_secrets(self) -> list[upcloudv1alpha1.Secret] | None: + """Read the UpCloudCluster's status.secrets from observed state.""" + upcloud_observed = self.req.observed.resources.get("upcloud-cluster") + if not upcloud_observed: + return None + observed_upcloud = upcloudv1alpha1.UpCloudCluster.model_validate( + resource.struct_to_dict(upcloud_observed.resource) + ) + if not observed_upcloud.status: + return None + return observed_upcloud.status.secrets + + def observed_upcloud_secret(self, secret_type: str) -> upcloudv1alpha1.Secret | None: + """Read a specific secret from the observed UpCloudCluster status.""" + upcloud_secrets = self.observed_upcloud_secrets() + if not upcloud_secrets: + return None + return next((s for s in upcloud_secrets if s.type == secret_type), None) + def compose_eks_usage(self) -> None: """Block EKSCluster deletion until the backend is deleted.""" resource.update( @@ -2155,8 +2404,9 @@ 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 - cache StorageClass (neither cloud has usable RWX storage). + class. Vultr, Civo and UpCloud are absent: their cluster XRs compose + no cache StorageClass (none of the three has RWX storage usable for + the cache - UpCloud's File Storage NFS has no CSI driver). For Existing clusters there is no cluster XR, so it's the user-supplied name. None until the cluster XR reports it.""" provisioned = { diff --git a/functions/compose-inference-cluster/tests/test_fn.py b/functions/compose-inference-cluster/tests/test_fn.py index 6a9e7104d..e5ddf3fc8 100644 --- a/functions/compose-inference-cluster/tests/test_fn.py +++ b/functions/compose-inference-cluster/tests/test_fn.py @@ -340,6 +340,28 @@ def _civo_cluster(*, node_pools: list[dict], credentials: dict | None, ready: fn ) +def _upcloud_cluster( + *, node_pools: list[dict], credentials: dict | None, autoscaler: dict | None, ready: fnv1.Ready +) -> fnv1.Resource: + """The composed UpCloudCluster in fi-hel2 with node_pools, using credentials and autoscaler unless they're None.""" + spec: dict = {"zone": "fi-hel2", "kubernetesVersion": "1.36", "nodePools": node_pools} + if credentials is not None: + spec["credentials"] = credentials + if autoscaler is not None: + spec["autoscaler"] = autoscaler + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "infrastructure.modelplane.ai/v1alpha1", + "kind": "UpCloudCluster", + "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 = { @@ -369,10 +391,11 @@ def _serving_stack( secrets: list[dict], client_cas: list[dict] | None, gpu: dict | None, + service_annotations: dict | None, ready: fnv1.Ready, dra_drivers: tuple[str, ...], ) -> fnv1.Resource: - """The composed ServingStack, its gateway accepting client_cas and its spec.gpu set to gpu unless they're None. + """The composed ServingStack, its gateway accepting client_cas and carrying service_annotations, and its spec.gpu set to gpu, unless they're None. dra_drivers is the drivers the cluster's classes claim, always stamped on the spec. @@ -380,6 +403,8 @@ def _serving_stack( gateway: dict = {"hostname": "gateway-test-cluster-09532.modelplane-system.svc.cluster.local"} if client_cas is not None: gateway["clientCAs"] = client_cas + if service_annotations is not None: + gateway["serviceAnnotations"] = service_annotations spec: dict = { "cloud": cloud, "gateway": gateway, @@ -644,6 +669,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "my-kubeconfig", "key": "kubeconfig"}], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_UNSPECIFIED, ), }, @@ -765,6 +791,7 @@ def _to_dict(msg: message.Message) -> dict: ], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_UNSPECIFIED, ), }, @@ -1110,6 +1137,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "my-kubeconfig", "key": "kubeconfig"}], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_TRUE, ), "pool-observation-l4-pool": _pool_observation(pool="l4-pool"), @@ -1258,6 +1286,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "my-kubeconfig", "key": "kubeconfig"}], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_TRUE, ), "pool-observation-l4-pool": _pool_observation(pool="l4-pool"), @@ -1398,6 +1427,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "my-kubeconfig", "key": "kubeconfig"}], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_TRUE, dra_drivers=("gpu.nvidia.com",), ), @@ -1527,6 +1557,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "my-kubeconfig", "key": "kubeconfig"}], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_TRUE, dra_drivers=("gpu.nvidia.com",), ), @@ -1665,6 +1696,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "my-kubeconfig", "key": "kubeconfig"}], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_TRUE, dra_drivers=("gpu.nvidia.com",), ), @@ -1799,6 +1831,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "my-kubeconfig", "key": "kubeconfig"}], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_TRUE, dra_drivers=("gpu.nvidia.com",), ), @@ -1954,6 +1987,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "my-kubeconfig", "key": "kubeconfig"}], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_UNSPECIFIED, dra_drivers=("gpu.nvidia.com",), ), @@ -2463,6 +2497,7 @@ def _to_dict(msg: message.Message) -> dict: ], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_UNSPECIFIED, ), "usage-gke-by-backend": _backend_usage(cluster_kind="GKECluster"), @@ -2657,6 +2692,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "test-cluster-kubeconfig-abcde", "key": "kubeconfig"}], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_UNSPECIFIED, ), "usage-eks-by-backend": _backend_usage(cluster_kind="EKSCluster"), @@ -3327,6 +3363,7 @@ def _to_dict(msg: message.Message) -> dict: ], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_UNSPECIFIED, ), "usage-nebius-by-backend": _backend_usage(cluster_kind="NebiusCluster"), @@ -3660,6 +3697,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "test-cluster-kubeconfig-abcde", "key": "kubeconfig"}], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_UNSPECIFIED, ), "usage-aks-by-backend": _backend_usage(cluster_kind="AKSCluster"), @@ -3955,6 +3993,7 @@ def _to_dict(msg: message.Message) -> dict: ], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_UNSPECIFIED, ), "usage-gke-by-backend": _backend_usage(cluster_kind="GKECluster"), @@ -4297,6 +4336,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "test-cluster-kubeconfig-abcde", "key": "kubeconfig"}], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_UNSPECIFIED, ), "usage-vultr-by-backend": _backend_usage(cluster_kind="VultrCluster"), @@ -4438,6 +4478,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "test-cluster-kubeconfig-abcde", "key": "kubeconfig"}], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_UNSPECIFIED, dra_drivers=("dra.cpu",), ), @@ -4848,6 +4889,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "test-cluster-kubeconfig-abcde", "key": "kubeconfig"}], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_UNSPECIFIED, ), "usage-civo-by-backend": _backend_usage(cluster_kind="CivoCluster"), @@ -5036,6 +5078,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "test-cluster-kubeconfig-abcde", "key": "kubeconfig"}], client_cas=None, gpu={"pools": [{"name": "h100-pool", "disableNvLink": True}]}, + service_annotations=None, ready=fnv1.READY_UNSPECIFIED, ), "usage-civo-by-backend": _backend_usage(cluster_kind="CivoCluster"), @@ -5068,6 +5111,614 @@ def _to_dict(msg: message.Message) -> dict: ], ), ), + ComposeCase( + name="UpCloudFirstPass", + reason="With no UpCloudCluster observed yet, an UpCloud cluster composes only the activation policy and the UpCloudCluster.", + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_inference_cluster( + cluster=v1alpha1.Cluster( + source="UpCloud", + upcloud=v1alpha1.Upcloud( + zone="fi-hel2", + autoscaler=v1alpha1.Autoscaler(secretRef=v1alpha1.SecretRefModel(name="upcloud-api")), + ), + ), + node_pools=[ + v1alpha1.NodePool(name="l40s-pool", className="gpu-l40s-upcloud", nodeCount=2, maxNodeCount=4), + ], + ), + resources={ + "activation": _observed_activation_policy( + activated=[ + "kubernetesclusters.uks.m.upcloud.com", + "kubernetesnodegroups.uks.m.upcloud.com", + "networks.network.m.upcloud.com", + ] + ), + }, + ), + required_resources={ + "class-gpu-l40s-upcloud": fnv1.Resources( + items=[ + _inference_class( + name="gpu-l40s-upcloud", + count=1, + memory="46068Mi", + provisioning={ + "provider": "UpCloud", + "upcloud": { + "plan": "GPU-8xCPU-64GB-1xL40S", + "accelerator": {"type": "nvidia-l40s", "count": 1}, + }, + }, + ), + ], + ), + }, + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_inference_cluster( + schedulable_pools=[ + { + "name": "l40s-pool", + "nodes": 4, + "devices": [ + { + "name": "gpu", + "claim": "DRA", + "driver": "gpu.nvidia.com", + "deviceClassName": "gpu.nvidia.com", + "count": 1, + "capacity": {"memory": {"value": "46068Mi"}}, + }, + ], + }, + ], + cache=None, + gateway=None, + ), + resources={ + "activation": _activation_policy( + activate=[ + "kubernetesclusters.uks.m.upcloud.com", + "kubernetesnodegroups.uks.m.upcloud.com", + "networks.network.m.upcloud.com", + ], + ready=fnv1.READY_TRUE, + ), + "upcloud-cluster": _upcloud_cluster( + node_pools=[ + { + "name": "l40s-pool", + "role": "GPU", + "plan": "GPU-8xCPU-64GB-1xL40S", + "diskSizeGb": 100, + "nodeCount": 2, + "maxNodeCount": 4, + "gpu": {"acceleratorType": "nvidia-l40s"}, + }, + ], + credentials=None, + autoscaler={"secretRef": {"name": "upcloud-api", "key": "token"}}, + 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-l40s-upcloud": fnv1.ResourceSelector( + api_version="modelplane.ai/v1alpha1", kind="InferenceClass", match_name="gpu-l40s-upcloud" + ), + }, + ), + 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="UpCloudCredentials", + reason="An UpCloud cluster's credentials pass through to the UpCloudCluster's spec.", + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_inference_cluster( + cluster=v1alpha1.Cluster( + source="UpCloud", + upcloud=v1alpha1.Upcloud( + zone="fi-hel2", + credentials=v1alpha1.Credentials(type="ProviderConfig", name="my-upcloud-account"), + autoscaler=v1alpha1.Autoscaler(secretRef=v1alpha1.SecretRefModel(name="upcloud-api")), + ), + ), + node_pools=[ + v1alpha1.NodePool(name="l40s-pool", className="gpu-l40s-upcloud", nodeCount=2, maxNodeCount=4), + ], + ), + resources={ + "activation": _observed_activation_policy( + activated=[ + "kubernetesclusters.uks.m.upcloud.com", + "kubernetesnodegroups.uks.m.upcloud.com", + "networks.network.m.upcloud.com", + ] + ), + }, + ), + required_resources={ + "class-gpu-l40s-upcloud": fnv1.Resources( + items=[ + _inference_class( + name="gpu-l40s-upcloud", + count=1, + memory="46068Mi", + provisioning={ + "provider": "UpCloud", + "upcloud": { + "plan": "GPU-8xCPU-64GB-1xL40S", + "accelerator": {"type": "nvidia-l40s", "count": 1}, + }, + }, + ), + ], + ), + }, + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_inference_cluster( + schedulable_pools=[ + { + "name": "l40s-pool", + "nodes": 4, + "devices": [ + { + "name": "gpu", + "claim": "DRA", + "driver": "gpu.nvidia.com", + "deviceClassName": "gpu.nvidia.com", + "count": 1, + "capacity": {"memory": {"value": "46068Mi"}}, + }, + ], + }, + ], + cache=None, + gateway=None, + ), + resources={ + "activation": _activation_policy( + activate=[ + "kubernetesclusters.uks.m.upcloud.com", + "kubernetesnodegroups.uks.m.upcloud.com", + "networks.network.m.upcloud.com", + ], + ready=fnv1.READY_TRUE, + ), + "upcloud-cluster": _upcloud_cluster( + node_pools=[ + { + "name": "l40s-pool", + "role": "GPU", + "plan": "GPU-8xCPU-64GB-1xL40S", + "diskSizeGb": 100, + "nodeCount": 2, + "maxNodeCount": 4, + "gpu": {"acceleratorType": "nvidia-l40s"}, + }, + ], + credentials={"type": "ProviderConfig", "name": "my-upcloud-account"}, + autoscaler={"secretRef": {"name": "upcloud-api", "key": "token"}}, + 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-l40s-upcloud": fnv1.ResourceSelector( + api_version="modelplane.ai/v1alpha1", kind="InferenceClass", match_name="gpu-l40s-upcloud" + ), + }, + ), + conditions=[ + fnv1.Condition(type="ClusterReady", status=fnv1.STATUS_CONDITION_FALSE, reason="Provisioning"), + fnv1.Condition(type="BackendReady", status=fnv1.STATUS_CONDITION_FALSE, reason="WaitingForCluster"), + ], + ), + ), + # The UKS kubeconfig embeds static client certificates, so the + # ClusterProviderConfig carries no identity (unlike Nebius). + # UpCloudCluster reports no cache StorageClass, so status.cache stays + # unset. + ComposeCase( + name="UpCloudReady", + reason="Once its UpCloudCluster is Ready, an UpCloud cluster composes a ClusterProviderConfig without identity, the ServingStack and the Usage.", + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_inference_cluster( + cluster=v1alpha1.Cluster( + source="UpCloud", + upcloud=v1alpha1.Upcloud( + zone="fi-hel2", + autoscaler=v1alpha1.Autoscaler(secretRef=v1alpha1.SecretRefModel(name="upcloud-api")), + ), + ), + node_pools=[ + v1alpha1.NodePool(name="l40s-pool", className="gpu-l40s-upcloud", nodeCount=2, maxNodeCount=4), + ], + ), + resources={ + "upcloud-cluster": fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "infrastructure.modelplane.ai/v1alpha1", + "kind": "UpCloudCluster", + "metadata": {"name": "test-cluster", "namespace": "modelplane-system"}, + "spec": { + "zone": "fi-hel2", + "nodePools": [ + { + "name": "l40s-pool", + "role": "GPU", + "plan": "GPU-8xCPU-64GB-1xL40S", + "nodeCount": 2, + }, + ], + }, + "status": { + "clusterId": "11111111-2222-3333-4444-555555555555", + "conditions": [ + { + "type": "Ready", + "status": "True", + "reason": "Available", + "lastTransitionTime": "2024-01-01T00:00:00Z", + }, + ], + "secrets": [ + { + "type": "Kubeconfig", + "name": "test-cluster-kubeconfig-abcde", + "key": "kubeconfig", + }, + ], + }, + } + ), + ), + "activation": _observed_activation_policy( + activated=[ + "kubernetesclusters.uks.m.upcloud.com", + "kubernetesnodegroups.uks.m.upcloud.com", + "networks.network.m.upcloud.com", + ] + ), + }, + ), + required_resources={ + "class-gpu-l40s-upcloud": fnv1.Resources( + items=[ + _inference_class( + name="gpu-l40s-upcloud", + count=1, + memory="46068Mi", + provisioning={ + "provider": "UpCloud", + "upcloud": { + "plan": "GPU-8xCPU-64GB-1xL40S", + "accelerator": {"type": "nvidia-l40s", "count": 1}, + }, + }, + ), + ], + ), + }, + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_inference_cluster( + schedulable_pools=[ + { + "name": "l40s-pool", + "nodes": 4, + "devices": [ + { + "name": "gpu", + "claim": "DRA", + "driver": "gpu.nvidia.com", + "deviceClassName": "gpu.nvidia.com", + "count": 1, + "capacity": {"memory": {"value": "46068Mi"}}, + }, + ], + }, + ], + cache=None, + gateway={ + "serviceAnnotations": { + "service.beta.kubernetes.io/upcloud-load-balancer-config": ( + '{"name": "11111111-2222-3333-4444-555555555555-{gateway}", "frontends": [{"mode": "tcp"}]}' + ), + }, + }, + ), + resources={ + "activation": _activation_policy( + activate=[ + "kubernetesclusters.uks.m.upcloud.com", + "kubernetesnodegroups.uks.m.upcloud.com", + "networks.network.m.upcloud.com", + ], + ready=fnv1.READY_TRUE, + ), + "upcloud-cluster": _upcloud_cluster( + node_pools=[ + { + "name": "l40s-pool", + "role": "GPU", + "plan": "GPU-8xCPU-64GB-1xL40S", + "diskSizeGb": 100, + "nodeCount": 2, + "maxNodeCount": 4, + "gpu": {"acceleratorType": "nvidia-l40s"}, + }, + ], + credentials=None, + autoscaler={"secretRef": {"name": "upcloud-api", "key": "token"}}, + ready=fnv1.READY_TRUE, + ), + "cluster-provider-config-kubernetes": _cluster_provider_config( + kubeconfig="test-cluster-kubeconfig-abcde", identity=None + ), + "serving-stack": _serving_stack( + cloud="UpCloud", + secrets=[{"type": "Kubeconfig", "name": "test-cluster-kubeconfig-abcde", "key": "kubeconfig"}], + client_cas=None, + gpu=None, + service_annotations={ + "service.beta.kubernetes.io/upcloud-load-balancer-config": ( + '{"name": "11111111-2222-3333-4444-555555555555-{gateway}", "frontends": [{"mode": "tcp"}]}' + ), + }, + dra_drivers=("gpu.nvidia.com",), + ready=fnv1.READY_UNSPECIFIED, + ), + "usage-upcloud-by-backend": _backend_usage(cluster_kind="UpCloudCluster"), + }, + ), + results=[fnv1.Result(severity=fnv1.SEVERITY_NORMAL, message="UpCloud 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-l40s-upcloud": fnv1.ResourceSelector( + api_version="modelplane.ai/v1alpha1", kind="InferenceClass", match_name="gpu-l40s-upcloud" + ), + }, + ), + conditions=[ + fnv1.Condition(type="ClusterReady", status=fnv1.STATUS_CONDITION_TRUE, reason="ClusterRunning"), + fnv1.Condition(type="BackendReady", status=fnv1.STATUS_CONDITION_FALSE, reason="Installing"), + ], + ), + ), + ComposeCase( + name="UpCloudCPUPool", + reason="Once its UpCloudCluster is Ready, an UpCloud cluster whose pool's class names no accelerator composes a CPU-role pool, a ServingStack claiming dra.cpu and the Usage.", + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_inference_cluster( + cluster=v1alpha1.Cluster( + source="UpCloud", + upcloud=v1alpha1.Upcloud(zone="fi-hel2"), + ), + node_pools=[ + v1alpha1.NodePool(name="cpu-pool", className="cpu-upcloud", nodeCount=2), + ], + ), + resources={ + "upcloud-cluster": fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "infrastructure.modelplane.ai/v1alpha1", + "kind": "UpCloudCluster", + "metadata": {"name": "test-cluster", "namespace": "modelplane-system"}, + "spec": { + "zone": "fi-hel2", + "nodePools": [ + { + "name": "cpu-pool", + "role": "CPU", + "plan": "PREMIUM-8xCPU-32GB", + "nodeCount": 2, + }, + ], + }, + "status": { + "clusterId": "11111111-2222-3333-4444-555555555555", + "conditions": [ + { + "type": "Ready", + "status": "True", + "reason": "Available", + "lastTransitionTime": "2024-01-01T00:00:00Z", + }, + ], + "secrets": [ + { + "type": "Kubeconfig", + "name": "test-cluster-kubeconfig-abcde", + "key": "kubeconfig", + }, + ], + }, + } + ), + ), + "activation": _observed_activation_policy( + activated=[ + "kubernetesclusters.uks.m.upcloud.com", + "kubernetesnodegroups.uks.m.upcloud.com", + "networks.network.m.upcloud.com", + ] + ), + }, + ), + required_resources={ + "class-cpu-upcloud": fnv1.Resources( + items=[ + _cpu_inference_class( + name="cpu-upcloud", + cpus="6", + provisioning={ + "provider": "UpCloud", + "upcloud": {"plan": "PREMIUM-8xCPU-32GB"}, + }, + ), + ], + ), + }, + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_inference_cluster( + schedulable_pools=[ + { + "name": "cpu-pool", + "nodes": 2, + "devices": [ + { + "name": "cpu", + "claim": "DRA", + "driver": "dra.cpu", + "deviceClassName": "dra.cpu", + "count": 1, + "capacity": {"cpu": {"value": "6"}}, + }, + ], + }, + ], + cache=None, + gateway={ + "serviceAnnotations": { + "service.beta.kubernetes.io/upcloud-load-balancer-config": ( + '{"name": "11111111-2222-3333-4444-555555555555-{gateway}", "frontends": [{"mode": "tcp"}]}' + ), + }, + }, + ), + resources={ + "activation": _activation_policy( + activate=[ + "kubernetesclusters.uks.m.upcloud.com", + "kubernetesnodegroups.uks.m.upcloud.com", + "networks.network.m.upcloud.com", + ], + ready=fnv1.READY_TRUE, + ), + "upcloud-cluster": _upcloud_cluster( + node_pools=[ + { + "name": "cpu-pool", + "role": "CPU", + "plan": "PREMIUM-8xCPU-32GB", + "diskSizeGb": 100, + "nodeCount": 2, + }, + ], + credentials=None, + autoscaler=None, + ready=fnv1.READY_TRUE, + ), + "cluster-provider-config-kubernetes": _cluster_provider_config( + kubeconfig="test-cluster-kubeconfig-abcde", identity=None + ), + "serving-stack": _serving_stack( + cloud="UpCloud", + secrets=[{"type": "Kubeconfig", "name": "test-cluster-kubeconfig-abcde", "key": "kubeconfig"}], + client_cas=None, + gpu=None, + service_annotations={ + "service.beta.kubernetes.io/upcloud-load-balancer-config": ( + '{"name": "11111111-2222-3333-4444-555555555555-{gateway}", "frontends": [{"mode": "tcp"}]}' + ), + }, + dra_drivers=("dra.cpu",), + ready=fnv1.READY_UNSPECIFIED, + ), + "usage-upcloud-by-backend": _backend_usage(cluster_kind="UpCloudCluster"), + }, + ), + results=[fnv1.Result(severity=fnv1.SEVERITY_NORMAL, message="UpCloud 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-upcloud": fnv1.ResourceSelector( + api_version="modelplane.ai/v1alpha1", kind="InferenceClass", match_name="cpu-upcloud" + ), + }, + ), + 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. # @@ -5218,6 +5869,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "my-kubeconfig", "key": "kubeconfig"}], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_UNSPECIFIED, ), }, @@ -5337,6 +5989,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "my-kubeconfig", "key": "kubeconfig"}], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_UNSPECIFIED, ), }, @@ -5442,6 +6095,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "my-kubeconfig", "key": "kubeconfig"}], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_UNSPECIFIED, ), }, @@ -5547,6 +6201,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "my-kubeconfig", "key": "kubeconfig"}], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_UNSPECIFIED, ), }, @@ -5656,6 +6311,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "my-kubeconfig", "key": "kubeconfig"}], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_UNSPECIFIED, ), }, @@ -5946,6 +6602,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "my-kubeconfig", "key": "kubeconfig"}], client_cas=[{"name": "fleet-0", "certificate": "fleet-ca"}], gpu=None, + service_annotations=None, ready=fnv1.READY_TRUE, ), }, @@ -6013,6 +6670,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "my-kubeconfig", "key": "kubeconfig"}], client_cas=None, gpu=None, + service_annotations=None, ready=fnv1.READY_TRUE, ), }, @@ -6086,6 +6744,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "my-kubeconfig", "key": "kubeconfig"}], client_cas=[{"name": "fleet-0", "certificate": "fleet-ca"}], gpu=None, + service_annotations=None, ready=fnv1.READY_TRUE, ), }, @@ -6156,6 +6815,7 @@ def _to_dict(msg: message.Message) -> dict: secrets=[{"type": "Kubeconfig", "name": "my-kubeconfig", "key": "kubeconfig"}], client_cas=[{"name": "fleet-0", "certificate": "fleet-ca"}], gpu=None, + service_annotations=None, ready=fnv1.READY_TRUE, ), }, @@ -6247,6 +6907,7 @@ def _to_dict(msg: message.Message) -> dict: {"name": "fleet-1", "certificate": "fleet-1-ca"}, ], gpu=None, + service_annotations=None, ready=fnv1.READY_TRUE, ), }, diff --git a/functions/compose-inference-gateway/function/fn.py b/functions/compose-inference-gateway/function/fn.py index 135d872db..e06295f88 100644 --- a/functions/compose-inference-gateway/function/fn.py +++ b/functions/compose-inference-gateway/function/fn.py @@ -488,6 +488,17 @@ def pc(self) -> str: assert self.cluster and self.cluster.status and self.cluster.status.providerConfigRef return self.cluster.status.providerConfigRef.name or "" + def _gateway_service_annotations(self) -> dict[str, str] | None: + """Annotations this gateway's LoadBalancer Service must carry, + published by the cluster for clouds whose load balancers need them, + with {gateway} replaced by this Gateway's name.""" + if not (self.cluster and self.cluster.status and self.cluster.status.gateway): + return None + annotations = self.cluster.status.gateway.serviceAnnotations + if not annotations: + return None + return {k: v.replace("{gateway}", _GATEWAY_NAME) for k, v in annotations.items()} + def compose_secrets(self) -> None: """Copy the gateway's Secrets to its cluster. @@ -545,7 +556,16 @@ def compose_envoy_proxy(self) -> None: the header carrying it is removed before the request reaches a third-party backend, so a log reading the header would drop the caller from the records that attribute provider spend. + + The cluster's gateway service annotations, published on the + InferenceCluster by clouds whose load balancers need them, land on + this gateway's LoadBalancer Service with {gateway} replaced by this + Gateway's name. """ + envoy_service: dict = {"externalTrafficPolicy": "Cluster"} + annotations = self._gateway_service_annotations() + if annotations: + envoy_service["annotations"] = annotations resource.update( self.rsp.desired.resources["envoy-proxy"], _k8s_object( @@ -558,7 +578,7 @@ def compose_envoy_proxy(self) -> None: "provider": { "type": "Kubernetes", "kubernetes": { - "envoyService": {"externalTrafficPolicy": "Cluster"}, + "envoyService": envoy_service, "envoyDeployment": { "replicas": _PROXY_REPLICAS, "patch": {"type": "StrategicMerge", "value": _NDOTS_PATCH}, diff --git a/functions/compose-inference-gateway/tests/test_fn.py b/functions/compose-inference-gateway/tests/test_fn.py index 131ef4c76..ce53c647a 100644 --- a/functions/compose-inference-gateway/tests/test_fn.py +++ b/functions/compose-inference-gateway/tests/test_fn.py @@ -67,8 +67,13 @@ def _desired_xr(*, status: dict | None, ready: fnv1.Ready) -> fnv1.Resource: return fnv1.Resource(resource=resource.dict_to_struct({"status": status}), ready=ready) -def _cluster(*, provider_config_ref: bool) -> fnv1.Resource: +def _cluster(*, provider_config_ref: bool, service_annotations: dict | None) -> fnv1.Resource: """The gateway's InferenceCluster, gw-eu, as the clusters requirement returns it.""" + status: dict = {} + if provider_config_ref: + status["providerConfigRef"] = {"name": "gw-eu-cluster-kubeconfig"} + if service_annotations is not None: + status["gateway"] = {"serviceAnnotations": service_annotations} return fnv1.Resource( resource=resource.dict_to_struct( { @@ -81,7 +86,7 @@ def _cluster(*, provider_config_ref: bool) -> fnv1.Resource: "existing": {"secretRef": {"name": "gw-eu-kubeconfig", "key": "kubeconfig"}}, } }, - "status": {"providerConfigRef": {"name": "gw-eu-cluster-kubeconfig"}} if provider_config_ref else {}, + "status": status, } ) ) @@ -180,8 +185,11 @@ def _observed_caller_auth() -> fnv1.Resource: # composed at all. -def _envoy_proxy() -> fnv1.Resource: +def _envoy_proxy(*, service_annotations: dict | None) -> fnv1.Resource: """The composed EnvoyProxy, configuring the gateway's proxy pods and its usage-record access log.""" + envoy_service: dict = {"externalTrafficPolicy": "Cluster"} + if service_annotations is not None: + envoy_service["annotations"] = service_annotations return fnv1.Resource( resource=resource.dict_to_struct( { @@ -209,7 +217,7 @@ def _envoy_proxy() -> fnv1.Resource: "provider": { "type": "Kubernetes", "kubernetes": { - "envoyService": {"externalTrafficPolicy": "Cluster"}, + "envoyService": envoy_service, "envoyDeployment": { "replicas": 2, "patch": { @@ -980,7 +988,7 @@ def _to_dict(msg: message.Message) -> dict: req=fnv1.RunFunctionRequest( observed=fnv1.State(composite=_xr(name="eu", tls=False, caller_secret_labels=None)), required_resources={ - "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True)]), + "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True, service_annotations=None)]), "gateways": fnv1.Resources( items=[_inference_gateway(name="eu", address=None), _inference_gateway(name="aaa", address=None)] ), @@ -1022,7 +1030,7 @@ def _to_dict(msg: message.Message) -> dict: req=fnv1.RunFunctionRequest( observed=fnv1.State(composite=_xr(name="aaa", tls=False, caller_secret_labels=None)), required_resources={ - "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True)]), + "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True, service_annotations=None)]), "gateways": fnv1.Resources( items=[ _inference_gateway(name="aaa", address=None), @@ -1062,7 +1070,7 @@ def _to_dict(msg: message.Message) -> dict: req=fnv1.RunFunctionRequest( observed=fnv1.State(composite=_xr(name="eu", tls=False, caller_secret_labels=None)), required_resources={ - "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=False)]), + "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=False, service_annotations=None)]), "gateways": fnv1.Resources(items=[_inference_gateway(name="eu", address=None)]), }, ), @@ -1102,7 +1110,7 @@ def _to_dict(msg: message.Message) -> dict: req=fnv1.RunFunctionRequest( observed=fnv1.State(composite=_xr(name="eu", tls=False, caller_secret_labels=None)), required_resources={ - "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True)]), + "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True, service_annotations=None)]), "gateways": fnv1.Resources(items=[_inference_gateway(name="eu", address=None)]), }, ), @@ -1111,7 +1119,77 @@ def _to_dict(msg: message.Message) -> dict: desired=fnv1.State( composite=_desired_xr(status={}, ready=fnv1.READY_FALSE), resources={ - "envoy-proxy": _envoy_proxy(), + "envoy-proxy": _envoy_proxy(service_annotations=None), + "gateway": _gateway(https=False, ready=fnv1.READY_UNSPECIFIED), + "client-selfsigned-issuer": _client_selfsigned_issuer(), + "client-ca-certificate": _client_ca_certificate(common_name="Modelplane InferenceGateway CA eu"), + "client-ca-issuer": _client_ca_issuer(), + "client-ca-bundle": _client_ca_bundle(), + "client-ca-configmap": _client_ca_configmap(), + "failover-policy": _failover_policy(), + "client-traffic-policy": _client_traffic_policy(), + "healthz-filter": _healthz_filter(), + "healthz-route": _healthz_route(), + }, + ), + results=[ + fnv1.Result( + severity=fnv1.SEVERITY_NORMAL, message="Waiting for the Gateway on cluster gw-eu to be programmed" + ) + ], + context=structpb.Struct(), + requirements=fnv1.Requirements( + resources={ + "gateways": fnv1.ResourceSelector(api_version="modelplane.ai/v1alpha1", kind="InferenceGateway"), + "clusters": fnv1.ResourceSelector(api_version="modelplane.ai/v1alpha1", kind="InferenceCluster"), + } + ), + conditions=[ + fnv1.Condition( + type="GatewayReady", + status=fnv1.STATUS_CONDITION_FALSE, + reason="WaitingForGateway", + message="Waiting for the Gateway on cluster gw-eu to be programmed", + ) + ], + ), + ), + Case( + name="ClusterServiceAnnotations", + reason=( + "A cluster publishing gateway service annotations gets them on this gateway's LoadBalancer Service " + "through the EnvoyProxy, with {gateway} replaced by the Gateway's name." + ), + req=fnv1.RunFunctionRequest( + observed=fnv1.State(composite=_xr(name="eu", tls=False, caller_secret_labels=None)), + required_resources={ + "clusters": fnv1.Resources( + items=[ + _cluster( + provider_config_ref=True, + service_annotations={ + "service.beta.kubernetes.io/upcloud-load-balancer-config": ( + '{"name": "11111111-2222-3333-4444-555555555555-{gateway}", "frontends": [{"mode": "tcp"}]}' + ), + }, + ) + ] + ), + "gateways": fnv1.Resources(items=[_inference_gateway(name="eu", address=None)]), + }, + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_xr(status={}, ready=fnv1.READY_FALSE), + resources={ + "envoy-proxy": _envoy_proxy( + service_annotations={ + "service.beta.kubernetes.io/upcloud-load-balancer-config": ( + '{"name": "11111111-2222-3333-4444-555555555555-inference-gateway", "frontends": [{"mode": "tcp"}]}' + ), + }, + ), "gateway": _gateway(https=False, ready=fnv1.READY_UNSPECIFIED), "client-selfsigned-issuer": _client_selfsigned_issuer(), "client-ca-certificate": _client_ca_certificate(common_name="Modelplane InferenceGateway CA eu"), @@ -1159,7 +1237,7 @@ def _to_dict(msg: message.Message) -> dict: resources={"gateway": _observed_gateway(address="34.56.129.3", ready=False)}, ), required_resources={ - "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True)]), + "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True, service_annotations=None)]), "gateways": fnv1.Resources(items=[_inference_gateway(name="eu", address=None)]), }, ), @@ -1177,7 +1255,7 @@ def _to_dict(msg: message.Message) -> dict: ready=fnv1.READY_FALSE, ), resources={ - "envoy-proxy": _envoy_proxy(), + "envoy-proxy": _envoy_proxy(service_annotations=None), "gateway": _gateway(https=False, ready=fnv1.READY_UNSPECIFIED), "client-selfsigned-issuer": _client_selfsigned_issuer(), "client-ca-certificate": _client_ca_certificate(common_name="Modelplane InferenceGateway CA eu"), @@ -1223,7 +1301,7 @@ def _to_dict(msg: message.Message) -> dict: resources={"gateway": _observed_gateway(address="2001:db8::1", ready=False)}, ), required_resources={ - "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True)]), + "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True, service_annotations=None)]), "gateways": fnv1.Resources(items=[_inference_gateway(name="eu", address=None)]), }, ), @@ -1241,7 +1319,7 @@ def _to_dict(msg: message.Message) -> dict: ready=fnv1.READY_FALSE, ), resources={ - "envoy-proxy": _envoy_proxy(), + "envoy-proxy": _envoy_proxy(service_annotations=None), "gateway": _gateway(https=False, ready=fnv1.READY_UNSPECIFIED), "client-selfsigned-issuer": _client_selfsigned_issuer(), "client-ca-certificate": _client_ca_certificate(common_name="Modelplane InferenceGateway CA eu"), @@ -1291,7 +1369,7 @@ def _to_dict(msg: message.Message) -> dict: ) ), required_resources={ - "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True)]), + "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True, service_annotations=None)]), "gateways": fnv1.Resources( items=[ _inference_gateway( @@ -1306,7 +1384,7 @@ def _to_dict(msg: message.Message) -> dict: desired=fnv1.State( composite=_desired_xr(status={}, ready=fnv1.READY_FALSE), resources={ - "envoy-proxy": _envoy_proxy(), + "envoy-proxy": _envoy_proxy(service_annotations=None), "gateway": _gateway(https=False, ready=fnv1.READY_UNSPECIFIED), "client-selfsigned-issuer": _client_selfsigned_issuer(), "client-ca-certificate": _client_ca_certificate( @@ -1376,7 +1454,7 @@ def _to_dict(msg: message.Message) -> dict: }, ), required_resources={ - "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True)]), + "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True, service_annotations=None)]), "gateways": fnv1.Resources(items=[_inference_gateway(name="eu", address=None)]), }, ), @@ -1395,7 +1473,7 @@ def _to_dict(msg: message.Message) -> dict: ready=fnv1.READY_UNSPECIFIED, ), resources={ - "envoy-proxy": _envoy_proxy(), + "envoy-proxy": _envoy_proxy(service_annotations=None), "gateway": _gateway(https=False, ready=fnv1.READY_TRUE), "client-selfsigned-issuer": _client_selfsigned_issuer(), "client-ca-certificate": _client_ca_certificate(common_name="Modelplane InferenceGateway CA eu"), @@ -1431,7 +1509,7 @@ def _to_dict(msg: message.Message) -> dict: resources={"gateway": _observed_gateway(address="gw.example.org", ready=True)}, ), required_resources={ - "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True)]), + "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True, service_annotations=None)]), "gateways": fnv1.Resources(items=[_inference_gateway(name="eu", address=None)]), }, ), @@ -1449,7 +1527,7 @@ def _to_dict(msg: message.Message) -> dict: ready=fnv1.READY_UNSPECIFIED, ), resources={ - "envoy-proxy": _envoy_proxy(), + "envoy-proxy": _envoy_proxy(service_annotations=None), "gateway": _gateway(https=False, ready=fnv1.READY_TRUE), "client-selfsigned-issuer": _client_selfsigned_issuer(), "client-ca-certificate": _client_ca_certificate(common_name="Modelplane InferenceGateway CA eu"), @@ -1492,7 +1570,7 @@ def _to_dict(msg: message.Message) -> dict: "gateways": fnv1.Resources(items=[_inference_gateway(name="eu", address=None)]), "clusters": fnv1.Resources( items=[ - _cluster(provider_config_ref=True), + _cluster(provider_config_ref=True, service_annotations=None), fnv1.Resource( resource=resource.dict_to_struct( { @@ -1571,7 +1649,7 @@ def _to_dict(msg: message.Message) -> dict: desired=fnv1.State( composite=_desired_xr(status={}, ready=fnv1.READY_FALSE), resources={ - "envoy-proxy": _envoy_proxy(), + "envoy-proxy": _envoy_proxy(service_annotations=None), "gateway": _gateway(https=False, ready=fnv1.READY_UNSPECIFIED), "client-selfsigned-issuer": _client_selfsigned_issuer(), "client-ca-certificate": _client_ca_certificate(common_name="Modelplane InferenceGateway CA eu"), @@ -1833,7 +1911,7 @@ def _to_dict(msg: message.Message) -> dict: req=fnv1.RunFunctionRequest( observed=fnv1.State(composite=_xr(name="eu", tls=True, caller_secret_labels=None)), required_resources={ - "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True)]), + "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True, service_annotations=None)]), "gateways": fnv1.Resources(items=[_inference_gateway(name="eu", address=None)]), "tls-secret-0": fnv1.Resources(), }, @@ -1843,7 +1921,7 @@ def _to_dict(msg: message.Message) -> dict: desired=fnv1.State( composite=_desired_xr(status={}, ready=fnv1.READY_FALSE), resources={ - "envoy-proxy": _envoy_proxy(), + "envoy-proxy": _envoy_proxy(service_annotations=None), "gateway": _gateway(https=True, ready=fnv1.READY_UNSPECIFIED), "client-selfsigned-issuer": _client_selfsigned_issuer(), "client-ca-certificate": _client_ca_certificate(common_name="Modelplane InferenceGateway CA eu"), @@ -1900,7 +1978,7 @@ def _to_dict(msg: message.Message) -> dict: }, ), required_resources={ - "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True)]), + "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True, service_annotations=None)]), "gateways": fnv1.Resources(items=[_inference_gateway(name="eu", address=None)]), "caller-secrets": fnv1.Resources( items=[_caller_key_secret(name="ml-team-keys", data={"ml-team-assistant": "c2stbXAtYTFiMmMz"})] @@ -1954,7 +2032,7 @@ def _to_dict(msg: message.Message) -> dict: } ) ), - "envoy-proxy": _envoy_proxy(), + "envoy-proxy": _envoy_proxy(service_annotations=None), "gateway": _gateway(https=True, ready=fnv1.READY_TRUE), "client-selfsigned-issuer": _client_selfsigned_issuer(), "client-ca-certificate": _client_ca_certificate(common_name="Modelplane InferenceGateway CA eu"), @@ -2053,7 +2131,7 @@ def _to_dict(msg: message.Message) -> dict: resources={"gateway": _observed_gateway(address="34.56.129.3", ready=True)}, ), required_resources={ - "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True)]), + "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True, service_annotations=None)]), "gateways": fnv1.Resources(items=[_inference_gateway(name="eu", address=None)]), "caller-secrets": fnv1.Resources( items=[_caller_key_secret(name="ml-team-keys", data={"a": "c2stMQ=="})] @@ -2075,7 +2153,7 @@ def _to_dict(msg: message.Message) -> dict: ), resources={ "caller-secret-ml-team-keys": _caller_secret(name="callers-ml-team-keys", data={"a": "c2stMQ=="}), - "envoy-proxy": _envoy_proxy(), + "envoy-proxy": _envoy_proxy(service_annotations=None), "gateway": _gateway(https=False, ready=fnv1.READY_TRUE), "client-selfsigned-issuer": _client_selfsigned_issuer(), "client-ca-certificate": _client_ca_certificate(common_name="Modelplane InferenceGateway CA eu"), @@ -2138,7 +2216,7 @@ def _to_dict(msg: message.Message) -> dict: }, ), required_resources={ - "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True)]), + "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True, service_annotations=None)]), "gateways": fnv1.Resources(items=[_inference_gateway(name="eu", address=None)]), "caller-secrets": fnv1.Resources( items=[ @@ -2164,7 +2242,7 @@ def _to_dict(msg: message.Message) -> dict: resources={ "caller-secret-team-a-keys": _caller_secret(name="callers-team-a-keys", data={"a": "c2stMQ=="}), "caller-secret-team-b-keys": _caller_secret(name="callers-team-b-keys", data={"b": "c2stMQ=="}), - "envoy-proxy": _envoy_proxy(), + "envoy-proxy": _envoy_proxy(service_annotations=None), "gateway": _gateway(https=False, ready=fnv1.READY_TRUE), "client-selfsigned-issuer": _client_selfsigned_issuer(), "client-ca-certificate": _client_ca_certificate(common_name="Modelplane InferenceGateway CA eu"), @@ -2225,7 +2303,7 @@ def _to_dict(msg: message.Message) -> dict: }, ), required_resources={ - "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True)]), + "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True, service_annotations=None)]), "gateways": fnv1.Resources(items=[_inference_gateway(name="eu", address=None)]), "caller-secrets": fnv1.Resources( items=[_caller_key_secret(name="team-a-keys", data={"a": "c2stMQ==", "z": "c2stMQ=="})] @@ -2249,7 +2327,7 @@ def _to_dict(msg: message.Message) -> dict: "caller-secret-team-a-keys": _caller_secret( name="callers-team-a-keys", data={"a": "c2stMQ==", "z": "c2stMQ=="} ), - "envoy-proxy": _envoy_proxy(), + "envoy-proxy": _envoy_proxy(service_annotations=None), "gateway": _gateway(https=False, ready=fnv1.READY_TRUE), "client-selfsigned-issuer": _client_selfsigned_issuer(), "client-ca-certificate": _client_ca_certificate(common_name="Modelplane InferenceGateway CA eu"), @@ -2314,7 +2392,7 @@ def _to_dict(msg: message.Message) -> dict: }, ), required_resources={ - "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True)]), + "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True, service_annotations=None)]), "gateways": fnv1.Resources(items=[_inference_gateway(name="eu", address=None)]), "caller-secrets": fnv1.Resources( items=[ @@ -2342,7 +2420,7 @@ def _to_dict(msg: message.Message) -> dict: "caller-secret-team-b-keys": _caller_secret( name="callers-team-b-keys", data={"x": "c2stMg==", "y": "c2stMQ=="} ), - "envoy-proxy": _envoy_proxy(), + "envoy-proxy": _envoy_proxy(service_annotations=None), "gateway": _gateway(https=False, ready=fnv1.READY_TRUE), "client-selfsigned-issuer": _client_selfsigned_issuer(), "client-ca-certificate": _client_ca_certificate(common_name="Modelplane InferenceGateway CA eu"), @@ -2405,7 +2483,7 @@ def _to_dict(msg: message.Message) -> dict: }, ), required_resources={ - "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True)]), + "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True, service_annotations=None)]), "gateways": fnv1.Resources(items=[_inference_gateway(name="eu", address=None)]), "caller-secrets": fnv1.Resources( items=[ @@ -2433,7 +2511,7 @@ def _to_dict(msg: message.Message) -> dict: "caller-secret-team-b-keys": _caller_secret( name="callers-team-b-keys", data={"a": "c2stMQ==", "b": "c2stMg=="} ), - "envoy-proxy": _envoy_proxy(), + "envoy-proxy": _envoy_proxy(service_annotations=None), "gateway": _gateway(https=False, ready=fnv1.READY_TRUE), "client-selfsigned-issuer": _client_selfsigned_issuer(), "client-ca-certificate": _client_ca_certificate(common_name="Modelplane InferenceGateway CA eu"), @@ -2480,7 +2558,7 @@ def _to_dict(msg: message.Message) -> dict: composite=_xr(name="eu", tls=False, caller_secret_labels={"modelplane.ai/inference-keys": "true"}) ), required_resources={ - "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True)]), + "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True, service_annotations=None)]), "gateways": fnv1.Resources(items=[_inference_gateway(name="eu", address=None)]), "caller-secrets": fnv1.Resources( items=[ @@ -2497,7 +2575,7 @@ def _to_dict(msg: message.Message) -> dict: resources={ "caller-secret-team-a-keys": _caller_secret(name="callers-team-a-keys", data={"a": "c2stMQ=="}), "caller-secret-team-b-keys": _caller_secret(name="callers-team-b-keys", data={"b": "c2stMg=="}), - "envoy-proxy": _envoy_proxy(), + "envoy-proxy": _envoy_proxy(service_annotations=None), "gateway": _gateway(https=False, ready=fnv1.READY_UNSPECIFIED), "client-selfsigned-issuer": _client_selfsigned_issuer(), "client-ca-certificate": _client_ca_certificate(common_name="Modelplane InferenceGateway CA eu"), @@ -2560,7 +2638,7 @@ def _to_dict(msg: message.Message) -> dict: composite=_xr(name="eu", tls=False, caller_secret_labels={"modelplane.ai/inference-keys": "true"}) ), required_resources={ - "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True)]), + "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True, service_annotations=None)]), "gateways": fnv1.Resources(items=[_inference_gateway(name="eu", address=None)]), "caller-secrets": fnv1.Resources(), }, @@ -2570,7 +2648,7 @@ def _to_dict(msg: message.Message) -> dict: desired=fnv1.State( composite=_desired_xr(status={}, ready=fnv1.READY_FALSE), resources={ - "envoy-proxy": _envoy_proxy(), + "envoy-proxy": _envoy_proxy(service_annotations=None), "gateway": _gateway(https=False, ready=fnv1.READY_UNSPECIFIED), "client-selfsigned-issuer": _client_selfsigned_issuer(), "client-ca-certificate": _client_ca_certificate(common_name="Modelplane InferenceGateway CA eu"), @@ -2667,7 +2745,7 @@ def _to_dict(msg: message.Message) -> dict: composite=_xr(name="eu", tls=False, caller_secret_labels={"modelplane.ai/inference-keys": "true"}) ), required_resources={ - "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True)]), + "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True, service_annotations=None)]), "gateways": fnv1.Resources(items=[_inference_gateway(name="eu", address=None)]), }, ), @@ -2676,7 +2754,7 @@ def _to_dict(msg: message.Message) -> dict: desired=fnv1.State( composite=_desired_xr(status={}, ready=fnv1.READY_FALSE), resources={ - "envoy-proxy": _envoy_proxy(), + "envoy-proxy": _envoy_proxy(service_annotations=None), "gateway": _gateway(https=False, ready=fnv1.READY_UNSPECIFIED), "client-selfsigned-issuer": _client_selfsigned_issuer(), "client-ca-certificate": _client_ca_certificate(common_name="Modelplane InferenceGateway CA eu"), @@ -2786,7 +2864,7 @@ def _to_dict(msg: message.Message) -> dict: req=fnv1.RunFunctionRequest( observed=fnv1.State(composite=_xr(name="eu", tls=True, caller_secret_labels={"team": "ml"})), required_resources={ - "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True)]), + "clusters": fnv1.Resources(items=[_cluster(provider_config_ref=True, service_annotations=None)]), "gateways": fnv1.Resources(items=[_inference_gateway(name="eu", address=None)]), "caller-secrets": fnv1.Resources( items=[_caller_key_secret(name="ml-team-keys", data={"alice": "a2V5"})] @@ -2838,7 +2916,7 @@ def _to_dict(msg: message.Message) -> dict: } ) ), - "envoy-proxy": _envoy_proxy(), + "envoy-proxy": _envoy_proxy(service_annotations=None), "gateway": _gateway(https=True, ready=fnv1.READY_UNSPECIFIED), "client-selfsigned-issuer": _client_selfsigned_issuer(), "client-ca-certificate": _client_ca_certificate(common_name="Modelplane InferenceGateway CA eu"), diff --git a/functions/compose-serving-stack/function/gateway.py b/functions/compose-serving-stack/function/gateway.py index 78b4a5bb9..87707df1b 100644 --- a/functions/compose-serving-stack/function/gateway.py +++ b/functions/compose-serving-stack/function/gateway.py @@ -31,6 +31,19 @@ # fn.compose_gateway_pki). The HTTPS listener terminates TLS with it. _GATEWAY_SERVING_SECRET = "cluster-gateway-serving" +# The Gateway's name, which also replaces {gateway} in +# spec.gateway.serviceAnnotations values, so a cloud can name each +# gateway's load balancer uniquely. +_GATEWAY_NAME = "cluster-gateway" + +# The per-cluster EnvoyProxy carrying the gateway Service's cloud-specific +# annotations. The Gateway references it through its own parametersRef, +# which replaces (not merges with) the GatewayClass-level EnvoyProxy the +# stack's common components lay down, so it restates the +# externalTrafficPolicy pin from common.py's gateway-proxy component; a +# change to one moves both. +_LB_PROXY_NAME = "cluster-gateway-lb" + # Label compose-inference-cluster stamps on the namespaces it mirrors onto this # cluster. The gateway's listeners select on it so a replica's HTTPRoute attaches # from its own team's namespace. @@ -51,8 +64,13 @@ def objects(gw: v1alpha1.Gateway) -> list[tuple[str, dict[str, Any], str | None]]: - """The gateway pair as (key, manifest, readiness CEL) triples.""" - return [ + """The gateway pair as (key, manifest, readiness CEL) triples. + + With spec.gateway.serviceAnnotations set, a per-cluster EnvoyProxy + joins the pair to put them on the Gateway's LoadBalancer Service, + and the Gateway references it instead of the GatewayClass default. + """ + triples: list[tuple[str, dict[str, Any], str | None]] = [ ( "gateway-class", { @@ -73,17 +91,57 @@ def objects(gw: v1alpha1.Gateway) -> list[tuple[str, dict[str, Any], str | None] }, None, ), + ] + + gateway_spec: dict[str, Any] = { + "gatewayClassName": gw.className, + } + if gw.serviceAnnotations: + triples.append( + ( + "gateway-lb-proxy", + { + "apiVersion": "gateway.envoyproxy.io/v1alpha1", + "kind": "EnvoyProxy", + "metadata": {"name": _LB_PROXY_NAME, "namespace": "modelplane-system"}, + "spec": { + "provider": { + "type": "Kubernetes", + "kubernetes": { + "envoyService": { + "externalTrafficPolicy": "Cluster", + "annotations": { + k: v.replace("{gateway}", _GATEWAY_NAME) + for k, v in gw.serviceAnnotations.items() + }, + }, + }, + }, + }, + }, + None, + ) + ) + gateway_spec["infrastructure"] = { + "parametersRef": { + "group": "gateway.envoyproxy.io", + "kind": "EnvoyProxy", + "name": _LB_PROXY_NAME, + }, + } + + triples.append( ( "gateway", { "apiVersion": "gateway.networking.k8s.io/v1", "kind": "Gateway", "metadata": { - "name": "cluster-gateway", + "name": _GATEWAY_NAME, "namespace": "modelplane-system", }, "spec": { - "gatewayClassName": gw.className, + **gateway_spec, # One HTTPS listener and nothing else. The gateway's Service # is a public load balancer with a port per listener, and the # serving HTTPRoutes carry no sectionName, so they attach to @@ -115,5 +173,6 @@ def objects(gw: v1alpha1.Gateway) -> list[tuple[str, dict[str, Any], str | None] }, }, READY_CEL, - ), - ] + ) + ) + return triples diff --git a/functions/compose-serving-stack/function/stacks/__init__.py b/functions/compose-serving-stack/function/stacks/__init__.py index 8187499ab..9d6d146ed 100644 --- a/functions/compose-serving-stack/function/stacks/__init__.py +++ b/functions/compose-serving-stack/function/stacks/__init__.py @@ -22,7 +22,7 @@ """ from function.stacks import common, components, dynamo, metrics, standard -from function.stacks.clouds import civo, existing, nebius, vultr +from function.stacks.clouds import civo, existing, nebius, upcloud, 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 +52,7 @@ "Nebius": nebius.COMPONENTS, "Vultr": vultr.COMPONENTS, "Civo": civo.COMPONENTS, + "UpCloud": upcloud.COMPONENTS, "Existing": existing.COMPONENTS, } @@ -73,6 +74,7 @@ "Nebius": frozenset(nebius.EXTERNAL_DRIVERS), "Vultr": frozenset(vultr.EXTERNAL_DRIVERS), "Civo": frozenset(civo.EXTERNAL_DRIVERS), + "UpCloud": frozenset(upcloud.EXTERNAL_DRIVERS), "Existing": frozenset(existing.EXTERNAL_DRIVERS), } diff --git a/functions/compose-serving-stack/function/stacks/clouds/upcloud.py b/functions/compose-serving-stack/function/stacks/clouds/upcloud.py new file mode 100644 index 000000000..5250c773d --- /dev/null +++ b/functions/compose-serving-stack/function/stacks/clouds/upcloud.py @@ -0,0 +1,228 @@ +# 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 UpCloud. + +No generator covers UpCloud, so Modelplane pins the whole cloud half by +hand, in the same shape a generator emits. Where a component also +appears on a generated cloud, this file states the same pin, so one +review moves both halves when a version changes - regenerate, then +mirror the shared pins here. The DCGM exporter's metrics CSV goes one +step further: rather than restating it, this file imports it from the +shared generated/aicr/dcgm.py, as civo.py does. + +UpCloud pre-installs the NVIDIA driver and container toolkit in its UKS +GPU node images, at the default root (/), and runs no managed GPU +Operator add-on. So like Nebius this half installs no GPU Operator: +NFD labels the GPU nodes and the DRA driver's kubelet plugin publishes +their devices. With no operator supplying one, the standalone +dcgm-exporter chart exports the GPU fields the collector's +modelplane-gpu job scrapes. +""" + +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] = [] + +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}}, + ), + Chart( + key="kube-prometheus-stack", + release="mp-kube-prometheus-stack", + namespace="monitoring", + chart="kube-prometheus-stack", + repository="https://prometheus-community.github.io/helm-charts", + version="84.4.0", + values={ + "fullnameOverride": "prometheus", + "prometheus": { + "prometheusSpec": { + # Discover PodMonitors across all namespaces. + "podMonitorSelectorNilUsesHelmValues": False, + "podMonitorNamespaceSelector": {}, + # Scrape Envoy Gateway proxy pods for upstream + # request metrics (envoy_cluster_upstream_rq_active): + # in-flight requests at the proxy level. + "additionalScrapeConfigs": [ + { + "job_name": "envoy-gateway-proxy", + "kubernetes_sd_configs": [ + { + "role": "pod", + "namespaces": { + "names": ["envoy-gateway-system"], + }, + }, + ], + "relabel_configs": [ + { + "source_labels": [ + "__meta_kubernetes_pod_label_app_kubernetes_io_component", + ], + "action": "keep", + "regex": "proxy", + }, + { + "source_labels": ["__address__"], + "action": "replace", + "regex": "([^:]+)(?::\\d+)?", + "replacement": "$1:19001", + "target_label": "__address__", + }, + ], + "metrics_path": "/stats/prometheus", + }, + ], + }, + }, + # The node-exporter chart's default toleration is keyless - it + # tolerates every taint, landing the pod on tainted nodes by + # accident rather than by intent. Scope it to the GPU and CPU pool + # taints, mirroring the generated clouds (TOLERATIONS in + # generate.py); as a DaemonSet it still reaches every untainted + # node. + "prometheus-node-exporter": { + "tolerations": [ + {"key": "nvidia.com/gpu", "operator": "Exists", "effect": "NoSchedule"}, + {"key": "modelplane.ai/cpu", "operator": "Exists", "effect": "NoSchedule"}, + ], + }, + # Disable components we don't need for observability. + "grafana": {"enabled": False}, + "alertmanager": {"enabled": False}, + }, + ), + Chart( + key="node-feature-discovery", + release="mp-node-feature-discovery", + namespace="node-feature-discovery", + chart="node-feature-discovery", + repository="https://kubernetes-sigs.github.io/node-feature-discovery/charts", + version="0.19.0", + # NFD exists here to label GPU nodes for the DRA driver, so it + # carries the GPU stack's driver and stays off clusters whose + # classes claim no GPUs. + dra_drivers=["gpu.nvidia.com"], + # The worker must run on the very nodes it is supposed to label: + # the DRA driver's kubelet plugin schedules only onto nodes + # carrying an NFD GPU label (feature.node.kubernetes.io/pci-10de + # and friends). The cluster compositions taint GPU nodes with + # nvidia.com/gpu, and the NFD chart's worker tolerates nothing + # by default. Without this toleration the chain breaks silently: + # no worker on the GPU node, no pci-10de label, no kubelet + # plugin, no ResourceSlices, and every GPU ResourceClaim stays + # unallocatable with all components looking healthy. Exists + # matches every taint value. + values={ + "worker": { + "tolerations": [ + { + "key": "nvidia.com/gpu", + "operator": "Exists", + "effect": "NoSchedule", + }, + ], + }, + }, + ), + # Publishes each GPU node's devices as DRA ResourceSlices and + # registers the gpu.nvidia.com DeviceClass ModelReplica + # ResourceClaims request through. GPU allocation is opt-in; + # ComputeDomains (multi-node NVLink) is unused and would pull in + # extra prerequisites. nvidiaDriverRoot stays at the chart default + # (/): UKS GPU node images put the driver at the default root. + 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}}, + }, + ), + # Exports DCGM fields for the collector's modelplane-gpu job, which + # keeps pods named .*dcgm.* with a port named metrics. Without this every + # modelplane_gpu_* series is empty. DCGM runs embedded (the chart + # default). The counters are the generated clouds' list, not the + # chart's shorter default, so UpCloud exports the same DCGM fields as + # EKS, GKE, AKS and Civo. The node terms are the DRA kubelet plugin's + # PCI terms; the standalone NFD above labels UKS GPU nodes pci-10de. + # The collector finds the pod itself, so no ServiceMonitor. + 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", + # Exports NVIDIA GPU telemetry, so it follows the GPU stack's + # driver and stays off clusters whose classes claim no GPUs. + dra_drivers=["gpu.nvidia.com"], + values={ + "serviceMonitor": {"enabled": False}, + "customMetrics": DCGM_METRICS_CSV, + # Attribute each GPU's series to the pod holding it. UpCloud GPUs + # are allocated through DRA, which the exporter only maps back to + # pods with this set; the chart adds the RBAC it needs. + "kubernetesDRA": {"enabled": True}, + "tolerations": [ + { + "key": "nvidia.com/gpu", + "operator": "Exists", + "effect": "NoSchedule", + }, + ], + # The first three nodeSelectorTerms of dra-driver-nvidia-gpu + # v0.5.0's kubeletPlugin affinity. 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/components.py b/functions/compose-serving-stack/function/stacks/components.py index 69e22a21f..fd264037e 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", "UpCloud", "Existing"] Stack = Literal["Standard", "Dynamo"] diff --git a/functions/compose-serving-stack/tests/test_fn.py b/functions/compose-serving-stack/tests/test_fn.py index 2b82ccc35..199dd91a5 100644 --- a/functions/compose-serving-stack/tests/test_fn.py +++ b/functions/compose-serving-stack/tests/test_fn.py @@ -8105,6 +8105,280 @@ def test_compose(case: ComposeCase) -> None: "usage-modelexpress-crds-modelmetadatas.modelexpress.nvidia.com-by-modelexpress-server", }, ), + ComposedResourceKeysCase( + name="UpCloudStandard", + reason=( + "On UpCloud, the Standard stack composes the gateway, the common components, UpCloud'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="UpCloud", + 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", + ) + ], + serviceAnnotations={ + "service.beta.kubernetes.io/upcloud-load-balancer-config": ( + '{"name": "11111111-2222-3333-4444-555555555555-{gateway}", "frontends": [{"mode": "tcp"}]}' + ), + }, + ), + gpu=None, + ), + resources={ + "provider-config-kubernetes": _observed_ready(), + "provider-config-helm": _observed_ready(), + "gateway": _observed_ready(), + "gateway-class": _observed_ready(), + "gateway-lb-proxy": _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(), + "kube-prometheus-stack": _observed_ready(), + "node-feature-discovery": _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", + # The per-gateway EnvoyProxy carrying UpCloud's load balancer + # name annotation (spec.gateway.serviceAnnotations). + "gateway-lb-proxy", + "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 UpCloud half. + "cert-manager", + "kube-prometheus-stack", + "node-feature-discovery", + "nvidia-dra-driver-gpu", + "dcgm-exporter", + # The Standard stack. + "leader-worker-set", + }, + ), + ComposedResourceKeysCase( + name="UpCloudDynamo", + reason=( + "On UpCloud, the Dynamo stack composes the gateway, the common components, UpCloud'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="UpCloud", + 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", + ) + ], + serviceAnnotations={ + "service.beta.kubernetes.io/upcloud-load-balancer-config": ( + '{"name": "11111111-2222-3333-4444-555555555555-{gateway}", "frontends": [{"mode": "tcp"}]}' + ), + }, + ), + gpu=None, + ), + resources={ + "provider-config-kubernetes": _observed_ready(), + "provider-config-helm": _observed_ready(), + "gateway": _observed_ready(), + "gateway-class": _observed_ready(), + "gateway-lb-proxy": _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(), + "kube-prometheus-stack": _observed_ready(), + "node-feature-discovery": _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", + # The per-gateway EnvoyProxy carrying UpCloud's load balancer + # name annotation (spec.gateway.serviceAnnotations). + "gateway-lb-proxy", + "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 UpCloud half. + "cert-manager", + "kube-prometheus-stack", + "node-feature-discovery", + "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="ExistingStandard", reason=( diff --git a/functions/compose-serving-stack/tests/test_gateway.py b/functions/compose-serving-stack/tests/test_gateway.py new file mode 100644 index 000000000..41d3fd30d --- /dev/null +++ b/functions/compose-serving-stack/tests/test_gateway.py @@ -0,0 +1,163 @@ +# 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 cluster gateway pair.""" + +import dataclasses +from typing import Any + +import pytest +from function import gateway +from models.ai.modelplane.infrastructure.servingstack import v1alpha1 + + +def _gateway_class() -> dict: + """The GatewayClass every case composes, pointing at the cluster-gateway EnvoyProxy.""" + return { + "apiVersion": "gateway.networking.k8s.io/v1", + "kind": "GatewayClass", + "metadata": {"name": "envoy"}, + "spec": { + "controllerName": "gateway.envoyproxy.io/gatewayclass-controller", + "parametersRef": { + "group": "gateway.envoyproxy.io", + "kind": "EnvoyProxy", + "name": "cluster-gateway", + "namespace": "modelplane-system", + }, + }, + } + + +def _listeners() -> list[dict]: + """The HTTPS listener every case's Gateway carries.""" + return [ + { + "name": "https", + "protocol": "HTTPS", + "port": 443, + "hostname": "test-backend.gateways.example.com", + "tls": { + "mode": "Terminate", + "certificateRefs": [{"name": "cluster-gateway-serving"}], + }, + "allowedRoutes": { + "namespaces": { + "from": "Selector", + "selector": {"matchExpressions": [{"key": "modelplane.ai/namespace", "operator": "Exists"}]}, + } + }, + } + ] + + +@dataclasses.dataclass +class Case: + """A test case for gateway.objects.""" + + name: str + reason: str + gw: v1alpha1.Gateway + want: list[tuple[str, dict[str, Any], str | None]] + + +OBJECTS_CASES = [ + Case( + name="Plain", + reason="Without service annotations, the pair is the GatewayClass and the Gateway, which uses the GatewayClass-level EnvoyProxy.", + gw=v1alpha1.Gateway(hostname="test-backend.gateways.example.com"), + want=[ + ("gateway-class", _gateway_class(), None), + ( + "gateway", + { + "apiVersion": "gateway.networking.k8s.io/v1", + "kind": "Gateway", + "metadata": {"name": "cluster-gateway", "namespace": "modelplane-system"}, + "spec": { + "gatewayClassName": "envoy", + "listeners": _listeners(), + }, + }, + gateway.READY_CEL, + ), + ], + ), + Case( + name="ServiceAnnotations", + reason="With service annotations, a per-gateway EnvoyProxy carries them on the Gateway's Service with {gateway} replaced by the Gateway's name, and the Gateway references it through its own parametersRef.", + gw=v1alpha1.Gateway( + hostname="test-backend.gateways.example.com", + serviceAnnotations={ + "service.beta.kubernetes.io/upcloud-load-balancer-config": ( + '{"name": "11111111-2222-3333-4444-555555555555-{gateway}", "frontends": [{"mode": "tcp"}]}' + ), + }, + ), + want=[ + ("gateway-class", _gateway_class(), None), + ( + "gateway-lb-proxy", + { + "apiVersion": "gateway.envoyproxy.io/v1alpha1", + "kind": "EnvoyProxy", + "metadata": {"name": "cluster-gateway-lb", "namespace": "modelplane-system"}, + "spec": { + "provider": { + "type": "Kubernetes", + "kubernetes": { + "envoyService": { + "externalTrafficPolicy": "Cluster", + "annotations": { + "service.beta.kubernetes.io/upcloud-load-balancer-config": ( + '{"name": "11111111-2222-3333-4444-555555555555-cluster-gateway", "frontends": [{"mode": "tcp"}]}' + ), + }, + }, + }, + }, + }, + }, + None, + ), + ( + "gateway", + { + "apiVersion": "gateway.networking.k8s.io/v1", + "kind": "Gateway", + "metadata": {"name": "cluster-gateway", "namespace": "modelplane-system"}, + "spec": { + "gatewayClassName": "envoy", + "infrastructure": { + "parametersRef": { + "group": "gateway.envoyproxy.io", + "kind": "EnvoyProxy", + "name": "cluster-gateway-lb", + }, + }, + "listeners": _listeners(), + }, + }, + gateway.READY_CEL, + ), + ], + ), +] + + +@pytest.mark.parametrize("case", OBJECTS_CASES, ids=lambda case: case.name) +def test_objects(case: Case) -> None: + """objects renders the gateway pair from spec.gateway.""" + got = gateway.objects(case.gw) + assert got == case.want, case.reason diff --git a/functions/compose-serving-stack/tests/test_stacks.py b/functions/compose-serving-stack/tests/test_stacks.py index 14626d7f4..d5163fe27 100644 --- a/functions/compose-serving-stack/tests/test_stacks.py +++ b/functions/compose-serving-stack/tests/test_stacks.py @@ -242,6 +242,12 @@ def test_join_fails_closed(case: JoinFailsClosedCase) -> None: cloud="Civo", want=frozenset({"gpu.nvidia.com", "dra.cpu"}), ), + SupportedDriversCase( + name="UpCloud", + reason="UpCloud tags the NVIDIA and CPU stacks.", + cloud="UpCloud", + 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.", @@ -478,6 +484,22 @@ def test_nebius_dcgm_exporter() -> None: assert exporter.values["customMetrics"] == _DCGM_METRICS_CSV +def test_upcloud_dcgm_exporter() -> None: + """UpCloud's dcgm-exporter exports the generated clouds' DCGM fields. + + UpCloud installs 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 UpCloud 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("UpCloud", "Standard") + 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. @@ -496,6 +518,24 @@ def test_nebius_exporter_affinity() -> None: ] +def test_upcloud_exporter_affinity() -> None: + """UpCloud's dcgm-exporter schedules by the DRA kubelet plugin's PCI terms. + + The standalone NFD labels UKS GPU nodes pci-10de; the other two terms + mirror the kubelet plugin's affinity so the exporter lands wherever the + plugin does. Spelled out as a literal so a changed term fails here rather + than only on a real cluster. + """ + joined = stacks.join("UpCloud", "Standard") + 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"] + assert [term["matchExpressions"] for term in required["nodeSelectorTerms"]] == [ + [{"key": f"feature.node.kubernetes.io/{label}.present", "operator": "In", "values": ["true"]}] + for label in ("pci-10de", "pci-0302_10de", "pci-0300_10de") + ] + + def test_nebius_exporter_dra() -> None: """Nebius's dcgm-exporter attributes GPU series to DRA-allocated pods. @@ -509,6 +549,19 @@ def test_nebius_exporter_dra() -> None: assert exporter.values["kubernetesDRA"] == {"enabled": True} +def test_upcloud_exporter_dra() -> None: + """UpCloud's dcgm-exporter attributes GPU series to DRA-allocated pods. + + UpCloud 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("UpCloud", "Standard") + 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} + + # Each case's input is the real joined Civo stack rather than a literal one. # The transform finds the gpu-operator and DRA driver charts by key, and where # a key matches nothing it rewrites nothing, without complaint. Only the real diff --git a/functions/compose-upcloud-cluster/function/__init__.py b/functions/compose-upcloud-cluster/function/__init__.py new file mode 100644 index 000000000..b53d39d12 --- /dev/null +++ b/functions/compose-upcloud-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-upcloud-cluster/function/fn.py b/functions/compose-upcloud-cluster/function/fn.py new file mode 100644 index 000000000..708232d46 --- /dev/null +++ b/functions/compose-upcloud-cluster/function/fn.py @@ -0,0 +1,666 @@ +# 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 an UpCloud Managed Kubernetes (UKS) cluster with node groups. + +This function provisions a UKS cluster on a dedicated SDN network (UKS +requires a private network per cluster, with DHCP on and its default +route off), with a fixed system node group and a KubernetesNodeGroup +managed resource for each user-defined pool. UKS has no inline pools on +the cluster, so the system pool is a separate node group too. Node +groups gate on the cluster being Ready: UKS only accepts node group +operations on a running cluster. UpCloud honors only nodeCount changes +on an existing node group; the provider replaces the group for any +other change. + +The cluster's kubeconfig embeds static client certificates, so the +kubeconfig alone is enough to reach the cluster. fetchKubeconfig must +be true or the provider publishes no kubeconfig to the connection +secret. + +UKS has no server-side node group autoscaler, and the cluster +autoscaler's UpCloud cloud provider is not merged upstream +(kubernetes/autoscaler#10234); UpCloud publishes images of its fork at +ghcr.io/upcloudltd/autoscaler. Pools with maxNodeCount set are scaled +by that autoscaler, installed on the workload cluster through the +upstream chart with the image overridden. It authenticates to the +UpCloud API with a token from the Secret spec.autoscaler references, +which UpCloud provisions nowhere on the cluster, so an Object copies it +to kube-system. provider-kubernetes resolves the copy's patchesFrom +reference server-side; the token never passes through this function or +the Object's manifest. The newest fork image is built for Kubernetes +1.29, older than any UKS version this XR provisions; it talks to the +UpCloud API rather than version-skewed Kubernetes APIs, but the skew is +outside the autoscaler's support policy. The autoscaler enforces a +minimum of one node per group, so pools can't scale to zero. + +UpCloud pre-installs the NVIDIA driver and container toolkit in its GPU +node images, so GPU pools need only the taint and pool labels here; the +serving stack installs NFD and the DRA driver (no GPU Operator), and +the DRA driver is the only GPU allocator. No GPU readiness gate is +composed: there is no pre-installed operator to observe. + +No ModelCache RWX StorageClass is composed: UpCloud File Storage is +managed NFS but has no CSI driver, so PersistentVolumes can only be +provisioned statically, and Modelplane ships no cache storage of its +own on UpCloud. +""" + +from typing import Literal + +import grpc +from crossplane.function import logging, 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.upcloudcluster import v1alpha1 +from models.com.upcloud.m.network import v1alpha1 as networkv1alpha1 +from models.com.upcloud.m.uks.kubernetescluster import v1alpha1 as clusterv1alpha1 +from models.com.upcloud.m.uks.kubernetesnodegroup import v1alpha1 as nodegroupv1alpha1 +from models.io.crossplane.m.helm.providerconfig import v1beta1 as helmpcv1beta1 +from models.io.crossplane.m.helm.release import v1beta1 as helmv1beta1 +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.k8s.apimachinery.pkg.apis.meta import v1 as metav1 + +# System pool injected into every UKS cluster to host control-plane +# components (Envoy Gateway, LeaderWorkerSet, cert-manager, etc.). Not part +# of the user-facing API - compose-inference-cluster only passes GPU pools. +# The plan matches the Nebius, Vultr and Civo system pools' shape (16 GB +# memory); Premium is UpCloud's general-purpose family (Cloud Native plans +# unbundle storage, Starter tops out smaller). Fixed at two nodes: the +# autoscaler only scales user pools. +_SYSTEM_POOL_NAME = "system" +_SYSTEM_POOL_PLAN = "PREMIUM-4xCPU-16GB" +_SYSTEM_POOL_NODES = 2 + +# Labels written on UKS node groups' nodes. compose-model-deployment reads +# these labels for GPU scheduling. +_LABEL_GPU = "modelplane.ai/gpu" +_LABEL_POOL = "modelplane.ai/pool" + +# 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 connection secret the KubernetesCluster resource writes. +# The provider publishes the decoded kubeconfig under this key once the +# cluster exists (spec.forProvider.fetchKubeconfig must be true for the +# provider to read it from the UpCloud API). +_SECRET_KEY_KUBECONFIG = "kubeconfig" + +# Taint applied to GPU node groups so only inference workloads that +# tolerate GPUs are scheduled on them. UpCloud taints GPU nodes with +# nothing itself. +_GPU_TAINT_KEY = "nvidia.com/gpu" +_GPU_TAINT_VALUE = "true" +_GPU_TAINT_EFFECT = "NoSchedule" + +# Label and taint on CPU inference pools. The label is what the serving +# stack's dra-driver-cpu selects its nodes by; the taint keeps system +# workloads off the pool as the GPU taint does on GPU pools, and engine +# pods tolerate it (compose-model-replica). +_LABEL_CPU = "modelplane.ai/cpu" +_CPU_TAINT_KEY = "modelplane.ai/cpu" +_CPU_TAINT_VALUE = "true" +_CPU_TAINT_EFFECT = "NoSchedule" + +# Storage tier for node group disks on plans whose storage UpCloud +# unbundles (GPU and Cloud Native plans). maxiops is UpCloud's SSD tier, +# matching the other clouds' SSD boot disks. +_NODE_STORAGE_TIER = "maxiops" + +# Control plane plan for every cluster: three API servers and a +# three-member etcd on separate infrastructure, up to 120 nodes. The +# dev-md plan has no redundancy, and the plan is create-time only, so +# every cluster gets the HA control plane (matching Vultr's +# haControlplanes). +_CLUSTER_PLAN = "prod-md-ha" + +# UKS requires controlPlaneIpFilter; an empty list denies everyone. Open +# access matches UKS's own default (null means no filtering) and the other +# clouds' public endpoints: the Modelplane control plane and anything +# consuming the kubeconfig reach the API server over the Internet. +_CONTROL_PLANE_IP_FILTER = ["0.0.0.0/0"] + +# The cluster's dedicated SDN network. UKS requires DHCP on and the DHCP +# default route off (nodes route through their public/utility interfaces), +# and a network can serve only one cluster. The CIDR is fixed: the network +# is never peered, so overlap across clusters doesn't matter. +_NETWORK_CIDR = "10.0.1.0/24" +_NETWORK_FAMILY = "IPv4" + +# The Kubernetes cluster autoscaler, installed on the workload cluster for +# pools with maxNodeCount set. Chart pin matches compose-eks-cluster's and +# compose-civo-cluster's. The image is UpCloud's fork build (see the module +# docstring); the upstream chart renders cloudProvider: upcloud +# mechanically even though its documented provider list omits it. +_AUTOSCALER_NAMESPACE = "kube-system" +_AUTOSCALER_CHART_REPO = "https://kubernetes.github.io/autoscaler" +_AUTOSCALER_CHART_NAME = "cluster-autoscaler" +_AUTOSCALER_CHART_VERSION = "9.57.0" +_AUTOSCALER_IMAGE_REPO = "ghcr.io/upcloudltd/autoscaler" +_AUTOSCALER_IMAGE_TAG = "v1.29.5" + +# Secret the autoscaler reads the UpCloud API token from, copied into +# kube-system on the workload cluster from the Secret spec.autoscaler +# references. The chart's extraEnvSecrets renders a secretKeyRef without +# optional, so the autoscaler pod restarts until the copy lands. +_AUTOSCALER_SECRET_NAME = "upcloud-autoscaler" +_AUTOSCALER_SECRET_KEY = "token" + +# Annotation the provider sets on a managed resource with its external +# name. On the cluster that's the UpCloud UUID the autoscaler's +# UPCLOUD_CLUSTER_ID env wants; on node groups this function sets it to +# the pool name, since KubernetesNodeGroup has no name in forProvider - +# the external name is the UKS node group name. +_ANNOTATION_EXTERNAL_NAME = "crossplane.io/external-name" + +# Compose the in-cluster resources (the autoscaler Helm release and the +# token Secret's Object) with Observe, Create and Update but not Delete. +# Deleting them with the XR would mean asking their providers to reach a +# cluster whose kubeconfig Secret has already been deleted, wedging their +# finalizers; orphaning them sidesteps that - the in-cluster resources die +# with the cluster. +_ManagementPolicy = Literal["Observe", "Create", "Update", "Delete", "LateInitialize", "*"] +_ORPHAN_MANAGEMENT: list[_ManagementPolicy] = ["Observe", "Create", "Update"] + +# Node group management policies that exclude LateInitialize, used for +# autoscaled pools: nodeCount is seeded via initProvider so it is applied +# only at creation and then left alone. The cluster autoscaler drives the +# group's node count; without this Crossplane would keep reverting it to +# nodeCount and fight the autoscaler. (initProvider is gated on +# enumerating management policies - the default "*" still late-initializes +# nodeCount into forProvider, defeating the purpose.) +_AUTOSCALED_POOL_MANAGEMENT: list[_ManagementPolicy] = ["Observe", "Create", "Update", "Delete"] + + +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 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.UpCloudCluster) -> str: + """Derive the kubeconfig secret name from the XR.""" + return resource.child_name(_name(xr.metadata), "kubeconfig") + + +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.UpCloudCluster(**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_network() + self.compose_cluster() + if self._cluster_ready() or self._dependents_observed(): + self.compose_node_pools() + # Only the autoscaler reaches into the workload cluster, so + # without credentials for it nothing composes the + # ProviderConfigs, the token Secret or the release. The XRD + # requires spec.autoscaler when any pool sets maxNodeCount. + # Once the release is observed it stays composed even after + # spec.autoscaler is removed: the release excludes Delete, so + # dropping it would orphan a running autoscaler that keeps + # scaling its old node groups against the nodeCount Crossplane + # enforces on the now-fixed pools. With no autoscaled pools the + # group list is empty and the chart renders no Deployment. The + # token Secret Object is composed only while spec.autoscaler + # names its source Secret; dropped, the copy stays on the + # cluster because the Object excludes Delete too. + if self.xr.spec.autoscaler or "release-cluster-autoscaler" in self.req.observed.resources: + self.compose_provider_configs() + if self.xr.spec.autoscaler: + self.compose_autoscaler_secret() + self.compose_cluster_autoscaler() + self.write_status() + self.mark_readiness() + + def _cluster_ready(self) -> bool: + return resource.get_condition(self.req.observed.resources.get("cluster"), "Ready").status == "True" + + def _dependents_observed(self) -> bool: + """Whether the Ready-gated dependents were composed on a previous + reconcile. The gate delays their first composition until the cluster + is Ready, but must not drop them from desired state when the Ready + condition transiently regresses - that would delete them, and the + KubernetesNodeGroups are not orphaned, so their nodes would be + deprovisioned with them. The dependents are composed as one block, + so any observed member means the block was composed before; the + node groups are the sentinel (the system group is always among + them), with the ProviderConfig covering partially-applied states of + the autoscaler sub-block.""" + observed = self.req.observed.resources + return "provider-config-helm" in observed or any(name.startswith("node-pool-") for name in observed) + + def _observed_cluster_id(self) -> str | None: + """The UpCloud UUID of the observed cluster, from the external-name + annotation the provider sets once the cluster exists.""" + observed = self.req.observed.resources.get("cluster") + if observed is None: + return None + d = resource.struct_to_dict(observed.resource) + return d.get("metadata", {}).get("annotations", {}).get(_ANNOTATION_EXTERNAL_NAME) or None + + def compose_network(self) -> None: + """Compose the cluster's dedicated SDN network. UKS requires a + private network per cluster with DHCP on and its default route + off.""" + resource.update( + self.rsp.desired.resources["network"], + networkv1alpha1.Network( + spec=networkv1alpha1.Spec( + providerConfigRef=networkv1alpha1.ProviderConfigRef( + kind=self._cred_kind(), + name=self._cred_name(), + ), + forProvider=networkv1alpha1.ForProvider( + name=_name(self.xr.metadata), + zone=self.xr.spec.zone, + ipNetwork=networkv1alpha1.IpNetwork( + address=_NETWORK_CIDR, + dhcp=True, + dhcpDefaultRoute=False, + family=_NETWORK_FAMILY, + ), + ), + ), + ), + ) + + def compose_cluster(self) -> None: + """Compose the UKS cluster. All node groups, the fixed system one + included, are separate KubernetesNodeGroup resources composed after + the cluster is Ready - UKS has no inline pools.""" + cluster = clusterv1alpha1.KubernetesCluster( + spec=clusterv1alpha1.Spec( + providerConfigRef=clusterv1alpha1.ProviderConfigRef( + kind=self._cred_kind(), + name=self._cred_name(), + ), + forProvider=clusterv1alpha1.ForProvider( + name=_name(self.xr.metadata), + zone=self.xr.spec.zone, + version=self.xr.spec.kubernetesVersion, + plan=_CLUSTER_PLAN, + controlPlaneIpFilter=_CONTROL_PLANE_IP_FILTER, + fetchKubeconfig=True, + networkSelector=clusterv1alpha1.NetworkSelector( + matchControllerRef=True, + ), + ), + writeConnectionSecretToRef=clusterv1alpha1.WriteConnectionSecretToRef( + name=_kubeconfig_secret_name(self.xr), + ), + ), + ) + resource.update(self.rsp.desired.resources["cluster"], cluster) + + def compose_node_pools(self) -> None: + """Compose a KubernetesNodeGroup for the injected system pool and + each user-defined pool. Gated on the cluster being Ready: UKS only + accepts node group operations on a running cluster, and the cluster + UUID must be available for the selector.""" + resource.update( + self.rsp.desired.resources[f"node-pool-{_SYSTEM_POOL_NAME}"], + self._system_pool(), + ) + for pool in self.xr.spec.nodePools: + resource.update( + self.rsp.desired.resources[f"node-pool-{pool.name}"], + self._node_pool(pool), + ) + + def compose_provider_configs(self) -> None: + """Compose provider-helm and provider-kubernetes ProviderConfigs + pointing at the cluster's kubeconfig secret. The kubeconfig embeds + client certificates, so no identity block is needed. They serve the + cluster autoscaler's Helm release and the token Secret's Object.""" + kubeconfig_name = _kubeconfig_secret_name(self.xr) + resource.update( + self.rsp.desired.resources["provider-config-helm"], + helmpcv1beta1.ProviderConfig( + metadata=metav1.ObjectMeta( + name=kubeconfig_name, + namespace=_namespace(self.xr.metadata), + ), + spec=helmpcv1beta1.Spec( + credentials=helmpcv1beta1.Credentials( + source="Secret", + secretRef=helmpcv1beta1.SecretRef( + namespace=_namespace(self.xr.metadata), + name=kubeconfig_name, + key=_SECRET_KEY_KUBECONFIG, + ), + ), + ), + ), + ) + 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_autoscaler_secret(self) -> None: + """Copy the UpCloud API token to kube-system on the workload + cluster for the autoscaler. UpCloud provisions no API credentials + on UKS clusters, so unlike Civo there is nothing to reference. + provider-kubernetes resolves the patchesFrom reference server-side + at apply time, so the token appears in neither this function nor + the Object's stored manifest.""" + autoscaler = self.xr.spec.autoscaler + if autoscaler is None: # compose() only calls this when set; keeps the type checker happy. + return + key = autoscaler.secretRef.key or _AUTOSCALER_SECRET_KEY + resource.update( + self.rsp.desired.resources["autoscaler-secret"], + k8sobjv1alpha1.Object( + metadata=metav1.ObjectMeta(namespace=_namespace(self.xr.metadata)), + spec=k8sobjv1alpha1.Spec( + managementPolicies=_ORPHAN_MANAGEMENT, + providerConfigRef=k8sobjv1alpha1.ProviderConfigRef( + kind="ProviderConfig", + name=_kubeconfig_secret_name(self.xr), + ), + references=[ + k8sobjv1alpha1.Reference( + patchesFrom=k8sobjv1alpha1.PatchesFrom( + apiVersion="v1", + kind="Secret", + name=autoscaler.secretRef.name, + namespace=_namespace(self.xr.metadata), + fieldPath=f"data.{key}", + ), + toFieldPath=f"data.{_AUTOSCALER_SECRET_KEY}", + ), + ], + forProvider=k8sobjv1alpha1.ForProvider( + manifest={ + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": _AUTOSCALER_SECRET_NAME, + "namespace": _AUTOSCALER_NAMESPACE, + }, + "type": "Opaque", + }, + ), + ), + ), + ) + + def _autoscaled_pools(self) -> list[v1alpha1.NodePool]: + return [p for p in self.xr.spec.nodePools if p.maxNodeCount is not None] + + def compose_cluster_autoscaler(self) -> None: + """Provision the Kubernetes cluster autoscaler so pools with + maxNodeCount scale within their min/max. Node groups are addressed + by name, which this function fixes to the pool name through the + external-name annotation, so the group list needs no observed + state; only UPCLOUD_CLUSTER_ID does, so the release waits for the + cluster's UUID to be observed. + + The release is composed whenever the autoscaler sub-block is, even + with no autoscaled pools: its management policies exclude Delete + (see _ORPHAN_MANAGEMENT), so dropping it from desired state when + the last pool goes fixed-size would orphan a running autoscaler + that keeps scaling with its old node groups. Updating it to an + empty group list instead makes the chart render no Deployment, + removing the stale autoscaler.""" + cluster_id = self._observed_cluster_id() + if cluster_id is None: + return + + groups = [ + { + "name": pool.name, + "minSize": pool.minNodeCount if pool.minNodeCount is not None else pool.nodeCount, + "maxSize": pool.maxNodeCount, + } + for pool in self._autoscaled_pools() + ] + + resource.update( + self.rsp.desired.resources["release-cluster-autoscaler"], + helmv1beta1.Release( + metadata=metav1.ObjectMeta(namespace=_namespace(self.xr.metadata)), + spec=helmv1beta1.Spec( + managementPolicies=_ORPHAN_MANAGEMENT, + providerConfigRef=helmv1beta1.ProviderConfigRef( + kind="ProviderConfig", + name=_kubeconfig_secret_name(self.xr), + ), + forProvider=helmv1beta1.ForProvider( + chart=helmv1beta1.Chart( + name=_AUTOSCALER_CHART_NAME, + repository=_AUTOSCALER_CHART_REPO, + version=_AUTOSCALER_CHART_VERSION, + ), + namespace=_AUTOSCALER_NAMESPACE, + values={ + "cloudProvider": "upcloud", + # The upstream chart ships no UpCloud build; + # this is UpCloud's fork image (see the module + # docstring for the version skew). + "image": { + "repository": _AUTOSCALER_IMAGE_REPO, + "tag": _AUTOSCALER_IMAGE_TAG, + }, + "autoscalingGroups": groups, + # The fork reads the cluster UUID and API token + # from the environment. The token comes from + # the Secret compose_autoscaler_secret copies; + # until that copy lands the pod restarts on the + # missing secretKeyRef and recovers by itself. + "extraEnv": {"UPCLOUD_CLUSTER_ID": cluster_id}, + "extraEnvSecrets": { + "UPCLOUD_TOKEN": { + "name": _AUTOSCALER_SECRET_NAME, + "key": _AUTOSCALER_SECRET_KEY, + }, + }, + }, + ), + ), + ), + ) + + def _system_pool(self) -> nodegroupv1alpha1.KubernetesNodeGroup: + """The system node group for control-plane components.""" + return nodegroupv1alpha1.KubernetesNodeGroup( + metadata=metav1.ObjectMeta( + annotations={_ANNOTATION_EXTERNAL_NAME: _SYSTEM_POOL_NAME}, + ), + spec=nodegroupv1alpha1.Spec( + providerConfigRef=nodegroupv1alpha1.ProviderConfigRef( + kind=self._cred_kind(), + name=self._cred_name(), + ), + forProvider=nodegroupv1alpha1.ForProvider( + plan=_SYSTEM_POOL_PLAN, + nodeCount=_SYSTEM_POOL_NODES, + labels={_LABEL_POOL: _SYSTEM_POOL_NAME}, + clusterSelector=nodegroupv1alpha1.ClusterSelector( + matchControllerRef=True, + ), + ), + ), + ) + + def _node_pool(self, pool: v1alpha1.NodePool) -> nodegroupv1alpha1.KubernetesNodeGroup: + """Map an XR node pool to a KubernetesNodeGroup managed resource. + + KubernetesNodeGroup has no name in forProvider; the external name + is the UKS node group name, so it is pinned to the pool name. That + keeps the name deterministic for the autoscaler's node group list + and the nodes it creates (the XRD restricts pool names to UKS's + charset).""" + labels = {_LABEL_POOL: pool.name} + if pool.role == "GPU" and pool.gpu: + labels[_LABEL_GPU] = pool.gpu.acceleratorType + elif pool.role == "CPU": + labels[_LABEL_CPU] = "true" + + fp = nodegroupv1alpha1.ForProvider( + plan=pool.plan, + labels=labels, + clusterSelector=nodegroupv1alpha1.ClusterSelector( + matchControllerRef=True, + ), + ) + + # UKS unbundles storage from GPU and Cloud Native plans, so the + # pool's disk size lands in the matching plan block. Starter and + # Premium plans bundle a fixed disk, leaving it nowhere to go. + # Sizing GPU disks matters: UKS's default GPU plan disk is too + # small to hold an inference serving image, and a full disk evicts + # every pod on the node on ephemeral-storage pressure. + if pool.plan.startswith("GPU-"): + fp.gpuPlan = nodegroupv1alpha1.GpuPlan( + storageSize=pool.diskSizeGb, + storageTier=_NODE_STORAGE_TIER, + ) + elif pool.plan.startswith("CLOUDNATIVE-"): + fp.cloudNativePlan = nodegroupv1alpha1.CloudNativePlan( + storageSize=pool.diskSizeGb, + storageTier=_NODE_STORAGE_TIER, + ) + + if pool.role == "GPU": + fp.taint = [ + nodegroupv1alpha1.TaintItem( + key=_GPU_TAINT_KEY, + value=_GPU_TAINT_VALUE, + effect=_GPU_TAINT_EFFECT, + ), + ] + elif pool.role == "CPU": + fp.taint = [ + nodegroupv1alpha1.TaintItem( + key=_CPU_TAINT_KEY, + value=_CPU_TAINT_VALUE, + effect=_CPU_TAINT_EFFECT, + ), + ] + + spec = nodegroupv1alpha1.Spec( + providerConfigRef=nodegroupv1alpha1.ProviderConfigRef( + kind=self._cred_kind(), + name=self._cred_name(), + ), + forProvider=fp, + ) + + # The autoscaler owns an autoscaled pool's node count, so nodeCount + # only seeds it at creation (see _AUTOSCALED_POOL_MANAGEMENT). Fixed + # pools keep it in forProvider so drift is corrected. + if pool.maxNodeCount is not None: + spec.managementPolicies = _AUTOSCALED_POOL_MANAGEMENT + spec.initProvider = nodegroupv1alpha1.InitProvider(nodeCount=pool.nodeCount) + else: + fp.nodeCount = pool.nodeCount + + return nodegroupv1alpha1.KubernetesNodeGroup( + metadata=metav1.ObjectMeta( + annotations={_ANNOTATION_EXTERNAL_NAME: pool.name}, + ), + spec=spec, + ) + + 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, + ), + ], + ) + # The cluster's UpCloud UUID. compose-inference-cluster builds + # account-unique gateway load balancer names from it. Assigned only + # when observed: an explicit None would serialize as a null + # tombstone under exclude_unset. + cluster_id = self._observed_cluster_id() + if cluster_id is not None: + status.clusterId = cluster_id + resource.update_status(self.rsp.desired.composite, status) + + def mark_readiness(self) -> None: + """Mark composed resources as ready based on their observed + conditions. + + The ProviderConfigs have no meaningful Ready condition and are + always marked ready. All other resources (network, cluster, node + groups, token Secret Object, autoscaler) are marked ready only once + their observed Ready condition is True. + """ + for r in self.rsp.desired.resources: + if r in ("provider-config-helm", "provider-config-kubernetes"): + 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-upcloud-cluster/function/main.py b/functions/compose-upcloud-cluster/function/main.py new file mode 100644 index 000000000..2e8441dac --- /dev/null +++ b/functions/compose-upcloud-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-upcloud-cluster/pyproject.toml b/functions/compose-upcloud-cluster/pyproject.toml new file mode 100644 index 000000000..fa6336381 --- /dev/null +++ b/functions/compose-upcloud-cluster/pyproject.toml @@ -0,0 +1,26 @@ +[build-system] +requires = ["uv_build>=0.11.0,<0.12"] +build-backend = "uv_build" + +[project] +name = "compose-upcloud-cluster" +version = "0.0.0" +description = "Compose an UpCloud Managed Kubernetes cluster with networking and node groups." +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-upcloud-cluster/tests/test_fn.py b/functions/compose-upcloud-cluster/tests/test_fn.py new file mode 100644 index 000000000..70adc6f8f --- /dev/null +++ b/functions/compose-upcloud-cluster/tests/test_fn.py @@ -0,0 +1,852 @@ +# 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-upcloud-cluster function.""" + +import asyncio +import dataclasses +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.upcloudcluster import v1alpha1 +from models.io.k8s.apimachinery.pkg.apis.meta import v1 as metav1 + + +@dataclasses.dataclass +class Case: + """A test case for compose-upcloud-cluster.""" + + name: str + reason: str + req: fnv1.RunFunctionRequest + want: fnv1.RunFunctionResponse + + +def _xr( + *, + credentials: v1alpha1.Credentials | None, + autoscaler: v1alpha1.Autoscaler | None, + node_pools: list[v1alpha1.NodePool], +) -> fnv1.Resource: + """The observed UpCloudCluster XR in fi-hel2, with the given credentials, autoscaler and node pools.""" + xr = v1alpha1.UpCloudCluster( + metadata=metav1.ObjectMeta( + name="test-cluster", + namespace="modelplane-system", + ), + spec=v1alpha1.Spec( + zone="fi-hel2", + credentials=credentials, + autoscaler=autoscaler, + nodePools=node_pools, + ), + ) + return fnv1.Resource(resource=resource.dict_to_struct(xr.model_dump(exclude_none=True, mode="json", by_alias=True))) + + +def _desired_xr(*, cluster_id: str | None) -> fnv1.Resource: + """The desired XR, publishing the cluster's kubeconfig Secret and, once + the cluster is observed, its UpCloud UUID.""" + status: dict[str, Any] = { + "secrets": [ + { + "type": "Kubeconfig", + "name": "test-cluster-kubeconfig-55b57", + "key": "kubeconfig", + }, + ], + } + if cluster_id is not None: + status["clusterId"] = cluster_id + return fnv1.Resource(resource=resource.dict_to_struct({"status": status})) + + +def _network(*, cred_kind: str, cred_name: str) -> fnv1.Resource: + """The composed Network, a dedicated SDN network for the cluster.""" + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "network.m.upcloud.com/v1alpha1", + "kind": "Network", + "spec": { + "providerConfigRef": {"kind": cred_kind, "name": cred_name}, + "forProvider": { + "name": "test-cluster", + "zone": "fi-hel2", + "ipNetwork": { + "address": "10.0.1.0/24", + "dhcp": True, + "dhcpDefaultRoute": False, + "family": "IPv4", + }, + }, + }, + } + ), + ) + + +def _cluster(*, cred_kind: str, cred_name: str, ready: fnv1.Ready) -> fnv1.Resource: + """The composed UKS KubernetesCluster.""" + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "uks.m.upcloud.com/v1alpha1", + "kind": "KubernetesCluster", + "spec": { + "providerConfigRef": {"kind": cred_kind, "name": cred_name}, + "forProvider": { + "name": "test-cluster", + "zone": "fi-hel2", + "version": "1.36", + "plan": "prod-md-ha", + "controlPlaneIpFilter": ["0.0.0.0/0"], + "fetchKubeconfig": True, + "networkSelector": {"matchControllerRef": True}, + }, + "writeConnectionSecretToRef": {"name": "test-cluster-kubeconfig-55b57"}, + }, + } + ), + ready=ready, + ) + + +def _observed_cluster(*, cred_kind: str, cred_name: str, ready: bool) -> fnv1.Resource: + """The UKS cluster as observed, with its UpCloud UUID, and a Ready condition that's True if ready and False if not.""" + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "uks.m.upcloud.com/v1alpha1", + "kind": "KubernetesCluster", + "metadata": { + "annotations": {"crossplane.io/external-name": "11111111-2222-3333-4444-555555555555"}, + }, + "spec": { + "providerConfigRef": {"kind": cred_kind, "name": cred_name}, + "forProvider": { + "name": "test-cluster", + "zone": "fi-hel2", + "version": "1.36", + "plan": "prod-md-ha", + "controlPlaneIpFilter": ["0.0.0.0/0"], + "fetchKubeconfig": True, + "networkSelector": {"matchControllerRef": True}, + }, + "writeConnectionSecretToRef": {"name": "test-cluster-kubeconfig-55b57"}, + }, + "status": { + "conditions": [ + { + "type": "Ready", + "status": "True" if ready else "False", + "reason": "Available" if ready else "Unavailable", + "lastTransitionTime": "2024-01-01T00:00:00Z", + }, + ], + }, + } + ), + ) + + +def _node_pool_system(*, cred_kind: str, cred_name: str) -> fnv1.Resource: + """The composed KubernetesNodeGroup for the system pool the function injects. + + The external-name annotation names the UKS node group, since the node + group resource has no name of its own in forProvider. + """ + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "uks.m.upcloud.com/v1alpha1", + "kind": "KubernetesNodeGroup", + "metadata": { + "annotations": {"crossplane.io/external-name": "system"}, + }, + "spec": { + "providerConfigRef": {"kind": cred_kind, "name": cred_name}, + "forProvider": { + "plan": "PREMIUM-4xCPU-16GB", + "nodeCount": 2, + "labels": {"modelplane.ai/pool": "system"}, + "clusterSelector": {"matchControllerRef": True}, + }, + }, + } + ), + ) + + +def _node_pool_gpu( + *, + management_policies: list[str] | None, + init_node_count: int | None, + node_count: int | None, + ready: fnv1.Ready, +) -> fnv1.Resource: + """The composed KubernetesNodeGroup for the gpu-l40s pool. + + An autoscaled pool's nodeCount is in initProvider, and its management + policies leave out LateInitialize, so the cluster autoscaler owns the count + once the pool exists. A fixed-size pool's nodeCount is in forProvider. + """ + for_provider: dict[str, Any] = { + "plan": "GPU-8xCPU-64GB-1xL40S", + "gpuPlan": {"storageSize": 100, "storageTier": "maxiops"}, + "labels": { + "modelplane.ai/pool": "gpu-l40s", + "modelplane.ai/gpu": "nvidia-l40s", + }, + "clusterSelector": {"matchControllerRef": True}, + "taint": [{"key": "nvidia.com/gpu", "value": "true", "effect": "NoSchedule"}], + } + if node_count is not None: + for_provider["nodeCount"] = node_count + spec: dict[str, Any] = { + "providerConfigRef": {"kind": "ClusterProviderConfig", "name": "default"}, + "forProvider": for_provider, + } + if management_policies is not None: + spec["managementPolicies"] = management_policies + if init_node_count is not None: + spec["initProvider"] = {"nodeCount": init_node_count} + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "uks.m.upcloud.com/v1alpha1", + "kind": "KubernetesNodeGroup", + "metadata": { + "annotations": {"crossplane.io/external-name": "gpu-l40s"}, + }, + "spec": spec, + } + ), + ready=ready, + ) + + +def _node_pool_cpu(*, node_count: int, ready: fnv1.Ready) -> fnv1.Resource: + """The composed KubernetesNodeGroup for the cpu-pool pool, with the CPU label and taint and no GPU labels. + + The Premium plan bundles a fixed disk, so no gpuPlan or + cloudNativePlan block carries diskSizeGb. + """ + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "uks.m.upcloud.com/v1alpha1", + "kind": "KubernetesNodeGroup", + "metadata": { + "annotations": {"crossplane.io/external-name": "cpu-pool"}, + }, + "spec": { + "providerConfigRef": {"kind": "ClusterProviderConfig", "name": "default"}, + "forProvider": { + "plan": "PREMIUM-8xCPU-32GB", + "nodeCount": node_count, + "labels": { + "modelplane.ai/pool": "cpu-pool", + "modelplane.ai/cpu": "true", + }, + "clusterSelector": {"matchControllerRef": True}, + "taint": [{"key": "modelplane.ai/cpu", "value": "true", "effect": "NoSchedule"}], + }, + }, + } + ), + ready=ready, + ) + + +def _provider_config_helm() -> fnv1.Resource: + """The composed provider-helm ProviderConfig for the cluster, which is always ready.""" + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "helm.m.crossplane.io/v1beta1", + "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 _provider_config_kubernetes() -> 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 _autoscaler_secret() -> fnv1.Resource: + """The composed Object copying the UpCloud API token to the cluster. + + provider-kubernetes resolves the patchesFrom reference server-side, so the + token never appears in the Object's manifest on the control plane. + """ + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "kubernetes.m.crossplane.io/v1alpha1", + "kind": "Object", + "metadata": {"namespace": "modelplane-system"}, + "spec": { + "managementPolicies": ["Observe", "Create", "Update"], + "providerConfigRef": { + "kind": "ProviderConfig", + "name": "test-cluster-kubeconfig-55b57", + }, + "references": [ + { + "patchesFrom": { + "apiVersion": "v1", + "kind": "Secret", + "name": "upcloud-api", + "namespace": "modelplane-system", + "fieldPath": "data.token", + }, + "toFieldPath": "data.token", + }, + ], + "forProvider": { + "manifest": { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "upcloud-autoscaler", + "namespace": "kube-system", + }, + "type": "Opaque", + }, + }, + }, + } + ), + ) + + +def _autoscaler_release(*, autoscaling_groups: list[dict]) -> fnv1.Resource: + """The composed cluster autoscaler Release, scaling the given node groups.""" + return fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "helm.m.crossplane.io/v1beta1", + "kind": "Release", + "metadata": {"namespace": "modelplane-system"}, + "spec": { + "managementPolicies": ["Observe", "Create", "Update"], + "providerConfigRef": { + "kind": "ProviderConfig", + "name": "test-cluster-kubeconfig-55b57", + }, + "forProvider": { + "chart": { + "name": "cluster-autoscaler", + "repository": "https://kubernetes.github.io/autoscaler", + "version": "9.57.0", + }, + "namespace": "kube-system", + "values": { + "cloudProvider": "upcloud", + "image": { + "repository": "ghcr.io/upcloudltd/autoscaler", + "tag": "v1.29.5", + }, + "autoscalingGroups": autoscaling_groups, + "extraEnv": { + "UPCLOUD_CLUSTER_ID": "11111111-2222-3333-4444-555555555555", + }, + "extraEnvSecrets": { + "UPCLOUD_TOKEN": {"name": "upcloud-autoscaler", "key": "token"}, + }, + }, + }, + }, + } + ), + ) + + +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, an UpCloudCluster composes the network and cluster, and withholds the node groups, ProviderConfigs, autoscaler Secret and autoscaler until the cluster is Ready.", + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_xr( + credentials=None, + autoscaler=v1alpha1.Autoscaler(secretRef=v1alpha1.SecretRef(name="upcloud-api")), + node_pools=[ + v1alpha1.NodePool( + name="gpu-l40s", + role="GPU", + plan="GPU-8xCPU-64GB-1xL40S", + maxNodeCount=4, + gpu=v1alpha1.Gpu(acceleratorType="nvidia-l40s"), + ), + ], + ), + ), + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_xr(cluster_id=None), + resources={ + "network": _network(cred_kind="ClusterProviderConfig", cred_name="default"), + "cluster": _cluster( + cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_UNSPECIFIED + ), + }, + ), + context=structpb.Struct(), + ), + ), + Case( + name="ClusterReady", + reason="With the cluster observed Ready under its UpCloud UUID, an UpCloudCluster composes the node groups, ProviderConfigs, autoscaler token Secret and the autoscaler, scaling the GPU pool from one node to its maxNodeCount.", + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_xr( + credentials=None, + autoscaler=v1alpha1.Autoscaler(secretRef=v1alpha1.SecretRef(name="upcloud-api")), + node_pools=[ + v1alpha1.NodePool( + name="gpu-l40s", + role="GPU", + plan="GPU-8xCPU-64GB-1xL40S", + maxNodeCount=4, + gpu=v1alpha1.Gpu(acceleratorType="nvidia-l40s"), + ), + ], + ), + resources={ + "cluster": _observed_cluster(cred_kind="ClusterProviderConfig", cred_name="default", ready=True), + }, + ), + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_xr(cluster_id="11111111-2222-3333-4444-555555555555"), + resources={ + "network": _network(cred_kind="ClusterProviderConfig", cred_name="default"), + "cluster": _cluster(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_TRUE), + "node-pool-system": _node_pool_system(cred_kind="ClusterProviderConfig", cred_name="default"), + "node-pool-gpu-l40s": _node_pool_gpu( + management_policies=["Observe", "Create", "Update", "Delete"], + init_node_count=1, + node_count=None, + ready=fnv1.READY_UNSPECIFIED, + ), + "provider-config-helm": _provider_config_helm(), + "provider-config-kubernetes": _provider_config_kubernetes(), + "autoscaler-secret": _autoscaler_secret(), + "release-cluster-autoscaler": _autoscaler_release( + autoscaling_groups=[{"name": "gpu-l40s", "minSize": 1, "maxSize": 4}], + ), + }, + ), + context=structpb.Struct(), + ), + ), + # The observed ProviderConfig shows the dependents were composed before. + # Dropping them would delete the KubernetesNodeGroups, and deprovision + # their nodes. + Case( + name="ClusterReadyRegressed", + reason="With the cluster's Ready condition regressed to False but its ProviderConfig observed, an UpCloudCluster keeps the node groups, ProviderConfigs, autoscaler Secret and autoscaler composed.", + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_xr( + credentials=None, + autoscaler=v1alpha1.Autoscaler(secretRef=v1alpha1.SecretRef(name="upcloud-api")), + node_pools=[ + v1alpha1.NodePool( + name="gpu-l40s", + role="GPU", + plan="GPU-8xCPU-64GB-1xL40S", + maxNodeCount=4, + gpu=v1alpha1.Gpu(acceleratorType="nvidia-l40s"), + ), + ], + ), + resources={ + "cluster": _observed_cluster(cred_kind="ClusterProviderConfig", cred_name="default", ready=False), + "provider-config-helm": fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "helm.m.crossplane.io/v1beta1", + "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", + }, + }, + }, + "status": { + "conditions": [ + { + "type": "Ready", + "status": "True", + "reason": "Available", + "lastTransitionTime": "2024-01-01T00:00:00Z", + }, + ], + }, + } + ), + ), + }, + ), + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_xr(cluster_id="11111111-2222-3333-4444-555555555555"), + resources={ + "network": _network(cred_kind="ClusterProviderConfig", cred_name="default"), + "cluster": _cluster( + cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_UNSPECIFIED + ), + "node-pool-system": _node_pool_system(cred_kind="ClusterProviderConfig", cred_name="default"), + "node-pool-gpu-l40s": _node_pool_gpu( + management_policies=["Observe", "Create", "Update", "Delete"], + init_node_count=1, + node_count=None, + ready=fnv1.READY_UNSPECIFIED, + ), + "provider-config-helm": _provider_config_helm(), + "provider-config-kubernetes": _provider_config_kubernetes(), + "autoscaler-secret": _autoscaler_secret(), + "release-cluster-autoscaler": _autoscaler_release( + autoscaling_groups=[{"name": "gpu-l40s", "minSize": 1, "maxSize": 4}], + ), + }, + ), + context=structpb.Struct(), + ), + ), + Case( + name="MinNodeCount", + reason="An autoscaled pool with minNodeCount set scales between that floor and maxNodeCount, and seeds the pool with nodeCount nodes.", + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_xr( + credentials=None, + autoscaler=v1alpha1.Autoscaler(secretRef=v1alpha1.SecretRef(name="upcloud-api")), + node_pools=[ + v1alpha1.NodePool( + name="gpu-l40s", + role="GPU", + plan="GPU-8xCPU-64GB-1xL40S", + nodeCount=2, + minNodeCount=2, + maxNodeCount=4, + gpu=v1alpha1.Gpu(acceleratorType="nvidia-l40s"), + ), + ], + ), + resources={ + "cluster": _observed_cluster(cred_kind="ClusterProviderConfig", cred_name="default", ready=True), + }, + ), + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_xr(cluster_id="11111111-2222-3333-4444-555555555555"), + resources={ + "network": _network(cred_kind="ClusterProviderConfig", cred_name="default"), + "cluster": _cluster(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_TRUE), + "node-pool-system": _node_pool_system(cred_kind="ClusterProviderConfig", cred_name="default"), + "node-pool-gpu-l40s": _node_pool_gpu( + management_policies=["Observe", "Create", "Update", "Delete"], + init_node_count=2, + node_count=None, + ready=fnv1.READY_UNSPECIFIED, + ), + "provider-config-helm": _provider_config_helm(), + "provider-config-kubernetes": _provider_config_kubernetes(), + "autoscaler-secret": _autoscaler_secret(), + "release-cluster-autoscaler": _autoscaler_release( + autoscaling_groups=[{"name": "gpu-l40s", "minSize": 2, "maxSize": 4}], + ), + }, + ), + context=structpb.Struct(), + ), + ), + # Without spec.autoscaler nothing needs to reach into the cluster, so no + # ProviderConfigs, token Secret or autoscaler Release are composed. + Case( + name="FixedSizePool", + reason="An UpCloudCluster with a fixed-size GPU pool and no autoscaler credentials composes only the node groups, with nodeCount in forProvider under the default management policies.", + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_xr( + credentials=None, + autoscaler=None, + node_pools=[ + v1alpha1.NodePool( + name="gpu-l40s", + role="GPU", + plan="GPU-8xCPU-64GB-1xL40S", + nodeCount=2, + gpu=v1alpha1.Gpu(acceleratorType="nvidia-l40s"), + ), + ], + ), + resources={ + "cluster": _observed_cluster(cred_kind="ClusterProviderConfig", cred_name="default", ready=True), + }, + ), + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_xr(cluster_id="11111111-2222-3333-4444-555555555555"), + resources={ + "network": _network(cred_kind="ClusterProviderConfig", cred_name="default"), + "cluster": _cluster(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_TRUE), + "node-pool-system": _node_pool_system(cred_kind="ClusterProviderConfig", cred_name="default"), + "node-pool-gpu-l40s": _node_pool_gpu( + management_policies=None, + init_node_count=None, + node_count=2, + ready=fnv1.READY_UNSPECIFIED, + ), + }, + ), + context=structpb.Struct(), + ), + ), + Case( + name="ClusterReadyCPUPool", + reason=( + "A CPU-role pool composes with the modelplane.ai/pool and modelplane.ai/cpu labels and the CPU taint, " + "no GPU label, and no plan storage block - Premium plans bundle a fixed disk." + ), + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_xr( + credentials=None, + autoscaler=None, + node_pools=[ + v1alpha1.NodePool( + name="cpu-pool", + role="CPU", + plan="PREMIUM-8xCPU-32GB", + nodeCount=2, + ), + ], + ), + resources={ + "cluster": _observed_cluster(cred_kind="ClusterProviderConfig", cred_name="default", ready=True), + }, + ), + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_xr(cluster_id="11111111-2222-3333-4444-555555555555"), + resources={ + "network": _network(cred_kind="ClusterProviderConfig", cred_name="default"), + "cluster": _cluster(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_TRUE), + "node-pool-system": _node_pool_system(cred_kind="ClusterProviderConfig", cred_name="default"), + "node-pool-cpu-pool": _node_pool_cpu( + node_count=2, + ready=fnv1.READY_UNSPECIFIED, + ), + }, + ), + context=structpb.Struct(), + ), + ), + # The release excludes Delete, so dropping it from desired state when + # spec.autoscaler goes away would orphan a running autoscaler that keeps + # scaling its old node groups. The token Secret Object is dropped: its + # source reference left with spec.autoscaler. + Case( + name="AutoscalerRemoved", + reason="With spec.autoscaler removed after the release was composed, an UpCloudCluster keeps the ProviderConfigs and the release composed with an empty node group list, and drops the token Secret copy.", + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_xr( + credentials=None, + autoscaler=None, + node_pools=[ + v1alpha1.NodePool( + name="gpu-l40s", + role="GPU", + plan="GPU-8xCPU-64GB-1xL40S", + nodeCount=2, + gpu=v1alpha1.Gpu(acceleratorType="nvidia-l40s"), + ), + ], + ), + resources={ + "cluster": _observed_cluster(cred_kind="ClusterProviderConfig", cred_name="default", ready=True), + "release-cluster-autoscaler": fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "helm.m.crossplane.io/v1beta1", + "kind": "Release", + "metadata": {"namespace": "modelplane-system"}, + } + ), + ), + }, + ), + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_xr(cluster_id="11111111-2222-3333-4444-555555555555"), + resources={ + "network": _network(cred_kind="ClusterProviderConfig", cred_name="default"), + "cluster": _cluster(cred_kind="ClusterProviderConfig", cred_name="default", ready=fnv1.READY_TRUE), + "node-pool-system": _node_pool_system(cred_kind="ClusterProviderConfig", cred_name="default"), + "node-pool-gpu-l40s": _node_pool_gpu( + management_policies=None, + init_node_count=None, + node_count=2, + ready=fnv1.READY_UNSPECIFIED, + ), + "provider-config-helm": _provider_config_helm(), + "provider-config-kubernetes": _provider_config_kubernetes(), + "release-cluster-autoscaler": _autoscaler_release(autoscaling_groups=[]), + }, + ), + context=structpb.Struct(), + ), + ), + Case( + name="CustomCredentials", + reason="An UpCloudCluster naming its own ProviderConfig gets it on every UpCloud resource, and its System-role pool gets no GPU label or taint.", + req=fnv1.RunFunctionRequest( + observed=fnv1.State( + composite=_xr( + credentials=v1alpha1.Credentials(type="ProviderConfig", name="team-a"), + autoscaler=None, + node_pools=[ + v1alpha1.NodePool( + name="workers", + role="System", + plan="PREMIUM-8xCPU-16GB", + nodeCount=2, + ), + ], + ), + resources={ + "cluster": _observed_cluster(cred_kind="ProviderConfig", cred_name="team-a", ready=True), + }, + ), + ), + want=fnv1.RunFunctionResponse( + meta=fnv1.ResponseMeta(ttl=durationpb.Duration(seconds=60)), + desired=fnv1.State( + composite=_desired_xr(cluster_id="11111111-2222-3333-4444-555555555555"), + resources={ + "network": _network(cred_kind="ProviderConfig", cred_name="team-a"), + "cluster": _cluster(cred_kind="ProviderConfig", cred_name="team-a", ready=fnv1.READY_TRUE), + "node-pool-system": _node_pool_system(cred_kind="ProviderConfig", cred_name="team-a"), + "node-pool-workers": fnv1.Resource( + resource=resource.dict_to_struct( + { + "apiVersion": "uks.m.upcloud.com/v1alpha1", + "kind": "KubernetesNodeGroup", + "metadata": { + "annotations": {"crossplane.io/external-name": "workers"}, + }, + "spec": { + "providerConfigRef": {"kind": "ProviderConfig", "name": "team-a"}, + "forProvider": { + "plan": "PREMIUM-8xCPU-16GB", + "nodeCount": 2, + "labels": {"modelplane.ai/pool": "workers"}, + "clusterSelector": {"matchControllerRef": True}, + }, + }, + } + ), + ), + }, + ), + context=structpb.Struct(), + ), + ), +] + + +@pytest.mark.parametrize("case", COMPOSE_CASES, ids=lambda case: case.name) +def test_compose(case: Case) -> None: + """RunFunction composes an UpCloud cluster's infrastructure.""" + got = asyncio.run(fn.FunctionRunner().RunFunction(case.req, None)) + assert _to_dict(got) == _to_dict(case.want), case.reason diff --git a/schemas/.lock.json b/schemas/.lock.json index 1f7f6524b..1bf28053e 100644 --- a/schemas/.lock.json +++ b/schemas/.lock.json @@ -1,8 +1,9 @@ { "packages": { - "fs://apis": "a214ca0e4ca2772e256e3da42cb23ba4c79d25a648e3eee69acc5c87b9b3dab2", + "fs://apis": "016f117a465b05d2421bb39eaa9914f3956ced9f35f2fc0a067abefa09bd6fb0", "git://https://github.com/crossplane/crossplane/cluster/crds": "90d8b72ad8b829f0bcd7d7d5a98eaa0d579f244a", "git://https://github.com/modelplaneai/cluster-agent/cluster/charts/cluster-agent/files/crds": "ca7631d72ef8550a2d2f415f33db1ec52b20c65c", + "xpkg://xpkg.upbound.io/crossplane-contrib/provider-upcloud:v1.0.2": "sha256:8cad22497dc00f9bf6ce998d9d46d945044b8e8ab4723caa72d7fe296321b9f6", "xpkg://xpkg.upbound.io/upbound/provider-aws-ec2:v2.9.4": "sha256:7a0febdfb8da2d59a9fdcdbc2d476811f00566fcb941880313fc2034b0ca6177", "xpkg://xpkg.upbound.io/upbound/provider-aws-efs:v2.9.4": "sha256:46bc928b63c2ab10c673f8872270e0cfcfce529a0d16deb48d0078f936aebe51", "xpkg://xpkg.upbound.io/upbound/provider-aws-eks:v2.9.4": "sha256:0d182a7bfced789e274cc0b2e94e4286d912f13ee70b9dab3e7e0caca2611d8f", diff --git a/schemas/python/models/ai/modelplane/inferenceclass/v1alpha1.py b/schemas/python/models/ai/modelplane/inferenceclass/v1alpha1.py index 22e16ec31..0a3a36b8e 100644 --- a/schemas/python/models/ai/modelplane/inferenceclass/v1alpha1.py +++ b/schemas/python/models/ai/modelplane/inferenceclass/v1alpha1.py @@ -195,6 +195,26 @@ class Nebius(BaseModel): class AcceleratorModel4(BaseModel): + count: conint(ge=1, le=16) + type: constr(min_length=1, max_length=63) + """ + GPU accelerator type (e.g. nvidia-l40s, nvidia-h100). Informational - reported on the consuming InferenceCluster's status. + """ + + +class Upcloud(BaseModel): + accelerator: AcceleratorModel4 | 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. + """ + diskSizeGb: conint(ge=10) | None = 100 + plan: constr(min_length=1, max_length=63) + """ + UpCloud server plan (e.g. GPU-8xCPU-64GB-1xL40S, PREMIUM-8xCPU-32GB). The plan 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 AcceleratorModel5(BaseModel): count: conint(ge=1, le=16) type: constr(min_length=1, max_length=63) """ @@ -203,7 +223,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. """ @@ -219,7 +239,8 @@ class Provisioning(BaseModel): 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', 'UpCloud'] + upcloud: Upcloud | None = None 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 d6a4a53a6..ccb207273 100644 --- a/schemas/python/models/ai/modelplane/inferencecluster/v1alpha1.py +++ b/schemas/python/models/ai/modelplane/inferencecluster/v1alpha1.py @@ -128,6 +128,37 @@ class Nebius(BaseModel): """ +class SecretRefModel(BaseModel): + key: constr(min_length=1, max_length=253) | None = 'token' + name: constr(min_length=1, max_length=253) + + +class Autoscaler(BaseModel): + secretRef: SecretRefModel + """ + Reference to a Secret in the modelplane-system namespace holding an UpCloud API token. + """ + + +class Upcloud(BaseModel): + autoscaler: Autoscaler | None = None + """ + Credentials for the Kubernetes cluster autoscaler that scales pools with maxNodeCount set. UpCloud provisions no API credentials on UKS clusters, so the referenced Secret is copied to the cluster for the autoscaler to read. Required when any pool sets maxNodeCount. + """ + credentials: Credentials | None = None + """ + UpCloud ProviderConfig or ClusterProviderConfig used to authenticate to the UpCloud API. Defaults to the ClusterProviderConfig named default. + """ + kubernetesVersion: constr(min_length=1, max_length=16) | None = '1.36' + """ + UKS Kubernetes version as major.minor (e.g. 1.36); list current versions with upctl kubernetes versions. Defaults to the newest UKS version. Choose 1.34 or newer so Dynamic Resource Allocation (how GPUs bind to pods) is generally available. + """ + zone: constr(min_length=1, max_length=32) + """ + UpCloud zone for the cluster (e.g. fi-hel2, de-fra1). GPU plans are currently available in fi-hel2 only. + """ + + class Vultr(BaseModel): credentials: Credentials | None = None """ @@ -168,10 +199,16 @@ 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', 'UpCloud', 'Existing' + ] """ Cluster provisioning method. """ + upcloud: Upcloud | None = None + """ + UpCloud Managed Kubernetes (UKS) cluster configuration. Required when source is UpCloud. + """ vultr: Vultr | None = None """ Vultr Kubernetes Engine (VKE) cluster configuration. Required when source is Vultr. @@ -340,6 +377,12 @@ class Gateway(BaseModel): """ The stable internal name an InferenceGateway addresses the gateway by, derived by Modelplane. Each InferenceGateway resolves it to address with a Service on its own cluster; it is also the gateway's TLS SNI and certificate SAN. ModelDeployment builds a ModelEndpoint origin from it. Set once the gateway has an address and both directions are mutually authenticated, and withheld otherwise. """ + serviceAnnotations: dict[str, constr(max_length=1024)] | None = Field( + None, max_length=8 + ) + """ + Annotations every gateway's LoadBalancer Service on this cluster carries, applied through a per-Gateway EnvoyProxy. {gateway} in a value is replaced with the Gateway's name by the function composing it. Set only on clouds whose load balancers need them. + """ class ProviderConfigRef(BaseModel): diff --git a/schemas/python/models/ai/modelplane/infrastructure/servingstack/v1alpha1.py b/schemas/python/models/ai/modelplane/infrastructure/servingstack/v1alpha1.py index cf1823ab5..bf6d2a535 100644 --- a/schemas/python/models/ai/modelplane/infrastructure/servingstack/v1alpha1.py +++ b/schemas/python/models/ai/modelplane/infrastructure/servingstack/v1alpha1.py @@ -70,6 +70,12 @@ class Gateway(BaseModel): """ The name this cluster's gateway is reached by, projected from the InferenceCluster. The gateway serves a certificate for it, so an InferenceGateway can originate TLS and know it reached the right cluster. """ + serviceAnnotations: dict[str, constr(max_length=1024)] | None = Field( + None, max_length=8 + ) + """ + Annotations for the gateway's LoadBalancer Service, applied through a per-Gateway EnvoyProxy. {gateway} in a value is replaced with the Gateway's name. Projected from the InferenceCluster, not user input. + """ class Pool(BaseModel): @@ -115,7 +121,9 @@ class Secret(BaseModel): class Spec(BaseModel): - cloud: Literal['GKE', 'EKS', 'AKS', 'Nebius', 'Vultr', 'Civo', 'Existing'] + cloud: Literal[ + 'GKE', 'EKS', 'AKS', 'Nebius', 'Vultr', 'Civo', 'UpCloud', '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/ai/modelplane/infrastructure/upcloudcluster/__init__.py b/schemas/python/models/ai/modelplane/infrastructure/upcloudcluster/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/ai/modelplane/infrastructure/upcloudcluster/v1alpha1.py b/schemas/python/models/ai/modelplane/infrastructure/upcloudcluster/v1alpha1.py new file mode 100644 index 000000000..313a40f04 --- /dev/null +++ b/schemas/python/models/ai/modelplane/infrastructure/upcloudcluster/v1alpha1.py @@ -0,0 +1,214 @@ +# generated by datamodel-codegen: +# filename: workdir/infrastructure_modelplane_ai_v1alpha1_upcloudcluster.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 SecretRef(BaseModel): + key: constr(min_length=1, max_length=253) | None = 'token' + name: constr(min_length=1, max_length=253) + + +class Autoscaler(BaseModel): + secretRef: SecretRef + """ + Reference to a Secret in this UpCloudCluster's namespace holding an UpCloud API token. + """ + + +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-l40s, nvidia-h100). Used to label GPU nodes; the actual GPU and count are determined by the plan. + """ + + +class NodePool(BaseModel): + diskSizeGb: conint(ge=10, le=4096) | None = 100 + """ + Node disk size in GB. Honored for GPU and Cloud Native plans, whose storage UpCloud unbundles from the plan; Starter and Premium plans bundle a fixed disk and ignore it. UKS's default GPU plan disk is too small to hold an inference serving image. + """ + gpu: Gpu | None = None + """ + GPU configuration. Required when role is GPU. + """ + maxNodeCount: conint(ge=1, le=120) | None = None + """ + Maximum number of nodes for autoscaling. When set the node pool autoscales between minNodeCount (or nodeCount) and this. UKS has no server-side autoscaler, so the Kubernetes cluster autoscaler is installed on the cluster to drive the pool's node count through the UpCloud API, which requires spec.autoscaler. Omit for fixed-size pools. + """ + minNodeCount: conint(ge=1, le=120) | None = None + """ + Minimum number of nodes for autoscaling. Defaults to nodeCount when maxNodeCount is set. Requires maxNodeCount. + """ + name: constr( + pattern=r'^[a-z0-9]([-a-z0-9]*[a-z0-9])?$', min_length=1, max_length=63 + ) + """ + Unique name for this node pool. Used as the UKS node group name, so it must be lowercase alphanumeric and dashes. + """ + nodeCount: conint(ge=1, le=120) | None = 1 + """ + Number of nodes. Fixed unless maxNodeCount enables autoscaling. + """ + plan: constr(min_length=1, max_length=63) + """ + UpCloud server plan for the pool's nodes (e.g. GPU-8xCPU-64GB-1xL40S, PREMIUM-4xCPU-16GB). This is the instance type used by other clouds; list plans with upctl server plans. + """ + role: Literal['System', 'GPU', 'CPU'] + """ + Determines what workloads this pool runs. System pools host controllers, gateways, and infrastructure. GPU pools host inference workloads and are tainted to exclude non-GPU pods. CPU pools host CPU inference workloads: a non-GPU plan and the modelplane.ai/cpu label and taint. + """ + + +class Spec(BaseModel): + autoscaler: Autoscaler | None = None + """ + Credentials for the Kubernetes cluster autoscaler that scales pools with maxNodeCount set. UpCloud provisions no API credentials on UKS clusters, so the referenced Secret is copied to the cluster for the autoscaler to read. Required when any pool sets maxNodeCount. + """ + credentials: Credentials | None = None + """ + UpCloud ProviderConfig or ClusterProviderConfig used to authenticate to the UpCloud API. Defaults to the ClusterProviderConfig named default. + """ + crossplane: Crossplane | None = None + """ + Configures how Crossplane will reconcile this composite resource + """ + kubernetesVersion: constr(min_length=1, max_length=16) | None = '1.36' + """ + UKS Kubernetes version as major.minor (e.g. 1.36); list current versions with upctl kubernetes versions. Defaults to the newest UKS version. Choose 1.34 or newer so Dynamic Resource Allocation (how devices bind to pods) is generally available, and 1.36 or newer for a CPU pool: its cores are claimed as consumable capacity, which Kubernetes enables by default from 1.36 (DRAConsumableCapacity). + """ + nodePools: list[NodePool] = Field(..., max_length=8, min_length=1) + """ + Node pools for the cluster. At least one System pool is required for controllers and infrastructure workloads. + """ + zone: constr(min_length=1, max_length=32) + """ + UpCloud zone for the cluster and its network (e.g. fi-hel2, de-fra1). GPU plans are currently available in fi-hel2 only; list zones with upctl zone list. + """ + + +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, CA certificate, and static client certificates. + """ + + +class Status(BaseModel): + clusterId: constr(max_length=36) | None = None + """ + UUID of the UKS cluster at UpCloud, once observed. compose-inference-cluster builds account-unique gateway load balancer names from it. + """ + 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 UpCloudCluster. + """ + + +class UpCloudCluster(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['UpCloudCluster'] | None = 'UpCloudCluster' + """ + 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 + """ + UpCloudClusterSpec defines the desired state of UpCloudCluster. + """ + status: Status | None = None + """ + UpCloudClusterStatus defines the observed state of UpCloudCluster. + """ + + +class UpCloudClusterList(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[UpCloudCluster] + """ + List of upcloudclusters. 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/com/__init__.py b/schemas/python/models/com/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/__init__.py b/schemas/python/models/com/upcloud/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/database/__init__.py b/schemas/python/models/com/upcloud/database/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/database/manageddatabaseconnectionpool/__init__.py b/schemas/python/models/com/upcloud/database/manageddatabaseconnectionpool/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/database/manageddatabaseconnectionpool/v1alpha1.py b/schemas/python/models/com/upcloud/database/manageddatabaseconnectionpool/v1alpha1.py new file mode 100644 index 000000000..e91461d30 --- /dev/null +++ b/schemas/python/models/com/upcloud/database/manageddatabaseconnectionpool/v1alpha1.py @@ -0,0 +1,415 @@ +# generated by datamodel-codegen: +# filename: workdir/database_upcloud_com_v1alpha1_manageddatabaseconnectionpool.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 DatabaseRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class DatabaseSelector(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 ServiceRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class ServiceSelector(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 UsernameRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class UsernameSelector(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): + database: str | None = None + """ + (String) Name of the database. + Name of the database. + """ + databaseRef: DatabaseRef | None = None + """ + Reference to a ManagedDatabaseLogicalDatabase in database to populate database. + """ + databaseSelector: DatabaseSelector | None = None + """ + Selector for a ManagedDatabaseLogicalDatabase in database to populate database. + """ + mode: str | None = None + """ + (String) Connection pool mode. + Connection pool mode. + """ + service: str | None = None + """ + (String) UUID of the service to which this connection pool belongs. + The service to which the resource belongs. Please note that reference fields (`serviceRef` and `serviceSelector`) only work for PostgreSQL databases. For other databases you need to leverage compositions and patches to pass the database service ID to the `service` field. See https://docs.crossplane.io/latest/concepts/patch-and-transform/#patching-between-resources for more info. + """ + serviceRef: ServiceRef | None = None + """ + Reference to a ManagedDatabasePostgresql in database to populate service. + """ + serviceSelector: ServiceSelector | None = None + """ + Selector for a ManagedDatabasePostgresql in database to populate service. + """ + size: float | None = None + """ + (Number) Connection pool size. + Connection pool size. + """ + username: str | None = None + """ + (String) Service username. If not set, all users are allowed to access this connection pool. + Service username. If not set, all users are allowed to access this connection pool. + """ + usernameRef: UsernameRef | None = None + """ + Reference to a ManagedDatabaseUser in database to populate username. + """ + usernameSelector: UsernameSelector | None = None + """ + Selector for a ManagedDatabaseUser in database to populate username. + """ + + +class InitProvider(BaseModel): + database: str | None = None + """ + (String) Name of the database. + Name of the database. + """ + databaseRef: DatabaseRef | None = None + """ + Reference to a ManagedDatabaseLogicalDatabase in database to populate database. + """ + databaseSelector: DatabaseSelector | None = None + """ + Selector for a ManagedDatabaseLogicalDatabase in database to populate database. + """ + mode: str | None = None + """ + (String) Connection pool mode. + Connection pool mode. + """ + size: float | None = None + """ + (Number) Connection pool size. + Connection pool size. + """ + username: str | None = None + """ + (String) Service username. If not set, all users are allowed to access this connection pool. + Service username. If not set, all users are allowed to access this connection pool. + """ + usernameRef: UsernameRef | None = None + """ + Reference to a ManagedDatabaseUser in database to populate username. + """ + usernameSelector: UsernameSelector | None = None + """ + Selector for a ManagedDatabaseUser in database to populate username. + """ + + +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): + connectionUri: str | None = None + """ + (String) Connection URI for the connection pool. + Connection URI for the connection pool. + """ + database: str | None = None + """ + (String) Name of the database. + Name of the database. + """ + id: str | None = None + """ + (String) ID of the connection pool. ID is in {service UUID}/{connection pool name} format. + """ + mode: str | None = None + """ + (String) Connection pool mode. + Connection pool mode. + """ + service: str | None = None + """ + (String) UUID of the service to which this connection pool belongs. + The service to which the resource belongs. Please note that reference fields (`serviceRef` and `serviceSelector`) only work for PostgreSQL databases. For other databases you need to leverage compositions and patches to pass the database service ID to the `service` field. See https://docs.crossplane.io/latest/concepts/patch-and-transform/#patching-between-resources for more info. + """ + size: float | None = None + """ + (Number) Connection pool size. + Connection pool size. + """ + username: str | None = None + """ + (String) Service username. If not set, all users are allowed to access this connection pool. + Service username. If not set, all users are allowed to access this connection pool. + """ + + +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 ManagedDatabaseConnectionPool(BaseModel): + apiVersion: Literal['database.upcloud.com/v1alpha1'] | None = ( + 'database.upcloud.com/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['ManagedDatabaseConnectionPool'] | None = ( + 'ManagedDatabaseConnectionPool' + ) + """ + 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 + """ + ManagedDatabaseConnectionPoolSpec defines the desired state of ManagedDatabaseConnectionPool + """ + status: Status | None = None + """ + ManagedDatabaseConnectionPoolStatus defines the observed state of ManagedDatabaseConnectionPool. + """ + + +class ManagedDatabaseConnectionPoolList(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[ManagedDatabaseConnectionPool] + """ + List of manageddatabaseconnectionpools. 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/com/upcloud/database/manageddatabaselogicaldatabase/__init__.py b/schemas/python/models/com/upcloud/database/manageddatabaselogicaldatabase/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/database/manageddatabaselogicaldatabase/v1alpha1.py b/schemas/python/models/com/upcloud/database/manageddatabaselogicaldatabase/v1alpha1.py new file mode 100644 index 000000000..30a80922c --- /dev/null +++ b/schemas/python/models/com/upcloud/database/manageddatabaselogicaldatabase/v1alpha1.py @@ -0,0 +1,294 @@ +# generated by datamodel-codegen: +# filename: workdir/database_upcloud_com_v1alpha1_manageddatabaselogicaldatabase.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 ServiceRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class ServiceSelector(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): + characterSet: str | None = None + """ + (String) Default character set for the database (LC_CTYPE), PostgreSQL only. + Default character set for the database (LC_CTYPE), PostgreSQL only. + """ + collation: str | None = None + """ + (String) Default collation for the database (LC_COLLATE), PostgreSQL only. + Default collation for the database (LC_COLLATE), PostgreSQL only. + """ + service: str | None = None + """ + (String) UUID of the service to which this logical database belongs. + The service to which the resource belongs. Please note that reference fields (`serviceRef` and `serviceSelector`) only work for PostgreSQL databases. For other databases you need to leverage compositions and patches to pass the database service ID to the `service` field. See https://docs.crossplane.io/latest/concepts/patch-and-transform/#patching-between-resources for more info. + """ + serviceRef: ServiceRef | None = None + """ + Reference to a ManagedDatabasePostgresql in database to populate service. + """ + serviceSelector: ServiceSelector | None = None + """ + Selector for a ManagedDatabasePostgresql in database to populate service. + """ + + +class InitProvider(BaseModel): + characterSet: str | None = None + """ + (String) Default character set for the database (LC_CTYPE), PostgreSQL only. + Default character set for the database (LC_CTYPE), PostgreSQL only. + """ + collation: str | None = None + """ + (String) Default collation for the database (LC_COLLATE), PostgreSQL only. + Default collation for the database (LC_COLLATE), PostgreSQL only. + """ + + +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): + characterSet: str | None = None + """ + (String) Default character set for the database (LC_CTYPE), PostgreSQL only. + Default character set for the database (LC_CTYPE), PostgreSQL only. + """ + collation: str | None = None + """ + (String) Default collation for the database (LC_COLLATE), PostgreSQL only. + Default collation for the database (LC_COLLATE), PostgreSQL only. + """ + id: str | None = None + """ + (String) ID of the logical database. ID is in {service UUID}/{database name} format. + """ + service: str | None = None + """ + (String) UUID of the service to which this logical database belongs. + The service to which the resource belongs. Please note that reference fields (`serviceRef` and `serviceSelector`) only work for PostgreSQL databases. For other databases you need to leverage compositions and patches to pass the database service ID to the `service` field. See https://docs.crossplane.io/latest/concepts/patch-and-transform/#patching-between-resources for more info. + """ + + +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 ManagedDatabaseLogicalDatabase(BaseModel): + apiVersion: Literal['database.upcloud.com/v1alpha1'] | None = ( + 'database.upcloud.com/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['ManagedDatabaseLogicalDatabase'] | None = ( + 'ManagedDatabaseLogicalDatabase' + ) + """ + 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 + """ + ManagedDatabaseLogicalDatabaseSpec defines the desired state of ManagedDatabaseLogicalDatabase + """ + status: Status | None = None + """ + ManagedDatabaseLogicalDatabaseStatus defines the observed state of ManagedDatabaseLogicalDatabase. + """ + + +class ManagedDatabaseLogicalDatabaseList(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[ManagedDatabaseLogicalDatabase] + """ + List of manageddatabaselogicaldatabases. 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/com/upcloud/database/manageddatabasemysql/__init__.py b/schemas/python/models/com/upcloud/database/manageddatabasemysql/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/database/manageddatabasemysql/v1alpha1.py b/schemas/python/models/com/upcloud/database/manageddatabasemysql/v1alpha1.py new file mode 100644 index 000000000..944024b70 --- /dev/null +++ b/schemas/python/models/com/upcloud/database/manageddatabasemysql/v1alpha1.py @@ -0,0 +1,1497 @@ +# generated by datamodel-codegen: +# filename: workdir/database_upcloud_com_v1alpha1_manageddatabasemysql.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 UuidRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class UuidSelector(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 NetworkItem(BaseModel): + family: str | None = None + """ + (String) Network family. Currently only IPv4 is supported. + Network family. Currently only `IPv4` is supported. + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + The name of the network. Must be unique within the service. + """ + type: str | None = None + """ + (String) Type of the managed database instance + The type of the network. Must be private. + """ + uuid: str | None = None + """ + (String) Private network UUID. Must reside in the same zone as the database. + Private network UUID. Must reside in the same zone as the database. + """ + uuidRef: UuidRef | None = None + """ + Reference to a Network in network to populate uuid. + """ + uuidSelector: UuidSelector | None = None + """ + Selector for a Network in network to populate uuid. + """ + + +class AdminPasswordSecretRef(BaseModel): + key: str + """ + The key to select. + """ + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class PasswordSecretRef(BaseModel): + key: str + """ + The key to select. + """ + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Migration(BaseModel): + dbname: str | None = None + """ + (String) Database name for bootstrapping the initial connection. + Database name for bootstrapping the initial connection. + """ + dumpTool: str | None = None + """ + (String) MySQL migration dump tool. Experimental! Tool to use for database dump and restore during migration. Default: mysqldump. + MySQL migration dump tool. Experimental! Tool to use for database dump and restore during migration. Default: mysqldump. + """ + host: str | None = None + """ + (String) Hostname or IP address of the server where to migrate data from. + Hostname or IP address of the server where to migrate data from. + """ + ignoreDbs: str | None = None + """ + separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + """ + ignoreRoles: str | None = None + """ + separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + """ + method: str | None = None + """ + (String) The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + """ + passwordSecretRef: PasswordSecretRef | None = None + """ + (String, Sensitive) Password for authentication with the server where to migrate data from. + Password for authentication with the server where to migrate data from. + """ + port: float | None = None + """ + (Number) Port number of the server where to migrate data from. + Port number of the server where to migrate data from. + """ + reestablishReplication: bool | None = None + """ + restore part and start replication. + Skip dump-restore part and start replication. + """ + ssl: bool | None = None + """ + (Boolean) The server where to migrate data from is secured with SSL. + The server where to migrate data from is secured with SSL. + """ + username: str | None = None + """ + (String) User name for authentication with the server where to migrate data from. + User name for authentication with the server where to migrate data from. + """ + + +class MysqlIncrementalBackup(BaseModel): + enabled: bool | None = None + """ + efficient than full backups. This is particularly useful for large databases where daily full backups would be too time-consuming or expensive. + Enable incremental backups. Enable periodic incremental backups. When enabled, full_backup_week_schedule must be set. Incremental backups only store changes since the last backup, making them faster and more storage-efficient than full backups. This is particularly useful for large databases where daily full backups would be too time-consuming or expensive. + """ + fullBackupWeekSchedule: str | None = None + """ + separated list of days of the week when full backups should be created. Valid values: mon, tue, wed, thu, fri, sat, sun. + Full backup week schedule. Comma-separated list of days of the week when full backups should be created. Valid values: mon, tue, wed, thu, fri, sat, sun. + """ + + +class Properties(BaseModel): + adminPasswordSecretRef: AdminPasswordSecretRef | None = None + """ + (String, Sensitive) Custom password for admin user. Defaults to random string. This must be set only when a new service is being created. + Custom password for admin user. Defaults to random string. This must be set only when a new service is being created. + """ + adminUsername: str | None = None + """ + (String) Custom username for admin user. This must be set only when a new service is being created. + Custom username for admin user. This must be set only when a new service is being created. + """ + automaticSpPrivileges: bool | None = None + """ + (Boolean) When enabled, the server automatically grants the EXECUTE and ALTER ROUTINE privileges to the creator of a stored routine and drops them when the routine is dropped. + When enabled, the server automatically grants the EXECUTE and ALTER ROUTINE privileges to the creator of a stored routine and drops them when the routine is dropped. + """ + automaticUtilityNetworkIpFilter: bool | None = None + """ + (Boolean) Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + """ + backupHour: float | None = None + """ + (Number) The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed. + The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed. + """ + backupMinute: float | None = None + """ + (Number) The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed. + The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed. + """ + binlogRetentionPeriod: float | None = None + """ + traffic window rather than dropping it drastically in one step. + The minimum amount of time in seconds to keep binlog entries before deletion. This may be extended for services that require binlog entries for longer than the default for example if using the MySQL Debezium Kafka connector. Warning: reducing this value can make a large batch of binary logs eligible for purge at once. Depending on the volume, this can sometimes stall the MySQL commit path and block writes until the purge completes. To stay on the safe side, prefer lowering the value gradually in small decrements during a low-traffic window rather than dropping it drastically in one step. + """ + connectTimeout: float | None = None + """ + (Number) The number of seconds that the mysqld server waits for a connect packet before responding with Bad handshake. + The number of seconds that the mysqld server waits for a connect packet before responding with Bad handshake. + """ + defaultTimeZone: str | None = None + """ + 12:00 to +12:00), a time zone name, or 'SYSTEM' to use the MySQL server default. + Default server time zone as an offset from UTC (from -12:00 to +12:00), a time zone name, or 'SYSTEM' to use the MySQL server default. + """ + divPrecisionIncrement: float | None = None + """ + (Number) Number of digits by which to increase the scale of the result of division operations performed with the / operator. Default is 4. + Number of digits by which to increase the scale of the result of division operations performed with the / operator. Default is 4. + """ + endMarkersInJson: bool | None = None + """ + (Boolean) Whether optimizer JSON output such as EXPLAIN FORMAT=JSON adds end markers that repeat a structure's key near its closing bracket, making large JSON structures easier to read. + Whether optimizer JSON output such as EXPLAIN FORMAT=JSON adds end markers that repeat a structure's key near its closing bracket, making large JSON structures easier to read. + """ + eqRangeIndexDiveLimit: float | None = None + """ + (Number) The number of equality ranges in a query at or above which the optimizer switches from index dives to index statistics when estimating the number of qualifying rows. 0 means always use index dives. Default is 200. + The number of equality ranges in a query at or above which the optimizer switches from index dives to index statistics when estimating the number of qualifying rows. 0 means always use index dives. Default is 200. + """ + groupConcatMaxLen: float | None = None + """ + (Number) The maximum permitted result length in bytes for the GROUP_CONCAT() function. + The maximum permitted result length in bytes for the GROUP_CONCAT() function. + """ + informationSchemaStatsExpiry: float | None = None + """ + (Number) The time, in seconds, before cached statistics expire. + The time, in seconds, before cached statistics expire. + """ + innodbAdaptiveHashIndex: bool | None = None + """ + dependent: it speeds up lookups for some workloads but its internal latch can become a contention point under high concurrency, in which case disabling it can improve throughput. + Whether InnoDB adaptive hash indexing is enabled. The optimal setting is workload-dependent: it speeds up lookups for some workloads but its internal latch can become a contention point under high concurrency, in which case disabling it can improve throughput. + """ + innodbChangeBufferMaxSize: float | None = None + """ + (Number) Maximum size for the InnoDB change buffer, as a percentage of the total size of the buffer pool. Default is 25. + Maximum size for the InnoDB change buffer, as a percentage of the total size of the buffer pool. Default is 25. + """ + innodbFlushNeighbors: float | None = None + """ + dirty pages in the same extent are not flushed, 1 - flush contiguous dirty pages in the same extent, 2 - flush dirty pages in the same extent. + Specifies whether flushing a page from the InnoDB buffer pool also flushes other dirty pages in the same extent (default is 1): 0 - dirty pages in the same extent are not flushed, 1 - flush contiguous dirty pages in the same extent, 2 - flush dirty pages in the same extent. + """ + innodbFtEnableStopword: bool | None = None + """ + (Boolean) Whether stopword processing is applied when creating or rebuilding an InnoDB FULLTEXT index. Enabled by default. + Whether stopword processing is applied when creating or rebuilding an InnoDB FULLTEXT index. Enabled by default. + """ + innodbFtMaxTokenSize: float | None = None + """ + (Number) Maximum length of words that are stored in an InnoDB FULLTEXT index. Changing this parameter will lead to a restart of the MySQL service. + Maximum length of words that are stored in an InnoDB FULLTEXT index. Changing this parameter will lead to a restart of the MySQL service. + """ + innodbFtMinTokenSize: float | None = None + """ + (Number) Minimum length of words that are stored in an InnoDB FULLTEXT index. Changing this parameter will lead to a restart of the MySQL service. + Minimum length of words that are stored in an InnoDB FULLTEXT index. Changing this parameter will lead to a restart of the MySQL service. + """ + innodbFtNumWordOptimize: float | None = None + """ + (Number) Number of words processed during each OPTIMIZE TABLE operation on an InnoDB FULLTEXT index. Default is 2000. + Number of words processed during each OPTIMIZE TABLE operation on an InnoDB FULLTEXT index. Default is 2000. + """ + innodbFtResultCacheLimit: float | None = None + """ + (Number) Maximum memory in bytes used per query for the InnoDB FULLTEXT search query result cache. Aiven sizes this automatically based on the service plan's memory; setting a value overrides the calculated default. + Maximum memory in bytes used per query for the InnoDB FULLTEXT search query result cache. Aiven sizes this automatically based on the service plan's memory; setting a value overrides the calculated default. + """ + innodbFtServerStopwordTable: str | None = None + """ + (String) This option is used to specify your own InnoDB FULLTEXT index stopword list for all InnoDB tables. + This option is used to specify your own InnoDB FULLTEXT index stopword list for all InnoDB tables. + """ + innodbFtUserStopwordTable: str | None = None + """ + (String) This option is used to specify your own InnoDB FULLTEXT index stopword list for specific InnoDB tables. + This option is used to specify your own InnoDB FULLTEXT index stopword list for specific InnoDB tables. + """ + innodbIoCapacity: float | None = None + """ + (Number) The number of I/O operations per second (IOPS) available to InnoDB background tasks, such as flushing pages from the buffer pool and merging data from the change buffer. Set this to a value appropriate for the underlying storage; it must not exceed innodb_io_capacity_max. + The number of I/O operations per second (IOPS) available to InnoDB background tasks, such as flushing pages from the buffer pool and merging data from the change buffer. Set this to a value appropriate for the underlying storage; it must not exceed innodb_io_capacity_max. + """ + innodbIoCapacityMax: float | None = None + """ + (Number) The maximum number of I/O operations per second (IOPS) that InnoDB background tasks may perform when flushing falls behind. Defaults to twice innodb_io_capacity (minimum 2000). This must be greater than or equal to innodb_io_capacity. + The maximum number of I/O operations per second (IOPS) that InnoDB background tasks may perform when flushing falls behind. Defaults to twice innodb_io_capacity (minimum 2000). This must be greater than or equal to innodb_io_capacity. + """ + innodbLockWaitTimeout: float | None = None + """ + (Number) The length of time in seconds an InnoDB transaction waits for a row lock before giving up. Default is 120. + The length of time in seconds an InnoDB transaction waits for a row lock before giving up. Default is 120. + """ + innodbLogBufferSize: float | None = None + """ + (Number) The size in bytes of the buffer that InnoDB uses to write to the log files on disk. Requests above 15% of the RAM provided by your service plan are rejected, because a larger buffer leaves less memory for the buffer pool and client connections. + The size in bytes of the buffer that InnoDB uses to write to the log files on disk. Requests above 15% of the RAM provided by your service plan are rejected, because a larger buffer leaves less memory for the buffer pool and client connections. + """ + innodbMaxDirtyPagesPct: float | None = None + """ + (Number) Percentage of dirty pages in the InnoDB buffer pool at which InnoDB starts flushing aggressively. Lowering it spreads write I/O more evenly and shortens crash recovery, at the cost of flushing pages that might have been modified again. Must stay at or above innodb_max_dirty_pages_pct_lwm. Default is 90. + Percentage of dirty pages in the InnoDB buffer pool at which InnoDB starts flushing aggressively. Lowering it spreads write I/O more evenly and shortens crash recovery, at the cost of flushing pages that might have been modified again. Must stay at or above innodb_max_dirty_pages_pct_lwm. Default is 90. + """ + innodbMaxDirtyPagesPctLwm: float | None = None + """ + flushing, to keep the dirty page ratio from reaching innodb_max_dirty_pages_pct. 0 turns pre-flushing off. Cannot be set above innodb_max_dirty_pages_pct. Default is 10. + Percentage of dirty pages in the InnoDB buffer pool at which InnoDB starts pre-flushing, to keep the dirty page ratio from reaching innodb_max_dirty_pages_pct. 0 turns pre-flushing off. Cannot be set above innodb_max_dirty_pages_pct. Default is 10. + """ + innodbMaxPurgeLag: float | None = None + """ + (Number) Number of outstanding transactions the InnoDB purge operation may fall behind by before INSERT, UPDATE and DELETE are delayed to let it catch up. The delay applies per row and grows with the lag, and it is capped by innodb_max_purge_lag_delay, which has to be set as well for this option to have any effect. Default is 0, which never delays anything. + Number of outstanding transactions the InnoDB purge operation may fall behind by before INSERT, UPDATE and DELETE are delayed to let it catch up. The delay applies per row and grows with the lag, and it is capped by innodb_max_purge_lag_delay, which has to be set as well for this option to have any effect. Default is 0, which never delays anything. + """ + innodbMaxPurgeLagDelay: float | None = None + """ + row delay innodb_max_purge_lag applies to INSERT, UPDATE and DELETE. MySQL clamps the delay to this value unconditionally, so while this is 0 no delay is ever applied and innodb_max_purge_lag on its own does nothing. Both options must be non-zero for either to take effect. Default is 0. + Cap in microseconds on the per-row delay innodb_max_purge_lag applies to INSERT, UPDATE and DELETE. MySQL clamps the delay to this value unconditionally, so while this is 0 no delay is ever applied and innodb_max_purge_lag on its own does nothing. Both options must be non-zero for either to take effect. Default is 0. + """ + innodbOnlineAlterLogMaxSize: float | None = None + """ + (Number) The upper limit in bytes on the size of the temporary log files used during online DDL operations for InnoDB tables. + The upper limit in bytes on the size of the temporary log files used during online DDL operations for InnoDB tables. + """ + innodbOptimizeFulltextOnly: bool | None = None + """ + (Boolean) When enabled, OPTIMIZE TABLE on InnoDB tables only updates the FULLTEXT index instead of rebuilding the table. Intended to be enabled temporarily during FULLTEXT index maintenance and disabled afterwards; while enabled, OPTIMIZE TABLE does not reclaim table space. + When enabled, OPTIMIZE TABLE on InnoDB tables only updates the FULLTEXT index instead of rebuilding the table. Intended to be enabled temporarily during FULLTEXT index maintenance and disabled afterwards; while enabled, OPTIMIZE TABLE does not reclaim table space. + """ + innodbPrintAllDeadlocks: bool | None = None + """ + (Boolean) When enabled, information about all deadlocks in InnoDB user transactions is recorded in the error log. Disabled by default. + When enabled, information about all deadlocks in InnoDB user transactions is recorded in the error log. Disabled by default. + """ + innodbReadIoThreads: float | None = None + """ + (Number) The number of I/O threads for read operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service. + The number of I/O threads for read operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service. + """ + innodbRollbackOnTimeout: bool | None = None + """ + (Boolean) When enabled a transaction timeout causes InnoDB to abort and roll back the entire transaction. Changing this parameter will lead to a restart of the MySQL service. + When enabled a transaction timeout causes InnoDB to abort and roll back the entire transaction. Changing this parameter will lead to a restart of the MySQL service. + """ + innodbThreadConcurrency: float | None = None + """ + no limit). + Defines the maximum number of threads permitted inside of InnoDB. Default is 0 (infinite concurrency - no limit). + """ + innodbWriteIoThreads: float | None = None + """ + (Number) The number of I/O threads for write operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service. + The number of I/O threads for write operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service. + """ + interactiveTimeout: float | None = None + """ + (Number) The number of seconds the server waits for activity on an interactive connection before closing it. + The number of seconds the server waits for activity on an interactive connection before closing it. + """ + internalTmpMemStorageEngine: str | None = None + """ + memory internal temporary tables. + The storage engine for in-memory internal temporary tables. + """ + ipFilter: list[str] | None = None + """ + (List of String) IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + """ + logOutput: str | None = None + """ + (String) The slow log output destination when slow_query_log is ON. To enable MySQL AI Insights, choose INSIGHTS. To use MySQL AI Insights and the mysql.slow_log table at the same time, choose INSIGHTS,TABLE. To only use the mysql.slow_log table, choose TABLE. To silence slow logs, choose NONE. + The slow log output destination when slow_query_log is ON. To enable MySQL AI Insights, choose INSIGHTS. To use MySQL AI Insights and the mysql.slow_log table at the same time, choose INSIGHTS,TABLE. To only use the mysql.slow_log table, choose TABLE. To silence slow logs, choose NONE. + """ + longQueryTime: float | None = None + """ + (Number) The slow_query_logs work as SQL statements that take more than long_query_time seconds to execute. + The slow_query_logs work as SQL statements that take more than long_query_time seconds to execute. + """ + lowerCaseTableNames: float | None = None + """ + sensitive (default), 1 = names stored lowercase, comparisons are case-insensitive. This option can only be set when creating the service and cannot be changed later. See https://dev.mysql.com/doc/refman/8.0/en/identifier-case-sensitivity.html for details. + Sets how table and database names are stored and compared. 0 = case-sensitive (default), 1 = names stored lowercase, comparisons are case-insensitive. This option can only be set when creating the service and cannot be changed later. See https://dev.mysql.com/doc/refman/8.0/en/identifier-case-sensitivity.html for details. + """ + maxAllowedPacket: float | None = None + """ + (Number) Size of the largest message in bytes that can be received by the server. Default is 67108864 (64M). Statements and rows larger than this are rejected with a packet too large error. + Size of the largest message in bytes that can be received by the server. Default is 67108864 (64M). Statements and rows larger than this are rejected with a packet too large error. + """ + maxConnections: float | None = None + """ + (Number) The maximum permitted number of simultaneous client connections. Lower this to reserve memory for other work. The value cannot exceed the limit provided by your service plan. Upgrading the plan does not raise a value you have set explicitly, so increase it yourself after an upgrade. + The maximum permitted number of simultaneous client connections. Lower this to reserve memory for other work. The value cannot exceed the limit provided by your service plan. Upgrading the plan does not raise a value you have set explicitly, so increase it yourself after an upgrade. + """ + maxExecutionTime: float | None = None + """ + only top-level SELECT statements. 0 (the default) means no timeout. + Execution timeout in milliseconds for read-only top-level SELECT statements. 0 (the default) means no timeout. + """ + maxHeapTableSize: float | None = None + """ + memory tables. Also set tmp_table_size. Default is 16777216 (16M). + Limits the size of internal in-memory tables. Also set tmp_table_size. Default is 16777216 (16M). + """ + maxSeeksForKey: float | None = None + """ + (Number) Limit on the assumed maximum number of index seeks when looking up rows based on a key. Lowering this value causes the optimizer to prefer index lookups over table scans. + Limit on the assumed maximum number of index seeks when looking up rows based on a key. Lowering this value causes the optimizer to prefer index lookups over table scans. + """ + maxUserConnections: float | None = None + """ + account limit. Any other value must be at least 10 below max_connections, so that monitoring and your own admin sessions can still connect when an application saturates its own limit. Aiven's replication and management connections are unaffected however low you set this. + The maximum number of simultaneous connections permitted to any single user account. 0, the default, means no per-account limit. Any other value must be at least 10 below max_connections, so that monitoring and your own admin sessions can still connect when an application saturates its own limit. Aiven's replication and management connections are unaffected however low you set this. + """ + migration: Migration | None = None + """ + (Block List) Migrate data from existing server. (see below for nested schema) + Migrate data from existing server. + """ + mysqlIncrementalBackup: MysqlIncrementalBackup | None = None + """ + (Block List) MySQL incremental backup configuration. (see below for nested schema) + MySQL incremental backup configuration. + """ + netBufferLength: float | None = None + """ + (Number) Start sizes of connection buffer and result buffer. Default is 16384 (16K). Changing this parameter will lead to a restart of the MySQL service. + Start sizes of connection buffer and result buffer. Default is 16384 (16K). Changing this parameter will lead to a restart of the MySQL service. + """ + netReadTimeout: float | None = None + """ + (Number) The number of seconds to wait for more data from a connection before aborting the read. + The number of seconds to wait for more data from a connection before aborting the read. + """ + netWriteTimeout: float | None = None + """ + (Number) The number of seconds to wait for a block to be written to a connection before aborting the write. + The number of seconds to wait for a block to be written to a connection before aborting the write. + """ + optimizerPruneLevel: float | None = None + """ + promising partial plans from the optimizer search space. 0 disables heuristics (exhaustive search); 1 prunes plans based on the number of rows retrieved. + Controls the heuristics applied during query optimization to prune less-promising partial plans from the optimizer search space. 0 disables heuristics (exhaustive search); 1 prunes plans based on the number of rows retrieved. + """ + optimizerSearchDepth: float | None = None + """ + (Number) Maximum depth of search performed by the query optimizer when choosing a join order. Larger values produce better plans for joins over many tables but take longer to compile; 0 lets the optimizer choose the depth automatically. + Maximum depth of search performed by the query optimizer when choosing a join order. Larger values produce better plans for joins over many tables but take longer to compile; 0 lets the optimizer choose the depth automatically. + """ + optimizerSwitch: str | None = None + """ + separated list of optimizer flag assignments in the form flag=on|off|default, or the single value 'default' to reset all flags. Flags not listed keep their current values. Controls query optimizer behaviors such as index merge, hash join and semijoin strategies. + Comma-separated list of optimizer flag assignments in the form flag=on|off|default, or the single value 'default' to reset all flags. Flags not listed keep their current values. Controls query optimizer behaviors such as index merge, hash join and semijoin strategies. + """ + performanceSchemaEventsStatementsHistorySize: float | None = None + """ + (Number) The number of rows per thread in the events_statements_history table. Changing this parameter will lead to a restart of the MySQL service. + The number of rows per thread in the events_statements_history table. Changing this parameter will lead to a restart of the MySQL service. + """ + publicAccess: bool | None = None + """ + (Boolean) Public Access. Allow access to the service from the public Internet. + Public Access. Allow access to the service from the public Internet. + """ + publicAccessPrometheus: bool | None = None + """ + (Boolean) Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + """ + relayLogSpaceLimit: float | None = None + """ + log budget; ensure the service disk is sized accordingly. The setting applies only on the node replicating from the external source; standby nodes always use the Aiven-managed default (the smaller of 5 GiB and 30% of the service disk), which is also used when this option is left unset. Changing this parameter will lead to a restart of the MySQL service. + The maximum amount of space in bytes to use for all relay logs while replicating from an external migration source. When the limit is reached, the replication I/O thread stops fetching relay log events until the SQL thread has caught up. Raise this to give a large migration a bigger relay-log budget; ensure the service disk is sized accordingly. The setting applies only on the node replicating from the external source; standby nodes always use the Aiven-managed default (the smaller of 5 GiB and 30% of the service disk), which is also used when this option is left unset. Changing this parameter will lead to a restart of the MySQL service. + """ + serviceLog: bool | None = None + """ + (Boolean) Service logging. Store logs for the service so that they are available in the HTTP API and console. + Service logging. Store logs for the service so that they are available in the HTTP API and console. + """ + slowQueryLog: bool | None = None + """ + (Boolean) Slow query log enables capturing of slow queries. Setting slow_query_log to false also truncates the mysql.slow_log table. + Slow query log enables capturing of slow queries. Setting slow_query_log to false also truncates the mysql.slow_log table. + """ + sortBufferSize: float | None = None + """ + (Number) Sort buffer size in bytes for ORDER BY optimization. Default is 262144 (256K). Requests above 2% of the RAM provided by your service plan are rejected, because the buffer is allocated per session and its cost multiplies with the connection count. + Sort buffer size in bytes for ORDER BY optimization. Default is 262144 (256K). Requests above 2% of the RAM provided by your service plan are rejected, because the buffer is allocated per session and its cost multiplies with the connection count. + """ + sqlMode: str | None = None + """ + (String) Global SQL mode. Set to empty to use MySQL server defaults. When creating a new service and not setting this field Aiven default SQL mode (strict, SQL standard compliant) will be assigned. + Global SQL mode. Set to empty to use MySQL server defaults. When creating a new service and not setting this field Aiven default SQL mode (strict, SQL standard compliant) will be assigned. + """ + sqlRequirePrimaryKey: bool | None = None + """ + (Boolean) Require primary key to be defined for new tables or old tables modified with ALTER TABLE and fail if missing. It is recommended to always have primary keys because various functionality may break if any large table is missing them. + Require primary key to be defined for new tables or old tables modified with ALTER TABLE and fail if missing. It is recommended to always have primary keys because various functionality may break if any large table is missing them. + """ + tmpTableSize: float | None = None + """ + memory tables. Also set max_heap_table_size. Default is 16777216 (16M). + Limits the size of internal in-memory tables. Also set max_heap_table_size. Default is 16777216 (16M). + """ + version: str | None = None + """ + (String) MySQL major version. + MySQL major version. + """ + waitTimeout: float | None = None + """ + (Number) The number of seconds the server waits for activity on a noninteractive connection before closing it. Requests to set this below 30 are rejected, because a shorter timeout closes your own idle connections between statements. + The number of seconds the server waits for activity on a noninteractive connection before closing it. Requests to set this below 30 are rejected, because a shorter timeout closes your own idle connections between statements. + """ + windowingUseHighPrecision: bool | None = None + """ + (Boolean) Whether window functions are computed to high precision. Disabling this trades exactness for speed in window function evaluation. + Whether window functions are computed to high precision. Disabling this trades exactness for speed in window function evaluation. + """ + + +class ForProvider(BaseModel): + additionalDiskSpaceGib: float | None = None + """ + (Number, Deprecated) Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItem] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + plan: str | None = None + """ + (String, Deprecated) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans mysql. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans mysql`. + """ + planBackups: str | None = None + """ + (String) Backup tier for the database plan. + Backup tier for the database plan. + """ + planCompute: str | None = None + """ + (String) Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + """ + planNodeCount: float | None = None + """ + (Number) Number of nodes in the database plan. + Number of nodes in the database plan. + """ + planStorageGib: float | None = None + """ + (Number) Total storage per node in GiB. + Total storage per node in GiB. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + properties: Properties | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +class InitProvider(BaseModel): + additionalDiskSpaceGib: float | None = None + """ + (Number, Deprecated) Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItem] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + plan: str | None = None + """ + (String, Deprecated) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans mysql. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans mysql`. + """ + planBackups: str | None = None + """ + (String) Backup tier for the database plan. + Backup tier for the database plan. + """ + planCompute: str | None = None + """ + (String) Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + """ + planNodeCount: float | None = None + """ + (Number) Number of nodes in the database plan. + Number of nodes in the database plan. + """ + planStorageGib: float | None = None + """ + (Number) Total storage per node in GiB. + Total storage per node in GiB. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + properties: Properties | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 Component(BaseModel): + component: str | None = None + """ + (String) Component name. + Component name. + """ + host: str | None = None + """ + (String) Hostname or IP address of the server where to migrate data from. + Hostname of the component + """ + port: float | None = None + """ + (Number) Port number of the server where to migrate data from. + Port number of the component + """ + route: str | None = None + """ + (String) Component network route type + Component network route type + """ + usage: str | None = None + """ + (String) Usage of the component + Usage of the component + """ + + +class NetworkItemModel(BaseModel): + family: str | None = None + """ + (String) Network family. Currently only IPv4 is supported. + Network family. Currently only `IPv4` is supported. + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + The name of the network. Must be unique within the service. + """ + type: str | None = None + """ + (String) Type of the managed database instance + The type of the network. Must be private. + """ + uuid: str | None = None + """ + (String) Private network UUID. Must reside in the same zone as the database. + Private network UUID. Must reside in the same zone as the database. + """ + + +class NodeState(BaseModel): + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name plus a node iteration + """ + role: str | None = None + """ + (String) Role of the node + Role of the node + """ + state: str | None = None + """ + (String) The current state of the service + Current state of the node + """ + + +class MigrationModel(BaseModel): + dbname: str | None = None + """ + (String) Database name for bootstrapping the initial connection. + Database name for bootstrapping the initial connection. + """ + dumpTool: str | None = None + """ + (String) MySQL migration dump tool. Experimental! Tool to use for database dump and restore during migration. Default: mysqldump. + MySQL migration dump tool. Experimental! Tool to use for database dump and restore during migration. Default: mysqldump. + """ + host: str | None = None + """ + (String) Hostname or IP address of the server where to migrate data from. + Hostname or IP address of the server where to migrate data from. + """ + ignoreDbs: str | None = None + """ + separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + """ + ignoreRoles: str | None = None + """ + separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + """ + method: str | None = None + """ + (String) The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + """ + port: float | None = None + """ + (Number) Port number of the server where to migrate data from. + Port number of the server where to migrate data from. + """ + reestablishReplication: bool | None = None + """ + restore part and start replication. + Skip dump-restore part and start replication. + """ + ssl: bool | None = None + """ + (Boolean) The server where to migrate data from is secured with SSL. + The server where to migrate data from is secured with SSL. + """ + username: str | None = None + """ + (String) User name for authentication with the server where to migrate data from. + User name for authentication with the server where to migrate data from. + """ + + +class PropertiesModel(BaseModel): + adminUsername: str | None = None + """ + (String) Custom username for admin user. This must be set only when a new service is being created. + Custom username for admin user. This must be set only when a new service is being created. + """ + automaticSpPrivileges: bool | None = None + """ + (Boolean) When enabled, the server automatically grants the EXECUTE and ALTER ROUTINE privileges to the creator of a stored routine and drops them when the routine is dropped. + When enabled, the server automatically grants the EXECUTE and ALTER ROUTINE privileges to the creator of a stored routine and drops them when the routine is dropped. + """ + automaticUtilityNetworkIpFilter: bool | None = None + """ + (Boolean) Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + """ + backupHour: float | None = None + """ + (Number) The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed. + The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed. + """ + backupMinute: float | None = None + """ + (Number) The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed. + The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed. + """ + binlogRetentionPeriod: float | None = None + """ + traffic window rather than dropping it drastically in one step. + The minimum amount of time in seconds to keep binlog entries before deletion. This may be extended for services that require binlog entries for longer than the default for example if using the MySQL Debezium Kafka connector. Warning: reducing this value can make a large batch of binary logs eligible for purge at once. Depending on the volume, this can sometimes stall the MySQL commit path and block writes until the purge completes. To stay on the safe side, prefer lowering the value gradually in small decrements during a low-traffic window rather than dropping it drastically in one step. + """ + connectTimeout: float | None = None + """ + (Number) The number of seconds that the mysqld server waits for a connect packet before responding with Bad handshake. + The number of seconds that the mysqld server waits for a connect packet before responding with Bad handshake. + """ + defaultTimeZone: str | None = None + """ + 12:00 to +12:00), a time zone name, or 'SYSTEM' to use the MySQL server default. + Default server time zone as an offset from UTC (from -12:00 to +12:00), a time zone name, or 'SYSTEM' to use the MySQL server default. + """ + divPrecisionIncrement: float | None = None + """ + (Number) Number of digits by which to increase the scale of the result of division operations performed with the / operator. Default is 4. + Number of digits by which to increase the scale of the result of division operations performed with the / operator. Default is 4. + """ + endMarkersInJson: bool | None = None + """ + (Boolean) Whether optimizer JSON output such as EXPLAIN FORMAT=JSON adds end markers that repeat a structure's key near its closing bracket, making large JSON structures easier to read. + Whether optimizer JSON output such as EXPLAIN FORMAT=JSON adds end markers that repeat a structure's key near its closing bracket, making large JSON structures easier to read. + """ + eqRangeIndexDiveLimit: float | None = None + """ + (Number) The number of equality ranges in a query at or above which the optimizer switches from index dives to index statistics when estimating the number of qualifying rows. 0 means always use index dives. Default is 200. + The number of equality ranges in a query at or above which the optimizer switches from index dives to index statistics when estimating the number of qualifying rows. 0 means always use index dives. Default is 200. + """ + groupConcatMaxLen: float | None = None + """ + (Number) The maximum permitted result length in bytes for the GROUP_CONCAT() function. + The maximum permitted result length in bytes for the GROUP_CONCAT() function. + """ + informationSchemaStatsExpiry: float | None = None + """ + (Number) The time, in seconds, before cached statistics expire. + The time, in seconds, before cached statistics expire. + """ + innodbAdaptiveHashIndex: bool | None = None + """ + dependent: it speeds up lookups for some workloads but its internal latch can become a contention point under high concurrency, in which case disabling it can improve throughput. + Whether InnoDB adaptive hash indexing is enabled. The optimal setting is workload-dependent: it speeds up lookups for some workloads but its internal latch can become a contention point under high concurrency, in which case disabling it can improve throughput. + """ + innodbChangeBufferMaxSize: float | None = None + """ + (Number) Maximum size for the InnoDB change buffer, as a percentage of the total size of the buffer pool. Default is 25. + Maximum size for the InnoDB change buffer, as a percentage of the total size of the buffer pool. Default is 25. + """ + innodbFlushNeighbors: float | None = None + """ + dirty pages in the same extent are not flushed, 1 - flush contiguous dirty pages in the same extent, 2 - flush dirty pages in the same extent. + Specifies whether flushing a page from the InnoDB buffer pool also flushes other dirty pages in the same extent (default is 1): 0 - dirty pages in the same extent are not flushed, 1 - flush contiguous dirty pages in the same extent, 2 - flush dirty pages in the same extent. + """ + innodbFtEnableStopword: bool | None = None + """ + (Boolean) Whether stopword processing is applied when creating or rebuilding an InnoDB FULLTEXT index. Enabled by default. + Whether stopword processing is applied when creating or rebuilding an InnoDB FULLTEXT index. Enabled by default. + """ + innodbFtMaxTokenSize: float | None = None + """ + (Number) Maximum length of words that are stored in an InnoDB FULLTEXT index. Changing this parameter will lead to a restart of the MySQL service. + Maximum length of words that are stored in an InnoDB FULLTEXT index. Changing this parameter will lead to a restart of the MySQL service. + """ + innodbFtMinTokenSize: float | None = None + """ + (Number) Minimum length of words that are stored in an InnoDB FULLTEXT index. Changing this parameter will lead to a restart of the MySQL service. + Minimum length of words that are stored in an InnoDB FULLTEXT index. Changing this parameter will lead to a restart of the MySQL service. + """ + innodbFtNumWordOptimize: float | None = None + """ + (Number) Number of words processed during each OPTIMIZE TABLE operation on an InnoDB FULLTEXT index. Default is 2000. + Number of words processed during each OPTIMIZE TABLE operation on an InnoDB FULLTEXT index. Default is 2000. + """ + innodbFtResultCacheLimit: float | None = None + """ + (Number) Maximum memory in bytes used per query for the InnoDB FULLTEXT search query result cache. Aiven sizes this automatically based on the service plan's memory; setting a value overrides the calculated default. + Maximum memory in bytes used per query for the InnoDB FULLTEXT search query result cache. Aiven sizes this automatically based on the service plan's memory; setting a value overrides the calculated default. + """ + innodbFtServerStopwordTable: str | None = None + """ + (String) This option is used to specify your own InnoDB FULLTEXT index stopword list for all InnoDB tables. + This option is used to specify your own InnoDB FULLTEXT index stopword list for all InnoDB tables. + """ + innodbFtUserStopwordTable: str | None = None + """ + (String) This option is used to specify your own InnoDB FULLTEXT index stopword list for specific InnoDB tables. + This option is used to specify your own InnoDB FULLTEXT index stopword list for specific InnoDB tables. + """ + innodbIoCapacity: float | None = None + """ + (Number) The number of I/O operations per second (IOPS) available to InnoDB background tasks, such as flushing pages from the buffer pool and merging data from the change buffer. Set this to a value appropriate for the underlying storage; it must not exceed innodb_io_capacity_max. + The number of I/O operations per second (IOPS) available to InnoDB background tasks, such as flushing pages from the buffer pool and merging data from the change buffer. Set this to a value appropriate for the underlying storage; it must not exceed innodb_io_capacity_max. + """ + innodbIoCapacityMax: float | None = None + """ + (Number) The maximum number of I/O operations per second (IOPS) that InnoDB background tasks may perform when flushing falls behind. Defaults to twice innodb_io_capacity (minimum 2000). This must be greater than or equal to innodb_io_capacity. + The maximum number of I/O operations per second (IOPS) that InnoDB background tasks may perform when flushing falls behind. Defaults to twice innodb_io_capacity (minimum 2000). This must be greater than or equal to innodb_io_capacity. + """ + innodbLockWaitTimeout: float | None = None + """ + (Number) The length of time in seconds an InnoDB transaction waits for a row lock before giving up. Default is 120. + The length of time in seconds an InnoDB transaction waits for a row lock before giving up. Default is 120. + """ + innodbLogBufferSize: float | None = None + """ + (Number) The size in bytes of the buffer that InnoDB uses to write to the log files on disk. Requests above 15% of the RAM provided by your service plan are rejected, because a larger buffer leaves less memory for the buffer pool and client connections. + The size in bytes of the buffer that InnoDB uses to write to the log files on disk. Requests above 15% of the RAM provided by your service plan are rejected, because a larger buffer leaves less memory for the buffer pool and client connections. + """ + innodbMaxDirtyPagesPct: float | None = None + """ + (Number) Percentage of dirty pages in the InnoDB buffer pool at which InnoDB starts flushing aggressively. Lowering it spreads write I/O more evenly and shortens crash recovery, at the cost of flushing pages that might have been modified again. Must stay at or above innodb_max_dirty_pages_pct_lwm. Default is 90. + Percentage of dirty pages in the InnoDB buffer pool at which InnoDB starts flushing aggressively. Lowering it spreads write I/O more evenly and shortens crash recovery, at the cost of flushing pages that might have been modified again. Must stay at or above innodb_max_dirty_pages_pct_lwm. Default is 90. + """ + innodbMaxDirtyPagesPctLwm: float | None = None + """ + flushing, to keep the dirty page ratio from reaching innodb_max_dirty_pages_pct. 0 turns pre-flushing off. Cannot be set above innodb_max_dirty_pages_pct. Default is 10. + Percentage of dirty pages in the InnoDB buffer pool at which InnoDB starts pre-flushing, to keep the dirty page ratio from reaching innodb_max_dirty_pages_pct. 0 turns pre-flushing off. Cannot be set above innodb_max_dirty_pages_pct. Default is 10. + """ + innodbMaxPurgeLag: float | None = None + """ + (Number) Number of outstanding transactions the InnoDB purge operation may fall behind by before INSERT, UPDATE and DELETE are delayed to let it catch up. The delay applies per row and grows with the lag, and it is capped by innodb_max_purge_lag_delay, which has to be set as well for this option to have any effect. Default is 0, which never delays anything. + Number of outstanding transactions the InnoDB purge operation may fall behind by before INSERT, UPDATE and DELETE are delayed to let it catch up. The delay applies per row and grows with the lag, and it is capped by innodb_max_purge_lag_delay, which has to be set as well for this option to have any effect. Default is 0, which never delays anything. + """ + innodbMaxPurgeLagDelay: float | None = None + """ + row delay innodb_max_purge_lag applies to INSERT, UPDATE and DELETE. MySQL clamps the delay to this value unconditionally, so while this is 0 no delay is ever applied and innodb_max_purge_lag on its own does nothing. Both options must be non-zero for either to take effect. Default is 0. + Cap in microseconds on the per-row delay innodb_max_purge_lag applies to INSERT, UPDATE and DELETE. MySQL clamps the delay to this value unconditionally, so while this is 0 no delay is ever applied and innodb_max_purge_lag on its own does nothing. Both options must be non-zero for either to take effect. Default is 0. + """ + innodbOnlineAlterLogMaxSize: float | None = None + """ + (Number) The upper limit in bytes on the size of the temporary log files used during online DDL operations for InnoDB tables. + The upper limit in bytes on the size of the temporary log files used during online DDL operations for InnoDB tables. + """ + innodbOptimizeFulltextOnly: bool | None = None + """ + (Boolean) When enabled, OPTIMIZE TABLE on InnoDB tables only updates the FULLTEXT index instead of rebuilding the table. Intended to be enabled temporarily during FULLTEXT index maintenance and disabled afterwards; while enabled, OPTIMIZE TABLE does not reclaim table space. + When enabled, OPTIMIZE TABLE on InnoDB tables only updates the FULLTEXT index instead of rebuilding the table. Intended to be enabled temporarily during FULLTEXT index maintenance and disabled afterwards; while enabled, OPTIMIZE TABLE does not reclaim table space. + """ + innodbPrintAllDeadlocks: bool | None = None + """ + (Boolean) When enabled, information about all deadlocks in InnoDB user transactions is recorded in the error log. Disabled by default. + When enabled, information about all deadlocks in InnoDB user transactions is recorded in the error log. Disabled by default. + """ + innodbReadIoThreads: float | None = None + """ + (Number) The number of I/O threads for read operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service. + The number of I/O threads for read operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service. + """ + innodbRollbackOnTimeout: bool | None = None + """ + (Boolean) When enabled a transaction timeout causes InnoDB to abort and roll back the entire transaction. Changing this parameter will lead to a restart of the MySQL service. + When enabled a transaction timeout causes InnoDB to abort and roll back the entire transaction. Changing this parameter will lead to a restart of the MySQL service. + """ + innodbThreadConcurrency: float | None = None + """ + no limit). + Defines the maximum number of threads permitted inside of InnoDB. Default is 0 (infinite concurrency - no limit). + """ + innodbWriteIoThreads: float | None = None + """ + (Number) The number of I/O threads for write operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service. + The number of I/O threads for write operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service. + """ + interactiveTimeout: float | None = None + """ + (Number) The number of seconds the server waits for activity on an interactive connection before closing it. + The number of seconds the server waits for activity on an interactive connection before closing it. + """ + internalTmpMemStorageEngine: str | None = None + """ + memory internal temporary tables. + The storage engine for in-memory internal temporary tables. + """ + ipFilter: list[str] | None = None + """ + (List of String) IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + """ + logOutput: str | None = None + """ + (String) The slow log output destination when slow_query_log is ON. To enable MySQL AI Insights, choose INSIGHTS. To use MySQL AI Insights and the mysql.slow_log table at the same time, choose INSIGHTS,TABLE. To only use the mysql.slow_log table, choose TABLE. To silence slow logs, choose NONE. + The slow log output destination when slow_query_log is ON. To enable MySQL AI Insights, choose INSIGHTS. To use MySQL AI Insights and the mysql.slow_log table at the same time, choose INSIGHTS,TABLE. To only use the mysql.slow_log table, choose TABLE. To silence slow logs, choose NONE. + """ + longQueryTime: float | None = None + """ + (Number) The slow_query_logs work as SQL statements that take more than long_query_time seconds to execute. + The slow_query_logs work as SQL statements that take more than long_query_time seconds to execute. + """ + lowerCaseTableNames: float | None = None + """ + sensitive (default), 1 = names stored lowercase, comparisons are case-insensitive. This option can only be set when creating the service and cannot be changed later. See https://dev.mysql.com/doc/refman/8.0/en/identifier-case-sensitivity.html for details. + Sets how table and database names are stored and compared. 0 = case-sensitive (default), 1 = names stored lowercase, comparisons are case-insensitive. This option can only be set when creating the service and cannot be changed later. See https://dev.mysql.com/doc/refman/8.0/en/identifier-case-sensitivity.html for details. + """ + maxAllowedPacket: float | None = None + """ + (Number) Size of the largest message in bytes that can be received by the server. Default is 67108864 (64M). Statements and rows larger than this are rejected with a packet too large error. + Size of the largest message in bytes that can be received by the server. Default is 67108864 (64M). Statements and rows larger than this are rejected with a packet too large error. + """ + maxConnections: float | None = None + """ + (Number) The maximum permitted number of simultaneous client connections. Lower this to reserve memory for other work. The value cannot exceed the limit provided by your service plan. Upgrading the plan does not raise a value you have set explicitly, so increase it yourself after an upgrade. + The maximum permitted number of simultaneous client connections. Lower this to reserve memory for other work. The value cannot exceed the limit provided by your service plan. Upgrading the plan does not raise a value you have set explicitly, so increase it yourself after an upgrade. + """ + maxExecutionTime: float | None = None + """ + only top-level SELECT statements. 0 (the default) means no timeout. + Execution timeout in milliseconds for read-only top-level SELECT statements. 0 (the default) means no timeout. + """ + maxHeapTableSize: float | None = None + """ + memory tables. Also set tmp_table_size. Default is 16777216 (16M). + Limits the size of internal in-memory tables. Also set tmp_table_size. Default is 16777216 (16M). + """ + maxSeeksForKey: float | None = None + """ + (Number) Limit on the assumed maximum number of index seeks when looking up rows based on a key. Lowering this value causes the optimizer to prefer index lookups over table scans. + Limit on the assumed maximum number of index seeks when looking up rows based on a key. Lowering this value causes the optimizer to prefer index lookups over table scans. + """ + maxUserConnections: float | None = None + """ + account limit. Any other value must be at least 10 below max_connections, so that monitoring and your own admin sessions can still connect when an application saturates its own limit. Aiven's replication and management connections are unaffected however low you set this. + The maximum number of simultaneous connections permitted to any single user account. 0, the default, means no per-account limit. Any other value must be at least 10 below max_connections, so that monitoring and your own admin sessions can still connect when an application saturates its own limit. Aiven's replication and management connections are unaffected however low you set this. + """ + migration: MigrationModel | None = None + """ + (Block List) Migrate data from existing server. (see below for nested schema) + Migrate data from existing server. + """ + mysqlIncrementalBackup: MysqlIncrementalBackup | None = None + """ + (Block List) MySQL incremental backup configuration. (see below for nested schema) + MySQL incremental backup configuration. + """ + netBufferLength: float | None = None + """ + (Number) Start sizes of connection buffer and result buffer. Default is 16384 (16K). Changing this parameter will lead to a restart of the MySQL service. + Start sizes of connection buffer and result buffer. Default is 16384 (16K). Changing this parameter will lead to a restart of the MySQL service. + """ + netReadTimeout: float | None = None + """ + (Number) The number of seconds to wait for more data from a connection before aborting the read. + The number of seconds to wait for more data from a connection before aborting the read. + """ + netWriteTimeout: float | None = None + """ + (Number) The number of seconds to wait for a block to be written to a connection before aborting the write. + The number of seconds to wait for a block to be written to a connection before aborting the write. + """ + optimizerPruneLevel: float | None = None + """ + promising partial plans from the optimizer search space. 0 disables heuristics (exhaustive search); 1 prunes plans based on the number of rows retrieved. + Controls the heuristics applied during query optimization to prune less-promising partial plans from the optimizer search space. 0 disables heuristics (exhaustive search); 1 prunes plans based on the number of rows retrieved. + """ + optimizerSearchDepth: float | None = None + """ + (Number) Maximum depth of search performed by the query optimizer when choosing a join order. Larger values produce better plans for joins over many tables but take longer to compile; 0 lets the optimizer choose the depth automatically. + Maximum depth of search performed by the query optimizer when choosing a join order. Larger values produce better plans for joins over many tables but take longer to compile; 0 lets the optimizer choose the depth automatically. + """ + optimizerSwitch: str | None = None + """ + separated list of optimizer flag assignments in the form flag=on|off|default, or the single value 'default' to reset all flags. Flags not listed keep their current values. Controls query optimizer behaviors such as index merge, hash join and semijoin strategies. + Comma-separated list of optimizer flag assignments in the form flag=on|off|default, or the single value 'default' to reset all flags. Flags not listed keep their current values. Controls query optimizer behaviors such as index merge, hash join and semijoin strategies. + """ + performanceSchemaEventsStatementsHistorySize: float | None = None + """ + (Number) The number of rows per thread in the events_statements_history table. Changing this parameter will lead to a restart of the MySQL service. + The number of rows per thread in the events_statements_history table. Changing this parameter will lead to a restart of the MySQL service. + """ + publicAccess: bool | None = None + """ + (Boolean) Public Access. Allow access to the service from the public Internet. + Public Access. Allow access to the service from the public Internet. + """ + publicAccessPrometheus: bool | None = None + """ + (Boolean) Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + """ + relayLogSpaceLimit: float | None = None + """ + log budget; ensure the service disk is sized accordingly. The setting applies only on the node replicating from the external source; standby nodes always use the Aiven-managed default (the smaller of 5 GiB and 30% of the service disk), which is also used when this option is left unset. Changing this parameter will lead to a restart of the MySQL service. + The maximum amount of space in bytes to use for all relay logs while replicating from an external migration source. When the limit is reached, the replication I/O thread stops fetching relay log events until the SQL thread has caught up. Raise this to give a large migration a bigger relay-log budget; ensure the service disk is sized accordingly. The setting applies only on the node replicating from the external source; standby nodes always use the Aiven-managed default (the smaller of 5 GiB and 30% of the service disk), which is also used when this option is left unset. Changing this parameter will lead to a restart of the MySQL service. + """ + serviceLog: bool | None = None + """ + (Boolean) Service logging. Store logs for the service so that they are available in the HTTP API and console. + Service logging. Store logs for the service so that they are available in the HTTP API and console. + """ + slowQueryLog: bool | None = None + """ + (Boolean) Slow query log enables capturing of slow queries. Setting slow_query_log to false also truncates the mysql.slow_log table. + Slow query log enables capturing of slow queries. Setting slow_query_log to false also truncates the mysql.slow_log table. + """ + sortBufferSize: float | None = None + """ + (Number) Sort buffer size in bytes for ORDER BY optimization. Default is 262144 (256K). Requests above 2% of the RAM provided by your service plan are rejected, because the buffer is allocated per session and its cost multiplies with the connection count. + Sort buffer size in bytes for ORDER BY optimization. Default is 262144 (256K). Requests above 2% of the RAM provided by your service plan are rejected, because the buffer is allocated per session and its cost multiplies with the connection count. + """ + sqlMode: str | None = None + """ + (String) Global SQL mode. Set to empty to use MySQL server defaults. When creating a new service and not setting this field Aiven default SQL mode (strict, SQL standard compliant) will be assigned. + Global SQL mode. Set to empty to use MySQL server defaults. When creating a new service and not setting this field Aiven default SQL mode (strict, SQL standard compliant) will be assigned. + """ + sqlRequirePrimaryKey: bool | None = None + """ + (Boolean) Require primary key to be defined for new tables or old tables modified with ALTER TABLE and fail if missing. It is recommended to always have primary keys because various functionality may break if any large table is missing them. + Require primary key to be defined for new tables or old tables modified with ALTER TABLE and fail if missing. It is recommended to always have primary keys because various functionality may break if any large table is missing them. + """ + tmpTableSize: float | None = None + """ + memory tables. Also set max_heap_table_size. Default is 16777216 (16M). + Limits the size of internal in-memory tables. Also set max_heap_table_size. Default is 16777216 (16M). + """ + version: str | None = None + """ + (String) MySQL major version. + MySQL major version. + """ + waitTimeout: float | None = None + """ + (Number) The number of seconds the server waits for activity on a noninteractive connection before closing it. Requests to set this below 30 are rejected, because a shorter timeout closes your own idle connections between statements. + The number of seconds the server waits for activity on a noninteractive connection before closing it. Requests to set this below 30 are rejected, because a shorter timeout closes your own idle connections between statements. + """ + windowingUseHighPrecision: bool | None = None + """ + (Boolean) Whether window functions are computed to high precision. Disabling this trades exactness for speed in window function evaluation. + Whether window functions are computed to high precision. Disabling this trades exactness for speed in window function evaluation. + """ + + +class AtProvider(BaseModel): + additionalDiskSpaceGib: float | None = None + """ + (Number, Deprecated) Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + """ + components: list[Component] | None = None + """ + (Attributes List) Service component information (see below for nested schema) + """ + id: str | None = None + """ + (String) UUID of the database. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItemModel] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + nodeStates: list[NodeState] | None = None + """ + (Attributes List) Information about nodes providing the managed service (see below for nested schema) + """ + plan: str | None = None + """ + (String, Deprecated) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans mysql. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans mysql`. + """ + planBackups: str | None = None + """ + (String) Backup tier for the database plan. + Backup tier for the database plan. + """ + planCompute: str | None = None + """ + (String) Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + """ + planNodeCount: float | None = None + """ + (Number) Number of nodes in the database plan. + Number of nodes in the database plan. + """ + planStorageGib: float | None = None + """ + (Number) Total storage per node in GiB. + Total storage per node in GiB. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + primaryDatabase: str | None = None + """ + (String) Primary database name + Primary database name + """ + properties: PropertiesModel | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + serviceHost: str | None = None + """ + (String) Hostname to the service instance + Hostname to the service instance + """ + servicePort: str | None = None + """ + (String) Port to the service instance + Port to the service instance + """ + serviceUsername: str | None = None + """ + (String) Primary username to the service instance + Primary username to the service instance + """ + state: str | None = None + """ + (String) The current state of the service + The current state of the service + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + type: str | None = None + """ + (String) Type of the managed database instance + Type of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 ManagedDatabaseMysql(BaseModel): + apiVersion: Literal['database.upcloud.com/v1alpha1'] | None = ( + 'database.upcloud.com/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['ManagedDatabaseMysql'] | None = 'ManagedDatabaseMysql' + """ + 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 + """ + ManagedDatabaseMysqlSpec defines the desired state of ManagedDatabaseMysql + """ + status: Status | None = None + """ + ManagedDatabaseMysqlStatus defines the observed state of ManagedDatabaseMysql. + """ + + +class ManagedDatabaseMysqlList(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[ManagedDatabaseMysql] + """ + List of manageddatabasemysqls. 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/com/upcloud/database/manageddatabaseopensearch/__init__.py b/schemas/python/models/com/upcloud/database/manageddatabaseopensearch/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/database/manageddatabaseopensearch/v1alpha1.py b/schemas/python/models/com/upcloud/database/manageddatabaseopensearch/v1alpha1.py new file mode 100644 index 000000000..a764a4d1e --- /dev/null +++ b/schemas/python/models/com/upcloud/database/manageddatabaseopensearch/v1alpha1.py @@ -0,0 +1,2179 @@ +# generated by datamodel-codegen: +# filename: workdir/database_upcloud_com_v1alpha1_manageddatabaseopensearch.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 UuidRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class UuidSelector(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 NetworkItem(BaseModel): + family: str | None = None + """ + (String) Network family. Currently only IPv4 is supported. + Network family. Currently only `IPv4` is supported. + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + The name of the network. Must be unique within the service. + """ + type: str | None = None + """ + (String) Type of the managed database instance + The type of the network. Must be private. + """ + uuid: str | None = None + """ + (String) Private network UUID. Must reside in the same zone as the database. + Private network UUID. Must reside in the same zone as the database. + """ + uuidRef: UuidRef | None = None + """ + Reference to a Network in network to populate uuid. + """ + uuidSelector: UuidSelector | None = None + """ + Selector for a Network in network to populate uuid. + """ + + +class InternalAuthenticationBackendLimiting(BaseModel): + allowedTries: float | None = None + """ + (Number) The number of login attempts allowed before login is blocked. + The number of login attempts allowed before login is blocked. + """ + authenticationBackend: str | None = None + """ + (String) The internal backend. Enter internal. + The internal backend. Enter `internal`. + """ + blockExpirySeconds: float | None = None + """ + (Number) The duration of time that login remains blocked after a failed login. + The duration of time that login remains blocked after a failed login. + """ + maxBlockedClients: float | None = None + """ + (Number) The maximum number of blocked IP addresses. + The maximum number of blocked IP addresses. + """ + maxTrackedClients: float | None = None + """ + (Number) The maximum number of tracked IP addresses that have failed login. + The maximum number of tracked IP addresses that have failed login. + """ + timeWindowSeconds: float | None = None + """ + (Number) The window of time in which the value for allowed_tries is enforced. + The window of time in which the value for `allowed_tries` is enforced. + """ + type: str | None = None + """ + (String) Type of the managed database instance + The type of rate limiting. + """ + + +class AuthFailureListeners(BaseModel): + internalAuthenticationBackendLimiting: ( + InternalAuthenticationBackendLimiting | None + ) = None + """ + (Block List) (see below for nested schema) + """ + + +class ClusterRemoteStore(BaseModel): + stateGlobalMetadataUploadTimeout: str | None = None + """ + (String) The amount of time to wait for the cluster state upload to complete. The amount of time to wait for the cluster state upload to complete. Defaults to 20s. + The amount of time to wait for the cluster state upload to complete. The amount of time to wait for the cluster state upload to complete. Defaults to 20s. + """ + stateMetadataManifestUploadTimeout: str | None = None + """ + (String) The amount of time to wait for the manifest file upload to complete. The amount of time to wait for the manifest file upload to complete. The manifest file contains the details of each of the files uploaded for a single cluster state, both index metadata files and global metadata files. Defaults to 20s. + The amount of time to wait for the manifest file upload to complete. The amount of time to wait for the manifest file upload to complete. The manifest file contains the details of each of the files uploaded for a single cluster state, both index metadata files and global metadata files. Defaults to 20s. + """ + translogBufferInterval: str | None = None + """ + (String) The default value of the translog buffer interval. The default value of the translog buffer interval used when performing periodic translog updates. This setting is only effective when the index setting index.remote_store.translog.buffer_interval is not present. Defaults to 650ms. + The default value of the translog buffer interval. The default value of the translog buffer interval used when performing periodic translog updates. This setting is only effective when the index setting `index.remote_store.translog.buffer_interval` is not present. Defaults to 650ms. + """ + translogMaxReaders: float | None = None + """ + backed indexes. Sets the maximum number of open translog files for remote-backed indexes. This limits the total number of translog files per shard. After reaching this limit, the remote store flushes the translog files. Default is 1000. The minimum required is 100. + The maximum number of open translog files for remote-backed indexes. Sets the maximum number of open translog files for remote-backed indexes. This limits the total number of translog files per shard. After reaching this limit, the remote store flushes the translog files. Default is 1000. The minimum required is 100. + """ + + +class Threshold(BaseModel): + debug: str | None = None + """ + 1. Default is -1. + Debug threshold for total request took time. The value should be in the form count and unit, where unit one of (s,m,h,d,nanos,ms,micros) or -1. Default is -1. + """ + info: str | None = None + """ + 1. Default is -1. + Info threshold for total request took time. The value should be in the form count and unit, where unit one of (s,m,h,d,nanos,ms,micros) or -1. Default is -1. + """ + trace: str | None = None + """ + 1. Default is -1. + Trace threshold for total request took time. The value should be in the form count and unit, where unit one of (s,m,h,d,nanos,ms,micros) or -1. Default is -1. + """ + warn: str | None = None + """ + 1. Default is -1. + Warning threshold for total request took time. The value should be in the form count and unit, where unit one of (s,m,h,d,nanos,ms,micros) or -1. Default is -1. + """ + + +class ClusterSearchRequestSlowlog(BaseModel): + level: str | None = None + """ + (String) Log level. + Log level. + """ + threshold: Threshold | None = None + """ + (Block List) (see below for nested schema) + """ + + +class DiskWatermarks(BaseModel): + floodStage: float | None = None + """ + (Number) Flood stage watermark (percentage). The flood stage watermark for disk usage. + Flood stage watermark (percentage). The flood stage watermark for disk usage. + """ + high: float | None = None + """ + (Number) High watermark (percentage). The high watermark for disk usage. + High watermark (percentage). The high watermark for disk usage. + """ + low: float | None = None + """ + (Number) Low watermark (percentage). The low watermark for disk usage. + Low watermark (percentage). The low watermark for disk usage. + """ + + +class EmailSenderPasswordSecretRef(BaseModel): + key: str + """ + The key to select. + """ + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class IndexRollup(BaseModel): + rollupDashboardsEnabled: bool | None = None + """ + (Boolean) plugins.rollup.dashboards.enabled. Whether rollups are enabled in OpenSearch Dashboards. Defaults to true. + plugins.rollup.dashboards.enabled. Whether rollups are enabled in OpenSearch Dashboards. Defaults to true. + """ + rollupEnabled: bool | None = None + """ + (Boolean) plugins.rollup.enabled. Whether the rollup plugin is enabled. Defaults to true. + plugins.rollup.enabled. Whether the rollup plugin is enabled. Defaults to true. + """ + rollupSearchBackoffCount: float | None = None + """ + (Number) plugins.rollup.search.backoff_count. How many retries the plugin should attempt for failed rollup jobs. Defaults to 5. + plugins.rollup.search.backoff_count. How many retries the plugin should attempt for failed rollup jobs. Defaults to 5. + """ + rollupSearchBackoffMillis: float | None = None + """ + (Number) plugins.rollup.search.backoff_millis. The backoff time between retries for failed rollup jobs. Defaults to 1000ms. + plugins.rollup.search.backoff_millis. The backoff time between retries for failed rollup jobs. Defaults to 1000ms. + """ + rollupSearchSearchAllJobs: bool | None = None + """ + (Boolean) plugins.rollup.search.all_jobs. Whether OpenSearch should return all jobs that match all specified search terms. If disabled, OpenSearch returns just one, as opposed to all, of the jobs that matches the search terms. Defaults to false. + plugins.rollup.search.all_jobs. Whether OpenSearch should return all jobs that match all specified search terms. If disabled, OpenSearch returns just one, as opposed to all, of the jobs that matches the search terms. Defaults to false. + """ + + +class IndexTemplate(BaseModel): + mappingNestedObjectsLimit: float | None = None + """ + (Number) (DEPRECATED) index.mapping.nested_objects.limit. The maximum number of nested JSON objects that a single document can contain across all nested types. This limit helps to prevent out of memory errors when a document contains too many nested objects. Default is 10000. Deprecated, use an index template instead. + (DEPRECATED) index.mapping.nested_objects.limit. The maximum number of nested JSON objects that a single document can contain across all nested types. This limit helps to prevent out of memory errors when a document contains too many nested objects. Default is 10000. Deprecated, use an index template instead. + """ + numberOfReplicas: float | None = None + """ + (Number) The number of replicas each primary shard has. Deprecated, use an index template instead. + The number of replicas each primary shard has. Deprecated, use an index template instead. + """ + numberOfShards: float | None = None + """ + (Number) The number of primary shards that an index should have. Deprecated, use an index template instead. + The number of primary shards that an index should have. Deprecated, use an index template instead. + """ + + +class Jwt(BaseModel): + enabled: bool | None = None + """ + based authentication for OpenSearch. When enabled, users can authenticate using JWT tokens. + Enable or disable OpenSearch JWT authentication. Enables or disables JWT-based authentication for OpenSearch. When enabled, users can authenticate using JWT tokens. + """ + jwtClockSkewToleranceSeconds: float | None = None + """ + (Number) JWT clock skew tolerance in seconds. The maximum allowed time difference in seconds between the JWT issuer's clock and the OpenSearch server's clock. This helps prevent token validation failures due to minor time synchronization issues. + JWT clock skew tolerance in seconds. The maximum allowed time difference in seconds between the JWT issuer's clock and the OpenSearch server's clock. This helps prevent token validation failures due to minor time synchronization issues. + """ + jwtHeader: str | None = None + """ + (String) HTTP header name for JWT token. The HTTP header name where the JWT token is transmitted. Typically 'Authorization' for Bearer tokens. + HTTP header name for JWT token. The HTTP header name where the JWT token is transmitted. Typically 'Authorization' for Bearer tokens. + """ + jwtUrlParameter: str | None = None + """ + (String) URL parameter name for JWT token. If the JWT token is transmitted as a URL parameter instead of an HTTP header, specify the parameter name here. + URL parameter name for JWT token. If the JWT token is transmitted as a URL parameter instead of an HTTP header, specify the parameter name here. + """ + requiredAudience: str | None = None + """ + (String) Required JWT audience. If specified, the JWT must contain an 'aud' claim that matches this value. This provides additional security by ensuring the JWT was issued for the expected audience. + Required JWT audience. If specified, the JWT must contain an 'aud' claim that matches this value. This provides additional security by ensuring the JWT was issued for the expected audience. + """ + requiredIssuer: str | None = None + """ + (String) Required JWT issuer. If specified, the JWT must contain an 'iss' claim that matches this value. This provides additional security by ensuring the JWT was issued by the expected issuer. + Required JWT issuer. If specified, the JWT must contain an 'iss' claim that matches this value. This provides additional security by ensuring the JWT was issued by the expected issuer. + """ + rolesKey: str | None = None + """ + (String) JWT claim key for roles. The key in the JWT payload that contains the user's roles. If specified, roles will be extracted from the JWT for authorization. + JWT claim key for roles. The key in the JWT payload that contains the user's roles. If specified, roles will be extracted from the JWT for authorization. + """ + signingKey: str | None = None + """ + (String) JWT signing key. The secret key used to sign and verify JWT tokens. This should be a secure, randomly generated key HMAC key or public RSA/ECDSA key. + JWT signing key. The secret key used to sign and verify JWT tokens. This should be a secure, randomly generated key HMAC key or public RSA/ECDSA key. + """ + subjectKey: str | None = None + """ + (String) JWT claim key for subject. The key in the JWT payload that contains the user's subject identifier. If not specified, the 'sub' claim is used by default. + JWT claim key for subject. The key in the JWT payload that contains the user's subject identifier. If not specified, the 'sub' claim is used by default. + """ + + +class Openid(BaseModel): + clientId: str | None = None + """ + (String) The ID of the OpenID Connect client. The ID of the OpenID Connect client configured in your IdP. Required. + The ID of the OpenID Connect client. The ID of the OpenID Connect client configured in your IdP. Required. + """ + clientSecret: str | None = None + """ + (String) The client secret of the OpenID Connect. The client secret of the OpenID Connect client configured in your IdP. Required. + The client secret of the OpenID Connect. The client secret of the OpenID Connect client configured in your IdP. Required. + """ + connectUrl: str | None = None + """ + (String) OpenID Connect metadata/configuration URL. The URL of your IdP where the Security plugin can find the OpenID Connect metadata/configuration settings. + OpenID Connect metadata/configuration URL. The URL of your IdP where the Security plugin can find the OpenID Connect metadata/configuration settings. + """ + enabled: bool | None = None + """ + based authentication for OpenSearch. When enabled, users can authenticate using JWT tokens. + Enable or disable OpenSearch OpenID Connect authentication. Enables or disables OpenID Connect authentication for OpenSearch. When enabled, users can authenticate using OpenID Connect with an Identity Provider. + """ + header: str | None = None + """ + (String) HTTP header name of the JWT token. HTTP header name of the JWT token. Optional. Default is Authorization. + HTTP header name of the JWT token. HTTP header name of the JWT token. Optional. Default is Authorization. + """ + jwtHeader: str | None = None + """ + (String) HTTP header name for JWT token. The HTTP header name where the JWT token is transmitted. Typically 'Authorization' for Bearer tokens. + The HTTP header that stores the token. The HTTP header that stores the token. Typically the Authorization header with the Bearer schema: Authorization: Bearer . Optional. Default is Authorization. + """ + jwtUrlParameter: str | None = None + """ + (String) URL parameter name for JWT token. If the JWT token is transmitted as a URL parameter instead of an HTTP header, specify the parameter name here. + URL JWT token. If the token is not transmitted in the HTTP header, but as an URL parameter, define the name of the parameter here. Optional. + """ + refreshRateLimitCount: float | None = None + """ + (Number) The maximum number of unknown key IDs in the time frame. The maximum number of unknown key IDs in the time frame. Default is 10. Optional. + The maximum number of unknown key IDs in the time frame. The maximum number of unknown key IDs in the time frame. Default is 10. Optional. + """ + refreshRateLimitTimeWindowMs: float | None = None + """ + (Number) The time frame to use when checking the maximum number of unknown key IDs, in milliseconds. The time frame to use when checking the maximum number of unknown key IDs, in milliseconds. Optional.Default is 10000 (10 seconds). + The time frame to use when checking the maximum number of unknown key IDs, in milliseconds. The time frame to use when checking the maximum number of unknown key IDs, in milliseconds. Optional.Default is 10000 (10 seconds). + """ + rolesKey: str | None = None + """ + (String) JWT claim key for roles. The key in the JWT payload that contains the user's roles. If specified, roles will be extracted from the JWT for authorization. + The key in the JSON payload that stores the user’s roles. The key in the JSON payload that stores the user’s roles. The value of this key must be a comma-separated list of roles. Required only if you want to use roles in the JWT. + """ + scope: str | None = None + """ + (String) The scope of the identity token issued by the IdP. The scope of the identity token issued by the IdP. Optional. Default is openid profile email address phone. + The scope of the identity token issued by the IdP. The scope of the identity token issued by the IdP. Optional. Default is openid profile email address phone. + """ + subjectKey: str | None = None + """ + (String) JWT claim key for subject. The key in the JWT payload that contains the user's subject identifier. If not specified, the 'sub' claim is used by default. + The key in the JSON payload that stores the user’s name. The key in the JSON payload that stores the user’s name. If not defined, the subject registered claim is used. Most IdP providers use the preferred_username claim. Optional. + """ + + +class OpensearchDashboards(BaseModel): + enabled: bool | None = None + """ + based authentication for OpenSearch. When enabled, users can authenticate using JWT tokens. + Enable or disable OpenSearch Dashboards. + """ + maxOldSpaceSize: float | None = None + """ + (Number) Limits the maximum amount of memory (in MiB) the OpenSearch Dashboards process can use. This sets the max_old_space_size option of the nodejs running the OpenSearch Dashboards. Note: the memory reserved by OpenSearch Dashboards is not available for OpenSearch. + Limits the maximum amount of memory (in MiB) the OpenSearch Dashboards process can use. This sets the max_old_space_size option of the nodejs running the OpenSearch Dashboards. Note: the memory reserved by OpenSearch Dashboards is not available for OpenSearch. + """ + multipleDataSourceEnabled: bool | None = None + """ + (Boolean) Enable or disable multiple data sources in OpenSearch Dashboards. + Enable or disable multiple data sources in OpenSearch Dashboards. + """ + opensearchRequestTimeout: float | None = None + """ + (Number) Timeout in milliseconds for requests made by OpenSearch Dashboards towards OpenSearch. + Timeout in milliseconds for requests made by OpenSearch Dashboards towards OpenSearch. + """ + sessionKeepalive: bool | None = None + """ + (Boolean) Determines whether the session TTL resets (is “kept alive”) on each user activity. Optional. Default is true. + Determines whether the session TTL resets (is “kept alive”) on each user activity. Optional. Default is true. + """ + sessionTtl: str | None = None + """ + to-live (TTL) for user sessions. The value should be a time value with unit, e.g. 1m, 5s, 1h, 3d, 100ms. Default is 1 hour. + Defines the time-to-live (TTL) for user sessions. The value should be a time value with unit, e.g. 1m, 5s, 1h, 3d, 100ms. Default is 1 hour. + """ + + +class RemoteStore(BaseModel): + segmentPressureBytesLagVarianceFactor: float | None = None + """ + (Number) The variance factor that is used to calculate the dynamic bytes lag threshold. The variance factor that is used together with the moving average to calculate the dynamic bytes lag threshold for activating remote segment backpressure. Defaults to 10. + The variance factor that is used to calculate the dynamic bytes lag threshold. The variance factor that is used together with the moving average to calculate the dynamic bytes lag threshold for activating remote segment backpressure. Defaults to 10. + """ + segmentPressureConsecutiveFailuresLimit: float | None = None + """ + (Number) The minimum consecutive failure count for activating remote segment backpressure. The minimum consecutive failure count for activating remote segment backpressure. Defaults to 5. + The minimum consecutive failure count for activating remote segment backpressure. The minimum consecutive failure count for activating remote segment backpressure. Defaults to 5. + """ + segmentPressureEnabled: bool | None = None + """ + (Boolean) Enables remote segment backpressure. Enables remote segment backpressure. Default is true. + Enables remote segment backpressure. Enables remote segment backpressure. Default is `true`. + """ + segmentPressureTimeLagVarianceFactor: float | None = None + """ + (Number) The variance factor that is used to calculate the dynamic bytes lag threshold. The variance factor that is used together with the moving average to calculate the dynamic time lag threshold for activating remote segment backpressure. Defaults to 10. + The variance factor that is used to calculate the dynamic bytes lag threshold. The variance factor that is used together with the moving average to calculate the dynamic time lag threshold for activating remote segment backpressure. Defaults to 10. + """ + + +class Saml(BaseModel): + enabled: bool | None = None + """ + based authentication for OpenSearch. When enabled, users can authenticate using JWT tokens. + Enable or disable OpenSearch SAML authentication. Enables or disables SAML-based authentication for OpenSearch. When enabled, users can authenticate using SAML with an Identity Provider. + """ + idpEntityId: str | None = None + """ + (String) Identity Provider Entity ID. The unique identifier for the Identity Provider (IdP) entity that is used for SAML authentication. This value is typically provided by the IdP. + Identity Provider Entity ID. The unique identifier for the Identity Provider (IdP) entity that is used for SAML authentication. This value is typically provided by the IdP. + """ + idpMetadataUrl: str | None = None + """ + based authentication with the IdP. + Identity Provider (IdP) SAML metadata URL. The URL of the SAML metadata for the Identity Provider (IdP). This is used to configure SAML-based authentication with the IdP. + """ + idpPemtrustedcasContent: str | None = None + """ + encoded root CA Content for SAML IdP server verification. This parameter specifies the PEM-encoded root certificate authority (CA) content for the SAML identity provider (IdP) server verification. The root CA content is used to verify the SSL/TLS certificate presented by the server. + PEM-encoded root CA Content for SAML IdP server verification. This parameter specifies the PEM-encoded root certificate authority (CA) content for the SAML identity provider (IdP) server verification. The root CA content is used to verify the SSL/TLS certificate presented by the server. + """ + rolesKey: str | None = None + """ + (String) JWT claim key for roles. The key in the JWT payload that contains the user's roles. If specified, roles will be extracted from the JWT for authorization. + SAML response role attribute. Optional. Specifies the attribute in the SAML response where role information is stored, if available. Role attributes are not required for SAML authentication, but can be included in SAML assertions by most Identity Providers (IdPs) to determine user access levels or permissions. + """ + spEntityId: str | None = None + """ + (String) Service Provider Entity ID. The unique identifier for the Service Provider (SP) entity that is used for SAML authentication. This value is typically provided by the SP. + Service Provider Entity ID. The unique identifier for the Service Provider (SP) entity that is used for SAML authentication. This value is typically provided by the SP. + """ + subjectKey: str | None = None + """ + (String) JWT claim key for subject. The key in the JWT payload that contains the user's subject identifier. If not specified, the 'sub' claim is used by default. + SAML response subject attribute. Optional. Specifies the attribute in the SAML response where the subject identifier is stored. If not configured, the NameID attribute is used by default. + """ + + +class NodeDuress(BaseModel): + cpuThreshold: float | None = None + """ + (Number) The CPU usage threshold (as a percentage) required for a node to be considered to be under duress. The CPU usage threshold (as a percentage) required for a node to be considered to be under duress. Default is 0.9. + The CPU usage threshold (as a percentage) required for a node to be considered to be under duress. The CPU usage threshold (as a percentage) required for a node to be considered to be under duress. Default is 0.9. + """ + heapThreshold: float | None = None + """ + (Number) The heap usage threshold (as a percentage) required for a node to be considered to be under duress. The heap usage threshold (as a percentage) required for a node to be considered to be under duress. Default is 0.7. + The heap usage threshold (as a percentage) required for a node to be considered to be under duress. The heap usage threshold (as a percentage) required for a node to be considered to be under duress. Default is 0.7. + """ + numSuccessiveBreaches: float | None = None + """ + (Number) The number of successive limit breaches after which the node is considered to be under duress. The number of successive limit breaches after which the node is considered to be under duress. Default is 3. + The number of successive limit breaches after which the node is considered to be under duress. The number of successive limit breaches after which the node is considered to be under duress. Default is 3. + """ + + +class SearchShardTask(BaseModel): + cancellationBurst: float | None = None + """ + (Number) The maximum number of search tasks to cancel in a single iteration of the observer thread. The maximum number of search tasks to cancel in a single iteration of the observer thread. Default is 10.0. + The maximum number of search tasks to cancel in a single iteration of the observer thread. The maximum number of search tasks to cancel in a single iteration of the observer thread. Default is 10.0. + """ + cancellationRate: float | None = None + """ + (Number) The maximum number of tasks to cancel per millisecond of elapsed time. The maximum number of tasks to cancel per millisecond of elapsed time. Default is 0.003. + The maximum number of tasks to cancel per millisecond of elapsed time. The maximum number of tasks to cancel per millisecond of elapsed time. Default is 0.003. + """ + cancellationRatio: float | None = None + """ + (Number) The maximum number of tasks to cancel. The maximum number of tasks to cancel, as a percentage of successful task completions. Default is 0.1. + The maximum number of tasks to cancel. The maximum number of tasks to cancel, as a percentage of successful task completions. Default is 0.1. + """ + cpuTimeMillisThreshold: float | None = None + """ + (Number) The CPU usage threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. The CPU usage threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. Default is 15000. + The CPU usage threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. The CPU usage threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. Default is 15000. + """ + elapsedTimeMillisThreshold: float | None = None + """ + (Number) The elapsed time threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. The elapsed time threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. Default is 30000. + The elapsed time threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. The elapsed time threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. Default is 30000. + """ + heapMovingAverageWindowSize: float | None = None + """ + (Number) The number of previously completed search shard tasks to consider when calculating the rolling average of heap usage. The number of previously completed search shard tasks to consider when calculating the rolling average of heap usage. Default is 100. + The number of previously completed search shard tasks to consider when calculating the rolling average of heap usage. The number of previously completed search shard tasks to consider when calculating the rolling average of heap usage. Default is 100. + """ + heapPercentThreshold: float | None = None + """ + (Number) The heap usage threshold (as a percentage) required for a single search shard task before it is considered for cancellation. The heap usage threshold (as a percentage) required for a single search shard task before it is considered for cancellation. Default is 0.5. + The heap usage threshold (as a percentage) required for a single search shard task before it is considered for cancellation. The heap usage threshold (as a percentage) required for a single search shard task before it is considered for cancellation. Default is 0.5. + """ + heapVariance: float | None = None + """ + (Number) The minimum variance required for a single search shard task’s heap usage compared to the rolling average of previously completed tasks before it is considered for cancellation. The minimum variance required for a single search shard task’s heap usage compared to the rolling average of previously completed tasks before it is considered for cancellation. Default is 2.0. + The minimum variance required for a single search shard task’s heap usage compared to the rolling average of previously completed tasks before it is considered for cancellation. The minimum variance required for a single search shard task’s heap usage compared to the rolling average of previously completed tasks before it is considered for cancellation. Default is 2.0. + """ + totalHeapPercentThreshold: float | None = None + """ + (Number) The heap usage threshold (as a percentage) required for the sum of heap usages of all search shard tasks before cancellation is applied. The heap usage threshold (as a percentage) required for the sum of heap usages of all search shard tasks before cancellation is applied. Default is 0.5. + The heap usage threshold (as a percentage) required for the sum of heap usages of all search shard tasks before cancellation is applied. The heap usage threshold (as a percentage) required for the sum of heap usages of all search shard tasks before cancellation is applied. Default is 0.5. + """ + + +class SearchTask(BaseModel): + cancellationBurst: float | None = None + """ + (Number) The maximum number of search tasks to cancel in a single iteration of the observer thread. The maximum number of search tasks to cancel in a single iteration of the observer thread. Default is 10.0. + The maximum number of search tasks to cancel in a single iteration of the observer thread. The maximum number of search tasks to cancel in a single iteration of the observer thread. Default is 5.0. + """ + cancellationRate: float | None = None + """ + (Number) The maximum number of tasks to cancel per millisecond of elapsed time. The maximum number of tasks to cancel per millisecond of elapsed time. Default is 0.003. + The maximum number of search tasks to cancel per millisecond of elapsed time. The maximum number of search tasks to cancel per millisecond of elapsed time. Default is 0.003. + """ + cancellationRatio: float | None = None + """ + (Number) The maximum number of tasks to cancel. The maximum number of tasks to cancel, as a percentage of successful task completions. Default is 0.1. + The maximum number of search tasks to cancel, as a percentage of successful search task completions. The maximum number of search tasks to cancel, as a percentage of successful search task completions. Default is 0.1. + """ + cpuTimeMillisThreshold: float | None = None + """ + (Number) The CPU usage threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. The CPU usage threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. Default is 15000. + The CPU usage threshold (in milliseconds) required for an individual parent task before it is considered for cancellation. The CPU usage threshold (in milliseconds) required for an individual parent task before it is considered for cancellation. Default is 30000. + """ + elapsedTimeMillisThreshold: float | None = None + """ + (Number) The elapsed time threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. The elapsed time threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. Default is 30000. + The elapsed time threshold (in milliseconds) required for an individual parent task before it is considered for cancellation. The elapsed time threshold (in milliseconds) required for an individual parent task before it is considered for cancellation. Default is 45000. + """ + heapMovingAverageWindowSize: float | None = None + """ + (Number) The number of previously completed search shard tasks to consider when calculating the rolling average of heap usage. The number of previously completed search shard tasks to consider when calculating the rolling average of heap usage. Default is 100. + The window size used to calculate the rolling average of the heap usage for the completed parent tasks. The window size used to calculate the rolling average of the heap usage for the completed parent tasks. Default is 10. + """ + heapPercentThreshold: float | None = None + """ + (Number) The heap usage threshold (as a percentage) required for a single search shard task before it is considered for cancellation. The heap usage threshold (as a percentage) required for a single search shard task before it is considered for cancellation. Default is 0.5. + The heap usage threshold (as a percentage) required for an individual parent task before it is considered for cancellation. The heap usage threshold (as a percentage) required for an individual parent task before it is considered for cancellation. Default is 0.2. + """ + heapVariance: float | None = None + """ + (Number) The minimum variance required for a single search shard task’s heap usage compared to the rolling average of previously completed tasks before it is considered for cancellation. The minimum variance required for a single search shard task’s heap usage compared to the rolling average of previously completed tasks before it is considered for cancellation. Default is 2.0. + The heap usage variance required for an individual parent task before it is considered for cancellation. The heap usage variance required for an individual parent task before it is considered for cancellation. A task is considered for cancellation when taskHeapUsage is greater than or equal to heapUsageMovingAverage * variance. Default is 2.0. + """ + totalHeapPercentThreshold: float | None = None + """ + (Number) The heap usage threshold (as a percentage) required for the sum of heap usages of all search shard tasks before cancellation is applied. The heap usage threshold (as a percentage) required for the sum of heap usages of all search shard tasks before cancellation is applied. Default is 0.5. + The heap usage threshold (as a percentage) required for the sum of heap usages of all search tasks before cancellation is applied. The heap usage threshold (as a percentage) required for the sum of heap usages of all search tasks before cancellation is applied. Default is 0.5. + """ + + +class SearchBackpressure(BaseModel): + mode: str | None = None + """ + (String) The search backpressure mode. The search backpressure mode. Valid values are monitor_only, enforced, or disabled. Default is monitor_only. + The search backpressure mode. The search backpressure mode. Valid values are monitor_only, enforced, or disabled. Default is monitor_only. + """ + nodeDuress: NodeDuress | None = None + """ + (Block List) Node duress settings. (see below for nested schema) + Node duress settings. + """ + searchShardTask: SearchShardTask | None = None + """ + (Block List) Search shard settings. (see below for nested schema) + Search shard settings. + """ + searchTask: SearchTask | None = None + """ + (Block List) Search task settings. (see below for nested schema) + Search task settings. + """ + + +class Cpu(BaseModel): + enabled: bool | None = None + """ + based authentication for OpenSearch. When enabled, users can authenticate using JWT tokens. + Enable or disable top N query monitoring by the metric. Enable or disable top N query monitoring by the metric. + """ + topNSize: float | None = None + """ + (Number) Specify the value of N for the top N queries by the metric. + Specify the value of N for the top N queries by the metric. + """ + windowSize: str | None = None + """ + (String) The window size of the top N queries by the metric. Configure the window size of the top N queries. The value should be a time value with unit, e.g. 1m, 5s, 1h. + The window size of the top N queries by the metric. Configure the window size of the top N queries. The value should be a time value with unit, e.g. 1m, 5s, 1h. + """ + + +class Latency(BaseModel): + enabled: bool | None = None + """ + based authentication for OpenSearch. When enabled, users can authenticate using JWT tokens. + Enable or disable top N query monitoring by the metric. Enable or disable top N query monitoring by the metric. + """ + topNSize: float | None = None + """ + (Number) Specify the value of N for the top N queries by the metric. + Specify the value of N for the top N queries by the metric. + """ + windowSize: str | None = None + """ + (String) The window size of the top N queries by the metric. Configure the window size of the top N queries. The value should be a time value with unit, e.g. 1m, 5s, 1h. + The window size of the top N queries by the metric. Configure the window size of the top N queries. The value should be a time value with unit, e.g. 1m, 5s, 1h. + """ + + +class Memory(BaseModel): + enabled: bool | None = None + """ + based authentication for OpenSearch. When enabled, users can authenticate using JWT tokens. + Enable or disable top N query monitoring by the metric. Enable or disable top N query monitoring by the metric. + """ + topNSize: float | None = None + """ + (Number) Specify the value of N for the top N queries by the metric. + Specify the value of N for the top N queries by the metric. + """ + windowSize: str | None = None + """ + (String) The window size of the top N queries by the metric. Configure the window size of the top N queries. The value should be a time value with unit, e.g. 1m, 5s, 1h. + The window size of the top N queries by the metric. Configure the window size of the top N queries. The value should be a time value with unit, e.g. 1m, 5s, 1h. + """ + + +class SearchInsightsTopQueries(BaseModel): + cpu: Cpu | None = None + """ + (Block List) Top N queries monitoring by CPU. (see below for nested schema) + Top N queries monitoring by CPU. + """ + latency: Latency | None = None + """ + (Block List) Top N queries monitoring by latency. (see below for nested schema) + Top N queries monitoring by latency. + """ + memory: Memory | None = None + """ + (Block List) Top N queries monitoring by memory. (see below for nested schema) + Top N queries monitoring by memory. + """ + + +class Segrep(BaseModel): + pressureCheckpointLimit: float | None = None + """ + (Number) The maximum number of indexing checkpoints that a replica shard can fall behind when copying from primary. Once segrep.pressure.checkpoint.limit is breached along with segrep.pressure.time.limit, the segment replication backpressure mechanism is initiated. Default is 4 checkpoints. + The maximum number of indexing checkpoints that a replica shard can fall behind when copying from primary. Once `segrep.pressure.checkpoint.limit` is breached along with `segrep.pressure.time.limit`, the segment replication backpressure mechanism is initiated. Default is 4 checkpoints. + """ + pressureEnabled: bool | None = None + """ + (Boolean) Enables the segment replication backpressure mechanism. Default is false. + Enables the segment replication backpressure mechanism. Default is false. + """ + pressureReplicaStaleLimit: float | None = None + """ + (Number) The maximum number of stale replica shards that can exist in a replication group. Once segrep.pressure.replica.stale.limit is breached, the segment replication backpressure mechanism is initiated. Default is .5, which is 50% of a replication group. + The maximum number of stale replica shards that can exist in a replication group. Once `segrep.pressure.replica.stale.limit` is breached, the segment replication backpressure mechanism is initiated. Default is .5, which is 50% of a replication group. + """ + pressureTimeLimit: str | None = None + """ + (String) The maximum amount of time that a replica shard can take to copy from the primary shard. Once segrep.pressure.time.limit is breached along with segrep.pressure.checkpoint.limit, the segment replication backpressure mechanism is initiated. Default is 5 minutes. + The maximum amount of time that a replica shard can take to copy from the primary shard. Once segrep.pressure.time.limit is breached along with segrep.pressure.checkpoint.limit, the segment replication backpressure mechanism is initiated. Default is 5 minutes. + """ + + +class OperatingFactor(BaseModel): + lower: float | None = None + """ + (Number) Lower occupancy limit of the allocated quota of memory for the shard. Specify the lower occupancy limit of the allocated quota of memory for the shard. + If the total memory usage of a shard is below this limit, + shard indexing backpressure decreases the current allocated memory for that shard. + Default is 0.75. + Lower occupancy limit of the allocated quota of memory for the shard. Specify the lower occupancy limit of the allocated quota of memory for the shard. + If the total memory usage of a shard is below this limit, + shard indexing backpressure decreases the current allocated memory for that shard. + Default is 0.75. + """ + optimal: float | None = None + """ + (Number) Optimal occupancy of the allocated quota of memory for the shard. Specify the optimal occupancy of the allocated quota of memory for the shard. + If the total memory usage of a shard is at this level, + shard indexing backpressure doesn’t change the current allocated memory for that shard. + Default is 0.85. + Optimal occupancy of the allocated quota of memory for the shard. Specify the optimal occupancy of the allocated quota of memory for the shard. + If the total memory usage of a shard is at this level, + shard indexing backpressure doesn’t change the current allocated memory for that shard. + Default is 0.85. + """ + upper: float | None = None + """ + (Number) Upper occupancy limit of the allocated quota of memory for the shard. Specify the upper occupancy limit of the allocated quota of memory for the shard. + If the total memory usage of a shard is above this limit, + shard indexing backpressure increases the current allocated memory for that shard. + Default is 0.95. + Upper occupancy limit of the allocated quota of memory for the shard. Specify the upper occupancy limit of the allocated quota of memory for the shard. + If the total memory usage of a shard is above this limit, + shard indexing backpressure increases the current allocated memory for that shard. + Default is 0.95. + """ + + +class Node(BaseModel): + softLimit: float | None = None + """ + level memory + threshold that acts as a soft indicator for strain on a node. + Default is 0.7. + Node soft limit. Define the percentage of the node-level memory + threshold that acts as a soft indicator for strain on a node. + Default is 0.7. + """ + + +class Shard(BaseModel): + minLimit: float | None = None + """ + (Number) Shard min limit. Specify the minimum assigned quota for a new shard in any role (coordinator, primary, or replica). + Shard indexing backpressure increases or decreases this allocated quota based on the inflow of traffic for the shard. + Default is 0.001. + Shard min limit. Specify the minimum assigned quota for a new shard in any role (coordinator, primary, or replica). + Shard indexing backpressure increases or decreases this allocated quota based on the inflow of traffic for the shard. + Default is 0.001. + """ + + +class PrimaryParameter(BaseModel): + node: Node | None = None + """ + (Block List) (see below for nested schema) + """ + shard: Shard | None = None + """ + (Block List) (see below for nested schema) + """ + + +class ShardIndexingPressure(BaseModel): + enabled: bool | None = None + """ + based authentication for OpenSearch. When enabled, users can authenticate using JWT tokens. + Enable or disable shard indexing backpressure. Enable or disable shard indexing backpressure. Default is false. + """ + enforced: bool | None = None + """ + level metrics, + but it doesn’t actually reject any indexing requests. + In enforced mode (value set as true), + shard indexing backpressure rejects any requests to the cluster that might cause a dip in its performance. + Default is false. + Run shard indexing backpressure in shadow mode or enforced mode. Run shard indexing backpressure in shadow mode or enforced mode. + In shadow mode (value set as false), shard indexing backpressure tracks all granular-level metrics, + but it doesn’t actually reject any indexing requests. + In enforced mode (value set as true), + shard indexing backpressure rejects any requests to the cluster that might cause a dip in its performance. + Default is false. + """ + operatingFactor: OperatingFactor | None = None + """ + (Block List) Operating factor. (see below for nested schema) + Operating factor. + """ + primaryParameter: PrimaryParameter | None = None + """ + (Block List) Primary parameter. (see below for nested schema) + Primary parameter. + """ + + +class Properties(BaseModel): + actionAutoCreateIndexEnabled: bool | None = None + """ + (Boolean) action.auto_create_index. Explicitly allow or block automatic creation of indices. Defaults to true. + action.auto_create_index. Explicitly allow or block automatic creation of indices. Defaults to true. + """ + actionDestructiveRequiresName: bool | None = None + """ + (Boolean) Require explicit index names when deleting. + Require explicit index names when deleting. + """ + authFailureListeners: AuthFailureListeners | None = None + """ + (Block List) Opensearch Security Plugin Settings. (see below for nested schema) + Opensearch Security Plugin Settings. + """ + automaticUtilityNetworkIpFilter: bool | None = None + """ + (Boolean) Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + """ + clusterFilecacheRemoteDataRatio: float | None = None + """ + (Number) The limit of how much total remote data can be referenced. Defines a limit of how much total remote data can be referenced as a ratio of the size of the disk reserved for the file cache. This is designed to be a safeguard to prevent oversubscribing a cluster. Defaults to 0. + The limit of how much total remote data can be referenced. Defines a limit of how much total remote data can be referenced as a ratio of the size of the disk reserved for the file cache. This is designed to be a safeguard to prevent oversubscribing a cluster. Defaults to 0. + """ + clusterMaxShardsPerNode: float | None = None + """ + (Number) Controls the number of shards allowed in the cluster per data node. + Controls the number of shards allowed in the cluster per data node. + """ + clusterRemoteStore: ClusterRemoteStore | None = None + """ + (Block List) (see below for nested schema) + """ + clusterRoutingAllocationBalancePreferPrimary: bool | None = None + """ + (Boolean) When set to true, OpenSearch attempts to evenly distribute the primary shards between the cluster nodes. Enabling this setting does not always guarantee an equal number of primary shards on each node, especially in the event of a failover. Changing this setting to false after it was set to true does not invoke redistribution of primary shards. Default is false. + When set to true, OpenSearch attempts to evenly distribute the primary shards between the cluster nodes. Enabling this setting does not always guarantee an equal number of primary shards on each node, especially in the event of a failover. Changing this setting to false after it was set to true does not invoke redistribution of primary shards. Default is false. + """ + clusterRoutingAllocationNodeConcurrentRecoveries: float | None = None + """ + (Number) Concurrent incoming/outgoing shard recoveries per node. How many concurrent incoming/outgoing shard recoveries (normally replicas) are allowed to happen on a node. Defaults to node cpu count * 2. + Concurrent incoming/outgoing shard recoveries per node. How many concurrent incoming/outgoing shard recoveries (normally replicas) are allowed to happen on a node. Defaults to node cpu count * 2. + """ + clusterSearchRequestSlowlog: ClusterSearchRequestSlowlog | None = None + """ + (Block List) (see below for nested schema) + """ + customDomain: str | None = None + """ + * hostname and the custom domain. + Custom domain. Serve the web frontend using a custom CNAME pointing to the Aiven DNS name. When you set a custom domain for a service deployed in a VPC, the service certificate is only created for the public-* hostname and the custom domain. + """ + customKeystores: list[str] | None = None + """ + (List of String) OpenSearch custom keystores. Allow to register custom keystores in OpenSearch. + OpenSearch custom keystores. Allow to register custom keystores in OpenSearch. + """ + customRepos: list[str] | None = None + """ + (List of String) OpenSearch custom repositories. Allow to register object storage repositories in OpenSearch. + OpenSearch custom repositories. Allow to register object storage repositories in OpenSearch. + """ + diskWatermarks: DiskWatermarks | None = None + """ + (Block List) Watermark settings. (see below for nested schema) + Watermark settings. + """ + elasticsearchVersion: str | None = None + """ + (String) OpenSearch version. + OpenSearch version. + """ + emailSenderName: str | None = None + """ + (String) Sender name placeholder to be used in Opensearch Dashboards and Opensearch keystore. This should be identical to the Sender name defined in Opensearch dashboards. + Sender name placeholder to be used in Opensearch Dashboards and Opensearch keystore. This should be identical to the Sender name defined in Opensearch dashboards. + """ + emailSenderPasswordSecretRef: EmailSenderPasswordSecretRef | None = None + """ + (String, Sensitive) Sender password for Opensearch alerts to authenticate with SMTP server. Sender password for Opensearch alerts to authenticate with SMTP server. + Sender password for Opensearch alerts to authenticate with SMTP server. Sender password for Opensearch alerts to authenticate with SMTP server. + """ + emailSenderUsername: str | None = None + """ + (String) Sender username for Opensearch alerts. + Sender username for Opensearch alerts. + """ + enableRemoteBackedStorage: bool | None = None + """ + backed storage. + Enable remote-backed storage. + """ + enableSearchableSnapshots: bool | None = None + """ + (Boolean) Enable searchable snapshots. + Enable searchable snapshots. + """ + enableSecurityAudit: bool | None = None + """ + (Boolean) Enable/Disable security audit. + Enable/Disable security audit. + """ + enableSnapshotApi: bool | None = None + """ + (Boolean) Enable/Disable snapshot API. Enable/Disable snapshot API for custom repositories, this requires security management to be enabled. + Enable/Disable snapshot API. Enable/Disable snapshot API for custom repositories, this requires security management to be enabled. + """ + httpMaxContentLength: float | None = None + """ + (Number) Maximum content length for HTTP requests to the OpenSearch HTTP API, in bytes. + Maximum content length for HTTP requests to the OpenSearch HTTP API, in bytes. + """ + httpMaxHeaderSize: float | None = None + """ + (Number) The max size of allowed headers, in bytes. + The max size of allowed headers, in bytes. + """ + httpMaxInitialLineLength: float | None = None + """ + (Number) The max length of an HTTP URL, in bytes. + The max length of an HTTP URL, in bytes. + """ + indexPatterns: list[str] | None = None + """ + (List of String) Index patterns. + Index patterns. + """ + indexRollup: IndexRollup | None = None + """ + (Block List) Index rollup settings. (see below for nested schema) + Index rollup settings. + """ + indexTemplate: IndexTemplate | None = None + """ + (Block List) Template settings for all new indexes. (see below for nested schema) + Template settings for all new indexes. + """ + indicesFielddataCacheSize: float | None = None + """ + (Number) Relative amount. Maximum amount of heap memory used for field data cache. This is an expert setting; decreasing the value too much will increase overhead of loading field data; too much memory used for field data cache will decrease amount of heap available for other operations. + Relative amount. Maximum amount of heap memory used for field data cache. This is an expert setting; decreasing the value too much will increase overhead of loading field data; too much memory used for field data cache will decrease amount of heap available for other operations. + """ + indicesMemoryIndexBufferSize: float | None = None + """ + (Number) Percentage value. Default is 10%. Total amount of heap used for indexing buffer, before writing segments to disk. This is an expert setting. Too low value will slow down indexing; too high value will increase indexing performance but causes performance issues for query performance. + Percentage value. Default is 10%. Total amount of heap used for indexing buffer, before writing segments to disk. This is an expert setting. Too low value will slow down indexing; too high value will increase indexing performance but causes performance issues for query performance. + """ + indicesMemoryMaxIndexBufferSize: float | None = None + """ + (Number) Absolute value. Default is unbound. Doesn't work without indices.memory.index_buffer_size. Maximum amount of heap used for query cache, an absolute indices.memory.index_buffer_size maximum hard limit. + Absolute value. Default is unbound. Doesn't work without indices.memory.index_buffer_size. Maximum amount of heap used for query cache, an absolute indices.memory.index_buffer_size maximum hard limit. + """ + indicesMemoryMinIndexBufferSize: float | None = None + """ + (Number) Absolute value. Default is 48mb. Doesn't work without indices.memory.index_buffer_size. Minimum amount of heap used for query cache, an absolute indices.memory.index_buffer_size minimal hard limit. + Absolute value. Default is 48mb. Doesn't work without indices.memory.index_buffer_size. Minimum amount of heap used for query cache, an absolute indices.memory.index_buffer_size minimal hard limit. + """ + indicesQueriesCacheSize: float | None = None + """ + (Number) Percentage value. Default is 10%. Maximum amount of heap used for query cache. This is an expert setting. Too low value will decrease query performance and increase performance for other operations; too high value will cause issues with other OpenSearch functionality. + Percentage value. Default is 10%. Maximum amount of heap used for query cache. This is an expert setting. Too low value will decrease query performance and increase performance for other operations; too high value will cause issues with other OpenSearch functionality. + """ + indicesQueryBoolMaxClauseCount: float | None = None + """ + (Number) Maximum number of clauses Lucene BooleanQuery can have. The default value (1024) is relatively high, and increasing it may cause performance issues. Investigate other approaches first before increasing this value. + Maximum number of clauses Lucene BooleanQuery can have. The default value (1024) is relatively high, and increasing it may cause performance issues. Investigate other approaches first before increasing this value. + """ + indicesRecoveryMaxBytesPerSec: float | None = None + """ + (Number) Limits total inbound and outbound recovery traffic for each node. Applies to both peer recoveries as well as snapshot recoveries (i.e., restores from a snapshot). Defaults to 40mb. + Limits total inbound and outbound recovery traffic for each node. Applies to both peer recoveries as well as snapshot recoveries (i.e., restores from a snapshot). Defaults to 40mb. + """ + indicesRecoveryMaxConcurrentFileChunks: float | None = None + """ + (Number) Number of file chunks sent in parallel for each recovery. Defaults to 2. + Number of file chunks sent in parallel for each recovery. Defaults to 2. + """ + ipFilter: list[str] | None = None + """ + (List of String) IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + """ + ismEnabled: bool | None = None + """ + (Boolean) Specifies whether ISM is enabled or not. + Specifies whether ISM is enabled or not. + """ + ismHistoryEnabled: bool | None = None + """ + (Boolean) Specifies whether audit history is enabled or not. The logs from ISM are automatically indexed to a logs document. + Specifies whether audit history is enabled or not. The logs from ISM are automatically indexed to a logs document. + """ + ismHistoryMaxAge: float | None = None + """ + (Number) The maximum age before rolling over the audit history index in hours. + The maximum age before rolling over the audit history index in hours. + """ + ismHistoryMaxDocs: float | None = None + """ + (Number) The maximum number of documents before rolling over the audit history index. + The maximum number of documents before rolling over the audit history index. + """ + ismHistoryRolloverCheckPeriod: float | None = None + """ + (Number) The time between rollover checks for the audit history index in hours. + The time between rollover checks for the audit history index in hours. + """ + ismHistoryRolloverRetentionPeriod: float | None = None + """ + (Number) How long audit history indices are kept in days. + How long audit history indices are kept in days. + """ + jwt: Jwt | None = None + """ + (Block List) OpenSearch JWT Configuration. (see below for nested schema) + OpenSearch JWT Configuration. + """ + keepIndexRefreshInterval: bool | None = None + """ + (Boolean) Don't reset index.refresh_interval to the default value. Aiven automation resets index.refresh_interval to default value for every index to be sure that indices are always visible to search. If it doesn't fit your case, you can disable this by setting up this flag to true. + Don't reset index.refresh_interval to the default value. Aiven automation resets index.refresh_interval to default value for every index to be sure that indices are always visible to search. If it doesn't fit your case, you can disable this by setting up this flag to true. + """ + knnCacheItemExpiryEnabled: bool | None = None + """ + (Boolean) Enable or disable removing KNN graphs from the cache when they are idle. Disabled by default. + Enable or disable removing KNN graphs from the cache when they are idle. Disabled by default. + """ + knnCacheItemExpiryMinutes: float | None = None + """ + (Number) If enabled, the amount of time in minutes a KNN graph can be idle in the cache before being evicted. + If enabled, the amount of time in minutes a KNN graph can be idle in the cache before being evicted. + """ + knnCircuitBreakerUnsetPercentage: float | None = None + """ + (Number) The native memory usage, as a percentage below the KNN memory circuit breaker limit, at which a tripped circuit breaker resets. Defaults to 5%. + The native memory usage, as a percentage below the KNN memory circuit breaker limit, at which a tripped circuit breaker resets. Defaults to 5%. + """ + knnMemoryCircuitBreakerEnabled: bool | None = None + """ + (Boolean) Enable or disable KNN memory circuit breaker. Defaults to true. + Enable or disable KNN memory circuit breaker. Defaults to true. + """ + knnMemoryCircuitBreakerLimit: float | None = None + """ + (Number) Maximum amount of memory in percentage that can be used for the KNN index. Defaults to 50% of the JVM heap size. 0 is used to set it to null which can be used to invalidate caches. + Maximum amount of memory in percentage that can be used for the KNN index. Defaults to 50% of the JVM heap size. 0 is used to set it to null which can be used to invalidate caches. + """ + mlCommonsConnectorAccessControlEnabled: bool | None = None + """ + (Boolean) plugins.ml_commons.connector_access_control_enabled. When set to true, the setting allows admins to control access and permissions to the connector API using backend_roles. Defaults to false. + plugins.ml_commons.connector_access_control_enabled. When set to true, the setting allows admins to control access and permissions to the connector API using backend_roles. Defaults to false. + """ + mlCommonsMaxModelOnNode: float | None = None + """ + (Number) plugins.ml_commons.max_model_on_node. Maximum number of ML models that can be deployed on a single ML node. Defaults to 10. + plugins.ml_commons.max_model_on_node. Maximum number of ML models that can be deployed on a single ML node. Defaults to 10. + """ + mlCommonsModelAccessControlEnabled: bool | None = None + """ + (Boolean) plugins.ml_commons.model_access_control.enabled. Enable or disable model access control for ML Commons. When enabled, access to ML models is controlled by security permissions. Defaults to false. + plugins.ml_commons.model_access_control.enabled. Enable or disable model access control for ML Commons. When enabled, access to ML models is controlled by security permissions. Defaults to false. + """ + mlCommonsModelAutoDeployEnable: bool | None = None + """ + (Boolean) plugins.ml_commons.model_auto_deploy.enable. For externally hosted models only: automatically deploy a model on its first predict request instead of requiring an explicit deploy call first. Defaults to true. + plugins.ml_commons.model_auto_deploy.enable. For externally hosted models only: automatically deploy a model on its first predict request instead of requiring an explicit deploy call first. Defaults to true. + """ + mlCommonsModelAutoRedeployEnable: bool | None = None + """ + (Boolean) plugins.ml_commons.model_auto_redeploy.enable. Automatically redeploy deployed or partially deployed models after ML nodes rejoin the cluster, e.g. after a node replacement. Defaults to true. + plugins.ml_commons.model_auto_redeploy.enable. Automatically redeploy deployed or partially deployed models after ML nodes rejoin the cluster, e.g. after a node replacement. Defaults to true. + """ + mlCommonsNativeMemoryThreshold: float | None = None + """ + (Number) plugins.ml_commons.native_memory_threshold. Native memory threshold percentage for ML Commons. Controls the maximum percentage of native memory that can be used by ML Commons operations. Defaults to 90%. + plugins.ml_commons.native_memory_threshold. Native memory threshold percentage for ML Commons. Controls the maximum percentage of native memory that can be used by ML Commons operations. Defaults to 90%. + """ + mlCommonsOnlyRunOnMlNode: bool | None = None + """ + (Boolean) plugins.ml_commons.only_run_on_ml_node. Enable or disable running ML Commons tasks only on ML nodes. When enabled, ML tasks will only execute on nodes designated as ML nodes. Defaults to true. + plugins.ml_commons.only_run_on_ml_node. Enable or disable running ML Commons tasks only on ML nodes. When enabled, ML tasks will only execute on nodes designated as ML nodes. Defaults to true. + """ + mlCommonsTrustedConnectorEndpointsRegex: list[str] | None = None + """ + (List of String) plugins.ml_commons.trusted_connector_endpoints_regex. Adds the trusted endpoints to the cluster settings. Supports Java regex expressions. + plugins.ml_commons.trusted_connector_endpoints_regex. Adds the trusted endpoints to the cluster settings. Supports Java regex expressions. + """ + nodeSearchCacheSize: str | None = None + """ + (String) The limit of how much total remote data can be referenced. Defines a limit of how much total remote data can be referenced as a ratio of the size of the disk reserved for the file cache. This is designed to be a safeguard to prevent oversubscribing a cluster. Defaults to 5gb. Requires restarting all OpenSearch nodes. + The limit of how much total remote data can be referenced. Defines a limit of how much total remote data can be referenced as a ratio of the size of the disk reserved for the file cache. This is designed to be a safeguard to prevent oversubscribing a cluster. Defaults to 5gb. Requires restarting all OpenSearch nodes. + """ + openid: Openid | None = None + """ + (Block List) OpenSearch OpenID Connect Configuration. (see below for nested schema) + OpenSearch OpenID Connect Configuration. + """ + opensearchDashboards: OpensearchDashboards | None = None + """ + (Block List) OpenSearch Dashboards settings. (see below for nested schema) + OpenSearch Dashboards settings. + """ + overrideMainResponseVersion: bool | None = None + """ + (Boolean) Compatibility mode sets OpenSearch to report its version as 7.10 so clients continue to work. Default is false. Deprecated and ignored for service version 3.3 and higher. + Compatibility mode sets OpenSearch to report its version as 7.10 so clients continue to work. Default is false. Deprecated and ignored for service version 3.3 and higher. + """ + pluginsAlertingFilterByBackendRoles: bool | None = None + """ + (Boolean) Enable or disable filtering of alerting by backend roles. Requires Security plugin. Defaults to false. + Enable or disable filtering of alerting by backend roles. Requires Security plugin. Defaults to false. + """ + publicAccess: bool | None = None + """ + (Boolean) Public Access. Allow access to the service from the public Internet. + Public Access. Allow access to the service from the public Internet. + """ + publicAccessPrometheus: bool | None = None + """ + (Boolean) Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + """ + reindexRemoteWhitelist: list[str] | None = None + """ + (List of String) reindex_remote_allowlist. Whitelisted addresses for reindexing. Changing this value will cause all OpenSearch instances to restart. + reindex_remote_allowlist. Whitelisted addresses for reindexing. Changing this value will cause all OpenSearch instances to restart. + """ + remoteStore: RemoteStore | None = None + """ + (Block List) (see below for nested schema) + """ + saml: Saml | None = None + """ + (Block List) OpenSearch SAML configuration. (see below for nested schema) + OpenSearch SAML configuration. + """ + scriptMaxCompilationsRate: str | None = None + """ + circuit breaker to prevent/minimize OOMs. Script compilation circuit breaker limits the number of inline script compilations within a period of time. Default is use-context. + Script max compilation rate - circuit breaker to prevent/minimize OOMs. Script compilation circuit breaker limits the number of inline script compilations within a period of time. Default is use-context. + """ + searchBackpressure: SearchBackpressure | None = None + """ + (Block List) Search Backpressure Settings. (see below for nested schema) + Search Backpressure Settings. + """ + searchInsightsTopQueries: SearchInsightsTopQueries | None = None + """ + (Block List) (see below for nested schema) + """ + searchMaxBuckets: float | None = None + """ + (Number) Maximum number of aggregation buckets allowed in a single response. OpenSearch default value is used when this is not defined. + Maximum number of aggregation buckets allowed in a single response. OpenSearch default value is used when this is not defined. + """ + segrep: Segrep | None = None + """ + (Block List) Segment Replication Backpressure Settings. (see below for nested schema) + Segment Replication Backpressure Settings. + """ + serviceLog: bool | None = None + """ + (Boolean) Service logging. Store logs for the service so that they are available in the HTTP API and console. + Service logging. Store logs for the service so that they are available in the HTTP API and console. + """ + shardIndexingPressure: ShardIndexingPressure | None = None + """ + (Block List) Shard indexing back pressure settings. (see below for nested schema) + Shard indexing back pressure settings. + """ + threadPoolAnalyzeQueueSize: float | None = None + """ + (Number) analyze thread pool queue size. Size for the thread pool queue. See documentation for exact details. + analyze thread pool queue size. Size for the thread pool queue. See documentation for exact details. + """ + threadPoolAnalyzeSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + analyze thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + threadPoolForceMergeSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + force_merge thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + threadPoolGetQueueSize: float | None = None + """ + (Number) get thread pool queue size. Size for the thread pool queue. See documentation for exact details. + get thread pool queue size. Size for the thread pool queue. See documentation for exact details. + """ + threadPoolGetSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + get thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + threadPoolSearchQueueSize: float | None = None + """ + (Number) search thread pool queue size. Size for the thread pool queue. See documentation for exact details. + search thread pool queue size. Size for the thread pool queue. See documentation for exact details. + """ + threadPoolSearchSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + search thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + threadPoolSearchThrottledQueueSize: float | None = None + """ + (Number) search_throttled thread pool queue size. Size for the thread pool queue. See documentation for exact details. + search_throttled thread pool queue size. Size for the thread pool queue. See documentation for exact details. + """ + threadPoolSearchThrottledSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + search_throttled thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + threadPoolWriteQueueSize: float | None = None + """ + (Number) write thread pool queue size. Size for the thread pool queue. See documentation for exact details. + write thread pool queue size. Size for the thread pool queue. See documentation for exact details. + """ + threadPoolWriteSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + write thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + version: str | None = None + """ + (String) OpenSearch version. + OpenSearch version. + """ + + +class ForProvider(BaseModel): + accessControl: bool | None = None + """ + (Boolean) Enables users access control for OpenSearch service. User access control rules will only be enforced if this attribute is enabled. + Enables users access control for OpenSearch service. User access control rules will only be enforced if this attribute is enabled. + """ + additionalDiskSpaceGib: float | None = None + """ + (Number) Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + """ + extendedAccessControl: bool | None = None + """ + level _mget, _msearch and _bulk APIs. Users are limited to perform operations on indices based on the user-specific access control rules. + Grant access to top-level `_mget`, `_msearch` and `_bulk` APIs. Users are limited to perform operations on indices based on the user-specific access control rules. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItem] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + plan: str | None = None + """ + (String) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans opensearch. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans opensearch`. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + properties: Properties | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +class InitProvider(BaseModel): + accessControl: bool | None = None + """ + (Boolean) Enables users access control for OpenSearch service. User access control rules will only be enforced if this attribute is enabled. + Enables users access control for OpenSearch service. User access control rules will only be enforced if this attribute is enabled. + """ + additionalDiskSpaceGib: float | None = None + """ + (Number) Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + """ + extendedAccessControl: bool | None = None + """ + level _mget, _msearch and _bulk APIs. Users are limited to perform operations on indices based on the user-specific access control rules. + Grant access to top-level `_mget`, `_msearch` and `_bulk` APIs. Users are limited to perform operations on indices based on the user-specific access control rules. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItem] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + plan: str | None = None + """ + (String) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans opensearch. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans opensearch`. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + properties: Properties | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 Component(BaseModel): + component: str | None = None + """ + (String) Component name. + Component name. + """ + host: str | None = None + """ + (String) Hostname of the component + Hostname of the component + """ + port: float | None = None + """ + (Number) Port number of the component + Port number of the component + """ + route: str | None = None + """ + (String) Component network route type + Component network route type + """ + usage: str | None = None + """ + (String) Usage of the component + Usage of the component + """ + + +class NetworkItemModel(BaseModel): + family: str | None = None + """ + (String) Network family. Currently only IPv4 is supported. + Network family. Currently only `IPv4` is supported. + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + The name of the network. Must be unique within the service. + """ + type: str | None = None + """ + (String) Type of the managed database instance + The type of the network. Must be private. + """ + uuid: str | None = None + """ + (String) Private network UUID. Must reside in the same zone as the database. + Private network UUID. Must reside in the same zone as the database. + """ + + +class NodeState(BaseModel): + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name plus a node iteration + """ + role: str | None = None + """ + (String) Role of the node + Role of the node + """ + state: str | None = None + """ + (String) The current state of the service + Current state of the node + """ + + +class PropertiesModel(BaseModel): + actionAutoCreateIndexEnabled: bool | None = None + """ + (Boolean) action.auto_create_index. Explicitly allow or block automatic creation of indices. Defaults to true. + action.auto_create_index. Explicitly allow or block automatic creation of indices. Defaults to true. + """ + actionDestructiveRequiresName: bool | None = None + """ + (Boolean) Require explicit index names when deleting. + Require explicit index names when deleting. + """ + authFailureListeners: AuthFailureListeners | None = None + """ + (Block List) Opensearch Security Plugin Settings. (see below for nested schema) + Opensearch Security Plugin Settings. + """ + automaticUtilityNetworkIpFilter: bool | None = None + """ + (Boolean) Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + """ + clusterFilecacheRemoteDataRatio: float | None = None + """ + (Number) The limit of how much total remote data can be referenced. Defines a limit of how much total remote data can be referenced as a ratio of the size of the disk reserved for the file cache. This is designed to be a safeguard to prevent oversubscribing a cluster. Defaults to 0. + The limit of how much total remote data can be referenced. Defines a limit of how much total remote data can be referenced as a ratio of the size of the disk reserved for the file cache. This is designed to be a safeguard to prevent oversubscribing a cluster. Defaults to 0. + """ + clusterMaxShardsPerNode: float | None = None + """ + (Number) Controls the number of shards allowed in the cluster per data node. + Controls the number of shards allowed in the cluster per data node. + """ + clusterRemoteStore: ClusterRemoteStore | None = None + """ + (Block List) (see below for nested schema) + """ + clusterRoutingAllocationBalancePreferPrimary: bool | None = None + """ + (Boolean) When set to true, OpenSearch attempts to evenly distribute the primary shards between the cluster nodes. Enabling this setting does not always guarantee an equal number of primary shards on each node, especially in the event of a failover. Changing this setting to false after it was set to true does not invoke redistribution of primary shards. Default is false. + When set to true, OpenSearch attempts to evenly distribute the primary shards between the cluster nodes. Enabling this setting does not always guarantee an equal number of primary shards on each node, especially in the event of a failover. Changing this setting to false after it was set to true does not invoke redistribution of primary shards. Default is false. + """ + clusterRoutingAllocationNodeConcurrentRecoveries: float | None = None + """ + (Number) Concurrent incoming/outgoing shard recoveries per node. How many concurrent incoming/outgoing shard recoveries (normally replicas) are allowed to happen on a node. Defaults to node cpu count * 2. + Concurrent incoming/outgoing shard recoveries per node. How many concurrent incoming/outgoing shard recoveries (normally replicas) are allowed to happen on a node. Defaults to node cpu count * 2. + """ + clusterSearchRequestSlowlog: ClusterSearchRequestSlowlog | None = None + """ + (Block List) (see below for nested schema) + """ + customDomain: str | None = None + """ + * hostname and the custom domain. + Custom domain. Serve the web frontend using a custom CNAME pointing to the Aiven DNS name. When you set a custom domain for a service deployed in a VPC, the service certificate is only created for the public-* hostname and the custom domain. + """ + customKeystores: list[str] | None = None + """ + (List of String) OpenSearch custom keystores. Allow to register custom keystores in OpenSearch. + OpenSearch custom keystores. Allow to register custom keystores in OpenSearch. + """ + customRepos: list[str] | None = None + """ + (List of String) OpenSearch custom repositories. Allow to register object storage repositories in OpenSearch. + OpenSearch custom repositories. Allow to register object storage repositories in OpenSearch. + """ + diskWatermarks: DiskWatermarks | None = None + """ + (Block List) Watermark settings. (see below for nested schema) + Watermark settings. + """ + elasticsearchVersion: str | None = None + """ + (String) OpenSearch version. + OpenSearch version. + """ + emailSenderName: str | None = None + """ + (String) Sender name placeholder to be used in Opensearch Dashboards and Opensearch keystore. This should be identical to the Sender name defined in Opensearch dashboards. + Sender name placeholder to be used in Opensearch Dashboards and Opensearch keystore. This should be identical to the Sender name defined in Opensearch dashboards. + """ + emailSenderUsername: str | None = None + """ + (String) Sender username for Opensearch alerts. + Sender username for Opensearch alerts. + """ + enableRemoteBackedStorage: bool | None = None + """ + backed storage. + Enable remote-backed storage. + """ + enableSearchableSnapshots: bool | None = None + """ + (Boolean) Enable searchable snapshots. + Enable searchable snapshots. + """ + enableSecurityAudit: bool | None = None + """ + (Boolean) Enable/Disable security audit. + Enable/Disable security audit. + """ + enableSnapshotApi: bool | None = None + """ + (Boolean) Enable/Disable snapshot API. Enable/Disable snapshot API for custom repositories, this requires security management to be enabled. + Enable/Disable snapshot API. Enable/Disable snapshot API for custom repositories, this requires security management to be enabled. + """ + httpMaxContentLength: float | None = None + """ + (Number) Maximum content length for HTTP requests to the OpenSearch HTTP API, in bytes. + Maximum content length for HTTP requests to the OpenSearch HTTP API, in bytes. + """ + httpMaxHeaderSize: float | None = None + """ + (Number) The max size of allowed headers, in bytes. + The max size of allowed headers, in bytes. + """ + httpMaxInitialLineLength: float | None = None + """ + (Number) The max length of an HTTP URL, in bytes. + The max length of an HTTP URL, in bytes. + """ + indexPatterns: list[str] | None = None + """ + (List of String) Index patterns. + Index patterns. + """ + indexRollup: IndexRollup | None = None + """ + (Block List) Index rollup settings. (see below for nested schema) + Index rollup settings. + """ + indexTemplate: IndexTemplate | None = None + """ + (Block List) Template settings for all new indexes. (see below for nested schema) + Template settings for all new indexes. + """ + indicesFielddataCacheSize: float | None = None + """ + (Number) Relative amount. Maximum amount of heap memory used for field data cache. This is an expert setting; decreasing the value too much will increase overhead of loading field data; too much memory used for field data cache will decrease amount of heap available for other operations. + Relative amount. Maximum amount of heap memory used for field data cache. This is an expert setting; decreasing the value too much will increase overhead of loading field data; too much memory used for field data cache will decrease amount of heap available for other operations. + """ + indicesMemoryIndexBufferSize: float | None = None + """ + (Number) Percentage value. Default is 10%. Total amount of heap used for indexing buffer, before writing segments to disk. This is an expert setting. Too low value will slow down indexing; too high value will increase indexing performance but causes performance issues for query performance. + Percentage value. Default is 10%. Total amount of heap used for indexing buffer, before writing segments to disk. This is an expert setting. Too low value will slow down indexing; too high value will increase indexing performance but causes performance issues for query performance. + """ + indicesMemoryMaxIndexBufferSize: float | None = None + """ + (Number) Absolute value. Default is unbound. Doesn't work without indices.memory.index_buffer_size. Maximum amount of heap used for query cache, an absolute indices.memory.index_buffer_size maximum hard limit. + Absolute value. Default is unbound. Doesn't work without indices.memory.index_buffer_size. Maximum amount of heap used for query cache, an absolute indices.memory.index_buffer_size maximum hard limit. + """ + indicesMemoryMinIndexBufferSize: float | None = None + """ + (Number) Absolute value. Default is 48mb. Doesn't work without indices.memory.index_buffer_size. Minimum amount of heap used for query cache, an absolute indices.memory.index_buffer_size minimal hard limit. + Absolute value. Default is 48mb. Doesn't work without indices.memory.index_buffer_size. Minimum amount of heap used for query cache, an absolute indices.memory.index_buffer_size minimal hard limit. + """ + indicesQueriesCacheSize: float | None = None + """ + (Number) Percentage value. Default is 10%. Maximum amount of heap used for query cache. This is an expert setting. Too low value will decrease query performance and increase performance for other operations; too high value will cause issues with other OpenSearch functionality. + Percentage value. Default is 10%. Maximum amount of heap used for query cache. This is an expert setting. Too low value will decrease query performance and increase performance for other operations; too high value will cause issues with other OpenSearch functionality. + """ + indicesQueryBoolMaxClauseCount: float | None = None + """ + (Number) Maximum number of clauses Lucene BooleanQuery can have. The default value (1024) is relatively high, and increasing it may cause performance issues. Investigate other approaches first before increasing this value. + Maximum number of clauses Lucene BooleanQuery can have. The default value (1024) is relatively high, and increasing it may cause performance issues. Investigate other approaches first before increasing this value. + """ + indicesRecoveryMaxBytesPerSec: float | None = None + """ + (Number) Limits total inbound and outbound recovery traffic for each node. Applies to both peer recoveries as well as snapshot recoveries (i.e., restores from a snapshot). Defaults to 40mb. + Limits total inbound and outbound recovery traffic for each node. Applies to both peer recoveries as well as snapshot recoveries (i.e., restores from a snapshot). Defaults to 40mb. + """ + indicesRecoveryMaxConcurrentFileChunks: float | None = None + """ + (Number) Number of file chunks sent in parallel for each recovery. Defaults to 2. + Number of file chunks sent in parallel for each recovery. Defaults to 2. + """ + ipFilter: list[str] | None = None + """ + (List of String) IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + """ + ismEnabled: bool | None = None + """ + (Boolean) Specifies whether ISM is enabled or not. + Specifies whether ISM is enabled or not. + """ + ismHistoryEnabled: bool | None = None + """ + (Boolean) Specifies whether audit history is enabled or not. The logs from ISM are automatically indexed to a logs document. + Specifies whether audit history is enabled or not. The logs from ISM are automatically indexed to a logs document. + """ + ismHistoryMaxAge: float | None = None + """ + (Number) The maximum age before rolling over the audit history index in hours. + The maximum age before rolling over the audit history index in hours. + """ + ismHistoryMaxDocs: float | None = None + """ + (Number) The maximum number of documents before rolling over the audit history index. + The maximum number of documents before rolling over the audit history index. + """ + ismHistoryRolloverCheckPeriod: float | None = None + """ + (Number) The time between rollover checks for the audit history index in hours. + The time between rollover checks for the audit history index in hours. + """ + ismHistoryRolloverRetentionPeriod: float | None = None + """ + (Number) How long audit history indices are kept in days. + How long audit history indices are kept in days. + """ + jwt: Jwt | None = None + """ + (Block List) OpenSearch JWT Configuration. (see below for nested schema) + OpenSearch JWT Configuration. + """ + keepIndexRefreshInterval: bool | None = None + """ + (Boolean) Don't reset index.refresh_interval to the default value. Aiven automation resets index.refresh_interval to default value for every index to be sure that indices are always visible to search. If it doesn't fit your case, you can disable this by setting up this flag to true. + Don't reset index.refresh_interval to the default value. Aiven automation resets index.refresh_interval to default value for every index to be sure that indices are always visible to search. If it doesn't fit your case, you can disable this by setting up this flag to true. + """ + knnCacheItemExpiryEnabled: bool | None = None + """ + (Boolean) Enable or disable removing KNN graphs from the cache when they are idle. Disabled by default. + Enable or disable removing KNN graphs from the cache when they are idle. Disabled by default. + """ + knnCacheItemExpiryMinutes: float | None = None + """ + (Number) If enabled, the amount of time in minutes a KNN graph can be idle in the cache before being evicted. + If enabled, the amount of time in minutes a KNN graph can be idle in the cache before being evicted. + """ + knnCircuitBreakerUnsetPercentage: float | None = None + """ + (Number) The native memory usage, as a percentage below the KNN memory circuit breaker limit, at which a tripped circuit breaker resets. Defaults to 5%. + The native memory usage, as a percentage below the KNN memory circuit breaker limit, at which a tripped circuit breaker resets. Defaults to 5%. + """ + knnMemoryCircuitBreakerEnabled: bool | None = None + """ + (Boolean) Enable or disable KNN memory circuit breaker. Defaults to true. + Enable or disable KNN memory circuit breaker. Defaults to true. + """ + knnMemoryCircuitBreakerLimit: float | None = None + """ + (Number) Maximum amount of memory in percentage that can be used for the KNN index. Defaults to 50% of the JVM heap size. 0 is used to set it to null which can be used to invalidate caches. + Maximum amount of memory in percentage that can be used for the KNN index. Defaults to 50% of the JVM heap size. 0 is used to set it to null which can be used to invalidate caches. + """ + mlCommonsConnectorAccessControlEnabled: bool | None = None + """ + (Boolean) plugins.ml_commons.connector_access_control_enabled. When set to true, the setting allows admins to control access and permissions to the connector API using backend_roles. Defaults to false. + plugins.ml_commons.connector_access_control_enabled. When set to true, the setting allows admins to control access and permissions to the connector API using backend_roles. Defaults to false. + """ + mlCommonsMaxModelOnNode: float | None = None + """ + (Number) plugins.ml_commons.max_model_on_node. Maximum number of ML models that can be deployed on a single ML node. Defaults to 10. + plugins.ml_commons.max_model_on_node. Maximum number of ML models that can be deployed on a single ML node. Defaults to 10. + """ + mlCommonsModelAccessControlEnabled: bool | None = None + """ + (Boolean) plugins.ml_commons.model_access_control.enabled. Enable or disable model access control for ML Commons. When enabled, access to ML models is controlled by security permissions. Defaults to false. + plugins.ml_commons.model_access_control.enabled. Enable or disable model access control for ML Commons. When enabled, access to ML models is controlled by security permissions. Defaults to false. + """ + mlCommonsModelAutoDeployEnable: bool | None = None + """ + (Boolean) plugins.ml_commons.model_auto_deploy.enable. For externally hosted models only: automatically deploy a model on its first predict request instead of requiring an explicit deploy call first. Defaults to true. + plugins.ml_commons.model_auto_deploy.enable. For externally hosted models only: automatically deploy a model on its first predict request instead of requiring an explicit deploy call first. Defaults to true. + """ + mlCommonsModelAutoRedeployEnable: bool | None = None + """ + (Boolean) plugins.ml_commons.model_auto_redeploy.enable. Automatically redeploy deployed or partially deployed models after ML nodes rejoin the cluster, e.g. after a node replacement. Defaults to true. + plugins.ml_commons.model_auto_redeploy.enable. Automatically redeploy deployed or partially deployed models after ML nodes rejoin the cluster, e.g. after a node replacement. Defaults to true. + """ + mlCommonsNativeMemoryThreshold: float | None = None + """ + (Number) plugins.ml_commons.native_memory_threshold. Native memory threshold percentage for ML Commons. Controls the maximum percentage of native memory that can be used by ML Commons operations. Defaults to 90%. + plugins.ml_commons.native_memory_threshold. Native memory threshold percentage for ML Commons. Controls the maximum percentage of native memory that can be used by ML Commons operations. Defaults to 90%. + """ + mlCommonsOnlyRunOnMlNode: bool | None = None + """ + (Boolean) plugins.ml_commons.only_run_on_ml_node. Enable or disable running ML Commons tasks only on ML nodes. When enabled, ML tasks will only execute on nodes designated as ML nodes. Defaults to true. + plugins.ml_commons.only_run_on_ml_node. Enable or disable running ML Commons tasks only on ML nodes. When enabled, ML tasks will only execute on nodes designated as ML nodes. Defaults to true. + """ + mlCommonsTrustedConnectorEndpointsRegex: list[str] | None = None + """ + (List of String) plugins.ml_commons.trusted_connector_endpoints_regex. Adds the trusted endpoints to the cluster settings. Supports Java regex expressions. + plugins.ml_commons.trusted_connector_endpoints_regex. Adds the trusted endpoints to the cluster settings. Supports Java regex expressions. + """ + nodeSearchCacheSize: str | None = None + """ + (String) The limit of how much total remote data can be referenced. Defines a limit of how much total remote data can be referenced as a ratio of the size of the disk reserved for the file cache. This is designed to be a safeguard to prevent oversubscribing a cluster. Defaults to 5gb. Requires restarting all OpenSearch nodes. + The limit of how much total remote data can be referenced. Defines a limit of how much total remote data can be referenced as a ratio of the size of the disk reserved for the file cache. This is designed to be a safeguard to prevent oversubscribing a cluster. Defaults to 5gb. Requires restarting all OpenSearch nodes. + """ + openid: Openid | None = None + """ + (Block List) OpenSearch OpenID Connect Configuration. (see below for nested schema) + OpenSearch OpenID Connect Configuration. + """ + opensearchDashboards: OpensearchDashboards | None = None + """ + (Block List) OpenSearch Dashboards settings. (see below for nested schema) + OpenSearch Dashboards settings. + """ + overrideMainResponseVersion: bool | None = None + """ + (Boolean) Compatibility mode sets OpenSearch to report its version as 7.10 so clients continue to work. Default is false. Deprecated and ignored for service version 3.3 and higher. + Compatibility mode sets OpenSearch to report its version as 7.10 so clients continue to work. Default is false. Deprecated and ignored for service version 3.3 and higher. + """ + pluginsAlertingFilterByBackendRoles: bool | None = None + """ + (Boolean) Enable or disable filtering of alerting by backend roles. Requires Security plugin. Defaults to false. + Enable or disable filtering of alerting by backend roles. Requires Security plugin. Defaults to false. + """ + publicAccess: bool | None = None + """ + (Boolean) Public Access. Allow access to the service from the public Internet. + Public Access. Allow access to the service from the public Internet. + """ + publicAccessPrometheus: bool | None = None + """ + (Boolean) Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + """ + reindexRemoteWhitelist: list[str] | None = None + """ + (List of String) reindex_remote_allowlist. Whitelisted addresses for reindexing. Changing this value will cause all OpenSearch instances to restart. + reindex_remote_allowlist. Whitelisted addresses for reindexing. Changing this value will cause all OpenSearch instances to restart. + """ + remoteStore: RemoteStore | None = None + """ + (Block List) (see below for nested schema) + """ + saml: Saml | None = None + """ + (Block List) OpenSearch SAML configuration. (see below for nested schema) + OpenSearch SAML configuration. + """ + scriptMaxCompilationsRate: str | None = None + """ + circuit breaker to prevent/minimize OOMs. Script compilation circuit breaker limits the number of inline script compilations within a period of time. Default is use-context. + Script max compilation rate - circuit breaker to prevent/minimize OOMs. Script compilation circuit breaker limits the number of inline script compilations within a period of time. Default is use-context. + """ + searchBackpressure: SearchBackpressure | None = None + """ + (Block List) Search Backpressure Settings. (see below for nested schema) + Search Backpressure Settings. + """ + searchInsightsTopQueries: SearchInsightsTopQueries | None = None + """ + (Block List) (see below for nested schema) + """ + searchMaxBuckets: float | None = None + """ + (Number) Maximum number of aggregation buckets allowed in a single response. OpenSearch default value is used when this is not defined. + Maximum number of aggregation buckets allowed in a single response. OpenSearch default value is used when this is not defined. + """ + segrep: Segrep | None = None + """ + (Block List) Segment Replication Backpressure Settings. (see below for nested schema) + Segment Replication Backpressure Settings. + """ + serviceLog: bool | None = None + """ + (Boolean) Service logging. Store logs for the service so that they are available in the HTTP API and console. + Service logging. Store logs for the service so that they are available in the HTTP API and console. + """ + shardIndexingPressure: ShardIndexingPressure | None = None + """ + (Block List) Shard indexing back pressure settings. (see below for nested schema) + Shard indexing back pressure settings. + """ + threadPoolAnalyzeQueueSize: float | None = None + """ + (Number) analyze thread pool queue size. Size for the thread pool queue. See documentation for exact details. + analyze thread pool queue size. Size for the thread pool queue. See documentation for exact details. + """ + threadPoolAnalyzeSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + analyze thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + threadPoolForceMergeSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + force_merge thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + threadPoolGetQueueSize: float | None = None + """ + (Number) get thread pool queue size. Size for the thread pool queue. See documentation for exact details. + get thread pool queue size. Size for the thread pool queue. See documentation for exact details. + """ + threadPoolGetSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + get thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + threadPoolSearchQueueSize: float | None = None + """ + (Number) search thread pool queue size. Size for the thread pool queue. See documentation for exact details. + search thread pool queue size. Size for the thread pool queue. See documentation for exact details. + """ + threadPoolSearchSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + search thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + threadPoolSearchThrottledQueueSize: float | None = None + """ + (Number) search_throttled thread pool queue size. Size for the thread pool queue. See documentation for exact details. + search_throttled thread pool queue size. Size for the thread pool queue. See documentation for exact details. + """ + threadPoolSearchThrottledSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + search_throttled thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + threadPoolWriteQueueSize: float | None = None + """ + (Number) write thread pool queue size. Size for the thread pool queue. See documentation for exact details. + write thread pool queue size. Size for the thread pool queue. See documentation for exact details. + """ + threadPoolWriteSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + write thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + version: str | None = None + """ + (String) OpenSearch version. + OpenSearch version. + """ + + +class AtProvider(BaseModel): + accessControl: bool | None = None + """ + (Boolean) Enables users access control for OpenSearch service. User access control rules will only be enforced if this attribute is enabled. + Enables users access control for OpenSearch service. User access control rules will only be enforced if this attribute is enabled. + """ + additionalDiskSpaceGib: float | None = None + """ + (Number) Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + """ + components: list[Component] | None = None + """ + (Attributes List) Service component information (see below for nested schema) + """ + extendedAccessControl: bool | None = None + """ + level _mget, _msearch and _bulk APIs. Users are limited to perform operations on indices based on the user-specific access control rules. + Grant access to top-level `_mget`, `_msearch` and `_bulk` APIs. Users are limited to perform operations on indices based on the user-specific access control rules. + """ + id: str | None = None + """ + (String) UUID of the database. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItemModel] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + nodeStates: list[NodeState] | None = None + """ + (Attributes List) Information about nodes providing the managed service (see below for nested schema) + """ + plan: str | None = None + """ + (String) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans opensearch. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans opensearch`. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + primaryDatabase: str | None = None + """ + (String) Primary database name + Primary database name + """ + properties: PropertiesModel | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + serviceHost: str | None = None + """ + (String) Hostname to the service instance + Hostname to the service instance + """ + servicePort: str | None = None + """ + (String) Port to the service instance + Port to the service instance + """ + serviceUsername: str | None = None + """ + (String) Primary username to the service instance + Primary username to the service instance + """ + state: str | None = None + """ + (String) The current state of the service + The current state of the service + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + type: str | None = None + """ + (String) Type of the managed database instance + Type of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 ManagedDatabaseOpensearch(BaseModel): + apiVersion: Literal['database.upcloud.com/v1alpha1'] | None = ( + 'database.upcloud.com/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['ManagedDatabaseOpensearch'] | None = 'ManagedDatabaseOpensearch' + """ + 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 + """ + ManagedDatabaseOpensearchSpec defines the desired state of ManagedDatabaseOpensearch + """ + status: Status | None = None + """ + ManagedDatabaseOpensearchStatus defines the observed state of ManagedDatabaseOpensearch. + """ + + +class ManagedDatabaseOpensearchList(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[ManagedDatabaseOpensearch] + """ + List of manageddatabaseopensearches. 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/com/upcloud/database/manageddatabasepostgresql/__init__.py b/schemas/python/models/com/upcloud/database/manageddatabasepostgresql/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/database/manageddatabasepostgresql/v1alpha1.py b/schemas/python/models/com/upcloud/database/manageddatabasepostgresql/v1alpha1.py new file mode 100644 index 000000000..d1649026d --- /dev/null +++ b/schemas/python/models/com/upcloud/database/manageddatabasepostgresql/v1alpha1.py @@ -0,0 +1,1762 @@ +# generated by datamodel-codegen: +# filename: workdir/database_upcloud_com_v1alpha1_manageddatabasepostgresql.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 UuidRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class UuidSelector(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 NetworkItem(BaseModel): + family: str | None = None + """ + (String) Network family. Currently only IPv4 is supported. + Network family. Currently only `IPv4` is supported. + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + The name of the network. Must be unique within the service. + """ + type: str | None = None + """ + (String) Type of the managed database instance + The type of the network. Must be private. + """ + uuid: str | None = None + """ + (String) Private network UUID. Must reside in the same zone as the database. + Private network UUID. Must reside in the same zone as the database. + """ + uuidRef: UuidRef | None = None + """ + Reference to a Network in network to populate uuid. + """ + uuidSelector: UuidSelector | None = None + """ + Selector for a Network in network to populate uuid. + """ + + +class AdminPasswordSecretRef(BaseModel): + key: str + """ + The key to select. + """ + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class PasswordSecretRef(BaseModel): + key: str + """ + The key to select. + """ + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Migration(BaseModel): + dbname: str | None = None + """ + (String) Database name for bootstrapping the initial connection. + Database name for bootstrapping the initial connection. + """ + host: str | None = None + """ + (String) Hostname or IP address of the server where to migrate data from. + Hostname or IP address of the server where to migrate data from. + """ + ignoreDbs: str | None = None + """ + separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + """ + ignoreRoles: str | None = None + """ + separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + """ + method: str | None = None + """ + (String) The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + """ + passwordSecretRef: PasswordSecretRef | None = None + """ + (String, Sensitive) Password for authentication with the server where to migrate data from. + Password for authentication with the server where to migrate data from. + """ + port: float | None = None + """ + (Number) Port number of the server where to migrate data from. + Port number of the server where to migrate data from. + """ + ssl: bool | None = None + """ + (Boolean) The server where to migrate data from is secured with SSL. + The server where to migrate data from is secured with SSL. + """ + username: str | None = None + """ + (String) User name for authentication with the server where to migrate data from. + User name for authentication with the server where to migrate data from. + """ + + +class PasswordEncryptionSecretRef(BaseModel): + key: str + """ + The key to select. + """ + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Pgaudit(BaseModel): + featureEnabled: bool | None = None + """ + (Boolean) Enable pgaudit extension. Enable pgaudit extension. When enabled, pgaudit extension will be automatically installed.Otherwise, extension will be uninstalled but auditing configurations will be preserved. + Enable pgaudit extension. Enable pgaudit extension. When enabled, pgaudit extension will be automatically installed.Otherwise, extension will be uninstalled but auditing configurations will be preserved. + """ + log: list[str] | None = None + """ + (List of String) Log. Specifies which classes of statements will be logged by session audit logging. + Log. Specifies which classes of statements will be logged by session audit logging. + """ + logCatalog: bool | None = None + """ + (Boolean) Log Catalog. Specifies that session logging should be enabled in the case where all relations + in a statement are in pg_catalog. + Log Catalog. Specifies that session logging should be enabled in the case where all relations + in a statement are in pg_catalog. + """ + logClient: bool | None = None + """ + (Boolean) Log Client. Specifies whether log messages will be visible to a client process such as psql. + Log Client. Specifies whether log messages will be visible to a client process such as psql. + """ + logLevel: str | None = None + """ + (String) Log level. Specifies the log level that will be used for log entries. + Log level. Specifies the log level that will be used for log entries. + """ + logMaxStringLength: float | None = None + """ + 1 disable the truncation. + Log Max String Length. Crop parameters representation and whole statements if they exceed this threshold. + A (default) value of -1 disable the truncation. + """ + logNestedStatements: bool | None = None + """ + (Boolean) Log Nested Statements. This GUC allows to turn off logging nested statements, that is, statements that are + executed as part of another ExecutorRun. + Log Nested Statements. This GUC allows to turn off logging nested statements, that is, statements that are + executed as part of another ExecutorRun. + """ + logParameter: bool | None = None + """ + (Boolean) Log Parameter. Specifies that audit logging should include the parameters that were passed with the statement. + Log Parameter. Specifies that audit logging should include the parameters that were passed with the statement. + """ + logParameterMaxSize: float | None = None + """ + (Number) Log Parameter Max Size. Specifies that parameter values longer than this setting (in bytes) should not be logged, + but replaced with . + Log Parameter Max Size. Specifies that parameter values longer than this setting (in bytes) should not be logged, + but replaced with . + """ + logRelation: bool | None = None + """ + (Boolean) Log Relation. Specifies whether session audit logging should create a separate log entry + for each relation (TABLE, VIEW, etc.) referenced in a SELECT or DML statement. + Log Relation. Specifies whether session audit logging should create a separate log entry + for each relation (TABLE, VIEW, etc.) referenced in a SELECT or DML statement. + """ + logRows: bool | None = None + """ + (Boolean) Log Rows. + Log Rows. + """ + logStatement: bool | None = None + """ + (Boolean) Log Statement. Specifies whether logging will include the statement text and parameters (if enabled). + Log Statement. Specifies whether logging will include the statement text and parameters (if enabled). + """ + logStatementOnce: bool | None = None + """ + (Boolean) Log Statement Once. Specifies whether logging will include the statement text and parameters with + the first log entry for a statement/substatement combination or with every entry. + Log Statement Once. Specifies whether logging will include the statement text and parameters with + the first log entry for a statement/substatement combination or with every entry. + """ + role: str | None = None + """ + (String) Role. Specifies the master role to use for object audit logging. + Role. Specifies the master role to use for object audit logging. + """ + + +class Pgbouncer(BaseModel): + autodbIdleTimeout: float | None = None + """ + (Number) If the automatically created database pools have been unused this many seconds, they are freed. If 0 then timeout is disabled. [seconds]. + If the automatically created database pools have been unused this many seconds, they are freed. If 0 then timeout is disabled. [seconds]. + """ + autodbMaxDbConnections: float | None = None + """ + (Number) Do not allow more than this many server connections per database (regardless of user). Setting it to 0 means unlimited. + Do not allow more than this many server connections per database (regardless of user). Setting it to 0 means unlimited. + """ + autodbPoolMode: str | None = None + """ + (String) PGBouncer pool mode. + PGBouncer pool mode. + """ + autodbPoolSize: float | None = None + """ + zero then create automatically a pool of that size per user when a pool doesn't exist. + If non-zero then create automatically a pool of that size per user when a pool doesn't exist. + """ + ignoreStartupParameters: list[str] | None = None + """ + (List of String) List of parameters to ignore when given in startup packet. + List of parameters to ignore when given in startup packet. + """ + maxPreparedStatements: float | None = None + """ + level named prepared statements related commands sent by the client in transaction and statement pooling modes when max_prepared_statements is set to a non-zero value. Setting it to 0 disables prepared statements. max_prepared_statements defaults to 100, and its maximum is 3000. + PgBouncer tracks protocol-level named prepared statements related commands sent by the client in transaction and statement pooling modes when max_prepared_statements is set to a non-zero value. Setting it to 0 disables prepared statements. max_prepared_statements defaults to 100, and its maximum is 3000. + """ + minPoolSize: float | None = None + """ + (Number) Add more server connections to pool if below this number. Improves behavior when usual load comes suddenly back after period of total inactivity. The value is effectively capped at the pool size. + Add more server connections to pool if below this number. Improves behavior when usual load comes suddenly back after period of total inactivity. The value is effectively capped at the pool size. + """ + serverConnectTimeout: float | None = None + """ + (Number) If connection and login don’t finish in this amount of time, the connection will be closed. [seconds]. + If connection and login don’t finish in this amount of time, the connection will be closed. [seconds]. + """ + serverIdleTimeout: float | None = None + """ + (Number) If a server connection has been idle more than this many seconds it will be dropped. If 0 then timeout is disabled. [seconds]. + If a server connection has been idle more than this many seconds it will be dropped. If 0 then timeout is disabled. [seconds]. + """ + serverLifetime: float | None = None + """ + (Number) The pooler will close an unused server connection that has been connected longer than this. [seconds]. + The pooler will close an unused server connection that has been connected longer than this. [seconds]. + """ + serverLoginRetry: float | None = None + """ + (Number) If login to the server failed, because of failure to connect or from authentication, the pooler waits this much before retrying to connect. During the waiting interval, new clients trying to connect to the failing server will get an error immediately without another connection attempt. [seconds]. + If login to the server failed, because of failure to connect or from authentication, the pooler waits this much before retrying to connect. During the waiting interval, new clients trying to connect to the failing server will get an error immediately without another connection attempt. [seconds]. + """ + serverResetQueryAlways: bool | None = None + """ + (Boolean) Run server_reset_query (DISCARD ALL) in all pooling modes. + Run server_reset_query (DISCARD ALL) in all pooling modes. + """ + + +class Pglookout(BaseModel): + maxFailoverReplicationTimeLag: float | None = None + """ + (Number) Max Failover Replication Time Lag. Number of seconds of master unavailability before triggering database failover to standby. + Max Failover Replication Time Lag. Number of seconds of master unavailability before triggering database failover to standby. + """ + + +class Timescaledb(BaseModel): + maxBackgroundWorkers: float | None = None + """ + (Number) The number of background workers for timescaledb operations. You should configure this setting to the sum of your number of databases and the total number of concurrent background workers you want running at any given point in time. Changing this parameter causes a service restart. + The number of background workers for timescaledb operations. You should configure this setting to the sum of your number of databases and the total number of concurrent background workers you want running at any given point in time. Changing this parameter causes a service restart. + """ + + +class Properties(BaseModel): + adminPasswordSecretRef: AdminPasswordSecretRef | None = None + """ + (String, Sensitive) Custom password for admin user. Defaults to random string. This must be set only when a new service is being created. + Custom password for admin user. Defaults to random string. This must be set only when a new service is being created. + """ + adminUsername: str | None = None + """ + (String) Custom username for admin user. This must be set only when a new service is being created. + Custom username for admin user. This must be set only when a new service is being created. + """ + automaticUtilityNetworkIpFilter: bool | None = None + """ + (Boolean) Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + """ + autovacuumAnalyzeScaleFactor: float | None = None + """ + (Number) Specifies a fraction of the table size to add to autovacuum_analyze_threshold when deciding whether to trigger an ANALYZE (e.g. 0.2 for 20% of the table size). The default is 0.2. + Specifies a fraction of the table size to add to autovacuum_analyze_threshold when deciding whether to trigger an ANALYZE (e.g. `0.2` for 20% of the table size). The default is `0.2`. + """ + autovacuumAnalyzeThreshold: float | None = None + """ + (Number) Specifies the minimum number of inserted, updated or deleted tuples needed to trigger an ANALYZE in any one table. The default is 50. + Specifies the minimum number of inserted, updated or deleted tuples needed to trigger an ANALYZE in any one table. The default is `50`. + """ + autovacuumFreezeMaxAge: float | None = None + """ + (Number) Specifies the maximum age (in transactions) that a table's pg_class.relfrozenxid field can attain before a VACUUM operation is forced to prevent transaction ID wraparound within the table. The system launches autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. Changing this parameter causes a service restart. + Specifies the maximum age (in transactions) that a table's pg_class.relfrozenxid field can attain before a VACUUM operation is forced to prevent transaction ID wraparound within the table. The system launches autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. Changing this parameter causes a service restart. + """ + autovacuumMaxWorkers: float | None = None + """ + (Number) Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time. The default is 3. Changing this parameter causes a service restart. + Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time. The default is `3`. Changing this parameter causes a service restart. + """ + autovacuumNaptime: float | None = None + """ + (Number) Specifies the minimum delay between autovacuum runs on any given database. The delay is measured in seconds. The default is 60. + Specifies the minimum delay between autovacuum runs on any given database. The delay is measured in seconds. The default is `60`. + """ + autovacuumVacuumCostDelay: float | None = None + """ + 1 is specified, the regular vacuum_cost_delay value will be used. The default is 2 (upstream default). + Specifies the cost delay value that will be used in automatic VACUUM operations. If `-1` is specified, the regular vacuum_cost_delay value will be used. The default is `2` (upstream default). + """ + autovacuumVacuumCostLimit: float | None = None + """ + 1 is specified, the regular vacuum_cost_limit value will be used. The default is -1 (upstream default). + Specifies the cost limit value that will be used in automatic VACUUM operations. If `-1` is specified, the regular vacuum_cost_limit value will be used. The default is `-1` (upstream default). + """ + autovacuumVacuumScaleFactor: float | None = None + """ + (Number) Specifies a fraction of the table size to add to autovacuum_vacuum_threshold when deciding whether to trigger a VACUUM (e.g. 0.2 for 20% of the table size). The default is 0.2. + Specifies a fraction of the table size to add to autovacuum_vacuum_threshold when deciding whether to trigger a VACUUM (e.g. `0.2` for 20% of the table size). The default is `0.2`. + """ + autovacuumVacuumThreshold: float | None = None + """ + (Number) Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is 50. + Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is `50`. + """ + backupHour: float | None = None + """ + (Number) The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed. + The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed. + """ + backupIntervalHours: float | None = None + """ + (Number) Backup interval in hours. Interval in hours between automatic backups. Minimum value is 3 hours. Must be a divisor of 24 (3, 4, 6, 8, 12, 24). (Applicable to ACU plans only). + Backup interval in hours. Interval in hours between automatic backups. Minimum value is 3 hours. Must be a divisor of 24 (3, 4, 6, 8, 12, 24). (Applicable to ACU plans only). + """ + backupMinute: float | None = None + """ + (Number) The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed. + The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed. + """ + backupRetentionDays: float | None = None + """ + (Number) Backup retention in days. Number of days to retain automatic backups. Backups older than this value will be automatically deleted. (Applicable to ACU plans only). + Backup retention in days. Number of days to retain automatic backups. Backups older than this value will be automatically deleted. (Applicable to ACU plans only). + """ + bgwriterDelay: float | None = None + """ + (Number) Specifies the delay between activity rounds for the background writer in milliseconds. The default is 200. + Specifies the delay between activity rounds for the background writer in milliseconds. The default is `200`. + """ + bgwriterFlushAfter: float | None = None + """ + (Number) Whenever more than bgwriter_flush_after bytes have been written by the background writer, attempt to force the OS to issue these writes to the underlying storage. Specified in kilobytes. Setting of 0 disables forced writeback. The default is 512. + Whenever more than bgwriter_flush_after bytes have been written by the background writer, attempt to force the OS to issue these writes to the underlying storage. Specified in kilobytes. Setting of 0 disables forced writeback. The default is `512`. + """ + bgwriterLruMaxpages: float | None = None + """ + (Number) In each round, no more than this many buffers will be written by the background writer. Setting this to zero disables background writing. The default is 100. + In each round, no more than this many buffers will be written by the background writer. Setting this to zero disables background writing. The default is `100`. + """ + bgwriterLruMultiplier: float | None = None + """ + (Number) The average recent need for new buffers is multiplied by bgwriter_lru_multiplier to arrive at an estimate of the number that will be needed during the next round, (up to bgwriter_lru_maxpages). 1.0 represents a “just in time” policy of writing exactly the number of buffers predicted to be needed. Larger values provide some cushion against spikes in demand, while smaller values intentionally leave writes to be done by server processes. The default is 2.0. + The average recent need for new buffers is multiplied by bgwriter_lru_multiplier to arrive at an estimate of the number that will be needed during the next round, (up to bgwriter_lru_maxpages). 1.0 represents a “just in time” policy of writing exactly the number of buffers predicted to be needed. Larger values provide some cushion against spikes in demand, while smaller values intentionally leave writes to be done by server processes. The default is `2.0`. + """ + deadlockTimeout: float | None = None + """ + (Number) This is the amount of time, in milliseconds, to wait on a lock before checking to see if there is a deadlock condition. The default is 1000 (upstream default). + This is the amount of time, in milliseconds, to wait on a lock before checking to see if there is a deadlock condition. The default is `1000` (upstream default). + """ + defaultToastCompression: str | None = None + """ + (String) Specifies the default TOAST compression method for values of compressible columns. The default is lz4. Only available for PostgreSQL 14+. + Specifies the default TOAST compression method for values of compressible columns. The default is `lz4`. Only available for PostgreSQL 14+. + """ + enableHaReplicaDns: bool | None = None + """ + only DNS that automatically falls back to the primary if standby nodes are unavailable. It switches back when a standby recovers. + Enable HA replica DNS. Creates a dedicated read-only DNS that automatically falls back to the primary if standby nodes are unavailable. It switches back when a standby recovers. + """ + idleInTransactionSessionTimeout: float | None = None + """ + (Number) Time out sessions with open transactions after this number of milliseconds. + Time out sessions with open transactions after this number of milliseconds. + """ + ioCombineLimit: float | None = None + """ + (Number) EXPERIMENTAL: Controls the largest I/O size in operations that combine I/O in 8kB units. Version 17 and up only. + EXPERIMENTAL: Controls the largest I/O size in operations that combine I/O in 8kB units. Version 17 and up only. + """ + ioMaxCombineLimit: float | None = None + """ + settable parameter io_combine_limit. Version 18 and up only. Changing this parameter causes a service restart. + EXPERIMENTAL: Controls the largest I/O size in operations that combine I/O in 8kB units, and silently limits the user-settable parameter io_combine_limit. Version 18 and up only. Changing this parameter causes a service restart. + """ + ioMaxConcurrency: float | None = None + """ + (Number) EXPERIMENTAL: Controls the maximum number of I/O operations that one process can execute simultaneously. Version 18 and up only. Changing this parameter causes a service restart. + EXPERIMENTAL: Controls the maximum number of I/O operations that one process can execute simultaneously. Version 18 and up only. Changing this parameter causes a service restart. + """ + ioMethod: str | None = None + """ + (String) EXPERIMENTAL: Controls the maximum number of I/O operations that one process can execute simultaneously. Version 18 and up only. Changing this parameter causes a service restart. + EXPERIMENTAL: Controls the maximum number of I/O operations that one process can execute simultaneously. Version 18 and up only. Changing this parameter causes a service restart. + """ + ioWorkers: float | None = None + """ + (Number) EXPERIMENTAL: Number of IO worker processes, for io_method=worker. Version 18 and up only. + EXPERIMENTAL: Number of IO worker processes, for io_method=worker. Version 18 and up only. + """ + ipFilter: list[str] | None = None + """ + (List of String) IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + """ + jit: bool | None = None + """ + wide use of Just-in-Time Compilation (JIT). + Controls system-wide use of Just-in-Time Compilation (JIT). + """ + logAutovacuumMinDuration: float | None = None + """ + one disables logging autovacuum actions. The default is 1000. + Causes each action executed by autovacuum to be logged if it ran for at least the specified number of milliseconds. Setting this to zero logs all autovacuum actions. Minus-one disables logging autovacuum actions. The default is `1000`. + """ + logErrorVerbosity: str | None = None + """ + (String) Controls the amount of detail written in the server log for each message that is logged. + Controls the amount of detail written in the server log for each message that is logged. + """ + logLinePrefix: str | None = None + """ + (String) Choose from one of the available log formats. + Choose from one of the available log formats. + """ + logMinDurationStatement: float | None = None + """ + 1 disables. + Log statements that take more than this number of milliseconds to run, -1 disables. + """ + logTempFiles: float | None = None + """ + 1 disables. + Log statements for each temporary file created larger than this number of kilobytes, -1 disables. + """ + maxConnections: float | None = None + """ + (Number) Sets the PostgreSQL maximum number of concurrent connections to the database server. For services with a read replica, first increase the read replica's value. After the change is applied to the replica, you can increase the primary service's value. Changing this parameter causes a service restart. + Sets the PostgreSQL maximum number of concurrent connections to the database server. For services with a read replica, first increase the read replica's value. After the change is applied to the replica, you can increase the primary service's value. Changing this parameter causes a service restart. + """ + maxFilesPerProcess: float | None = None + """ + (Number) PostgreSQL maximum number of files that can be open per process. The default is 1000 (upstream default). Changing this parameter causes a service restart. + PostgreSQL maximum number of files that can be open per process. The default is `1000` (upstream default). Changing this parameter causes a service restart. + """ + maxLocksPerTransaction: float | None = None + """ + (Number) PostgreSQL maximum locks per transaction. Changing this parameter causes a service restart. + PostgreSQL maximum locks per transaction. Changing this parameter causes a service restart. + """ + maxLogicalReplicationWorkers: float | None = None + """ + (Number) PostgreSQL maximum logical replication workers (taken from the pool defined by max_worker_processes). The default is 4 (upstream default). Changing this parameter causes a service restart. + PostgreSQL maximum logical replication workers (taken from the pool defined by max_worker_processes). The default is `4` (upstream default). Changing this parameter causes a service restart. + """ + maxParallelWorkers: float | None = None + """ + (Number) Sets the maximum number of workers that the system can support for parallel queries. The default is 8 (upstream default). + Sets the maximum number of workers that the system can support for parallel queries. The default is `8` (upstream default). + """ + maxParallelWorkersPerGather: float | None = None + """ + (Number) Sets the maximum number of workers that can be started by a single Gather or Gather Merge node. The default is 2 (upstream default). + Sets the maximum number of workers that can be started by a single Gather or Gather Merge node. The default is `2` (upstream default). + """ + maxPredLocksPerTransaction: float | None = None + """ + (Number) PostgreSQL maximum predicate locks per transaction. The default is 64 (upstream default). Changing this parameter causes a service restart. + PostgreSQL maximum predicate locks per transaction. The default is `64` (upstream default). Changing this parameter causes a service restart. + """ + maxPreparedTransactions: float | None = None + """ + (Number) PostgreSQL maximum prepared transactions. The default is 0. Changing this parameter causes a service restart. + PostgreSQL maximum prepared transactions. The default is `0`. Changing this parameter causes a service restart. + """ + maxReplicationSlots: float | None = None + """ + (Number) PostgreSQL maximum replication slots. The default is 20. Changing this parameter causes a service restart. + PostgreSQL maximum replication slots. The default is `20`. Changing this parameter causes a service restart. + """ + maxSlotWalKeepSize: float | None = None + """ + 1 is specified, replication slots may retain an unlimited amount of WAL files. The default is -1 (upstream default). wal_keep_size minimum WAL size setting takes precedence over this. + PostgreSQL maximum WAL size (MB) reserved for replication slots. If `-1` is specified, replication slots may retain an unlimited amount of WAL files. The default is `-1` (upstream default). wal_keep_size minimum WAL size setting takes precedence over this. + """ + maxStackDepth: float | None = None + """ + (Number) Maximum depth of the stack in bytes. The default is 2097152 (upstream default). + Maximum depth of the stack in bytes. The default is `2097152` (upstream default). + """ + maxStandbyArchiveDelay: float | None = None + """ + (Number) Max standby archive delay in milliseconds. The default is 30000 (upstream default). + Max standby archive delay in milliseconds. The default is `30000` (upstream default). + """ + maxStandbyStreamingDelay: float | None = None + """ + (Number) Max standby streaming delay in milliseconds. The default is 30000 (upstream default). + Max standby streaming delay in milliseconds. The default is `30000` (upstream default). + """ + maxSyncWorkersPerSubscription: float | None = None + """ + (Number) Maximum number of synchronization workers per subscription. The default is 2. + Maximum number of synchronization workers per subscription. The default is `2`. + """ + maxWalSenders: float | None = None + """ + (Number) PostgreSQL maximum WAL senders. The default is 20. Changing this parameter causes a service restart. + PostgreSQL maximum WAL senders. The default is `20`. Changing this parameter causes a service restart. + """ + maxWorkerProcesses: float | None = None + """ + (Number) Sets the maximum number of background processes that the system can support. The default is 8. Changing this parameter causes a service restart. + Sets the maximum number of background processes that the system can support. The default is `8`. Changing this parameter causes a service restart. + """ + migration: Migration | None = None + """ + (Block List) Migrate data from existing server. (see below for nested schema) + Migrate data from existing server. + """ + nodeCount: float | None = None + """ + (Number) Number of nodes for the service. + Number of nodes for the service. + """ + passwordEncryptionSecretRef: PasswordEncryptionSecretRef | None = None + """ + (String, Sensitive) Chooses the algorithm for encrypting passwords. + Chooses the algorithm for encrypting passwords. + """ + pgPartmanBgwInterval: float | None = None + """ + (Number) Sets the time interval in seconds to run pg_partman's scheduled tasks. The default is 3600. + Sets the time interval in seconds to run pg_partman's scheduled tasks. The default is `3600`. + """ + pgPartmanBgwRole: str | None = None + """ + (String) Controls which role to use for pg_partman's scheduled background tasks. + Controls which role to use for pg_partman's scheduled background tasks. + """ + pgStatMonitorEnable: bool | None = None + """ + (Boolean) Enable pg_stat_monitor extension if available for the current cluster. Enable the pg_stat_monitor extension. Changing this parameter causes a service restart. When this extension is enabled, pg_stat_statements results for utility commands are unreliable. + Enable pg_stat_monitor extension if available for the current cluster. Enable the pg_stat_monitor extension. Changing this parameter causes a service restart. When this extension is enabled, pg_stat_statements results for utility commands are unreliable. + """ + pgStatMonitorPgsmEnableQueryPlan: bool | None = None + """ + (Boolean) Enables or disables query plan monitoring. Only available for PostgreSQL 13+. + Enables or disables query plan monitoring. Only available for PostgreSQL 13+. + """ + pgStatMonitorPgsmMaxBuckets: float | None = None + """ + (Number) Sets the maximum number of buckets. Changing this parameter causes a service restart. Only available for PostgreSQL 13+. + Sets the maximum number of buckets. Changing this parameter causes a service restart. Only available for PostgreSQL 13+. + """ + pgStatPlansEnable: bool | None = None + """ + (Boolean) Enable pg_stat_plans extension if available for the current cluster. Enable the pg_stat_plans extension. Changing this parameter causes a service restart. Tracks execution plans for SQL queries. + Enable pg_stat_plans extension if available for the current cluster. Enable the pg_stat_plans extension. Changing this parameter causes a service restart. Tracks execution plans for SQL queries. + """ + pgStatPlansTrack: str | None = None + """ + level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable plan tracking. The default is top. + Controls which statements' plans are tracked. Specify top to track top-level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable plan tracking. The default is `top`. + """ + pgStatStatementsTrack: str | None = None + """ + level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable statement statistics collection. The default is top. + Controls which statements are counted. Specify top to track top-level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable statement statistics collection. The default is `top`. + """ + pgaudit: Pgaudit | None = None + """ + wide settings for the pgaudit extension. (see below for nested schema) + PGAudit settings. System-wide settings for the pgaudit extension. + """ + pgbouncer: Pgbouncer | None = None + """ + wide settings for pgbouncer. (see below for nested schema) + PGBouncer connection pooling settings. System-wide settings for pgbouncer. + """ + pglookout: Pglookout | None = None + """ + wide settings for pglookout. (see below for nested schema) + PGLookout settings. System-wide settings for pglookout. + """ + publicAccess: bool | None = None + """ + (Boolean) Public Access. Allow access to the service from the public Internet. + Public Access. Allow access to the service from the public Internet. + """ + publicAccessPrometheus: bool | None = None + """ + (Boolean) Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + """ + serviceLog: bool | None = None + """ + (Boolean) Service logging. Store logs for the service so that they are available in the HTTP API and console. + Service logging. Store logs for the service so that they are available in the HTTP API and console. + """ + sharedBuffersPercentage: float | None = None + """ + 60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value. Changing this parameter causes a service restart. + Percentage of total RAM that the database server uses for shared memory buffers. Valid range is 20-60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value. Changing this parameter causes a service restart. + """ + synchronousCommit: str | None = None + """ + (String) Sets the current transaction's synchronization level. The default is off. This setting takes precedence over synchronous_replication. + Sets the current transaction's synchronization level. The default is `off`. This setting takes precedence over `synchronous_replication`. + """ + synchronousReplication: str | None = None + """ + (String) Synchronous replication type. (deprecated, use synchronous_commit instead). Note that the service plan also needs to support synchronous replication. This setting is deprecated. Use synchronous_commit instead. Any change to this setting will automatically update synchronous_commit. Setting the value to quorum changes synchronous_commit to remote_write, while setting it to off changes synchronous_commit to off. + Synchronous replication type. (deprecated, use synchronous_commit instead). Note that the service plan also needs to support synchronous replication. This setting is deprecated. Use synchronous_commit instead. Any change to this setting will automatically update synchronous_commit. Setting the value to quorum changes synchronous_commit to remote_write, while setting it to off changes synchronous_commit to off. + """ + tempFileLimit: float | None = None + """ + 1 for unlimited. + PostgreSQL temporary file limit in KiB, -1 for unlimited. + """ + timescaledb: Timescaledb | None = None + """ + wide settings for the timescaledb extension. (see below for nested schema) + TimescaleDB extension configuration values. System-wide settings for the timescaledb extension. + """ + timezone: str | None = None + """ + (String) PostgreSQL service timezone. + PostgreSQL service timezone. + """ + trackActivityQuerySize: float | None = None + """ + (Number) Specifies the number of bytes reserved to track the currently executing command for each active session. Changing this parameter causes a service restart. + Specifies the number of bytes reserved to track the currently executing command for each active session. Changing this parameter causes a service restart. + """ + trackCommitTimestamp: str | None = None + """ + (String) Record commit time of transactions. Changing this parameter causes a service restart. + Record commit time of transactions. Changing this parameter causes a service restart. + """ + trackFunctions: str | None = None + """ + (String) Enables tracking of function call counts and time used. + Enables tracking of function call counts and time used. + """ + trackIoTiming: str | None = None + """ + (String) Enables timing of database I/O calls. The default is off. When on, it will repeatedly query the operating system for the current time, which may cause significant overhead on some platforms. + Enables timing of database I/O calls. The default is `off`. When on, it will repeatedly query the operating system for the current time, which may cause significant overhead on some platforms. + """ + variant: str | None = None + """ + (String) Variant of the PostgreSQL service, may affect the features that are exposed by default. + Variant of the PostgreSQL service, may affect the features that are exposed by default. + """ + version: str | None = None + """ + (String) PostgreSQL major version. + PostgreSQL major version. + """ + walSenderTimeout: float | None = None + """ + (Number) Terminate replication connections that are inactive for longer than this amount of time, in milliseconds. Setting this value to zero disables the timeout. + Terminate replication connections that are inactive for longer than this amount of time, in milliseconds. Setting this value to zero disables the timeout. + """ + walWriterDelay: float | None = None + """ + (Number) WAL flush interval in milliseconds. The default is 200. Setting this parameter to a lower value may negatively impact performance. + WAL flush interval in milliseconds. The default is `200`. Setting this parameter to a lower value may negatively impact performance. + """ + workMem: float | None = None + """ + (Number) Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files, in MB. The default is 1MB + 0.075% of total RAM (up to 32MB). + Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files, in MB. The default is 1MB + 0.075% of total RAM (up to 32MB). + """ + + +class ForProvider(BaseModel): + additionalDiskSpaceGib: float | None = None + """ + (Number, Deprecated) Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItem] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + plan: str | None = None + """ + (String, Deprecated) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans pg. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans pg`. + """ + planBackups: str | None = None + """ + (String) Backup tier for the database plan. + Backup tier for the database plan. + """ + planCompute: str | None = None + """ + (String) Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + """ + planNodeCount: float | None = None + """ + (Number) Number of nodes in the database plan. + Number of nodes in the database plan. + """ + planStorageGib: float | None = None + """ + (Number) Total storage per node in GiB. + Total storage per node in GiB. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + properties: Properties | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +class InitProvider(BaseModel): + additionalDiskSpaceGib: float | None = None + """ + (Number, Deprecated) Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItem] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + plan: str | None = None + """ + (String, Deprecated) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans pg. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans pg`. + """ + planBackups: str | None = None + """ + (String) Backup tier for the database plan. + Backup tier for the database plan. + """ + planCompute: str | None = None + """ + (String) Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + """ + planNodeCount: float | None = None + """ + (Number) Number of nodes in the database plan. + Number of nodes in the database plan. + """ + planStorageGib: float | None = None + """ + (Number) Total storage per node in GiB. + Total storage per node in GiB. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + properties: Properties | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 Component(BaseModel): + component: str | None = None + """ + (String) Component name. + Component name. + """ + host: str | None = None + """ + (String) Hostname or IP address of the server where to migrate data from. + Hostname of the component + """ + port: float | None = None + """ + (Number) Port number of the server where to migrate data from. + Port number of the component + """ + route: str | None = None + """ + (String) Component network route type + Component network route type + """ + usage: str | None = None + """ + (String) Usage of the component + Usage of the component + """ + + +class NetworkItemModel(BaseModel): + family: str | None = None + """ + (String) Network family. Currently only IPv4 is supported. + Network family. Currently only `IPv4` is supported. + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + The name of the network. Must be unique within the service. + """ + type: str | None = None + """ + (String) Type of the managed database instance + The type of the network. Must be private. + """ + uuid: str | None = None + """ + (String) Private network UUID. Must reside in the same zone as the database. + Private network UUID. Must reside in the same zone as the database. + """ + + +class NodeState(BaseModel): + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name plus a node iteration + """ + role: str | None = None + """ + (String) Role. Specifies the master role to use for object audit logging. + Role of the node + """ + state: str | None = None + """ + (String) The current state of the service + Current state of the node + """ + + +class MigrationModel(BaseModel): + dbname: str | None = None + """ + (String) Database name for bootstrapping the initial connection. + Database name for bootstrapping the initial connection. + """ + host: str | None = None + """ + (String) Hostname or IP address of the server where to migrate data from. + Hostname or IP address of the server where to migrate data from. + """ + ignoreDbs: str | None = None + """ + separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + """ + ignoreRoles: str | None = None + """ + separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + """ + method: str | None = None + """ + (String) The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + """ + port: float | None = None + """ + (Number) Port number of the server where to migrate data from. + Port number of the server where to migrate data from. + """ + ssl: bool | None = None + """ + (Boolean) The server where to migrate data from is secured with SSL. + The server where to migrate data from is secured with SSL. + """ + username: str | None = None + """ + (String) User name for authentication with the server where to migrate data from. + User name for authentication with the server where to migrate data from. + """ + + +class PropertiesModel(BaseModel): + adminUsername: str | None = None + """ + (String) Custom username for admin user. This must be set only when a new service is being created. + Custom username for admin user. This must be set only when a new service is being created. + """ + automaticUtilityNetworkIpFilter: bool | None = None + """ + (Boolean) Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + """ + autovacuumAnalyzeScaleFactor: float | None = None + """ + (Number) Specifies a fraction of the table size to add to autovacuum_analyze_threshold when deciding whether to trigger an ANALYZE (e.g. 0.2 for 20% of the table size). The default is 0.2. + Specifies a fraction of the table size to add to autovacuum_analyze_threshold when deciding whether to trigger an ANALYZE (e.g. `0.2` for 20% of the table size). The default is `0.2`. + """ + autovacuumAnalyzeThreshold: float | None = None + """ + (Number) Specifies the minimum number of inserted, updated or deleted tuples needed to trigger an ANALYZE in any one table. The default is 50. + Specifies the minimum number of inserted, updated or deleted tuples needed to trigger an ANALYZE in any one table. The default is `50`. + """ + autovacuumFreezeMaxAge: float | None = None + """ + (Number) Specifies the maximum age (in transactions) that a table's pg_class.relfrozenxid field can attain before a VACUUM operation is forced to prevent transaction ID wraparound within the table. The system launches autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. Changing this parameter causes a service restart. + Specifies the maximum age (in transactions) that a table's pg_class.relfrozenxid field can attain before a VACUUM operation is forced to prevent transaction ID wraparound within the table. The system launches autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. Changing this parameter causes a service restart. + """ + autovacuumMaxWorkers: float | None = None + """ + (Number) Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time. The default is 3. Changing this parameter causes a service restart. + Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time. The default is `3`. Changing this parameter causes a service restart. + """ + autovacuumNaptime: float | None = None + """ + (Number) Specifies the minimum delay between autovacuum runs on any given database. The delay is measured in seconds. The default is 60. + Specifies the minimum delay between autovacuum runs on any given database. The delay is measured in seconds. The default is `60`. + """ + autovacuumVacuumCostDelay: float | None = None + """ + 1 is specified, the regular vacuum_cost_delay value will be used. The default is 2 (upstream default). + Specifies the cost delay value that will be used in automatic VACUUM operations. If `-1` is specified, the regular vacuum_cost_delay value will be used. The default is `2` (upstream default). + """ + autovacuumVacuumCostLimit: float | None = None + """ + 1 is specified, the regular vacuum_cost_limit value will be used. The default is -1 (upstream default). + Specifies the cost limit value that will be used in automatic VACUUM operations. If `-1` is specified, the regular vacuum_cost_limit value will be used. The default is `-1` (upstream default). + """ + autovacuumVacuumScaleFactor: float | None = None + """ + (Number) Specifies a fraction of the table size to add to autovacuum_vacuum_threshold when deciding whether to trigger a VACUUM (e.g. 0.2 for 20% of the table size). The default is 0.2. + Specifies a fraction of the table size to add to autovacuum_vacuum_threshold when deciding whether to trigger a VACUUM (e.g. `0.2` for 20% of the table size). The default is `0.2`. + """ + autovacuumVacuumThreshold: float | None = None + """ + (Number) Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is 50. + Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is `50`. + """ + backupHour: float | None = None + """ + (Number) The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed. + The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed. + """ + backupIntervalHours: float | None = None + """ + (Number) Backup interval in hours. Interval in hours between automatic backups. Minimum value is 3 hours. Must be a divisor of 24 (3, 4, 6, 8, 12, 24). (Applicable to ACU plans only). + Backup interval in hours. Interval in hours between automatic backups. Minimum value is 3 hours. Must be a divisor of 24 (3, 4, 6, 8, 12, 24). (Applicable to ACU plans only). + """ + backupMinute: float | None = None + """ + (Number) The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed. + The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed. + """ + backupRetentionDays: float | None = None + """ + (Number) Backup retention in days. Number of days to retain automatic backups. Backups older than this value will be automatically deleted. (Applicable to ACU plans only). + Backup retention in days. Number of days to retain automatic backups. Backups older than this value will be automatically deleted. (Applicable to ACU plans only). + """ + bgwriterDelay: float | None = None + """ + (Number) Specifies the delay between activity rounds for the background writer in milliseconds. The default is 200. + Specifies the delay between activity rounds for the background writer in milliseconds. The default is `200`. + """ + bgwriterFlushAfter: float | None = None + """ + (Number) Whenever more than bgwriter_flush_after bytes have been written by the background writer, attempt to force the OS to issue these writes to the underlying storage. Specified in kilobytes. Setting of 0 disables forced writeback. The default is 512. + Whenever more than bgwriter_flush_after bytes have been written by the background writer, attempt to force the OS to issue these writes to the underlying storage. Specified in kilobytes. Setting of 0 disables forced writeback. The default is `512`. + """ + bgwriterLruMaxpages: float | None = None + """ + (Number) In each round, no more than this many buffers will be written by the background writer. Setting this to zero disables background writing. The default is 100. + In each round, no more than this many buffers will be written by the background writer. Setting this to zero disables background writing. The default is `100`. + """ + bgwriterLruMultiplier: float | None = None + """ + (Number) The average recent need for new buffers is multiplied by bgwriter_lru_multiplier to arrive at an estimate of the number that will be needed during the next round, (up to bgwriter_lru_maxpages). 1.0 represents a “just in time” policy of writing exactly the number of buffers predicted to be needed. Larger values provide some cushion against spikes in demand, while smaller values intentionally leave writes to be done by server processes. The default is 2.0. + The average recent need for new buffers is multiplied by bgwriter_lru_multiplier to arrive at an estimate of the number that will be needed during the next round, (up to bgwriter_lru_maxpages). 1.0 represents a “just in time” policy of writing exactly the number of buffers predicted to be needed. Larger values provide some cushion against spikes in demand, while smaller values intentionally leave writes to be done by server processes. The default is `2.0`. + """ + deadlockTimeout: float | None = None + """ + (Number) This is the amount of time, in milliseconds, to wait on a lock before checking to see if there is a deadlock condition. The default is 1000 (upstream default). + This is the amount of time, in milliseconds, to wait on a lock before checking to see if there is a deadlock condition. The default is `1000` (upstream default). + """ + defaultToastCompression: str | None = None + """ + (String) Specifies the default TOAST compression method for values of compressible columns. The default is lz4. Only available for PostgreSQL 14+. + Specifies the default TOAST compression method for values of compressible columns. The default is `lz4`. Only available for PostgreSQL 14+. + """ + enableHaReplicaDns: bool | None = None + """ + only DNS that automatically falls back to the primary if standby nodes are unavailable. It switches back when a standby recovers. + Enable HA replica DNS. Creates a dedicated read-only DNS that automatically falls back to the primary if standby nodes are unavailable. It switches back when a standby recovers. + """ + idleInTransactionSessionTimeout: float | None = None + """ + (Number) Time out sessions with open transactions after this number of milliseconds. + Time out sessions with open transactions after this number of milliseconds. + """ + ioCombineLimit: float | None = None + """ + (Number) EXPERIMENTAL: Controls the largest I/O size in operations that combine I/O in 8kB units. Version 17 and up only. + EXPERIMENTAL: Controls the largest I/O size in operations that combine I/O in 8kB units. Version 17 and up only. + """ + ioMaxCombineLimit: float | None = None + """ + settable parameter io_combine_limit. Version 18 and up only. Changing this parameter causes a service restart. + EXPERIMENTAL: Controls the largest I/O size in operations that combine I/O in 8kB units, and silently limits the user-settable parameter io_combine_limit. Version 18 and up only. Changing this parameter causes a service restart. + """ + ioMaxConcurrency: float | None = None + """ + (Number) EXPERIMENTAL: Controls the maximum number of I/O operations that one process can execute simultaneously. Version 18 and up only. Changing this parameter causes a service restart. + EXPERIMENTAL: Controls the maximum number of I/O operations that one process can execute simultaneously. Version 18 and up only. Changing this parameter causes a service restart. + """ + ioMethod: str | None = None + """ + (String) EXPERIMENTAL: Controls the maximum number of I/O operations that one process can execute simultaneously. Version 18 and up only. Changing this parameter causes a service restart. + EXPERIMENTAL: Controls the maximum number of I/O operations that one process can execute simultaneously. Version 18 and up only. Changing this parameter causes a service restart. + """ + ioWorkers: float | None = None + """ + (Number) EXPERIMENTAL: Number of IO worker processes, for io_method=worker. Version 18 and up only. + EXPERIMENTAL: Number of IO worker processes, for io_method=worker. Version 18 and up only. + """ + ipFilter: list[str] | None = None + """ + (List of String) IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + """ + jit: bool | None = None + """ + wide use of Just-in-Time Compilation (JIT). + Controls system-wide use of Just-in-Time Compilation (JIT). + """ + logAutovacuumMinDuration: float | None = None + """ + one disables logging autovacuum actions. The default is 1000. + Causes each action executed by autovacuum to be logged if it ran for at least the specified number of milliseconds. Setting this to zero logs all autovacuum actions. Minus-one disables logging autovacuum actions. The default is `1000`. + """ + logErrorVerbosity: str | None = None + """ + (String) Controls the amount of detail written in the server log for each message that is logged. + Controls the amount of detail written in the server log for each message that is logged. + """ + logLinePrefix: str | None = None + """ + (String) Choose from one of the available log formats. + Choose from one of the available log formats. + """ + logMinDurationStatement: float | None = None + """ + 1 disables. + Log statements that take more than this number of milliseconds to run, -1 disables. + """ + logTempFiles: float | None = None + """ + 1 disables. + Log statements for each temporary file created larger than this number of kilobytes, -1 disables. + """ + maxConnections: float | None = None + """ + (Number) Sets the PostgreSQL maximum number of concurrent connections to the database server. For services with a read replica, first increase the read replica's value. After the change is applied to the replica, you can increase the primary service's value. Changing this parameter causes a service restart. + Sets the PostgreSQL maximum number of concurrent connections to the database server. For services with a read replica, first increase the read replica's value. After the change is applied to the replica, you can increase the primary service's value. Changing this parameter causes a service restart. + """ + maxFilesPerProcess: float | None = None + """ + (Number) PostgreSQL maximum number of files that can be open per process. The default is 1000 (upstream default). Changing this parameter causes a service restart. + PostgreSQL maximum number of files that can be open per process. The default is `1000` (upstream default). Changing this parameter causes a service restart. + """ + maxLocksPerTransaction: float | None = None + """ + (Number) PostgreSQL maximum locks per transaction. Changing this parameter causes a service restart. + PostgreSQL maximum locks per transaction. Changing this parameter causes a service restart. + """ + maxLogicalReplicationWorkers: float | None = None + """ + (Number) PostgreSQL maximum logical replication workers (taken from the pool defined by max_worker_processes). The default is 4 (upstream default). Changing this parameter causes a service restart. + PostgreSQL maximum logical replication workers (taken from the pool defined by max_worker_processes). The default is `4` (upstream default). Changing this parameter causes a service restart. + """ + maxParallelWorkers: float | None = None + """ + (Number) Sets the maximum number of workers that the system can support for parallel queries. The default is 8 (upstream default). + Sets the maximum number of workers that the system can support for parallel queries. The default is `8` (upstream default). + """ + maxParallelWorkersPerGather: float | None = None + """ + (Number) Sets the maximum number of workers that can be started by a single Gather or Gather Merge node. The default is 2 (upstream default). + Sets the maximum number of workers that can be started by a single Gather or Gather Merge node. The default is `2` (upstream default). + """ + maxPredLocksPerTransaction: float | None = None + """ + (Number) PostgreSQL maximum predicate locks per transaction. The default is 64 (upstream default). Changing this parameter causes a service restart. + PostgreSQL maximum predicate locks per transaction. The default is `64` (upstream default). Changing this parameter causes a service restart. + """ + maxPreparedTransactions: float | None = None + """ + (Number) PostgreSQL maximum prepared transactions. The default is 0. Changing this parameter causes a service restart. + PostgreSQL maximum prepared transactions. The default is `0`. Changing this parameter causes a service restart. + """ + maxReplicationSlots: float | None = None + """ + (Number) PostgreSQL maximum replication slots. The default is 20. Changing this parameter causes a service restart. + PostgreSQL maximum replication slots. The default is `20`. Changing this parameter causes a service restart. + """ + maxSlotWalKeepSize: float | None = None + """ + 1 is specified, replication slots may retain an unlimited amount of WAL files. The default is -1 (upstream default). wal_keep_size minimum WAL size setting takes precedence over this. + PostgreSQL maximum WAL size (MB) reserved for replication slots. If `-1` is specified, replication slots may retain an unlimited amount of WAL files. The default is `-1` (upstream default). wal_keep_size minimum WAL size setting takes precedence over this. + """ + maxStackDepth: float | None = None + """ + (Number) Maximum depth of the stack in bytes. The default is 2097152 (upstream default). + Maximum depth of the stack in bytes. The default is `2097152` (upstream default). + """ + maxStandbyArchiveDelay: float | None = None + """ + (Number) Max standby archive delay in milliseconds. The default is 30000 (upstream default). + Max standby archive delay in milliseconds. The default is `30000` (upstream default). + """ + maxStandbyStreamingDelay: float | None = None + """ + (Number) Max standby streaming delay in milliseconds. The default is 30000 (upstream default). + Max standby streaming delay in milliseconds. The default is `30000` (upstream default). + """ + maxSyncWorkersPerSubscription: float | None = None + """ + (Number) Maximum number of synchronization workers per subscription. The default is 2. + Maximum number of synchronization workers per subscription. The default is `2`. + """ + maxWalSenders: float | None = None + """ + (Number) PostgreSQL maximum WAL senders. The default is 20. Changing this parameter causes a service restart. + PostgreSQL maximum WAL senders. The default is `20`. Changing this parameter causes a service restart. + """ + maxWorkerProcesses: float | None = None + """ + (Number) Sets the maximum number of background processes that the system can support. The default is 8. Changing this parameter causes a service restart. + Sets the maximum number of background processes that the system can support. The default is `8`. Changing this parameter causes a service restart. + """ + migration: MigrationModel | None = None + """ + (Block List) Migrate data from existing server. (see below for nested schema) + Migrate data from existing server. + """ + nodeCount: float | None = None + """ + (Number) Number of nodes for the service. + Number of nodes for the service. + """ + pgPartmanBgwInterval: float | None = None + """ + (Number) Sets the time interval in seconds to run pg_partman's scheduled tasks. The default is 3600. + Sets the time interval in seconds to run pg_partman's scheduled tasks. The default is `3600`. + """ + pgPartmanBgwRole: str | None = None + """ + (String) Controls which role to use for pg_partman's scheduled background tasks. + Controls which role to use for pg_partman's scheduled background tasks. + """ + pgStatMonitorEnable: bool | None = None + """ + (Boolean) Enable pg_stat_monitor extension if available for the current cluster. Enable the pg_stat_monitor extension. Changing this parameter causes a service restart. When this extension is enabled, pg_stat_statements results for utility commands are unreliable. + Enable pg_stat_monitor extension if available for the current cluster. Enable the pg_stat_monitor extension. Changing this parameter causes a service restart. When this extension is enabled, pg_stat_statements results for utility commands are unreliable. + """ + pgStatMonitorPgsmEnableQueryPlan: bool | None = None + """ + (Boolean) Enables or disables query plan monitoring. Only available for PostgreSQL 13+. + Enables or disables query plan monitoring. Only available for PostgreSQL 13+. + """ + pgStatMonitorPgsmMaxBuckets: float | None = None + """ + (Number) Sets the maximum number of buckets. Changing this parameter causes a service restart. Only available for PostgreSQL 13+. + Sets the maximum number of buckets. Changing this parameter causes a service restart. Only available for PostgreSQL 13+. + """ + pgStatPlansEnable: bool | None = None + """ + (Boolean) Enable pg_stat_plans extension if available for the current cluster. Enable the pg_stat_plans extension. Changing this parameter causes a service restart. Tracks execution plans for SQL queries. + Enable pg_stat_plans extension if available for the current cluster. Enable the pg_stat_plans extension. Changing this parameter causes a service restart. Tracks execution plans for SQL queries. + """ + pgStatPlansTrack: str | None = None + """ + level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable plan tracking. The default is top. + Controls which statements' plans are tracked. Specify top to track top-level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable plan tracking. The default is `top`. + """ + pgStatStatementsTrack: str | None = None + """ + level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable statement statistics collection. The default is top. + Controls which statements are counted. Specify top to track top-level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable statement statistics collection. The default is `top`. + """ + pgaudit: Pgaudit | None = None + """ + wide settings for the pgaudit extension. (see below for nested schema) + PGAudit settings. System-wide settings for the pgaudit extension. + """ + pgbouncer: Pgbouncer | None = None + """ + wide settings for pgbouncer. (see below for nested schema) + PGBouncer connection pooling settings. System-wide settings for pgbouncer. + """ + pglookout: Pglookout | None = None + """ + wide settings for pglookout. (see below for nested schema) + PGLookout settings. System-wide settings for pglookout. + """ + publicAccess: bool | None = None + """ + (Boolean) Public Access. Allow access to the service from the public Internet. + Public Access. Allow access to the service from the public Internet. + """ + publicAccessPrometheus: bool | None = None + """ + (Boolean) Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + """ + serviceLog: bool | None = None + """ + (Boolean) Service logging. Store logs for the service so that they are available in the HTTP API and console. + Service logging. Store logs for the service so that they are available in the HTTP API and console. + """ + sharedBuffersPercentage: float | None = None + """ + 60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value. Changing this parameter causes a service restart. + Percentage of total RAM that the database server uses for shared memory buffers. Valid range is 20-60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value. Changing this parameter causes a service restart. + """ + synchronousCommit: str | None = None + """ + (String) Sets the current transaction's synchronization level. The default is off. This setting takes precedence over synchronous_replication. + Sets the current transaction's synchronization level. The default is `off`. This setting takes precedence over `synchronous_replication`. + """ + synchronousReplication: str | None = None + """ + (String) Synchronous replication type. (deprecated, use synchronous_commit instead). Note that the service plan also needs to support synchronous replication. This setting is deprecated. Use synchronous_commit instead. Any change to this setting will automatically update synchronous_commit. Setting the value to quorum changes synchronous_commit to remote_write, while setting it to off changes synchronous_commit to off. + Synchronous replication type. (deprecated, use synchronous_commit instead). Note that the service plan also needs to support synchronous replication. This setting is deprecated. Use synchronous_commit instead. Any change to this setting will automatically update synchronous_commit. Setting the value to quorum changes synchronous_commit to remote_write, while setting it to off changes synchronous_commit to off. + """ + tempFileLimit: float | None = None + """ + 1 for unlimited. + PostgreSQL temporary file limit in KiB, -1 for unlimited. + """ + timescaledb: Timescaledb | None = None + """ + wide settings for the timescaledb extension. (see below for nested schema) + TimescaleDB extension configuration values. System-wide settings for the timescaledb extension. + """ + timezone: str | None = None + """ + (String) PostgreSQL service timezone. + PostgreSQL service timezone. + """ + trackActivityQuerySize: float | None = None + """ + (Number) Specifies the number of bytes reserved to track the currently executing command for each active session. Changing this parameter causes a service restart. + Specifies the number of bytes reserved to track the currently executing command for each active session. Changing this parameter causes a service restart. + """ + trackCommitTimestamp: str | None = None + """ + (String) Record commit time of transactions. Changing this parameter causes a service restart. + Record commit time of transactions. Changing this parameter causes a service restart. + """ + trackFunctions: str | None = None + """ + (String) Enables tracking of function call counts and time used. + Enables tracking of function call counts and time used. + """ + trackIoTiming: str | None = None + """ + (String) Enables timing of database I/O calls. The default is off. When on, it will repeatedly query the operating system for the current time, which may cause significant overhead on some platforms. + Enables timing of database I/O calls. The default is `off`. When on, it will repeatedly query the operating system for the current time, which may cause significant overhead on some platforms. + """ + variant: str | None = None + """ + (String) Variant of the PostgreSQL service, may affect the features that are exposed by default. + Variant of the PostgreSQL service, may affect the features that are exposed by default. + """ + version: str | None = None + """ + (String) PostgreSQL major version. + PostgreSQL major version. + """ + walSenderTimeout: float | None = None + """ + (Number) Terminate replication connections that are inactive for longer than this amount of time, in milliseconds. Setting this value to zero disables the timeout. + Terminate replication connections that are inactive for longer than this amount of time, in milliseconds. Setting this value to zero disables the timeout. + """ + walWriterDelay: float | None = None + """ + (Number) WAL flush interval in milliseconds. The default is 200. Setting this parameter to a lower value may negatively impact performance. + WAL flush interval in milliseconds. The default is `200`. Setting this parameter to a lower value may negatively impact performance. + """ + workMem: float | None = None + """ + (Number) Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files, in MB. The default is 1MB + 0.075% of total RAM (up to 32MB). + Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files, in MB. The default is 1MB + 0.075% of total RAM (up to 32MB). + """ + + +class AtProvider(BaseModel): + additionalDiskSpaceGib: float | None = None + """ + (Number, Deprecated) Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + """ + components: list[Component] | None = None + """ + (Attributes List) Service component information (see below for nested schema) + """ + id: str | None = None + """ + (String) UUID of the database. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItemModel] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + nodeStates: list[NodeState] | None = None + """ + (Attributes List) Information about nodes providing the managed service (see below for nested schema) + """ + plan: str | None = None + """ + (String, Deprecated) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans pg. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans pg`. + """ + planBackups: str | None = None + """ + (String) Backup tier for the database plan. + Backup tier for the database plan. + """ + planCompute: str | None = None + """ + (String) Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + """ + planNodeCount: float | None = None + """ + (Number) Number of nodes in the database plan. + Number of nodes in the database plan. + """ + planStorageGib: float | None = None + """ + (Number) Total storage per node in GiB. + Total storage per node in GiB. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + primaryDatabase: str | None = None + """ + (String) Primary database name + Primary database name + """ + properties: PropertiesModel | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + serviceHost: str | None = None + """ + (String) Hostname to the service instance + Hostname to the service instance + """ + servicePort: str | None = None + """ + (String) Port to the service instance + Port to the service instance + """ + serviceUsername: str | None = None + """ + (String) Primary username to the service instance + Primary username to the service instance + """ + sslmode: str | None = None + """ + (String) SSL Connection Mode for PostgreSQL + SSL Connection Mode for PostgreSQL + """ + state: str | None = None + """ + (String) The current state of the service + The current state of the service + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + type: str | None = None + """ + (String) Type of the managed database instance + Type of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 ManagedDatabasePostgresql(BaseModel): + apiVersion: Literal['database.upcloud.com/v1alpha1'] | None = ( + 'database.upcloud.com/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['ManagedDatabasePostgresql'] | None = 'ManagedDatabasePostgresql' + """ + 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 + """ + ManagedDatabasePostgresqlSpec defines the desired state of ManagedDatabasePostgresql + """ + status: Status | None = None + """ + ManagedDatabasePostgresqlStatus defines the observed state of ManagedDatabasePostgresql. + """ + + +class ManagedDatabasePostgresqlList(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[ManagedDatabasePostgresql] + """ + List of manageddatabasepostgresqls. 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/com/upcloud/database/manageddatabaseuser/__init__.py b/schemas/python/models/com/upcloud/database/manageddatabaseuser/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/database/manageddatabaseuser/v1alpha1.py b/schemas/python/models/com/upcloud/database/manageddatabaseuser/v1alpha1.py new file mode 100644 index 000000000..8a69633fd --- /dev/null +++ b/schemas/python/models/com/upcloud/database/manageddatabaseuser/v1alpha1.py @@ -0,0 +1,404 @@ +# generated by datamodel-codegen: +# filename: workdir/database_upcloud_com_v1alpha1_manageddatabaseuser.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.k8s.apimachinery.pkg.apis.meta import v1 + + +class Rule(BaseModel): + index: str | None = None + """ + (String) Set index name, pattern or top level API. + Set index name, pattern or top level API. + """ + permission: str | None = None + """ + (String) Set permission access. + Set permission access. + """ + + +class OpensearchAccessControl(BaseModel): + rules: list[Rule] | None = None + """ + (Block List) Set user access control rules. (see below for nested schema) + Set user access control rules. + """ + + +class PasswordSecretRef(BaseModel): + key: str + """ + The key to select. + """ + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class PgAccessControl(BaseModel): + allowReplication: bool | None = None + """ + (Boolean) Grant replication privilege + Grant replication privilege + """ + + +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 ServiceRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class ServiceSelector(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 ValkeyAccessControl(BaseModel): + categories: list[str] | None = None + """ + (List of String) Set access control to all commands in specified categories. + Set access control to all commands in specified categories. + """ + channels: list[str] | None = None + """ + (List of String) Set access control to Pub/Sub channels. + Set access control to Pub/Sub channels. + """ + commands: list[str] | None = None + """ + (List of String) Set access control to commands. + Set access control to commands. + """ + keys: list[str] | None = None + """ + (List of String) Set access control to keys. + Set access control to keys. + """ + + +class ForProvider(BaseModel): + authentication: str | None = None + """ + (String) MySQL only, authentication type. + MySQL only, authentication type. + """ + opensearchAccessControl: OpensearchAccessControl | None = None + """ + (Block List) OpenSearch access control object. (see below for nested schema) + OpenSearch access control object. + """ + passwordSecretRef: PasswordSecretRef | None = None + """ + (String, Sensitive) Password for the database user. Defaults to a random value + Password for the database user. Defaults to a random value + """ + pgAccessControl: PgAccessControl | None = None + """ + (Block List) PostgreSQL access control object. (see below for nested schema) + PostgreSQL access control object. + """ + service: str | None = None + """ + (String) Service's UUID for which this user belongs to + The service to which the resource belongs. Please note that reference fields (`serviceRef` and `serviceSelector`) only work for PostgreSQL databases. For other databases you need to leverage compositions and patches to pass the database service ID to the `service` field. See https://docs.crossplane.io/latest/concepts/patch-and-transform/#patching-between-resources for more info. + """ + serviceRef: ServiceRef | None = None + """ + Reference to a ManagedDatabasePostgresql in database to populate service. + """ + serviceSelector: ServiceSelector | None = None + """ + Selector for a ManagedDatabasePostgresql in database to populate service. + """ + valkeyAccessControl: ValkeyAccessControl | None = None + """ + (Block List) Valkey access control object. (see below for nested schema) + Valkey access control object. + """ + + +class InitProvider(BaseModel): + authentication: str | None = None + """ + (String) MySQL only, authentication type. + MySQL only, authentication type. + """ + opensearchAccessControl: OpensearchAccessControl | None = None + """ + (Block List) OpenSearch access control object. (see below for nested schema) + OpenSearch access control object. + """ + passwordSecretRef: PasswordSecretRef | None = None + """ + (String, Sensitive) Password for the database user. Defaults to a random value + Password for the database user. Defaults to a random value + """ + pgAccessControl: PgAccessControl | None = None + """ + (Block List) PostgreSQL access control object. (see below for nested schema) + PostgreSQL access control object. + """ + valkeyAccessControl: ValkeyAccessControl | None = None + """ + (Block List) Valkey access control object. (see below for nested schema) + Valkey access control object. + """ + + +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): + authentication: str | None = None + """ + (String) MySQL only, authentication type. + MySQL only, authentication type. + """ + id: str | None = None + """ + (String) ID of the user. ID is in {service UUID}/{username} format. + """ + opensearchAccessControl: OpensearchAccessControl | None = None + """ + (Block List) OpenSearch access control object. (see below for nested schema) + OpenSearch access control object. + """ + pgAccessControl: PgAccessControl | None = None + """ + (Block List) PostgreSQL access control object. (see below for nested schema) + PostgreSQL access control object. + """ + service: str | None = None + """ + (String) Service's UUID for which this user belongs to + The service to which the resource belongs. Please note that reference fields (`serviceRef` and `serviceSelector`) only work for PostgreSQL databases. For other databases you need to leverage compositions and patches to pass the database service ID to the `service` field. See https://docs.crossplane.io/latest/concepts/patch-and-transform/#patching-between-resources for more info. + """ + type: str | None = None + """ + (String) Type of the user. Only normal type users can be created + Type of the user. Only normal type users can be created + """ + valkeyAccessControl: ValkeyAccessControl | None = None + """ + (Block List) Valkey access control object. (see below for nested schema) + Valkey access control object. + """ + + +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 ManagedDatabaseUser(BaseModel): + apiVersion: Literal['database.upcloud.com/v1alpha1'] | None = ( + 'database.upcloud.com/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['ManagedDatabaseUser'] | None = 'ManagedDatabaseUser' + """ + 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 + """ + ManagedDatabaseUserSpec defines the desired state of ManagedDatabaseUser + """ + status: Status | None = None + """ + ManagedDatabaseUserStatus defines the observed state of ManagedDatabaseUser. + """ + + +class ManagedDatabaseUserList(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[ManagedDatabaseUser] + """ + List of manageddatabaseusers. 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/com/upcloud/database/manageddatabasevalkey/__init__.py b/schemas/python/models/com/upcloud/database/manageddatabasevalkey/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/database/manageddatabasevalkey/v1alpha1.py b/schemas/python/models/com/upcloud/database/manageddatabasevalkey/v1alpha1.py new file mode 100644 index 000000000..5584c2f7a --- /dev/null +++ b/schemas/python/models/com/upcloud/database/manageddatabasevalkey/v1alpha1.py @@ -0,0 +1,806 @@ +# generated by datamodel-codegen: +# filename: workdir/database_upcloud_com_v1alpha1_manageddatabasevalkey.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 UuidRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class UuidSelector(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 NetworkItem(BaseModel): + family: str | None = None + """ + (String) Network family. Currently only IPv4 is supported. + Network family. Currently only `IPv4` is supported. + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + The name of the network. Must be unique within the service. + """ + type: str | None = None + """ + (String) Type of the managed database instance + The type of the network. Must be private. + """ + uuid: str | None = None + """ + (String) Private network UUID. Must reside in the same zone as the database. + Private network UUID. Must reside in the same zone as the database. + """ + uuidRef: UuidRef | None = None + """ + Reference to a Network in network to populate uuid. + """ + uuidSelector: UuidSelector | None = None + """ + Selector for a Network in network to populate uuid. + """ + + +class PasswordSecretRef(BaseModel): + key: str + """ + The key to select. + """ + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class Migration(BaseModel): + dbname: str | None = None + """ + (String) Database name for bootstrapping the initial connection. + Database name for bootstrapping the initial connection. + """ + host: str | None = None + """ + (String) Hostname or IP address of the server where to migrate data from. + Hostname or IP address of the server where to migrate data from. + """ + ignoreDbs: str | None = None + """ + separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + """ + ignoreRoles: str | None = None + """ + separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + """ + method: str | None = None + """ + (String) The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + """ + passwordSecretRef: PasswordSecretRef | None = None + """ + (String, Sensitive) Password for authentication with the server where to migrate data from. + Password for authentication with the server where to migrate data from. + """ + port: float | None = None + """ + (Number) Port number of the server where to migrate data from. + Port number of the server where to migrate data from. + """ + ssl: bool | None = None + """ + (Boolean) The server where to migrate data from is secured with SSL. + The server where to migrate data from is secured with SSL. + """ + username: str | None = None + """ + (String) User name for authentication with the server where to migrate data from. + User name for authentication with the server where to migrate data from. + """ + + +class Properties(BaseModel): + automaticUtilityNetworkIpFilter: bool | None = None + """ + (Boolean) Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + """ + backupHour: float | None = None + """ + (Number) The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed. + The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed. + """ + backupMinute: float | None = None + """ + (Number) The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed. + The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed. + """ + frequentSnapshots: bool | None = None + """ + (Boolean) Frequent RDB snapshots. When enabled, Valkey will create frequent local RDB snapshots. When disabled, Valkey will only take RDB snapshots when a backup is created, based on the backup schedule. This setting is ignored when valkey_persistence is set to off. + Frequent RDB snapshots. When enabled, Valkey will create frequent local RDB snapshots. When disabled, Valkey will only take RDB snapshots when a backup is created, based on the backup schedule. This setting is ignored when `valkey_persistence` is set to `off`. + """ + ipFilter: list[str] | None = None + """ + (List of String) IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + """ + migration: Migration | None = None + """ + (Block List) Migrate data from existing server. (see below for nested schema) + Migrate data from existing server. + """ + publicAccess: bool | None = None + """ + (Boolean) Public Access. Allow access to the service from the public Internet. + Public Access. Allow access to the service from the public Internet. + """ + publicAccessPrometheus: bool | None = None + """ + (Boolean) Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + """ + replicas: float | None = None + """ + (Number) Number of replicas per shard. Number of replicas per shard in the Valkey cluster. Only applies to cluster plans. + Number of replicas per shard. Number of replicas per shard in the Valkey cluster. Only applies to cluster plans. + """ + serviceLog: bool | None = None + """ + (Boolean) Service logging. Store logs for the service so that they are available in the HTTP API and console. + Service logging. Store logs for the service so that they are available in the HTTP API and console. + """ + shardCount: float | None = None + """ + (Number) Number of shards. Number of shards (primaries) in the Valkey cluster. Required for cluster plans. + Number of shards. Number of shards (primaries) in the Valkey cluster. Required for cluster plans. + """ + valkeyAclChannelsDefault: str | None = None + """ + pubsub-default. + Default ACL for pub/sub channels used when a Valkey user is created. Determines default pub/sub channels' ACL for new users if ACL is not supplied. When this option is not defined, all_channels is assumed to keep backward compatibility. This option doesn't affect Valkey configuration acl-pubsub-default. + """ + valkeyActiveDefragIgnoreBytes: float | None = None + """ + (Number) Active defrag minimum fragmentation waste. Minimum amount of fragmentation waste, in bytes, before active defragmentation starts. Only takes effect when valkey_activedefrag is enabled. + Active defrag minimum fragmentation waste. Minimum amount of fragmentation waste, in bytes, before active defragmentation starts. Only takes effect when `valkey_activedefrag` is enabled. + """ + valkeyActiveDefragThresholdLower: float | None = None + """ + (Number) Active defrag minimum fragmentation percentage. Minimum percentage of fragmentation before active defragmentation starts. Only takes effect when valkey_activedefrag is enabled. + Active defrag minimum fragmentation percentage. Minimum percentage of fragmentation before active defragmentation starts. Only takes effect when `valkey_activedefrag` is enabled. + """ + valkeyActiveExpireEffort: float | None = None + """ + expire-effort setting (default 1, max 10) uses more CPU to reclaim expired keys faster, reducing memory usage but potentially increasing latency. + Active expire effort. Valkey reclaims expired keys both when accessed and in the background. The background process scans for expired keys to free memory. Increasing the active-expire-effort setting (default 1, max 10) uses more CPU to reclaim expired keys faster, reducing memory usage but potentially increasing latency. + """ + valkeyActivedefrag: bool | None = None + """ + used memory pages to reduce fragmentation and return memory to the operating system. Defragmentation runs on the main thread and consumes CPU, so it may increase latency under load. + Active memory defragmentation. Enable active memory defragmentation. When enabled, Valkey relocates objects off sparsely-used memory pages to reduce fragmentation and return memory to the operating system. Defragmentation runs on the main thread and consumes CPU, so it may increase latency under load. + """ + valkeyIoThreads: float | None = None + """ + (Number) Valkey IO thread count. Set Valkey IO thread count. Changing this will cause a restart of the Valkey service. + Valkey IO thread count. Set Valkey IO thread count. Changing this will cause a restart of the Valkey service. + """ + valkeyLfuDecayTime: float | None = None + """ + policy counter decay time in minutes. + LFU maxmemory-policy counter decay time in minutes. + """ + valkeyLfuLogFactor: float | None = None + """ + lfu and allkeys-lfu maxmemory-policies. + Counter logarithm factor for volatile-lfu and allkeys-lfu maxmemory-policies. + """ + valkeyMaxmemoryPolicy: str | None = None + """ + policy. + Valkey maxmemory-policy. + """ + valkeyNotifyKeyspaceEvents: str | None = None + """ + keyspace-events option. + Set notify-keyspace-events option. + """ + valkeyNumberOfDatabases: float | None = None + """ + (Number) Number of Valkey databases. Set number of Valkey databases. Changing this will cause a restart of the Valkey service. + Number of Valkey databases. Set number of Valkey databases. Changing this will cause a restart of the Valkey service. + """ + valkeyPersistence: str | None = None + """ + (String) Valkey persistence. Controls whether Valkey writes RDB dumps to disk. With rdb, RDB dumps are written for backups on the backup schedule and, if frequent_snapshots is enabled, every 10 minutes so the service can recover recent data after a restart. With off, no RDB dumps are written at all: backups and forking are unavailable, frequent_snapshots and backup_hour/backup_minute have no effect, and all data is lost if the service restarts or is powered off. + Valkey persistence. Controls whether Valkey writes RDB dumps to disk. With `rdb`, RDB dumps are written for backups on the backup schedule and, if `frequent_snapshots` is enabled, every 10 minutes so the service can recover recent data after a restart. With `off`, no RDB dumps are written at all: backups and forking are unavailable, `frequent_snapshots` and `backup_hour`/`backup_minute` have no effect, and all data is lost if the service restarts or is powered off. + """ + valkeyPubsubClientOutputBufferLimit: float | None = None + """ + (Number) Pub/sub client output buffer hard limit in MB. Set output buffer limit for pub / sub clients in MB. The value is the hard limit, the soft limit is 1/4 of the hard limit. When setting the limit, be mindful of the available memory in the selected service plan. + Pub/sub client output buffer hard limit in MB. Set output buffer limit for pub / sub clients in MB. The value is the hard limit, the soft limit is 1/4 of the hard limit. When setting the limit, be mindful of the available memory in the selected service plan. + """ + valkeySsl: bool | None = None + """ + (Boolean) Require SSL to access Valkey. + Require SSL to access Valkey. + """ + valkeyTimeout: float | None = None + """ + (Number) Valkey idle connection timeout in seconds. + Valkey idle connection timeout in seconds. + """ + valkeyVersion: str | None = None + """ + (String) Valkey major version. + Valkey major version. + """ + + +class ForProvider(BaseModel): + additionalDiskSpaceGib: float | None = None + """ + (Number) Not supported for valkey databases. Should be left unconfigured. + Not supported for `valkey` databases. Should be left unconfigured. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItem] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + plan: str | None = None + """ + (String) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans valkey. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans valkey`. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + properties: Properties | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +class InitProvider(BaseModel): + additionalDiskSpaceGib: float | None = None + """ + (Number) Not supported for valkey databases. Should be left unconfigured. + Not supported for `valkey` databases. Should be left unconfigured. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItem] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + plan: str | None = None + """ + (String) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans valkey. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans valkey`. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + properties: Properties | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 Component(BaseModel): + component: str | None = None + """ + (String) Component name. + Component name. + """ + host: str | None = None + """ + (String) Hostname or IP address of the server where to migrate data from. + Hostname of the component + """ + port: float | None = None + """ + (Number) Port number of the server where to migrate data from. + Port number of the component + """ + route: str | None = None + """ + (String) Component network route type + Component network route type + """ + usage: str | None = None + """ + (String) Usage of the component + Usage of the component + """ + + +class NetworkItemModel(BaseModel): + family: str | None = None + """ + (String) Network family. Currently only IPv4 is supported. + Network family. Currently only `IPv4` is supported. + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + The name of the network. Must be unique within the service. + """ + type: str | None = None + """ + (String) Type of the managed database instance + The type of the network. Must be private. + """ + uuid: str | None = None + """ + (String) Private network UUID. Must reside in the same zone as the database. + Private network UUID. Must reside in the same zone as the database. + """ + + +class NodeState(BaseModel): + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name plus a node iteration + """ + role: str | None = None + """ + (String) Role of the node + Role of the node + """ + state: str | None = None + """ + (String) The current state of the service + Current state of the node + """ + + +class MigrationModel(BaseModel): + dbname: str | None = None + """ + (String) Database name for bootstrapping the initial connection. + Database name for bootstrapping the initial connection. + """ + host: str | None = None + """ + (String) Hostname or IP address of the server where to migrate data from. + Hostname or IP address of the server where to migrate data from. + """ + ignoreDbs: str | None = None + """ + separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + """ + ignoreRoles: str | None = None + """ + separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + """ + method: str | None = None + """ + (String) The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + """ + port: float | None = None + """ + (Number) Port number of the server where to migrate data from. + Port number of the server where to migrate data from. + """ + ssl: bool | None = None + """ + (Boolean) The server where to migrate data from is secured with SSL. + The server where to migrate data from is secured with SSL. + """ + username: str | None = None + """ + (String) User name for authentication with the server where to migrate data from. + User name for authentication with the server where to migrate data from. + """ + + +class AtProvider(BaseModel): + additionalDiskSpaceGib: float | None = None + """ + (Number) Not supported for valkey databases. Should be left unconfigured. + Not supported for `valkey` databases. Should be left unconfigured. + """ + components: list[Component] | None = None + """ + (Attributes List) Service component information (see below for nested schema) + """ + id: str | None = None + """ + (String) UUID of the database. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItemModel] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + nodeStates: list[NodeState] | None = None + """ + (Attributes List) Information about nodes providing the managed service (see below for nested schema) + """ + plan: str | None = None + """ + (String) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans valkey. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans valkey`. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + primaryDatabase: str | None = None + """ + (String) Primary database name + Primary database name + """ + properties: Properties | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + serviceHost: str | None = None + """ + (String) Hostname to the service instance + Hostname to the service instance + """ + servicePort: str | None = None + """ + (String) Port to the service instance + Port to the service instance + """ + serviceUsername: str | None = None + """ + (String) Primary username to the service instance + Primary username to the service instance + """ + state: str | None = None + """ + (String) The current state of the service + The current state of the service + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + type: str | None = None + """ + (String) Type of the managed database instance + Type of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 ManagedDatabaseValkey(BaseModel): + apiVersion: Literal['database.upcloud.com/v1alpha1'] | None = ( + 'database.upcloud.com/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['ManagedDatabaseValkey'] | None = 'ManagedDatabaseValkey' + """ + 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 + """ + ManagedDatabaseValkeySpec defines the desired state of ManagedDatabaseValkey + """ + status: Status | None = None + """ + ManagedDatabaseValkeyStatus defines the observed state of ManagedDatabaseValkey. + """ + + +class ManagedDatabaseValkeyList(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[ManagedDatabaseValkey] + """ + List of manageddatabasevalkeys. 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/com/upcloud/m/__init__.py b/schemas/python/models/com/upcloud/m/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/database/__init__.py b/schemas/python/models/com/upcloud/m/database/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/database/manageddatabaseconnectionpool/__init__.py b/schemas/python/models/com/upcloud/m/database/manageddatabaseconnectionpool/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/database/manageddatabaseconnectionpool/v1alpha1.py b/schemas/python/models/com/upcloud/m/database/manageddatabaseconnectionpool/v1alpha1.py new file mode 100644 index 000000000..f914d0462 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/database/manageddatabaseconnectionpool/v1alpha1.py @@ -0,0 +1,421 @@ +# generated by datamodel-codegen: +# filename: workdir/database_m_upcloud_com_v1alpha1_manageddatabaseconnectionpool.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 DatabaseRef(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 DatabaseSelector(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 ServiceRef(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 ServiceSelector(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 UsernameRef(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 UsernameSelector(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): + database: str | None = None + """ + (String) Name of the database. + Name of the database. + """ + databaseRef: DatabaseRef | None = None + """ + Reference to a ManagedDatabaseLogicalDatabase in database to populate database. + """ + databaseSelector: DatabaseSelector | None = None + """ + Selector for a ManagedDatabaseLogicalDatabase in database to populate database. + """ + mode: str | None = None + """ + (String) Connection pool mode. + Connection pool mode. + """ + service: str | None = None + """ + (String) UUID of the service to which this connection pool belongs. + The service to which the resource belongs. Please note that reference fields (`serviceRef` and `serviceSelector`) only work for PostgreSQL databases. For other databases you need to leverage compositions and patches to pass the database service ID to the `service` field. See https://docs.crossplane.io/latest/concepts/patch-and-transform/#patching-between-resources for more info. + """ + serviceRef: ServiceRef | None = None + """ + Reference to a ManagedDatabasePostgresql in database to populate service. + """ + serviceSelector: ServiceSelector | None = None + """ + Selector for a ManagedDatabasePostgresql in database to populate service. + """ + size: float | None = None + """ + (Number) Connection pool size. + Connection pool size. + """ + username: str | None = None + """ + (String) Service username. If not set, all users are allowed to access this connection pool. + Service username. If not set, all users are allowed to access this connection pool. + """ + usernameRef: UsernameRef | None = None + """ + Reference to a ManagedDatabaseUser in database to populate username. + """ + usernameSelector: UsernameSelector | None = None + """ + Selector for a ManagedDatabaseUser in database to populate username. + """ + + +class InitProvider(BaseModel): + database: str | None = None + """ + (String) Name of the database. + Name of the database. + """ + databaseRef: DatabaseRef | None = None + """ + Reference to a ManagedDatabaseLogicalDatabase in database to populate database. + """ + databaseSelector: DatabaseSelector | None = None + """ + Selector for a ManagedDatabaseLogicalDatabase in database to populate database. + """ + mode: str | None = None + """ + (String) Connection pool mode. + Connection pool mode. + """ + size: float | None = None + """ + (Number) Connection pool size. + Connection pool size. + """ + username: str | None = None + """ + (String) Service username. If not set, all users are allowed to access this connection pool. + Service username. If not set, all users are allowed to access this connection pool. + """ + usernameRef: UsernameRef | None = None + """ + Reference to a ManagedDatabaseUser in database to populate username. + """ + usernameSelector: UsernameSelector | None = None + """ + Selector for a ManagedDatabaseUser in database to populate username. + """ + + +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): + connectionUri: str | None = None + """ + (String) Connection URI for the connection pool. + Connection URI for the connection pool. + """ + database: str | None = None + """ + (String) Name of the database. + Name of the database. + """ + id: str | None = None + """ + (String) ID of the connection pool. ID is in {service UUID}/{connection pool name} format. + """ + mode: str | None = None + """ + (String) Connection pool mode. + Connection pool mode. + """ + service: str | None = None + """ + (String) UUID of the service to which this connection pool belongs. + The service to which the resource belongs. Please note that reference fields (`serviceRef` and `serviceSelector`) only work for PostgreSQL databases. For other databases you need to leverage compositions and patches to pass the database service ID to the `service` field. See https://docs.crossplane.io/latest/concepts/patch-and-transform/#patching-between-resources for more info. + """ + size: float | None = None + """ + (Number) Connection pool size. + Connection pool size. + """ + username: str | None = None + """ + (String) Service username. If not set, all users are allowed to access this connection pool. + Service username. If not set, all users are allowed to access this connection pool. + """ + + +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 ManagedDatabaseConnectionPool(BaseModel): + apiVersion: Literal['database.m.upcloud.com/v1alpha1'] | None = ( + 'database.m.upcloud.com/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['ManagedDatabaseConnectionPool'] | None = ( + 'ManagedDatabaseConnectionPool' + ) + """ + 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 + """ + ManagedDatabaseConnectionPoolSpec defines the desired state of ManagedDatabaseConnectionPool + """ + status: Status | None = None + """ + ManagedDatabaseConnectionPoolStatus defines the observed state of ManagedDatabaseConnectionPool. + """ + + +class ManagedDatabaseConnectionPoolList(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[ManagedDatabaseConnectionPool] + """ + List of manageddatabaseconnectionpools. 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/com/upcloud/m/database/manageddatabaselogicaldatabase/__init__.py b/schemas/python/models/com/upcloud/m/database/manageddatabaselogicaldatabase/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/database/manageddatabaselogicaldatabase/v1alpha1.py b/schemas/python/models/com/upcloud/m/database/manageddatabaselogicaldatabase/v1alpha1.py new file mode 100644 index 000000000..2d153cf95 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/database/manageddatabaselogicaldatabase/v1alpha1.py @@ -0,0 +1,284 @@ +# generated by datamodel-codegen: +# filename: workdir/database_m_upcloud_com_v1alpha1_manageddatabaselogicaldatabase.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 ServiceRef(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 ServiceSelector(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): + characterSet: str | None = None + """ + (String) Default character set for the database (LC_CTYPE), PostgreSQL only. + Default character set for the database (LC_CTYPE), PostgreSQL only. + """ + collation: str | None = None + """ + (String) Default collation for the database (LC_COLLATE), PostgreSQL only. + Default collation for the database (LC_COLLATE), PostgreSQL only. + """ + service: str | None = None + """ + (String) UUID of the service to which this logical database belongs. + The service to which the resource belongs. Please note that reference fields (`serviceRef` and `serviceSelector`) only work for PostgreSQL databases. For other databases you need to leverage compositions and patches to pass the database service ID to the `service` field. See https://docs.crossplane.io/latest/concepts/patch-and-transform/#patching-between-resources for more info. + """ + serviceRef: ServiceRef | None = None + """ + Reference to a ManagedDatabasePostgresql in database to populate service. + """ + serviceSelector: ServiceSelector | None = None + """ + Selector for a ManagedDatabasePostgresql in database to populate service. + """ + + +class InitProvider(BaseModel): + characterSet: str | None = None + """ + (String) Default character set for the database (LC_CTYPE), PostgreSQL only. + Default character set for the database (LC_CTYPE), PostgreSQL only. + """ + collation: str | None = None + """ + (String) Default collation for the database (LC_COLLATE), PostgreSQL only. + Default collation for the database (LC_COLLATE), PostgreSQL only. + """ + + +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): + characterSet: str | None = None + """ + (String) Default character set for the database (LC_CTYPE), PostgreSQL only. + Default character set for the database (LC_CTYPE), PostgreSQL only. + """ + collation: str | None = None + """ + (String) Default collation for the database (LC_COLLATE), PostgreSQL only. + Default collation for the database (LC_COLLATE), PostgreSQL only. + """ + id: str | None = None + """ + (String) ID of the logical database. ID is in {service UUID}/{database name} format. + """ + service: str | None = None + """ + (String) UUID of the service to which this logical database belongs. + The service to which the resource belongs. Please note that reference fields (`serviceRef` and `serviceSelector`) only work for PostgreSQL databases. For other databases you need to leverage compositions and patches to pass the database service ID to the `service` field. See https://docs.crossplane.io/latest/concepts/patch-and-transform/#patching-between-resources for more info. + """ + + +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 ManagedDatabaseLogicalDatabase(BaseModel): + apiVersion: Literal['database.m.upcloud.com/v1alpha1'] | None = ( + 'database.m.upcloud.com/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['ManagedDatabaseLogicalDatabase'] | None = ( + 'ManagedDatabaseLogicalDatabase' + ) + """ + 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 + """ + ManagedDatabaseLogicalDatabaseSpec defines the desired state of ManagedDatabaseLogicalDatabase + """ + status: Status | None = None + """ + ManagedDatabaseLogicalDatabaseStatus defines the observed state of ManagedDatabaseLogicalDatabase. + """ + + +class ManagedDatabaseLogicalDatabaseList(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[ManagedDatabaseLogicalDatabase] + """ + List of manageddatabaselogicaldatabases. 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/com/upcloud/m/database/manageddatabasemysql/__init__.py b/schemas/python/models/com/upcloud/m/database/manageddatabasemysql/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/database/manageddatabasemysql/v1alpha1.py b/schemas/python/models/com/upcloud/m/database/manageddatabasemysql/v1alpha1.py new file mode 100644 index 000000000..e58f1f89e --- /dev/null +++ b/schemas/python/models/com/upcloud/m/database/manageddatabasemysql/v1alpha1.py @@ -0,0 +1,1473 @@ +# generated by datamodel-codegen: +# filename: workdir/database_m_upcloud_com_v1alpha1_manageddatabasemysql.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 UuidRef(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 UuidSelector(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 NetworkItem(BaseModel): + family: str | None = None + """ + (String) Network family. Currently only IPv4 is supported. + Network family. Currently only `IPv4` is supported. + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + The name of the network. Must be unique within the service. + """ + type: str | None = None + """ + (String) Type of the managed database instance + The type of the network. Must be private. + """ + uuid: str | None = None + """ + (String) Private network UUID. Must reside in the same zone as the database. + Private network UUID. Must reside in the same zone as the database. + """ + uuidRef: UuidRef | None = None + """ + Reference to a Network in network to populate uuid. + """ + uuidSelector: UuidSelector | None = None + """ + Selector for a Network in network to populate uuid. + """ + + +class AdminPasswordSecretRef(BaseModel): + key: str + name: str + """ + Name of the secret. + """ + + +class PasswordSecretRef(BaseModel): + key: str + name: str + """ + Name of the secret. + """ + + +class Migration(BaseModel): + dbname: str | None = None + """ + (String) Database name for bootstrapping the initial connection. + Database name for bootstrapping the initial connection. + """ + dumpTool: str | None = None + """ + (String) MySQL migration dump tool. Experimental! Tool to use for database dump and restore during migration. Default: mysqldump. + MySQL migration dump tool. Experimental! Tool to use for database dump and restore during migration. Default: mysqldump. + """ + host: str | None = None + """ + (String) Hostname or IP address of the server where to migrate data from. + Hostname or IP address of the server where to migrate data from. + """ + ignoreDbs: str | None = None + """ + separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + """ + ignoreRoles: str | None = None + """ + separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + """ + method: str | None = None + """ + (String) The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + """ + passwordSecretRef: PasswordSecretRef | None = None + """ + (String, Sensitive) Password for authentication with the server where to migrate data from. + Password for authentication with the server where to migrate data from. + """ + port: float | None = None + """ + (Number) Port number of the server where to migrate data from. + Port number of the server where to migrate data from. + """ + reestablishReplication: bool | None = None + """ + restore part and start replication. + Skip dump-restore part and start replication. + """ + ssl: bool | None = None + """ + (Boolean) The server where to migrate data from is secured with SSL. + The server where to migrate data from is secured with SSL. + """ + username: str | None = None + """ + (String) User name for authentication with the server where to migrate data from. + User name for authentication with the server where to migrate data from. + """ + + +class MysqlIncrementalBackup(BaseModel): + enabled: bool | None = None + """ + efficient than full backups. This is particularly useful for large databases where daily full backups would be too time-consuming or expensive. + Enable incremental backups. Enable periodic incremental backups. When enabled, full_backup_week_schedule must be set. Incremental backups only store changes since the last backup, making them faster and more storage-efficient than full backups. This is particularly useful for large databases where daily full backups would be too time-consuming or expensive. + """ + fullBackupWeekSchedule: str | None = None + """ + separated list of days of the week when full backups should be created. Valid values: mon, tue, wed, thu, fri, sat, sun. + Full backup week schedule. Comma-separated list of days of the week when full backups should be created. Valid values: mon, tue, wed, thu, fri, sat, sun. + """ + + +class Properties(BaseModel): + adminPasswordSecretRef: AdminPasswordSecretRef | None = None + """ + (String, Sensitive) Custom password for admin user. Defaults to random string. This must be set only when a new service is being created. + Custom password for admin user. Defaults to random string. This must be set only when a new service is being created. + """ + adminUsername: str | None = None + """ + (String) Custom username for admin user. This must be set only when a new service is being created. + Custom username for admin user. This must be set only when a new service is being created. + """ + automaticSpPrivileges: bool | None = None + """ + (Boolean) When enabled, the server automatically grants the EXECUTE and ALTER ROUTINE privileges to the creator of a stored routine and drops them when the routine is dropped. + When enabled, the server automatically grants the EXECUTE and ALTER ROUTINE privileges to the creator of a stored routine and drops them when the routine is dropped. + """ + automaticUtilityNetworkIpFilter: bool | None = None + """ + (Boolean) Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + """ + backupHour: float | None = None + """ + (Number) The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed. + The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed. + """ + backupMinute: float | None = None + """ + (Number) The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed. + The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed. + """ + binlogRetentionPeriod: float | None = None + """ + traffic window rather than dropping it drastically in one step. + The minimum amount of time in seconds to keep binlog entries before deletion. This may be extended for services that require binlog entries for longer than the default for example if using the MySQL Debezium Kafka connector. Warning: reducing this value can make a large batch of binary logs eligible for purge at once. Depending on the volume, this can sometimes stall the MySQL commit path and block writes until the purge completes. To stay on the safe side, prefer lowering the value gradually in small decrements during a low-traffic window rather than dropping it drastically in one step. + """ + connectTimeout: float | None = None + """ + (Number) The number of seconds that the mysqld server waits for a connect packet before responding with Bad handshake. + The number of seconds that the mysqld server waits for a connect packet before responding with Bad handshake. + """ + defaultTimeZone: str | None = None + """ + 12:00 to +12:00), a time zone name, or 'SYSTEM' to use the MySQL server default. + Default server time zone as an offset from UTC (from -12:00 to +12:00), a time zone name, or 'SYSTEM' to use the MySQL server default. + """ + divPrecisionIncrement: float | None = None + """ + (Number) Number of digits by which to increase the scale of the result of division operations performed with the / operator. Default is 4. + Number of digits by which to increase the scale of the result of division operations performed with the / operator. Default is 4. + """ + endMarkersInJson: bool | None = None + """ + (Boolean) Whether optimizer JSON output such as EXPLAIN FORMAT=JSON adds end markers that repeat a structure's key near its closing bracket, making large JSON structures easier to read. + Whether optimizer JSON output such as EXPLAIN FORMAT=JSON adds end markers that repeat a structure's key near its closing bracket, making large JSON structures easier to read. + """ + eqRangeIndexDiveLimit: float | None = None + """ + (Number) The number of equality ranges in a query at or above which the optimizer switches from index dives to index statistics when estimating the number of qualifying rows. 0 means always use index dives. Default is 200. + The number of equality ranges in a query at or above which the optimizer switches from index dives to index statistics when estimating the number of qualifying rows. 0 means always use index dives. Default is 200. + """ + groupConcatMaxLen: float | None = None + """ + (Number) The maximum permitted result length in bytes for the GROUP_CONCAT() function. + The maximum permitted result length in bytes for the GROUP_CONCAT() function. + """ + informationSchemaStatsExpiry: float | None = None + """ + (Number) The time, in seconds, before cached statistics expire. + The time, in seconds, before cached statistics expire. + """ + innodbAdaptiveHashIndex: bool | None = None + """ + dependent: it speeds up lookups for some workloads but its internal latch can become a contention point under high concurrency, in which case disabling it can improve throughput. + Whether InnoDB adaptive hash indexing is enabled. The optimal setting is workload-dependent: it speeds up lookups for some workloads but its internal latch can become a contention point under high concurrency, in which case disabling it can improve throughput. + """ + innodbChangeBufferMaxSize: float | None = None + """ + (Number) Maximum size for the InnoDB change buffer, as a percentage of the total size of the buffer pool. Default is 25. + Maximum size for the InnoDB change buffer, as a percentage of the total size of the buffer pool. Default is 25. + """ + innodbFlushNeighbors: float | None = None + """ + dirty pages in the same extent are not flushed, 1 - flush contiguous dirty pages in the same extent, 2 - flush dirty pages in the same extent. + Specifies whether flushing a page from the InnoDB buffer pool also flushes other dirty pages in the same extent (default is 1): 0 - dirty pages in the same extent are not flushed, 1 - flush contiguous dirty pages in the same extent, 2 - flush dirty pages in the same extent. + """ + innodbFtEnableStopword: bool | None = None + """ + (Boolean) Whether stopword processing is applied when creating or rebuilding an InnoDB FULLTEXT index. Enabled by default. + Whether stopword processing is applied when creating or rebuilding an InnoDB FULLTEXT index. Enabled by default. + """ + innodbFtMaxTokenSize: float | None = None + """ + (Number) Maximum length of words that are stored in an InnoDB FULLTEXT index. Changing this parameter will lead to a restart of the MySQL service. + Maximum length of words that are stored in an InnoDB FULLTEXT index. Changing this parameter will lead to a restart of the MySQL service. + """ + innodbFtMinTokenSize: float | None = None + """ + (Number) Minimum length of words that are stored in an InnoDB FULLTEXT index. Changing this parameter will lead to a restart of the MySQL service. + Minimum length of words that are stored in an InnoDB FULLTEXT index. Changing this parameter will lead to a restart of the MySQL service. + """ + innodbFtNumWordOptimize: float | None = None + """ + (Number) Number of words processed during each OPTIMIZE TABLE operation on an InnoDB FULLTEXT index. Default is 2000. + Number of words processed during each OPTIMIZE TABLE operation on an InnoDB FULLTEXT index. Default is 2000. + """ + innodbFtResultCacheLimit: float | None = None + """ + (Number) Maximum memory in bytes used per query for the InnoDB FULLTEXT search query result cache. Aiven sizes this automatically based on the service plan's memory; setting a value overrides the calculated default. + Maximum memory in bytes used per query for the InnoDB FULLTEXT search query result cache. Aiven sizes this automatically based on the service plan's memory; setting a value overrides the calculated default. + """ + innodbFtServerStopwordTable: str | None = None + """ + (String) This option is used to specify your own InnoDB FULLTEXT index stopword list for all InnoDB tables. + This option is used to specify your own InnoDB FULLTEXT index stopword list for all InnoDB tables. + """ + innodbFtUserStopwordTable: str | None = None + """ + (String) This option is used to specify your own InnoDB FULLTEXT index stopword list for specific InnoDB tables. + This option is used to specify your own InnoDB FULLTEXT index stopword list for specific InnoDB tables. + """ + innodbIoCapacity: float | None = None + """ + (Number) The number of I/O operations per second (IOPS) available to InnoDB background tasks, such as flushing pages from the buffer pool and merging data from the change buffer. Set this to a value appropriate for the underlying storage; it must not exceed innodb_io_capacity_max. + The number of I/O operations per second (IOPS) available to InnoDB background tasks, such as flushing pages from the buffer pool and merging data from the change buffer. Set this to a value appropriate for the underlying storage; it must not exceed innodb_io_capacity_max. + """ + innodbIoCapacityMax: float | None = None + """ + (Number) The maximum number of I/O operations per second (IOPS) that InnoDB background tasks may perform when flushing falls behind. Defaults to twice innodb_io_capacity (minimum 2000). This must be greater than or equal to innodb_io_capacity. + The maximum number of I/O operations per second (IOPS) that InnoDB background tasks may perform when flushing falls behind. Defaults to twice innodb_io_capacity (minimum 2000). This must be greater than or equal to innodb_io_capacity. + """ + innodbLockWaitTimeout: float | None = None + """ + (Number) The length of time in seconds an InnoDB transaction waits for a row lock before giving up. Default is 120. + The length of time in seconds an InnoDB transaction waits for a row lock before giving up. Default is 120. + """ + innodbLogBufferSize: float | None = None + """ + (Number) The size in bytes of the buffer that InnoDB uses to write to the log files on disk. Requests above 15% of the RAM provided by your service plan are rejected, because a larger buffer leaves less memory for the buffer pool and client connections. + The size in bytes of the buffer that InnoDB uses to write to the log files on disk. Requests above 15% of the RAM provided by your service plan are rejected, because a larger buffer leaves less memory for the buffer pool and client connections. + """ + innodbMaxDirtyPagesPct: float | None = None + """ + (Number) Percentage of dirty pages in the InnoDB buffer pool at which InnoDB starts flushing aggressively. Lowering it spreads write I/O more evenly and shortens crash recovery, at the cost of flushing pages that might have been modified again. Must stay at or above innodb_max_dirty_pages_pct_lwm. Default is 90. + Percentage of dirty pages in the InnoDB buffer pool at which InnoDB starts flushing aggressively. Lowering it spreads write I/O more evenly and shortens crash recovery, at the cost of flushing pages that might have been modified again. Must stay at or above innodb_max_dirty_pages_pct_lwm. Default is 90. + """ + innodbMaxDirtyPagesPctLwm: float | None = None + """ + flushing, to keep the dirty page ratio from reaching innodb_max_dirty_pages_pct. 0 turns pre-flushing off. Cannot be set above innodb_max_dirty_pages_pct. Default is 10. + Percentage of dirty pages in the InnoDB buffer pool at which InnoDB starts pre-flushing, to keep the dirty page ratio from reaching innodb_max_dirty_pages_pct. 0 turns pre-flushing off. Cannot be set above innodb_max_dirty_pages_pct. Default is 10. + """ + innodbMaxPurgeLag: float | None = None + """ + (Number) Number of outstanding transactions the InnoDB purge operation may fall behind by before INSERT, UPDATE and DELETE are delayed to let it catch up. The delay applies per row and grows with the lag, and it is capped by innodb_max_purge_lag_delay, which has to be set as well for this option to have any effect. Default is 0, which never delays anything. + Number of outstanding transactions the InnoDB purge operation may fall behind by before INSERT, UPDATE and DELETE are delayed to let it catch up. The delay applies per row and grows with the lag, and it is capped by innodb_max_purge_lag_delay, which has to be set as well for this option to have any effect. Default is 0, which never delays anything. + """ + innodbMaxPurgeLagDelay: float | None = None + """ + row delay innodb_max_purge_lag applies to INSERT, UPDATE and DELETE. MySQL clamps the delay to this value unconditionally, so while this is 0 no delay is ever applied and innodb_max_purge_lag on its own does nothing. Both options must be non-zero for either to take effect. Default is 0. + Cap in microseconds on the per-row delay innodb_max_purge_lag applies to INSERT, UPDATE and DELETE. MySQL clamps the delay to this value unconditionally, so while this is 0 no delay is ever applied and innodb_max_purge_lag on its own does nothing. Both options must be non-zero for either to take effect. Default is 0. + """ + innodbOnlineAlterLogMaxSize: float | None = None + """ + (Number) The upper limit in bytes on the size of the temporary log files used during online DDL operations for InnoDB tables. + The upper limit in bytes on the size of the temporary log files used during online DDL operations for InnoDB tables. + """ + innodbOptimizeFulltextOnly: bool | None = None + """ + (Boolean) When enabled, OPTIMIZE TABLE on InnoDB tables only updates the FULLTEXT index instead of rebuilding the table. Intended to be enabled temporarily during FULLTEXT index maintenance and disabled afterwards; while enabled, OPTIMIZE TABLE does not reclaim table space. + When enabled, OPTIMIZE TABLE on InnoDB tables only updates the FULLTEXT index instead of rebuilding the table. Intended to be enabled temporarily during FULLTEXT index maintenance and disabled afterwards; while enabled, OPTIMIZE TABLE does not reclaim table space. + """ + innodbPrintAllDeadlocks: bool | None = None + """ + (Boolean) When enabled, information about all deadlocks in InnoDB user transactions is recorded in the error log. Disabled by default. + When enabled, information about all deadlocks in InnoDB user transactions is recorded in the error log. Disabled by default. + """ + innodbReadIoThreads: float | None = None + """ + (Number) The number of I/O threads for read operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service. + The number of I/O threads for read operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service. + """ + innodbRollbackOnTimeout: bool | None = None + """ + (Boolean) When enabled a transaction timeout causes InnoDB to abort and roll back the entire transaction. Changing this parameter will lead to a restart of the MySQL service. + When enabled a transaction timeout causes InnoDB to abort and roll back the entire transaction. Changing this parameter will lead to a restart of the MySQL service. + """ + innodbThreadConcurrency: float | None = None + """ + no limit). + Defines the maximum number of threads permitted inside of InnoDB. Default is 0 (infinite concurrency - no limit). + """ + innodbWriteIoThreads: float | None = None + """ + (Number) The number of I/O threads for write operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service. + The number of I/O threads for write operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service. + """ + interactiveTimeout: float | None = None + """ + (Number) The number of seconds the server waits for activity on an interactive connection before closing it. + The number of seconds the server waits for activity on an interactive connection before closing it. + """ + internalTmpMemStorageEngine: str | None = None + """ + memory internal temporary tables. + The storage engine for in-memory internal temporary tables. + """ + ipFilter: list[str] | None = None + """ + (List of String) IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + """ + logOutput: str | None = None + """ + (String) The slow log output destination when slow_query_log is ON. To enable MySQL AI Insights, choose INSIGHTS. To use MySQL AI Insights and the mysql.slow_log table at the same time, choose INSIGHTS,TABLE. To only use the mysql.slow_log table, choose TABLE. To silence slow logs, choose NONE. + The slow log output destination when slow_query_log is ON. To enable MySQL AI Insights, choose INSIGHTS. To use MySQL AI Insights and the mysql.slow_log table at the same time, choose INSIGHTS,TABLE. To only use the mysql.slow_log table, choose TABLE. To silence slow logs, choose NONE. + """ + longQueryTime: float | None = None + """ + (Number) The slow_query_logs work as SQL statements that take more than long_query_time seconds to execute. + The slow_query_logs work as SQL statements that take more than long_query_time seconds to execute. + """ + lowerCaseTableNames: float | None = None + """ + sensitive (default), 1 = names stored lowercase, comparisons are case-insensitive. This option can only be set when creating the service and cannot be changed later. See https://dev.mysql.com/doc/refman/8.0/en/identifier-case-sensitivity.html for details. + Sets how table and database names are stored and compared. 0 = case-sensitive (default), 1 = names stored lowercase, comparisons are case-insensitive. This option can only be set when creating the service and cannot be changed later. See https://dev.mysql.com/doc/refman/8.0/en/identifier-case-sensitivity.html for details. + """ + maxAllowedPacket: float | None = None + """ + (Number) Size of the largest message in bytes that can be received by the server. Default is 67108864 (64M). Statements and rows larger than this are rejected with a packet too large error. + Size of the largest message in bytes that can be received by the server. Default is 67108864 (64M). Statements and rows larger than this are rejected with a packet too large error. + """ + maxConnections: float | None = None + """ + (Number) The maximum permitted number of simultaneous client connections. Lower this to reserve memory for other work. The value cannot exceed the limit provided by your service plan. Upgrading the plan does not raise a value you have set explicitly, so increase it yourself after an upgrade. + The maximum permitted number of simultaneous client connections. Lower this to reserve memory for other work. The value cannot exceed the limit provided by your service plan. Upgrading the plan does not raise a value you have set explicitly, so increase it yourself after an upgrade. + """ + maxExecutionTime: float | None = None + """ + only top-level SELECT statements. 0 (the default) means no timeout. + Execution timeout in milliseconds for read-only top-level SELECT statements. 0 (the default) means no timeout. + """ + maxHeapTableSize: float | None = None + """ + memory tables. Also set tmp_table_size. Default is 16777216 (16M). + Limits the size of internal in-memory tables. Also set tmp_table_size. Default is 16777216 (16M). + """ + maxSeeksForKey: float | None = None + """ + (Number) Limit on the assumed maximum number of index seeks when looking up rows based on a key. Lowering this value causes the optimizer to prefer index lookups over table scans. + Limit on the assumed maximum number of index seeks when looking up rows based on a key. Lowering this value causes the optimizer to prefer index lookups over table scans. + """ + maxUserConnections: float | None = None + """ + account limit. Any other value must be at least 10 below max_connections, so that monitoring and your own admin sessions can still connect when an application saturates its own limit. Aiven's replication and management connections are unaffected however low you set this. + The maximum number of simultaneous connections permitted to any single user account. 0, the default, means no per-account limit. Any other value must be at least 10 below max_connections, so that monitoring and your own admin sessions can still connect when an application saturates its own limit. Aiven's replication and management connections are unaffected however low you set this. + """ + migration: Migration | None = None + """ + (Block List) Migrate data from existing server. (see below for nested schema) + Migrate data from existing server. + """ + mysqlIncrementalBackup: MysqlIncrementalBackup | None = None + """ + (Block List) MySQL incremental backup configuration. (see below for nested schema) + MySQL incremental backup configuration. + """ + netBufferLength: float | None = None + """ + (Number) Start sizes of connection buffer and result buffer. Default is 16384 (16K). Changing this parameter will lead to a restart of the MySQL service. + Start sizes of connection buffer and result buffer. Default is 16384 (16K). Changing this parameter will lead to a restart of the MySQL service. + """ + netReadTimeout: float | None = None + """ + (Number) The number of seconds to wait for more data from a connection before aborting the read. + The number of seconds to wait for more data from a connection before aborting the read. + """ + netWriteTimeout: float | None = None + """ + (Number) The number of seconds to wait for a block to be written to a connection before aborting the write. + The number of seconds to wait for a block to be written to a connection before aborting the write. + """ + optimizerPruneLevel: float | None = None + """ + promising partial plans from the optimizer search space. 0 disables heuristics (exhaustive search); 1 prunes plans based on the number of rows retrieved. + Controls the heuristics applied during query optimization to prune less-promising partial plans from the optimizer search space. 0 disables heuristics (exhaustive search); 1 prunes plans based on the number of rows retrieved. + """ + optimizerSearchDepth: float | None = None + """ + (Number) Maximum depth of search performed by the query optimizer when choosing a join order. Larger values produce better plans for joins over many tables but take longer to compile; 0 lets the optimizer choose the depth automatically. + Maximum depth of search performed by the query optimizer when choosing a join order. Larger values produce better plans for joins over many tables but take longer to compile; 0 lets the optimizer choose the depth automatically. + """ + optimizerSwitch: str | None = None + """ + separated list of optimizer flag assignments in the form flag=on|off|default, or the single value 'default' to reset all flags. Flags not listed keep their current values. Controls query optimizer behaviors such as index merge, hash join and semijoin strategies. + Comma-separated list of optimizer flag assignments in the form flag=on|off|default, or the single value 'default' to reset all flags. Flags not listed keep their current values. Controls query optimizer behaviors such as index merge, hash join and semijoin strategies. + """ + performanceSchemaEventsStatementsHistorySize: float | None = None + """ + (Number) The number of rows per thread in the events_statements_history table. Changing this parameter will lead to a restart of the MySQL service. + The number of rows per thread in the events_statements_history table. Changing this parameter will lead to a restart of the MySQL service. + """ + publicAccess: bool | None = None + """ + (Boolean) Public Access. Allow access to the service from the public Internet. + Public Access. Allow access to the service from the public Internet. + """ + publicAccessPrometheus: bool | None = None + """ + (Boolean) Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + """ + relayLogSpaceLimit: float | None = None + """ + log budget; ensure the service disk is sized accordingly. The setting applies only on the node replicating from the external source; standby nodes always use the Aiven-managed default (the smaller of 5 GiB and 30% of the service disk), which is also used when this option is left unset. Changing this parameter will lead to a restart of the MySQL service. + The maximum amount of space in bytes to use for all relay logs while replicating from an external migration source. When the limit is reached, the replication I/O thread stops fetching relay log events until the SQL thread has caught up. Raise this to give a large migration a bigger relay-log budget; ensure the service disk is sized accordingly. The setting applies only on the node replicating from the external source; standby nodes always use the Aiven-managed default (the smaller of 5 GiB and 30% of the service disk), which is also used when this option is left unset. Changing this parameter will lead to a restart of the MySQL service. + """ + serviceLog: bool | None = None + """ + (Boolean) Service logging. Store logs for the service so that they are available in the HTTP API and console. + Service logging. Store logs for the service so that they are available in the HTTP API and console. + """ + slowQueryLog: bool | None = None + """ + (Boolean) Slow query log enables capturing of slow queries. Setting slow_query_log to false also truncates the mysql.slow_log table. + Slow query log enables capturing of slow queries. Setting slow_query_log to false also truncates the mysql.slow_log table. + """ + sortBufferSize: float | None = None + """ + (Number) Sort buffer size in bytes for ORDER BY optimization. Default is 262144 (256K). Requests above 2% of the RAM provided by your service plan are rejected, because the buffer is allocated per session and its cost multiplies with the connection count. + Sort buffer size in bytes for ORDER BY optimization. Default is 262144 (256K). Requests above 2% of the RAM provided by your service plan are rejected, because the buffer is allocated per session and its cost multiplies with the connection count. + """ + sqlMode: str | None = None + """ + (String) Global SQL mode. Set to empty to use MySQL server defaults. When creating a new service and not setting this field Aiven default SQL mode (strict, SQL standard compliant) will be assigned. + Global SQL mode. Set to empty to use MySQL server defaults. When creating a new service and not setting this field Aiven default SQL mode (strict, SQL standard compliant) will be assigned. + """ + sqlRequirePrimaryKey: bool | None = None + """ + (Boolean) Require primary key to be defined for new tables or old tables modified with ALTER TABLE and fail if missing. It is recommended to always have primary keys because various functionality may break if any large table is missing them. + Require primary key to be defined for new tables or old tables modified with ALTER TABLE and fail if missing. It is recommended to always have primary keys because various functionality may break if any large table is missing them. + """ + tmpTableSize: float | None = None + """ + memory tables. Also set max_heap_table_size. Default is 16777216 (16M). + Limits the size of internal in-memory tables. Also set max_heap_table_size. Default is 16777216 (16M). + """ + version: str | None = None + """ + (String) MySQL major version. + MySQL major version. + """ + waitTimeout: float | None = None + """ + (Number) The number of seconds the server waits for activity on a noninteractive connection before closing it. Requests to set this below 30 are rejected, because a shorter timeout closes your own idle connections between statements. + The number of seconds the server waits for activity on a noninteractive connection before closing it. Requests to set this below 30 are rejected, because a shorter timeout closes your own idle connections between statements. + """ + windowingUseHighPrecision: bool | None = None + """ + (Boolean) Whether window functions are computed to high precision. Disabling this trades exactness for speed in window function evaluation. + Whether window functions are computed to high precision. Disabling this trades exactness for speed in window function evaluation. + """ + + +class ForProvider(BaseModel): + additionalDiskSpaceGib: float | None = None + """ + (Number, Deprecated) Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItem] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + plan: str | None = None + """ + (String, Deprecated) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans mysql. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans mysql`. + """ + planBackups: str | None = None + """ + (String) Backup tier for the database plan. + Backup tier for the database plan. + """ + planCompute: str | None = None + """ + (String) Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + """ + planNodeCount: float | None = None + """ + (Number) Number of nodes in the database plan. + Number of nodes in the database plan. + """ + planStorageGib: float | None = None + """ + (Number) Total storage per node in GiB. + Total storage per node in GiB. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + properties: Properties | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +class InitProvider(BaseModel): + additionalDiskSpaceGib: float | None = None + """ + (Number, Deprecated) Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItem] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + plan: str | None = None + """ + (String, Deprecated) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans mysql. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans mysql`. + """ + planBackups: str | None = None + """ + (String) Backup tier for the database plan. + Backup tier for the database plan. + """ + planCompute: str | None = None + """ + (String) Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + """ + planNodeCount: float | None = None + """ + (Number) Number of nodes in the database plan. + Number of nodes in the database plan. + """ + planStorageGib: float | None = None + """ + (Number) Total storage per node in GiB. + Total storage per node in GiB. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + properties: Properties | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 Component(BaseModel): + component: str | None = None + """ + (String) Component name. + Component name. + """ + host: str | None = None + """ + (String) Hostname or IP address of the server where to migrate data from. + Hostname of the component + """ + port: float | None = None + """ + (Number) Port number of the server where to migrate data from. + Port number of the component + """ + route: str | None = None + """ + (String) Component network route type + Component network route type + """ + usage: str | None = None + """ + (String) Usage of the component + Usage of the component + """ + + +class NetworkItemModel(BaseModel): + family: str | None = None + """ + (String) Network family. Currently only IPv4 is supported. + Network family. Currently only `IPv4` is supported. + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + The name of the network. Must be unique within the service. + """ + type: str | None = None + """ + (String) Type of the managed database instance + The type of the network. Must be private. + """ + uuid: str | None = None + """ + (String) Private network UUID. Must reside in the same zone as the database. + Private network UUID. Must reside in the same zone as the database. + """ + + +class NodeState(BaseModel): + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name plus a node iteration + """ + role: str | None = None + """ + (String) Role of the node + Role of the node + """ + state: str | None = None + """ + (String) The current state of the service + Current state of the node + """ + + +class MigrationModel(BaseModel): + dbname: str | None = None + """ + (String) Database name for bootstrapping the initial connection. + Database name for bootstrapping the initial connection. + """ + dumpTool: str | None = None + """ + (String) MySQL migration dump tool. Experimental! Tool to use for database dump and restore during migration. Default: mysqldump. + MySQL migration dump tool. Experimental! Tool to use for database dump and restore during migration. Default: mysqldump. + """ + host: str | None = None + """ + (String) Hostname or IP address of the server where to migrate data from. + Hostname or IP address of the server where to migrate data from. + """ + ignoreDbs: str | None = None + """ + separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + """ + ignoreRoles: str | None = None + """ + separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + """ + method: str | None = None + """ + (String) The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + """ + port: float | None = None + """ + (Number) Port number of the server where to migrate data from. + Port number of the server where to migrate data from. + """ + reestablishReplication: bool | None = None + """ + restore part and start replication. + Skip dump-restore part and start replication. + """ + ssl: bool | None = None + """ + (Boolean) The server where to migrate data from is secured with SSL. + The server where to migrate data from is secured with SSL. + """ + username: str | None = None + """ + (String) User name for authentication with the server where to migrate data from. + User name for authentication with the server where to migrate data from. + """ + + +class PropertiesModel(BaseModel): + adminUsername: str | None = None + """ + (String) Custom username for admin user. This must be set only when a new service is being created. + Custom username for admin user. This must be set only when a new service is being created. + """ + automaticSpPrivileges: bool | None = None + """ + (Boolean) When enabled, the server automatically grants the EXECUTE and ALTER ROUTINE privileges to the creator of a stored routine and drops them when the routine is dropped. + When enabled, the server automatically grants the EXECUTE and ALTER ROUTINE privileges to the creator of a stored routine and drops them when the routine is dropped. + """ + automaticUtilityNetworkIpFilter: bool | None = None + """ + (Boolean) Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + """ + backupHour: float | None = None + """ + (Number) The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed. + The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed. + """ + backupMinute: float | None = None + """ + (Number) The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed. + The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed. + """ + binlogRetentionPeriod: float | None = None + """ + traffic window rather than dropping it drastically in one step. + The minimum amount of time in seconds to keep binlog entries before deletion. This may be extended for services that require binlog entries for longer than the default for example if using the MySQL Debezium Kafka connector. Warning: reducing this value can make a large batch of binary logs eligible for purge at once. Depending on the volume, this can sometimes stall the MySQL commit path and block writes until the purge completes. To stay on the safe side, prefer lowering the value gradually in small decrements during a low-traffic window rather than dropping it drastically in one step. + """ + connectTimeout: float | None = None + """ + (Number) The number of seconds that the mysqld server waits for a connect packet before responding with Bad handshake. + The number of seconds that the mysqld server waits for a connect packet before responding with Bad handshake. + """ + defaultTimeZone: str | None = None + """ + 12:00 to +12:00), a time zone name, or 'SYSTEM' to use the MySQL server default. + Default server time zone as an offset from UTC (from -12:00 to +12:00), a time zone name, or 'SYSTEM' to use the MySQL server default. + """ + divPrecisionIncrement: float | None = None + """ + (Number) Number of digits by which to increase the scale of the result of division operations performed with the / operator. Default is 4. + Number of digits by which to increase the scale of the result of division operations performed with the / operator. Default is 4. + """ + endMarkersInJson: bool | None = None + """ + (Boolean) Whether optimizer JSON output such as EXPLAIN FORMAT=JSON adds end markers that repeat a structure's key near its closing bracket, making large JSON structures easier to read. + Whether optimizer JSON output such as EXPLAIN FORMAT=JSON adds end markers that repeat a structure's key near its closing bracket, making large JSON structures easier to read. + """ + eqRangeIndexDiveLimit: float | None = None + """ + (Number) The number of equality ranges in a query at or above which the optimizer switches from index dives to index statistics when estimating the number of qualifying rows. 0 means always use index dives. Default is 200. + The number of equality ranges in a query at or above which the optimizer switches from index dives to index statistics when estimating the number of qualifying rows. 0 means always use index dives. Default is 200. + """ + groupConcatMaxLen: float | None = None + """ + (Number) The maximum permitted result length in bytes for the GROUP_CONCAT() function. + The maximum permitted result length in bytes for the GROUP_CONCAT() function. + """ + informationSchemaStatsExpiry: float | None = None + """ + (Number) The time, in seconds, before cached statistics expire. + The time, in seconds, before cached statistics expire. + """ + innodbAdaptiveHashIndex: bool | None = None + """ + dependent: it speeds up lookups for some workloads but its internal latch can become a contention point under high concurrency, in which case disabling it can improve throughput. + Whether InnoDB adaptive hash indexing is enabled. The optimal setting is workload-dependent: it speeds up lookups for some workloads but its internal latch can become a contention point under high concurrency, in which case disabling it can improve throughput. + """ + innodbChangeBufferMaxSize: float | None = None + """ + (Number) Maximum size for the InnoDB change buffer, as a percentage of the total size of the buffer pool. Default is 25. + Maximum size for the InnoDB change buffer, as a percentage of the total size of the buffer pool. Default is 25. + """ + innodbFlushNeighbors: float | None = None + """ + dirty pages in the same extent are not flushed, 1 - flush contiguous dirty pages in the same extent, 2 - flush dirty pages in the same extent. + Specifies whether flushing a page from the InnoDB buffer pool also flushes other dirty pages in the same extent (default is 1): 0 - dirty pages in the same extent are not flushed, 1 - flush contiguous dirty pages in the same extent, 2 - flush dirty pages in the same extent. + """ + innodbFtEnableStopword: bool | None = None + """ + (Boolean) Whether stopword processing is applied when creating or rebuilding an InnoDB FULLTEXT index. Enabled by default. + Whether stopword processing is applied when creating or rebuilding an InnoDB FULLTEXT index. Enabled by default. + """ + innodbFtMaxTokenSize: float | None = None + """ + (Number) Maximum length of words that are stored in an InnoDB FULLTEXT index. Changing this parameter will lead to a restart of the MySQL service. + Maximum length of words that are stored in an InnoDB FULLTEXT index. Changing this parameter will lead to a restart of the MySQL service. + """ + innodbFtMinTokenSize: float | None = None + """ + (Number) Minimum length of words that are stored in an InnoDB FULLTEXT index. Changing this parameter will lead to a restart of the MySQL service. + Minimum length of words that are stored in an InnoDB FULLTEXT index. Changing this parameter will lead to a restart of the MySQL service. + """ + innodbFtNumWordOptimize: float | None = None + """ + (Number) Number of words processed during each OPTIMIZE TABLE operation on an InnoDB FULLTEXT index. Default is 2000. + Number of words processed during each OPTIMIZE TABLE operation on an InnoDB FULLTEXT index. Default is 2000. + """ + innodbFtResultCacheLimit: float | None = None + """ + (Number) Maximum memory in bytes used per query for the InnoDB FULLTEXT search query result cache. Aiven sizes this automatically based on the service plan's memory; setting a value overrides the calculated default. + Maximum memory in bytes used per query for the InnoDB FULLTEXT search query result cache. Aiven sizes this automatically based on the service plan's memory; setting a value overrides the calculated default. + """ + innodbFtServerStopwordTable: str | None = None + """ + (String) This option is used to specify your own InnoDB FULLTEXT index stopword list for all InnoDB tables. + This option is used to specify your own InnoDB FULLTEXT index stopword list for all InnoDB tables. + """ + innodbFtUserStopwordTable: str | None = None + """ + (String) This option is used to specify your own InnoDB FULLTEXT index stopword list for specific InnoDB tables. + This option is used to specify your own InnoDB FULLTEXT index stopword list for specific InnoDB tables. + """ + innodbIoCapacity: float | None = None + """ + (Number) The number of I/O operations per second (IOPS) available to InnoDB background tasks, such as flushing pages from the buffer pool and merging data from the change buffer. Set this to a value appropriate for the underlying storage; it must not exceed innodb_io_capacity_max. + The number of I/O operations per second (IOPS) available to InnoDB background tasks, such as flushing pages from the buffer pool and merging data from the change buffer. Set this to a value appropriate for the underlying storage; it must not exceed innodb_io_capacity_max. + """ + innodbIoCapacityMax: float | None = None + """ + (Number) The maximum number of I/O operations per second (IOPS) that InnoDB background tasks may perform when flushing falls behind. Defaults to twice innodb_io_capacity (minimum 2000). This must be greater than or equal to innodb_io_capacity. + The maximum number of I/O operations per second (IOPS) that InnoDB background tasks may perform when flushing falls behind. Defaults to twice innodb_io_capacity (minimum 2000). This must be greater than or equal to innodb_io_capacity. + """ + innodbLockWaitTimeout: float | None = None + """ + (Number) The length of time in seconds an InnoDB transaction waits for a row lock before giving up. Default is 120. + The length of time in seconds an InnoDB transaction waits for a row lock before giving up. Default is 120. + """ + innodbLogBufferSize: float | None = None + """ + (Number) The size in bytes of the buffer that InnoDB uses to write to the log files on disk. Requests above 15% of the RAM provided by your service plan are rejected, because a larger buffer leaves less memory for the buffer pool and client connections. + The size in bytes of the buffer that InnoDB uses to write to the log files on disk. Requests above 15% of the RAM provided by your service plan are rejected, because a larger buffer leaves less memory for the buffer pool and client connections. + """ + innodbMaxDirtyPagesPct: float | None = None + """ + (Number) Percentage of dirty pages in the InnoDB buffer pool at which InnoDB starts flushing aggressively. Lowering it spreads write I/O more evenly and shortens crash recovery, at the cost of flushing pages that might have been modified again. Must stay at or above innodb_max_dirty_pages_pct_lwm. Default is 90. + Percentage of dirty pages in the InnoDB buffer pool at which InnoDB starts flushing aggressively. Lowering it spreads write I/O more evenly and shortens crash recovery, at the cost of flushing pages that might have been modified again. Must stay at or above innodb_max_dirty_pages_pct_lwm. Default is 90. + """ + innodbMaxDirtyPagesPctLwm: float | None = None + """ + flushing, to keep the dirty page ratio from reaching innodb_max_dirty_pages_pct. 0 turns pre-flushing off. Cannot be set above innodb_max_dirty_pages_pct. Default is 10. + Percentage of dirty pages in the InnoDB buffer pool at which InnoDB starts pre-flushing, to keep the dirty page ratio from reaching innodb_max_dirty_pages_pct. 0 turns pre-flushing off. Cannot be set above innodb_max_dirty_pages_pct. Default is 10. + """ + innodbMaxPurgeLag: float | None = None + """ + (Number) Number of outstanding transactions the InnoDB purge operation may fall behind by before INSERT, UPDATE and DELETE are delayed to let it catch up. The delay applies per row and grows with the lag, and it is capped by innodb_max_purge_lag_delay, which has to be set as well for this option to have any effect. Default is 0, which never delays anything. + Number of outstanding transactions the InnoDB purge operation may fall behind by before INSERT, UPDATE and DELETE are delayed to let it catch up. The delay applies per row and grows with the lag, and it is capped by innodb_max_purge_lag_delay, which has to be set as well for this option to have any effect. Default is 0, which never delays anything. + """ + innodbMaxPurgeLagDelay: float | None = None + """ + row delay innodb_max_purge_lag applies to INSERT, UPDATE and DELETE. MySQL clamps the delay to this value unconditionally, so while this is 0 no delay is ever applied and innodb_max_purge_lag on its own does nothing. Both options must be non-zero for either to take effect. Default is 0. + Cap in microseconds on the per-row delay innodb_max_purge_lag applies to INSERT, UPDATE and DELETE. MySQL clamps the delay to this value unconditionally, so while this is 0 no delay is ever applied and innodb_max_purge_lag on its own does nothing. Both options must be non-zero for either to take effect. Default is 0. + """ + innodbOnlineAlterLogMaxSize: float | None = None + """ + (Number) The upper limit in bytes on the size of the temporary log files used during online DDL operations for InnoDB tables. + The upper limit in bytes on the size of the temporary log files used during online DDL operations for InnoDB tables. + """ + innodbOptimizeFulltextOnly: bool | None = None + """ + (Boolean) When enabled, OPTIMIZE TABLE on InnoDB tables only updates the FULLTEXT index instead of rebuilding the table. Intended to be enabled temporarily during FULLTEXT index maintenance and disabled afterwards; while enabled, OPTIMIZE TABLE does not reclaim table space. + When enabled, OPTIMIZE TABLE on InnoDB tables only updates the FULLTEXT index instead of rebuilding the table. Intended to be enabled temporarily during FULLTEXT index maintenance and disabled afterwards; while enabled, OPTIMIZE TABLE does not reclaim table space. + """ + innodbPrintAllDeadlocks: bool | None = None + """ + (Boolean) When enabled, information about all deadlocks in InnoDB user transactions is recorded in the error log. Disabled by default. + When enabled, information about all deadlocks in InnoDB user transactions is recorded in the error log. Disabled by default. + """ + innodbReadIoThreads: float | None = None + """ + (Number) The number of I/O threads for read operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service. + The number of I/O threads for read operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service. + """ + innodbRollbackOnTimeout: bool | None = None + """ + (Boolean) When enabled a transaction timeout causes InnoDB to abort and roll back the entire transaction. Changing this parameter will lead to a restart of the MySQL service. + When enabled a transaction timeout causes InnoDB to abort and roll back the entire transaction. Changing this parameter will lead to a restart of the MySQL service. + """ + innodbThreadConcurrency: float | None = None + """ + no limit). + Defines the maximum number of threads permitted inside of InnoDB. Default is 0 (infinite concurrency - no limit). + """ + innodbWriteIoThreads: float | None = None + """ + (Number) The number of I/O threads for write operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service. + The number of I/O threads for write operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service. + """ + interactiveTimeout: float | None = None + """ + (Number) The number of seconds the server waits for activity on an interactive connection before closing it. + The number of seconds the server waits for activity on an interactive connection before closing it. + """ + internalTmpMemStorageEngine: str | None = None + """ + memory internal temporary tables. + The storage engine for in-memory internal temporary tables. + """ + ipFilter: list[str] | None = None + """ + (List of String) IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + """ + logOutput: str | None = None + """ + (String) The slow log output destination when slow_query_log is ON. To enable MySQL AI Insights, choose INSIGHTS. To use MySQL AI Insights and the mysql.slow_log table at the same time, choose INSIGHTS,TABLE. To only use the mysql.slow_log table, choose TABLE. To silence slow logs, choose NONE. + The slow log output destination when slow_query_log is ON. To enable MySQL AI Insights, choose INSIGHTS. To use MySQL AI Insights and the mysql.slow_log table at the same time, choose INSIGHTS,TABLE. To only use the mysql.slow_log table, choose TABLE. To silence slow logs, choose NONE. + """ + longQueryTime: float | None = None + """ + (Number) The slow_query_logs work as SQL statements that take more than long_query_time seconds to execute. + The slow_query_logs work as SQL statements that take more than long_query_time seconds to execute. + """ + lowerCaseTableNames: float | None = None + """ + sensitive (default), 1 = names stored lowercase, comparisons are case-insensitive. This option can only be set when creating the service and cannot be changed later. See https://dev.mysql.com/doc/refman/8.0/en/identifier-case-sensitivity.html for details. + Sets how table and database names are stored and compared. 0 = case-sensitive (default), 1 = names stored lowercase, comparisons are case-insensitive. This option can only be set when creating the service and cannot be changed later. See https://dev.mysql.com/doc/refman/8.0/en/identifier-case-sensitivity.html for details. + """ + maxAllowedPacket: float | None = None + """ + (Number) Size of the largest message in bytes that can be received by the server. Default is 67108864 (64M). Statements and rows larger than this are rejected with a packet too large error. + Size of the largest message in bytes that can be received by the server. Default is 67108864 (64M). Statements and rows larger than this are rejected with a packet too large error. + """ + maxConnections: float | None = None + """ + (Number) The maximum permitted number of simultaneous client connections. Lower this to reserve memory for other work. The value cannot exceed the limit provided by your service plan. Upgrading the plan does not raise a value you have set explicitly, so increase it yourself after an upgrade. + The maximum permitted number of simultaneous client connections. Lower this to reserve memory for other work. The value cannot exceed the limit provided by your service plan. Upgrading the plan does not raise a value you have set explicitly, so increase it yourself after an upgrade. + """ + maxExecutionTime: float | None = None + """ + only top-level SELECT statements. 0 (the default) means no timeout. + Execution timeout in milliseconds for read-only top-level SELECT statements. 0 (the default) means no timeout. + """ + maxHeapTableSize: float | None = None + """ + memory tables. Also set tmp_table_size. Default is 16777216 (16M). + Limits the size of internal in-memory tables. Also set tmp_table_size. Default is 16777216 (16M). + """ + maxSeeksForKey: float | None = None + """ + (Number) Limit on the assumed maximum number of index seeks when looking up rows based on a key. Lowering this value causes the optimizer to prefer index lookups over table scans. + Limit on the assumed maximum number of index seeks when looking up rows based on a key. Lowering this value causes the optimizer to prefer index lookups over table scans. + """ + maxUserConnections: float | None = None + """ + account limit. Any other value must be at least 10 below max_connections, so that monitoring and your own admin sessions can still connect when an application saturates its own limit. Aiven's replication and management connections are unaffected however low you set this. + The maximum number of simultaneous connections permitted to any single user account. 0, the default, means no per-account limit. Any other value must be at least 10 below max_connections, so that monitoring and your own admin sessions can still connect when an application saturates its own limit. Aiven's replication and management connections are unaffected however low you set this. + """ + migration: MigrationModel | None = None + """ + (Block List) Migrate data from existing server. (see below for nested schema) + Migrate data from existing server. + """ + mysqlIncrementalBackup: MysqlIncrementalBackup | None = None + """ + (Block List) MySQL incremental backup configuration. (see below for nested schema) + MySQL incremental backup configuration. + """ + netBufferLength: float | None = None + """ + (Number) Start sizes of connection buffer and result buffer. Default is 16384 (16K). Changing this parameter will lead to a restart of the MySQL service. + Start sizes of connection buffer and result buffer. Default is 16384 (16K). Changing this parameter will lead to a restart of the MySQL service. + """ + netReadTimeout: float | None = None + """ + (Number) The number of seconds to wait for more data from a connection before aborting the read. + The number of seconds to wait for more data from a connection before aborting the read. + """ + netWriteTimeout: float | None = None + """ + (Number) The number of seconds to wait for a block to be written to a connection before aborting the write. + The number of seconds to wait for a block to be written to a connection before aborting the write. + """ + optimizerPruneLevel: float | None = None + """ + promising partial plans from the optimizer search space. 0 disables heuristics (exhaustive search); 1 prunes plans based on the number of rows retrieved. + Controls the heuristics applied during query optimization to prune less-promising partial plans from the optimizer search space. 0 disables heuristics (exhaustive search); 1 prunes plans based on the number of rows retrieved. + """ + optimizerSearchDepth: float | None = None + """ + (Number) Maximum depth of search performed by the query optimizer when choosing a join order. Larger values produce better plans for joins over many tables but take longer to compile; 0 lets the optimizer choose the depth automatically. + Maximum depth of search performed by the query optimizer when choosing a join order. Larger values produce better plans for joins over many tables but take longer to compile; 0 lets the optimizer choose the depth automatically. + """ + optimizerSwitch: str | None = None + """ + separated list of optimizer flag assignments in the form flag=on|off|default, or the single value 'default' to reset all flags. Flags not listed keep their current values. Controls query optimizer behaviors such as index merge, hash join and semijoin strategies. + Comma-separated list of optimizer flag assignments in the form flag=on|off|default, or the single value 'default' to reset all flags. Flags not listed keep their current values. Controls query optimizer behaviors such as index merge, hash join and semijoin strategies. + """ + performanceSchemaEventsStatementsHistorySize: float | None = None + """ + (Number) The number of rows per thread in the events_statements_history table. Changing this parameter will lead to a restart of the MySQL service. + The number of rows per thread in the events_statements_history table. Changing this parameter will lead to a restart of the MySQL service. + """ + publicAccess: bool | None = None + """ + (Boolean) Public Access. Allow access to the service from the public Internet. + Public Access. Allow access to the service from the public Internet. + """ + publicAccessPrometheus: bool | None = None + """ + (Boolean) Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + """ + relayLogSpaceLimit: float | None = None + """ + log budget; ensure the service disk is sized accordingly. The setting applies only on the node replicating from the external source; standby nodes always use the Aiven-managed default (the smaller of 5 GiB and 30% of the service disk), which is also used when this option is left unset. Changing this parameter will lead to a restart of the MySQL service. + The maximum amount of space in bytes to use for all relay logs while replicating from an external migration source. When the limit is reached, the replication I/O thread stops fetching relay log events until the SQL thread has caught up. Raise this to give a large migration a bigger relay-log budget; ensure the service disk is sized accordingly. The setting applies only on the node replicating from the external source; standby nodes always use the Aiven-managed default (the smaller of 5 GiB and 30% of the service disk), which is also used when this option is left unset. Changing this parameter will lead to a restart of the MySQL service. + """ + serviceLog: bool | None = None + """ + (Boolean) Service logging. Store logs for the service so that they are available in the HTTP API and console. + Service logging. Store logs for the service so that they are available in the HTTP API and console. + """ + slowQueryLog: bool | None = None + """ + (Boolean) Slow query log enables capturing of slow queries. Setting slow_query_log to false also truncates the mysql.slow_log table. + Slow query log enables capturing of slow queries. Setting slow_query_log to false also truncates the mysql.slow_log table. + """ + sortBufferSize: float | None = None + """ + (Number) Sort buffer size in bytes for ORDER BY optimization. Default is 262144 (256K). Requests above 2% of the RAM provided by your service plan are rejected, because the buffer is allocated per session and its cost multiplies with the connection count. + Sort buffer size in bytes for ORDER BY optimization. Default is 262144 (256K). Requests above 2% of the RAM provided by your service plan are rejected, because the buffer is allocated per session and its cost multiplies with the connection count. + """ + sqlMode: str | None = None + """ + (String) Global SQL mode. Set to empty to use MySQL server defaults. When creating a new service and not setting this field Aiven default SQL mode (strict, SQL standard compliant) will be assigned. + Global SQL mode. Set to empty to use MySQL server defaults. When creating a new service and not setting this field Aiven default SQL mode (strict, SQL standard compliant) will be assigned. + """ + sqlRequirePrimaryKey: bool | None = None + """ + (Boolean) Require primary key to be defined for new tables or old tables modified with ALTER TABLE and fail if missing. It is recommended to always have primary keys because various functionality may break if any large table is missing them. + Require primary key to be defined for new tables or old tables modified with ALTER TABLE and fail if missing. It is recommended to always have primary keys because various functionality may break if any large table is missing them. + """ + tmpTableSize: float | None = None + """ + memory tables. Also set max_heap_table_size. Default is 16777216 (16M). + Limits the size of internal in-memory tables. Also set max_heap_table_size. Default is 16777216 (16M). + """ + version: str | None = None + """ + (String) MySQL major version. + MySQL major version. + """ + waitTimeout: float | None = None + """ + (Number) The number of seconds the server waits for activity on a noninteractive connection before closing it. Requests to set this below 30 are rejected, because a shorter timeout closes your own idle connections between statements. + The number of seconds the server waits for activity on a noninteractive connection before closing it. Requests to set this below 30 are rejected, because a shorter timeout closes your own idle connections between statements. + """ + windowingUseHighPrecision: bool | None = None + """ + (Boolean) Whether window functions are computed to high precision. Disabling this trades exactness for speed in window function evaluation. + Whether window functions are computed to high precision. Disabling this trades exactness for speed in window function evaluation. + """ + + +class AtProvider(BaseModel): + additionalDiskSpaceGib: float | None = None + """ + (Number, Deprecated) Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + """ + components: list[Component] | None = None + """ + (Attributes List) Service component information (see below for nested schema) + """ + id: str | None = None + """ + (String) UUID of the database. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItemModel] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + nodeStates: list[NodeState] | None = None + """ + (Attributes List) Information about nodes providing the managed service (see below for nested schema) + """ + plan: str | None = None + """ + (String, Deprecated) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans mysql. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans mysql`. + """ + planBackups: str | None = None + """ + (String) Backup tier for the database plan. + Backup tier for the database plan. + """ + planCompute: str | None = None + """ + (String) Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + """ + planNodeCount: float | None = None + """ + (Number) Number of nodes in the database plan. + Number of nodes in the database plan. + """ + planStorageGib: float | None = None + """ + (Number) Total storage per node in GiB. + Total storage per node in GiB. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + primaryDatabase: str | None = None + """ + (String) Primary database name + Primary database name + """ + properties: PropertiesModel | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + serviceHost: str | None = None + """ + (String) Hostname to the service instance + Hostname to the service instance + """ + servicePort: str | None = None + """ + (String) Port to the service instance + Port to the service instance + """ + serviceUsername: str | None = None + """ + (String) Primary username to the service instance + Primary username to the service instance + """ + state: str | None = None + """ + (String) The current state of the service + The current state of the service + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + type: str | None = None + """ + (String) Type of the managed database instance + Type of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 ManagedDatabaseMysql(BaseModel): + apiVersion: Literal['database.m.upcloud.com/v1alpha1'] | None = ( + 'database.m.upcloud.com/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['ManagedDatabaseMysql'] | None = 'ManagedDatabaseMysql' + """ + 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 + """ + ManagedDatabaseMysqlSpec defines the desired state of ManagedDatabaseMysql + """ + status: Status | None = None + """ + ManagedDatabaseMysqlStatus defines the observed state of ManagedDatabaseMysql. + """ + + +class ManagedDatabaseMysqlList(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[ManagedDatabaseMysql] + """ + List of manageddatabasemysqls. 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/com/upcloud/m/database/manageddatabaseopensearch/__init__.py b/schemas/python/models/com/upcloud/m/database/manageddatabaseopensearch/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/database/manageddatabaseopensearch/v1alpha1.py b/schemas/python/models/com/upcloud/m/database/manageddatabaseopensearch/v1alpha1.py new file mode 100644 index 000000000..d7f105ea9 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/database/manageddatabaseopensearch/v1alpha1.py @@ -0,0 +1,2162 @@ +# generated by datamodel-codegen: +# filename: workdir/database_m_upcloud_com_v1alpha1_manageddatabaseopensearch.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 UuidRef(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 UuidSelector(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 NetworkItem(BaseModel): + family: str | None = None + """ + (String) Network family. Currently only IPv4 is supported. + Network family. Currently only `IPv4` is supported. + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + The name of the network. Must be unique within the service. + """ + type: str | None = None + """ + (String) Type of the managed database instance + The type of the network. Must be private. + """ + uuid: str | None = None + """ + (String) Private network UUID. Must reside in the same zone as the database. + Private network UUID. Must reside in the same zone as the database. + """ + uuidRef: UuidRef | None = None + """ + Reference to a Network in network to populate uuid. + """ + uuidSelector: UuidSelector | None = None + """ + Selector for a Network in network to populate uuid. + """ + + +class InternalAuthenticationBackendLimiting(BaseModel): + allowedTries: float | None = None + """ + (Number) The number of login attempts allowed before login is blocked. + The number of login attempts allowed before login is blocked. + """ + authenticationBackend: str | None = None + """ + (String) The internal backend. Enter internal. + The internal backend. Enter `internal`. + """ + blockExpirySeconds: float | None = None + """ + (Number) The duration of time that login remains blocked after a failed login. + The duration of time that login remains blocked after a failed login. + """ + maxBlockedClients: float | None = None + """ + (Number) The maximum number of blocked IP addresses. + The maximum number of blocked IP addresses. + """ + maxTrackedClients: float | None = None + """ + (Number) The maximum number of tracked IP addresses that have failed login. + The maximum number of tracked IP addresses that have failed login. + """ + timeWindowSeconds: float | None = None + """ + (Number) The window of time in which the value for allowed_tries is enforced. + The window of time in which the value for `allowed_tries` is enforced. + """ + type: str | None = None + """ + (String) Type of the managed database instance + The type of rate limiting. + """ + + +class AuthFailureListeners(BaseModel): + internalAuthenticationBackendLimiting: ( + InternalAuthenticationBackendLimiting | None + ) = None + """ + (Block List) (see below for nested schema) + """ + + +class ClusterRemoteStore(BaseModel): + stateGlobalMetadataUploadTimeout: str | None = None + """ + (String) The amount of time to wait for the cluster state upload to complete. The amount of time to wait for the cluster state upload to complete. Defaults to 20s. + The amount of time to wait for the cluster state upload to complete. The amount of time to wait for the cluster state upload to complete. Defaults to 20s. + """ + stateMetadataManifestUploadTimeout: str | None = None + """ + (String) The amount of time to wait for the manifest file upload to complete. The amount of time to wait for the manifest file upload to complete. The manifest file contains the details of each of the files uploaded for a single cluster state, both index metadata files and global metadata files. Defaults to 20s. + The amount of time to wait for the manifest file upload to complete. The amount of time to wait for the manifest file upload to complete. The manifest file contains the details of each of the files uploaded for a single cluster state, both index metadata files and global metadata files. Defaults to 20s. + """ + translogBufferInterval: str | None = None + """ + (String) The default value of the translog buffer interval. The default value of the translog buffer interval used when performing periodic translog updates. This setting is only effective when the index setting index.remote_store.translog.buffer_interval is not present. Defaults to 650ms. + The default value of the translog buffer interval. The default value of the translog buffer interval used when performing periodic translog updates. This setting is only effective when the index setting `index.remote_store.translog.buffer_interval` is not present. Defaults to 650ms. + """ + translogMaxReaders: float | None = None + """ + backed indexes. Sets the maximum number of open translog files for remote-backed indexes. This limits the total number of translog files per shard. After reaching this limit, the remote store flushes the translog files. Default is 1000. The minimum required is 100. + The maximum number of open translog files for remote-backed indexes. Sets the maximum number of open translog files for remote-backed indexes. This limits the total number of translog files per shard. After reaching this limit, the remote store flushes the translog files. Default is 1000. The minimum required is 100. + """ + + +class Threshold(BaseModel): + debug: str | None = None + """ + 1. Default is -1. + Debug threshold for total request took time. The value should be in the form count and unit, where unit one of (s,m,h,d,nanos,ms,micros) or -1. Default is -1. + """ + info: str | None = None + """ + 1. Default is -1. + Info threshold for total request took time. The value should be in the form count and unit, where unit one of (s,m,h,d,nanos,ms,micros) or -1. Default is -1. + """ + trace: str | None = None + """ + 1. Default is -1. + Trace threshold for total request took time. The value should be in the form count and unit, where unit one of (s,m,h,d,nanos,ms,micros) or -1. Default is -1. + """ + warn: str | None = None + """ + 1. Default is -1. + Warning threshold for total request took time. The value should be in the form count and unit, where unit one of (s,m,h,d,nanos,ms,micros) or -1. Default is -1. + """ + + +class ClusterSearchRequestSlowlog(BaseModel): + level: str | None = None + """ + (String) Log level. + Log level. + """ + threshold: Threshold | None = None + """ + (Block List) (see below for nested schema) + """ + + +class DiskWatermarks(BaseModel): + floodStage: float | None = None + """ + (Number) Flood stage watermark (percentage). The flood stage watermark for disk usage. + Flood stage watermark (percentage). The flood stage watermark for disk usage. + """ + high: float | None = None + """ + (Number) High watermark (percentage). The high watermark for disk usage. + High watermark (percentage). The high watermark for disk usage. + """ + low: float | None = None + """ + (Number) Low watermark (percentage). The low watermark for disk usage. + Low watermark (percentage). The low watermark for disk usage. + """ + + +class EmailSenderPasswordSecretRef(BaseModel): + key: str + name: str + """ + Name of the secret. + """ + + +class IndexRollup(BaseModel): + rollupDashboardsEnabled: bool | None = None + """ + (Boolean) plugins.rollup.dashboards.enabled. Whether rollups are enabled in OpenSearch Dashboards. Defaults to true. + plugins.rollup.dashboards.enabled. Whether rollups are enabled in OpenSearch Dashboards. Defaults to true. + """ + rollupEnabled: bool | None = None + """ + (Boolean) plugins.rollup.enabled. Whether the rollup plugin is enabled. Defaults to true. + plugins.rollup.enabled. Whether the rollup plugin is enabled. Defaults to true. + """ + rollupSearchBackoffCount: float | None = None + """ + (Number) plugins.rollup.search.backoff_count. How many retries the plugin should attempt for failed rollup jobs. Defaults to 5. + plugins.rollup.search.backoff_count. How many retries the plugin should attempt for failed rollup jobs. Defaults to 5. + """ + rollupSearchBackoffMillis: float | None = None + """ + (Number) plugins.rollup.search.backoff_millis. The backoff time between retries for failed rollup jobs. Defaults to 1000ms. + plugins.rollup.search.backoff_millis. The backoff time between retries for failed rollup jobs. Defaults to 1000ms. + """ + rollupSearchSearchAllJobs: bool | None = None + """ + (Boolean) plugins.rollup.search.all_jobs. Whether OpenSearch should return all jobs that match all specified search terms. If disabled, OpenSearch returns just one, as opposed to all, of the jobs that matches the search terms. Defaults to false. + plugins.rollup.search.all_jobs. Whether OpenSearch should return all jobs that match all specified search terms. If disabled, OpenSearch returns just one, as opposed to all, of the jobs that matches the search terms. Defaults to false. + """ + + +class IndexTemplate(BaseModel): + mappingNestedObjectsLimit: float | None = None + """ + (Number) (DEPRECATED) index.mapping.nested_objects.limit. The maximum number of nested JSON objects that a single document can contain across all nested types. This limit helps to prevent out of memory errors when a document contains too many nested objects. Default is 10000. Deprecated, use an index template instead. + (DEPRECATED) index.mapping.nested_objects.limit. The maximum number of nested JSON objects that a single document can contain across all nested types. This limit helps to prevent out of memory errors when a document contains too many nested objects. Default is 10000. Deprecated, use an index template instead. + """ + numberOfReplicas: float | None = None + """ + (Number) The number of replicas each primary shard has. Deprecated, use an index template instead. + The number of replicas each primary shard has. Deprecated, use an index template instead. + """ + numberOfShards: float | None = None + """ + (Number) The number of primary shards that an index should have. Deprecated, use an index template instead. + The number of primary shards that an index should have. Deprecated, use an index template instead. + """ + + +class Jwt(BaseModel): + enabled: bool | None = None + """ + based authentication for OpenSearch. When enabled, users can authenticate using JWT tokens. + Enable or disable OpenSearch JWT authentication. Enables or disables JWT-based authentication for OpenSearch. When enabled, users can authenticate using JWT tokens. + """ + jwtClockSkewToleranceSeconds: float | None = None + """ + (Number) JWT clock skew tolerance in seconds. The maximum allowed time difference in seconds between the JWT issuer's clock and the OpenSearch server's clock. This helps prevent token validation failures due to minor time synchronization issues. + JWT clock skew tolerance in seconds. The maximum allowed time difference in seconds between the JWT issuer's clock and the OpenSearch server's clock. This helps prevent token validation failures due to minor time synchronization issues. + """ + jwtHeader: str | None = None + """ + (String) HTTP header name for JWT token. The HTTP header name where the JWT token is transmitted. Typically 'Authorization' for Bearer tokens. + HTTP header name for JWT token. The HTTP header name where the JWT token is transmitted. Typically 'Authorization' for Bearer tokens. + """ + jwtUrlParameter: str | None = None + """ + (String) URL parameter name for JWT token. If the JWT token is transmitted as a URL parameter instead of an HTTP header, specify the parameter name here. + URL parameter name for JWT token. If the JWT token is transmitted as a URL parameter instead of an HTTP header, specify the parameter name here. + """ + requiredAudience: str | None = None + """ + (String) Required JWT audience. If specified, the JWT must contain an 'aud' claim that matches this value. This provides additional security by ensuring the JWT was issued for the expected audience. + Required JWT audience. If specified, the JWT must contain an 'aud' claim that matches this value. This provides additional security by ensuring the JWT was issued for the expected audience. + """ + requiredIssuer: str | None = None + """ + (String) Required JWT issuer. If specified, the JWT must contain an 'iss' claim that matches this value. This provides additional security by ensuring the JWT was issued by the expected issuer. + Required JWT issuer. If specified, the JWT must contain an 'iss' claim that matches this value. This provides additional security by ensuring the JWT was issued by the expected issuer. + """ + rolesKey: str | None = None + """ + (String) JWT claim key for roles. The key in the JWT payload that contains the user's roles. If specified, roles will be extracted from the JWT for authorization. + JWT claim key for roles. The key in the JWT payload that contains the user's roles. If specified, roles will be extracted from the JWT for authorization. + """ + signingKey: str | None = None + """ + (String) JWT signing key. The secret key used to sign and verify JWT tokens. This should be a secure, randomly generated key HMAC key or public RSA/ECDSA key. + JWT signing key. The secret key used to sign and verify JWT tokens. This should be a secure, randomly generated key HMAC key or public RSA/ECDSA key. + """ + subjectKey: str | None = None + """ + (String) JWT claim key for subject. The key in the JWT payload that contains the user's subject identifier. If not specified, the 'sub' claim is used by default. + JWT claim key for subject. The key in the JWT payload that contains the user's subject identifier. If not specified, the 'sub' claim is used by default. + """ + + +class Openid(BaseModel): + clientId: str | None = None + """ + (String) The ID of the OpenID Connect client. The ID of the OpenID Connect client configured in your IdP. Required. + The ID of the OpenID Connect client. The ID of the OpenID Connect client configured in your IdP. Required. + """ + clientSecret: str | None = None + """ + (String) The client secret of the OpenID Connect. The client secret of the OpenID Connect client configured in your IdP. Required. + The client secret of the OpenID Connect. The client secret of the OpenID Connect client configured in your IdP. Required. + """ + connectUrl: str | None = None + """ + (String) OpenID Connect metadata/configuration URL. The URL of your IdP where the Security plugin can find the OpenID Connect metadata/configuration settings. + OpenID Connect metadata/configuration URL. The URL of your IdP where the Security plugin can find the OpenID Connect metadata/configuration settings. + """ + enabled: bool | None = None + """ + based authentication for OpenSearch. When enabled, users can authenticate using JWT tokens. + Enable or disable OpenSearch OpenID Connect authentication. Enables or disables OpenID Connect authentication for OpenSearch. When enabled, users can authenticate using OpenID Connect with an Identity Provider. + """ + header: str | None = None + """ + (String) HTTP header name of the JWT token. HTTP header name of the JWT token. Optional. Default is Authorization. + HTTP header name of the JWT token. HTTP header name of the JWT token. Optional. Default is Authorization. + """ + jwtHeader: str | None = None + """ + (String) HTTP header name for JWT token. The HTTP header name where the JWT token is transmitted. Typically 'Authorization' for Bearer tokens. + The HTTP header that stores the token. The HTTP header that stores the token. Typically the Authorization header with the Bearer schema: Authorization: Bearer . Optional. Default is Authorization. + """ + jwtUrlParameter: str | None = None + """ + (String) URL parameter name for JWT token. If the JWT token is transmitted as a URL parameter instead of an HTTP header, specify the parameter name here. + URL JWT token. If the token is not transmitted in the HTTP header, but as an URL parameter, define the name of the parameter here. Optional. + """ + refreshRateLimitCount: float | None = None + """ + (Number) The maximum number of unknown key IDs in the time frame. The maximum number of unknown key IDs in the time frame. Default is 10. Optional. + The maximum number of unknown key IDs in the time frame. The maximum number of unknown key IDs in the time frame. Default is 10. Optional. + """ + refreshRateLimitTimeWindowMs: float | None = None + """ + (Number) The time frame to use when checking the maximum number of unknown key IDs, in milliseconds. The time frame to use when checking the maximum number of unknown key IDs, in milliseconds. Optional.Default is 10000 (10 seconds). + The time frame to use when checking the maximum number of unknown key IDs, in milliseconds. The time frame to use when checking the maximum number of unknown key IDs, in milliseconds. Optional.Default is 10000 (10 seconds). + """ + rolesKey: str | None = None + """ + (String) JWT claim key for roles. The key in the JWT payload that contains the user's roles. If specified, roles will be extracted from the JWT for authorization. + The key in the JSON payload that stores the user’s roles. The key in the JSON payload that stores the user’s roles. The value of this key must be a comma-separated list of roles. Required only if you want to use roles in the JWT. + """ + scope: str | None = None + """ + (String) The scope of the identity token issued by the IdP. The scope of the identity token issued by the IdP. Optional. Default is openid profile email address phone. + The scope of the identity token issued by the IdP. The scope of the identity token issued by the IdP. Optional. Default is openid profile email address phone. + """ + subjectKey: str | None = None + """ + (String) JWT claim key for subject. The key in the JWT payload that contains the user's subject identifier. If not specified, the 'sub' claim is used by default. + The key in the JSON payload that stores the user’s name. The key in the JSON payload that stores the user’s name. If not defined, the subject registered claim is used. Most IdP providers use the preferred_username claim. Optional. + """ + + +class OpensearchDashboards(BaseModel): + enabled: bool | None = None + """ + based authentication for OpenSearch. When enabled, users can authenticate using JWT tokens. + Enable or disable OpenSearch Dashboards. + """ + maxOldSpaceSize: float | None = None + """ + (Number) Limits the maximum amount of memory (in MiB) the OpenSearch Dashboards process can use. This sets the max_old_space_size option of the nodejs running the OpenSearch Dashboards. Note: the memory reserved by OpenSearch Dashboards is not available for OpenSearch. + Limits the maximum amount of memory (in MiB) the OpenSearch Dashboards process can use. This sets the max_old_space_size option of the nodejs running the OpenSearch Dashboards. Note: the memory reserved by OpenSearch Dashboards is not available for OpenSearch. + """ + multipleDataSourceEnabled: bool | None = None + """ + (Boolean) Enable or disable multiple data sources in OpenSearch Dashboards. + Enable or disable multiple data sources in OpenSearch Dashboards. + """ + opensearchRequestTimeout: float | None = None + """ + (Number) Timeout in milliseconds for requests made by OpenSearch Dashboards towards OpenSearch. + Timeout in milliseconds for requests made by OpenSearch Dashboards towards OpenSearch. + """ + sessionKeepalive: bool | None = None + """ + (Boolean) Determines whether the session TTL resets (is “kept alive”) on each user activity. Optional. Default is true. + Determines whether the session TTL resets (is “kept alive”) on each user activity. Optional. Default is true. + """ + sessionTtl: str | None = None + """ + to-live (TTL) for user sessions. The value should be a time value with unit, e.g. 1m, 5s, 1h, 3d, 100ms. Default is 1 hour. + Defines the time-to-live (TTL) for user sessions. The value should be a time value with unit, e.g. 1m, 5s, 1h, 3d, 100ms. Default is 1 hour. + """ + + +class RemoteStore(BaseModel): + segmentPressureBytesLagVarianceFactor: float | None = None + """ + (Number) The variance factor that is used to calculate the dynamic bytes lag threshold. The variance factor that is used together with the moving average to calculate the dynamic bytes lag threshold for activating remote segment backpressure. Defaults to 10. + The variance factor that is used to calculate the dynamic bytes lag threshold. The variance factor that is used together with the moving average to calculate the dynamic bytes lag threshold for activating remote segment backpressure. Defaults to 10. + """ + segmentPressureConsecutiveFailuresLimit: float | None = None + """ + (Number) The minimum consecutive failure count for activating remote segment backpressure. The minimum consecutive failure count for activating remote segment backpressure. Defaults to 5. + The minimum consecutive failure count for activating remote segment backpressure. The minimum consecutive failure count for activating remote segment backpressure. Defaults to 5. + """ + segmentPressureEnabled: bool | None = None + """ + (Boolean) Enables remote segment backpressure. Enables remote segment backpressure. Default is true. + Enables remote segment backpressure. Enables remote segment backpressure. Default is `true`. + """ + segmentPressureTimeLagVarianceFactor: float | None = None + """ + (Number) The variance factor that is used to calculate the dynamic bytes lag threshold. The variance factor that is used together with the moving average to calculate the dynamic time lag threshold for activating remote segment backpressure. Defaults to 10. + The variance factor that is used to calculate the dynamic bytes lag threshold. The variance factor that is used together with the moving average to calculate the dynamic time lag threshold for activating remote segment backpressure. Defaults to 10. + """ + + +class Saml(BaseModel): + enabled: bool | None = None + """ + based authentication for OpenSearch. When enabled, users can authenticate using JWT tokens. + Enable or disable OpenSearch SAML authentication. Enables or disables SAML-based authentication for OpenSearch. When enabled, users can authenticate using SAML with an Identity Provider. + """ + idpEntityId: str | None = None + """ + (String) Identity Provider Entity ID. The unique identifier for the Identity Provider (IdP) entity that is used for SAML authentication. This value is typically provided by the IdP. + Identity Provider Entity ID. The unique identifier for the Identity Provider (IdP) entity that is used for SAML authentication. This value is typically provided by the IdP. + """ + idpMetadataUrl: str | None = None + """ + based authentication with the IdP. + Identity Provider (IdP) SAML metadata URL. The URL of the SAML metadata for the Identity Provider (IdP). This is used to configure SAML-based authentication with the IdP. + """ + idpPemtrustedcasContent: str | None = None + """ + encoded root CA Content for SAML IdP server verification. This parameter specifies the PEM-encoded root certificate authority (CA) content for the SAML identity provider (IdP) server verification. The root CA content is used to verify the SSL/TLS certificate presented by the server. + PEM-encoded root CA Content for SAML IdP server verification. This parameter specifies the PEM-encoded root certificate authority (CA) content for the SAML identity provider (IdP) server verification. The root CA content is used to verify the SSL/TLS certificate presented by the server. + """ + rolesKey: str | None = None + """ + (String) JWT claim key for roles. The key in the JWT payload that contains the user's roles. If specified, roles will be extracted from the JWT for authorization. + SAML response role attribute. Optional. Specifies the attribute in the SAML response where role information is stored, if available. Role attributes are not required for SAML authentication, but can be included in SAML assertions by most Identity Providers (IdPs) to determine user access levels or permissions. + """ + spEntityId: str | None = None + """ + (String) Service Provider Entity ID. The unique identifier for the Service Provider (SP) entity that is used for SAML authentication. This value is typically provided by the SP. + Service Provider Entity ID. The unique identifier for the Service Provider (SP) entity that is used for SAML authentication. This value is typically provided by the SP. + """ + subjectKey: str | None = None + """ + (String) JWT claim key for subject. The key in the JWT payload that contains the user's subject identifier. If not specified, the 'sub' claim is used by default. + SAML response subject attribute. Optional. Specifies the attribute in the SAML response where the subject identifier is stored. If not configured, the NameID attribute is used by default. + """ + + +class NodeDuress(BaseModel): + cpuThreshold: float | None = None + """ + (Number) The CPU usage threshold (as a percentage) required for a node to be considered to be under duress. The CPU usage threshold (as a percentage) required for a node to be considered to be under duress. Default is 0.9. + The CPU usage threshold (as a percentage) required for a node to be considered to be under duress. The CPU usage threshold (as a percentage) required for a node to be considered to be under duress. Default is 0.9. + """ + heapThreshold: float | None = None + """ + (Number) The heap usage threshold (as a percentage) required for a node to be considered to be under duress. The heap usage threshold (as a percentage) required for a node to be considered to be under duress. Default is 0.7. + The heap usage threshold (as a percentage) required for a node to be considered to be under duress. The heap usage threshold (as a percentage) required for a node to be considered to be under duress. Default is 0.7. + """ + numSuccessiveBreaches: float | None = None + """ + (Number) The number of successive limit breaches after which the node is considered to be under duress. The number of successive limit breaches after which the node is considered to be under duress. Default is 3. + The number of successive limit breaches after which the node is considered to be under duress. The number of successive limit breaches after which the node is considered to be under duress. Default is 3. + """ + + +class SearchShardTask(BaseModel): + cancellationBurst: float | None = None + """ + (Number) The maximum number of search tasks to cancel in a single iteration of the observer thread. The maximum number of search tasks to cancel in a single iteration of the observer thread. Default is 10.0. + The maximum number of search tasks to cancel in a single iteration of the observer thread. The maximum number of search tasks to cancel in a single iteration of the observer thread. Default is 10.0. + """ + cancellationRate: float | None = None + """ + (Number) The maximum number of tasks to cancel per millisecond of elapsed time. The maximum number of tasks to cancel per millisecond of elapsed time. Default is 0.003. + The maximum number of tasks to cancel per millisecond of elapsed time. The maximum number of tasks to cancel per millisecond of elapsed time. Default is 0.003. + """ + cancellationRatio: float | None = None + """ + (Number) The maximum number of tasks to cancel. The maximum number of tasks to cancel, as a percentage of successful task completions. Default is 0.1. + The maximum number of tasks to cancel. The maximum number of tasks to cancel, as a percentage of successful task completions. Default is 0.1. + """ + cpuTimeMillisThreshold: float | None = None + """ + (Number) The CPU usage threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. The CPU usage threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. Default is 15000. + The CPU usage threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. The CPU usage threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. Default is 15000. + """ + elapsedTimeMillisThreshold: float | None = None + """ + (Number) The elapsed time threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. The elapsed time threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. Default is 30000. + The elapsed time threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. The elapsed time threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. Default is 30000. + """ + heapMovingAverageWindowSize: float | None = None + """ + (Number) The number of previously completed search shard tasks to consider when calculating the rolling average of heap usage. The number of previously completed search shard tasks to consider when calculating the rolling average of heap usage. Default is 100. + The number of previously completed search shard tasks to consider when calculating the rolling average of heap usage. The number of previously completed search shard tasks to consider when calculating the rolling average of heap usage. Default is 100. + """ + heapPercentThreshold: float | None = None + """ + (Number) The heap usage threshold (as a percentage) required for a single search shard task before it is considered for cancellation. The heap usage threshold (as a percentage) required for a single search shard task before it is considered for cancellation. Default is 0.5. + The heap usage threshold (as a percentage) required for a single search shard task before it is considered for cancellation. The heap usage threshold (as a percentage) required for a single search shard task before it is considered for cancellation. Default is 0.5. + """ + heapVariance: float | None = None + """ + (Number) The minimum variance required for a single search shard task’s heap usage compared to the rolling average of previously completed tasks before it is considered for cancellation. The minimum variance required for a single search shard task’s heap usage compared to the rolling average of previously completed tasks before it is considered for cancellation. Default is 2.0. + The minimum variance required for a single search shard task’s heap usage compared to the rolling average of previously completed tasks before it is considered for cancellation. The minimum variance required for a single search shard task’s heap usage compared to the rolling average of previously completed tasks before it is considered for cancellation. Default is 2.0. + """ + totalHeapPercentThreshold: float | None = None + """ + (Number) The heap usage threshold (as a percentage) required for the sum of heap usages of all search shard tasks before cancellation is applied. The heap usage threshold (as a percentage) required for the sum of heap usages of all search shard tasks before cancellation is applied. Default is 0.5. + The heap usage threshold (as a percentage) required for the sum of heap usages of all search shard tasks before cancellation is applied. The heap usage threshold (as a percentage) required for the sum of heap usages of all search shard tasks before cancellation is applied. Default is 0.5. + """ + + +class SearchTask(BaseModel): + cancellationBurst: float | None = None + """ + (Number) The maximum number of search tasks to cancel in a single iteration of the observer thread. The maximum number of search tasks to cancel in a single iteration of the observer thread. Default is 10.0. + The maximum number of search tasks to cancel in a single iteration of the observer thread. The maximum number of search tasks to cancel in a single iteration of the observer thread. Default is 5.0. + """ + cancellationRate: float | None = None + """ + (Number) The maximum number of tasks to cancel per millisecond of elapsed time. The maximum number of tasks to cancel per millisecond of elapsed time. Default is 0.003. + The maximum number of search tasks to cancel per millisecond of elapsed time. The maximum number of search tasks to cancel per millisecond of elapsed time. Default is 0.003. + """ + cancellationRatio: float | None = None + """ + (Number) The maximum number of tasks to cancel. The maximum number of tasks to cancel, as a percentage of successful task completions. Default is 0.1. + The maximum number of search tasks to cancel, as a percentage of successful search task completions. The maximum number of search tasks to cancel, as a percentage of successful search task completions. Default is 0.1. + """ + cpuTimeMillisThreshold: float | None = None + """ + (Number) The CPU usage threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. The CPU usage threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. Default is 15000. + The CPU usage threshold (in milliseconds) required for an individual parent task before it is considered for cancellation. The CPU usage threshold (in milliseconds) required for an individual parent task before it is considered for cancellation. Default is 30000. + """ + elapsedTimeMillisThreshold: float | None = None + """ + (Number) The elapsed time threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. The elapsed time threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. Default is 30000. + The elapsed time threshold (in milliseconds) required for an individual parent task before it is considered for cancellation. The elapsed time threshold (in milliseconds) required for an individual parent task before it is considered for cancellation. Default is 45000. + """ + heapMovingAverageWindowSize: float | None = None + """ + (Number) The number of previously completed search shard tasks to consider when calculating the rolling average of heap usage. The number of previously completed search shard tasks to consider when calculating the rolling average of heap usage. Default is 100. + The window size used to calculate the rolling average of the heap usage for the completed parent tasks. The window size used to calculate the rolling average of the heap usage for the completed parent tasks. Default is 10. + """ + heapPercentThreshold: float | None = None + """ + (Number) The heap usage threshold (as a percentage) required for a single search shard task before it is considered for cancellation. The heap usage threshold (as a percentage) required for a single search shard task before it is considered for cancellation. Default is 0.5. + The heap usage threshold (as a percentage) required for an individual parent task before it is considered for cancellation. The heap usage threshold (as a percentage) required for an individual parent task before it is considered for cancellation. Default is 0.2. + """ + heapVariance: float | None = None + """ + (Number) The minimum variance required for a single search shard task’s heap usage compared to the rolling average of previously completed tasks before it is considered for cancellation. The minimum variance required for a single search shard task’s heap usage compared to the rolling average of previously completed tasks before it is considered for cancellation. Default is 2.0. + The heap usage variance required for an individual parent task before it is considered for cancellation. The heap usage variance required for an individual parent task before it is considered for cancellation. A task is considered for cancellation when taskHeapUsage is greater than or equal to heapUsageMovingAverage * variance. Default is 2.0. + """ + totalHeapPercentThreshold: float | None = None + """ + (Number) The heap usage threshold (as a percentage) required for the sum of heap usages of all search shard tasks before cancellation is applied. The heap usage threshold (as a percentage) required for the sum of heap usages of all search shard tasks before cancellation is applied. Default is 0.5. + The heap usage threshold (as a percentage) required for the sum of heap usages of all search tasks before cancellation is applied. The heap usage threshold (as a percentage) required for the sum of heap usages of all search tasks before cancellation is applied. Default is 0.5. + """ + + +class SearchBackpressure(BaseModel): + mode: str | None = None + """ + (String) The search backpressure mode. The search backpressure mode. Valid values are monitor_only, enforced, or disabled. Default is monitor_only. + The search backpressure mode. The search backpressure mode. Valid values are monitor_only, enforced, or disabled. Default is monitor_only. + """ + nodeDuress: NodeDuress | None = None + """ + (Block List) Node duress settings. (see below for nested schema) + Node duress settings. + """ + searchShardTask: SearchShardTask | None = None + """ + (Block List) Search shard settings. (see below for nested schema) + Search shard settings. + """ + searchTask: SearchTask | None = None + """ + (Block List) Search task settings. (see below for nested schema) + Search task settings. + """ + + +class Cpu(BaseModel): + enabled: bool | None = None + """ + based authentication for OpenSearch. When enabled, users can authenticate using JWT tokens. + Enable or disable top N query monitoring by the metric. Enable or disable top N query monitoring by the metric. + """ + topNSize: float | None = None + """ + (Number) Specify the value of N for the top N queries by the metric. + Specify the value of N for the top N queries by the metric. + """ + windowSize: str | None = None + """ + (String) The window size of the top N queries by the metric. Configure the window size of the top N queries. The value should be a time value with unit, e.g. 1m, 5s, 1h. + The window size of the top N queries by the metric. Configure the window size of the top N queries. The value should be a time value with unit, e.g. 1m, 5s, 1h. + """ + + +class Latency(BaseModel): + enabled: bool | None = None + """ + based authentication for OpenSearch. When enabled, users can authenticate using JWT tokens. + Enable or disable top N query monitoring by the metric. Enable or disable top N query monitoring by the metric. + """ + topNSize: float | None = None + """ + (Number) Specify the value of N for the top N queries by the metric. + Specify the value of N for the top N queries by the metric. + """ + windowSize: str | None = None + """ + (String) The window size of the top N queries by the metric. Configure the window size of the top N queries. The value should be a time value with unit, e.g. 1m, 5s, 1h. + The window size of the top N queries by the metric. Configure the window size of the top N queries. The value should be a time value with unit, e.g. 1m, 5s, 1h. + """ + + +class Memory(BaseModel): + enabled: bool | None = None + """ + based authentication for OpenSearch. When enabled, users can authenticate using JWT tokens. + Enable or disable top N query monitoring by the metric. Enable or disable top N query monitoring by the metric. + """ + topNSize: float | None = None + """ + (Number) Specify the value of N for the top N queries by the metric. + Specify the value of N for the top N queries by the metric. + """ + windowSize: str | None = None + """ + (String) The window size of the top N queries by the metric. Configure the window size of the top N queries. The value should be a time value with unit, e.g. 1m, 5s, 1h. + The window size of the top N queries by the metric. Configure the window size of the top N queries. The value should be a time value with unit, e.g. 1m, 5s, 1h. + """ + + +class SearchInsightsTopQueries(BaseModel): + cpu: Cpu | None = None + """ + (Block List) Top N queries monitoring by CPU. (see below for nested schema) + Top N queries monitoring by CPU. + """ + latency: Latency | None = None + """ + (Block List) Top N queries monitoring by latency. (see below for nested schema) + Top N queries monitoring by latency. + """ + memory: Memory | None = None + """ + (Block List) Top N queries monitoring by memory. (see below for nested schema) + Top N queries monitoring by memory. + """ + + +class Segrep(BaseModel): + pressureCheckpointLimit: float | None = None + """ + (Number) The maximum number of indexing checkpoints that a replica shard can fall behind when copying from primary. Once segrep.pressure.checkpoint.limit is breached along with segrep.pressure.time.limit, the segment replication backpressure mechanism is initiated. Default is 4 checkpoints. + The maximum number of indexing checkpoints that a replica shard can fall behind when copying from primary. Once `segrep.pressure.checkpoint.limit` is breached along with `segrep.pressure.time.limit`, the segment replication backpressure mechanism is initiated. Default is 4 checkpoints. + """ + pressureEnabled: bool | None = None + """ + (Boolean) Enables the segment replication backpressure mechanism. Default is false. + Enables the segment replication backpressure mechanism. Default is false. + """ + pressureReplicaStaleLimit: float | None = None + """ + (Number) The maximum number of stale replica shards that can exist in a replication group. Once segrep.pressure.replica.stale.limit is breached, the segment replication backpressure mechanism is initiated. Default is .5, which is 50% of a replication group. + The maximum number of stale replica shards that can exist in a replication group. Once `segrep.pressure.replica.stale.limit` is breached, the segment replication backpressure mechanism is initiated. Default is .5, which is 50% of a replication group. + """ + pressureTimeLimit: str | None = None + """ + (String) The maximum amount of time that a replica shard can take to copy from the primary shard. Once segrep.pressure.time.limit is breached along with segrep.pressure.checkpoint.limit, the segment replication backpressure mechanism is initiated. Default is 5 minutes. + The maximum amount of time that a replica shard can take to copy from the primary shard. Once segrep.pressure.time.limit is breached along with segrep.pressure.checkpoint.limit, the segment replication backpressure mechanism is initiated. Default is 5 minutes. + """ + + +class OperatingFactor(BaseModel): + lower: float | None = None + """ + (Number) Lower occupancy limit of the allocated quota of memory for the shard. Specify the lower occupancy limit of the allocated quota of memory for the shard. + If the total memory usage of a shard is below this limit, + shard indexing backpressure decreases the current allocated memory for that shard. + Default is 0.75. + Lower occupancy limit of the allocated quota of memory for the shard. Specify the lower occupancy limit of the allocated quota of memory for the shard. + If the total memory usage of a shard is below this limit, + shard indexing backpressure decreases the current allocated memory for that shard. + Default is 0.75. + """ + optimal: float | None = None + """ + (Number) Optimal occupancy of the allocated quota of memory for the shard. Specify the optimal occupancy of the allocated quota of memory for the shard. + If the total memory usage of a shard is at this level, + shard indexing backpressure doesn’t change the current allocated memory for that shard. + Default is 0.85. + Optimal occupancy of the allocated quota of memory for the shard. Specify the optimal occupancy of the allocated quota of memory for the shard. + If the total memory usage of a shard is at this level, + shard indexing backpressure doesn’t change the current allocated memory for that shard. + Default is 0.85. + """ + upper: float | None = None + """ + (Number) Upper occupancy limit of the allocated quota of memory for the shard. Specify the upper occupancy limit of the allocated quota of memory for the shard. + If the total memory usage of a shard is above this limit, + shard indexing backpressure increases the current allocated memory for that shard. + Default is 0.95. + Upper occupancy limit of the allocated quota of memory for the shard. Specify the upper occupancy limit of the allocated quota of memory for the shard. + If the total memory usage of a shard is above this limit, + shard indexing backpressure increases the current allocated memory for that shard. + Default is 0.95. + """ + + +class Node(BaseModel): + softLimit: float | None = None + """ + level memory + threshold that acts as a soft indicator for strain on a node. + Default is 0.7. + Node soft limit. Define the percentage of the node-level memory + threshold that acts as a soft indicator for strain on a node. + Default is 0.7. + """ + + +class Shard(BaseModel): + minLimit: float | None = None + """ + (Number) Shard min limit. Specify the minimum assigned quota for a new shard in any role (coordinator, primary, or replica). + Shard indexing backpressure increases or decreases this allocated quota based on the inflow of traffic for the shard. + Default is 0.001. + Shard min limit. Specify the minimum assigned quota for a new shard in any role (coordinator, primary, or replica). + Shard indexing backpressure increases or decreases this allocated quota based on the inflow of traffic for the shard. + Default is 0.001. + """ + + +class PrimaryParameter(BaseModel): + node: Node | None = None + """ + (Block List) (see below for nested schema) + """ + shard: Shard | None = None + """ + (Block List) (see below for nested schema) + """ + + +class ShardIndexingPressure(BaseModel): + enabled: bool | None = None + """ + based authentication for OpenSearch. When enabled, users can authenticate using JWT tokens. + Enable or disable shard indexing backpressure. Enable or disable shard indexing backpressure. Default is false. + """ + enforced: bool | None = None + """ + level metrics, + but it doesn’t actually reject any indexing requests. + In enforced mode (value set as true), + shard indexing backpressure rejects any requests to the cluster that might cause a dip in its performance. + Default is false. + Run shard indexing backpressure in shadow mode or enforced mode. Run shard indexing backpressure in shadow mode or enforced mode. + In shadow mode (value set as false), shard indexing backpressure tracks all granular-level metrics, + but it doesn’t actually reject any indexing requests. + In enforced mode (value set as true), + shard indexing backpressure rejects any requests to the cluster that might cause a dip in its performance. + Default is false. + """ + operatingFactor: OperatingFactor | None = None + """ + (Block List) Operating factor. (see below for nested schema) + Operating factor. + """ + primaryParameter: PrimaryParameter | None = None + """ + (Block List) Primary parameter. (see below for nested schema) + Primary parameter. + """ + + +class Properties(BaseModel): + actionAutoCreateIndexEnabled: bool | None = None + """ + (Boolean) action.auto_create_index. Explicitly allow or block automatic creation of indices. Defaults to true. + action.auto_create_index. Explicitly allow or block automatic creation of indices. Defaults to true. + """ + actionDestructiveRequiresName: bool | None = None + """ + (Boolean) Require explicit index names when deleting. + Require explicit index names when deleting. + """ + authFailureListeners: AuthFailureListeners | None = None + """ + (Block List) Opensearch Security Plugin Settings. (see below for nested schema) + Opensearch Security Plugin Settings. + """ + automaticUtilityNetworkIpFilter: bool | None = None + """ + (Boolean) Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + """ + clusterFilecacheRemoteDataRatio: float | None = None + """ + (Number) The limit of how much total remote data can be referenced. Defines a limit of how much total remote data can be referenced as a ratio of the size of the disk reserved for the file cache. This is designed to be a safeguard to prevent oversubscribing a cluster. Defaults to 0. + The limit of how much total remote data can be referenced. Defines a limit of how much total remote data can be referenced as a ratio of the size of the disk reserved for the file cache. This is designed to be a safeguard to prevent oversubscribing a cluster. Defaults to 0. + """ + clusterMaxShardsPerNode: float | None = None + """ + (Number) Controls the number of shards allowed in the cluster per data node. + Controls the number of shards allowed in the cluster per data node. + """ + clusterRemoteStore: ClusterRemoteStore | None = None + """ + (Block List) (see below for nested schema) + """ + clusterRoutingAllocationBalancePreferPrimary: bool | None = None + """ + (Boolean) When set to true, OpenSearch attempts to evenly distribute the primary shards between the cluster nodes. Enabling this setting does not always guarantee an equal number of primary shards on each node, especially in the event of a failover. Changing this setting to false after it was set to true does not invoke redistribution of primary shards. Default is false. + When set to true, OpenSearch attempts to evenly distribute the primary shards between the cluster nodes. Enabling this setting does not always guarantee an equal number of primary shards on each node, especially in the event of a failover. Changing this setting to false after it was set to true does not invoke redistribution of primary shards. Default is false. + """ + clusterRoutingAllocationNodeConcurrentRecoveries: float | None = None + """ + (Number) Concurrent incoming/outgoing shard recoveries per node. How many concurrent incoming/outgoing shard recoveries (normally replicas) are allowed to happen on a node. Defaults to node cpu count * 2. + Concurrent incoming/outgoing shard recoveries per node. How many concurrent incoming/outgoing shard recoveries (normally replicas) are allowed to happen on a node. Defaults to node cpu count * 2. + """ + clusterSearchRequestSlowlog: ClusterSearchRequestSlowlog | None = None + """ + (Block List) (see below for nested schema) + """ + customDomain: str | None = None + """ + * hostname and the custom domain. + Custom domain. Serve the web frontend using a custom CNAME pointing to the Aiven DNS name. When you set a custom domain for a service deployed in a VPC, the service certificate is only created for the public-* hostname and the custom domain. + """ + customKeystores: list[str] | None = None + """ + (List of String) OpenSearch custom keystores. Allow to register custom keystores in OpenSearch. + OpenSearch custom keystores. Allow to register custom keystores in OpenSearch. + """ + customRepos: list[str] | None = None + """ + (List of String) OpenSearch custom repositories. Allow to register object storage repositories in OpenSearch. + OpenSearch custom repositories. Allow to register object storage repositories in OpenSearch. + """ + diskWatermarks: DiskWatermarks | None = None + """ + (Block List) Watermark settings. (see below for nested schema) + Watermark settings. + """ + elasticsearchVersion: str | None = None + """ + (String) OpenSearch version. + OpenSearch version. + """ + emailSenderName: str | None = None + """ + (String) Sender name placeholder to be used in Opensearch Dashboards and Opensearch keystore. This should be identical to the Sender name defined in Opensearch dashboards. + Sender name placeholder to be used in Opensearch Dashboards and Opensearch keystore. This should be identical to the Sender name defined in Opensearch dashboards. + """ + emailSenderPasswordSecretRef: EmailSenderPasswordSecretRef | None = None + """ + (String, Sensitive) Sender password for Opensearch alerts to authenticate with SMTP server. Sender password for Opensearch alerts to authenticate with SMTP server. + Sender password for Opensearch alerts to authenticate with SMTP server. Sender password for Opensearch alerts to authenticate with SMTP server. + """ + emailSenderUsername: str | None = None + """ + (String) Sender username for Opensearch alerts. + Sender username for Opensearch alerts. + """ + enableRemoteBackedStorage: bool | None = None + """ + backed storage. + Enable remote-backed storage. + """ + enableSearchableSnapshots: bool | None = None + """ + (Boolean) Enable searchable snapshots. + Enable searchable snapshots. + """ + enableSecurityAudit: bool | None = None + """ + (Boolean) Enable/Disable security audit. + Enable/Disable security audit. + """ + enableSnapshotApi: bool | None = None + """ + (Boolean) Enable/Disable snapshot API. Enable/Disable snapshot API for custom repositories, this requires security management to be enabled. + Enable/Disable snapshot API. Enable/Disable snapshot API for custom repositories, this requires security management to be enabled. + """ + httpMaxContentLength: float | None = None + """ + (Number) Maximum content length for HTTP requests to the OpenSearch HTTP API, in bytes. + Maximum content length for HTTP requests to the OpenSearch HTTP API, in bytes. + """ + httpMaxHeaderSize: float | None = None + """ + (Number) The max size of allowed headers, in bytes. + The max size of allowed headers, in bytes. + """ + httpMaxInitialLineLength: float | None = None + """ + (Number) The max length of an HTTP URL, in bytes. + The max length of an HTTP URL, in bytes. + """ + indexPatterns: list[str] | None = None + """ + (List of String) Index patterns. + Index patterns. + """ + indexRollup: IndexRollup | None = None + """ + (Block List) Index rollup settings. (see below for nested schema) + Index rollup settings. + """ + indexTemplate: IndexTemplate | None = None + """ + (Block List) Template settings for all new indexes. (see below for nested schema) + Template settings for all new indexes. + """ + indicesFielddataCacheSize: float | None = None + """ + (Number) Relative amount. Maximum amount of heap memory used for field data cache. This is an expert setting; decreasing the value too much will increase overhead of loading field data; too much memory used for field data cache will decrease amount of heap available for other operations. + Relative amount. Maximum amount of heap memory used for field data cache. This is an expert setting; decreasing the value too much will increase overhead of loading field data; too much memory used for field data cache will decrease amount of heap available for other operations. + """ + indicesMemoryIndexBufferSize: float | None = None + """ + (Number) Percentage value. Default is 10%. Total amount of heap used for indexing buffer, before writing segments to disk. This is an expert setting. Too low value will slow down indexing; too high value will increase indexing performance but causes performance issues for query performance. + Percentage value. Default is 10%. Total amount of heap used for indexing buffer, before writing segments to disk. This is an expert setting. Too low value will slow down indexing; too high value will increase indexing performance but causes performance issues for query performance. + """ + indicesMemoryMaxIndexBufferSize: float | None = None + """ + (Number) Absolute value. Default is unbound. Doesn't work without indices.memory.index_buffer_size. Maximum amount of heap used for query cache, an absolute indices.memory.index_buffer_size maximum hard limit. + Absolute value. Default is unbound. Doesn't work without indices.memory.index_buffer_size. Maximum amount of heap used for query cache, an absolute indices.memory.index_buffer_size maximum hard limit. + """ + indicesMemoryMinIndexBufferSize: float | None = None + """ + (Number) Absolute value. Default is 48mb. Doesn't work without indices.memory.index_buffer_size. Minimum amount of heap used for query cache, an absolute indices.memory.index_buffer_size minimal hard limit. + Absolute value. Default is 48mb. Doesn't work without indices.memory.index_buffer_size. Minimum amount of heap used for query cache, an absolute indices.memory.index_buffer_size minimal hard limit. + """ + indicesQueriesCacheSize: float | None = None + """ + (Number) Percentage value. Default is 10%. Maximum amount of heap used for query cache. This is an expert setting. Too low value will decrease query performance and increase performance for other operations; too high value will cause issues with other OpenSearch functionality. + Percentage value. Default is 10%. Maximum amount of heap used for query cache. This is an expert setting. Too low value will decrease query performance and increase performance for other operations; too high value will cause issues with other OpenSearch functionality. + """ + indicesQueryBoolMaxClauseCount: float | None = None + """ + (Number) Maximum number of clauses Lucene BooleanQuery can have. The default value (1024) is relatively high, and increasing it may cause performance issues. Investigate other approaches first before increasing this value. + Maximum number of clauses Lucene BooleanQuery can have. The default value (1024) is relatively high, and increasing it may cause performance issues. Investigate other approaches first before increasing this value. + """ + indicesRecoveryMaxBytesPerSec: float | None = None + """ + (Number) Limits total inbound and outbound recovery traffic for each node. Applies to both peer recoveries as well as snapshot recoveries (i.e., restores from a snapshot). Defaults to 40mb. + Limits total inbound and outbound recovery traffic for each node. Applies to both peer recoveries as well as snapshot recoveries (i.e., restores from a snapshot). Defaults to 40mb. + """ + indicesRecoveryMaxConcurrentFileChunks: float | None = None + """ + (Number) Number of file chunks sent in parallel for each recovery. Defaults to 2. + Number of file chunks sent in parallel for each recovery. Defaults to 2. + """ + ipFilter: list[str] | None = None + """ + (List of String) IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + """ + ismEnabled: bool | None = None + """ + (Boolean) Specifies whether ISM is enabled or not. + Specifies whether ISM is enabled or not. + """ + ismHistoryEnabled: bool | None = None + """ + (Boolean) Specifies whether audit history is enabled or not. The logs from ISM are automatically indexed to a logs document. + Specifies whether audit history is enabled or not. The logs from ISM are automatically indexed to a logs document. + """ + ismHistoryMaxAge: float | None = None + """ + (Number) The maximum age before rolling over the audit history index in hours. + The maximum age before rolling over the audit history index in hours. + """ + ismHistoryMaxDocs: float | None = None + """ + (Number) The maximum number of documents before rolling over the audit history index. + The maximum number of documents before rolling over the audit history index. + """ + ismHistoryRolloverCheckPeriod: float | None = None + """ + (Number) The time between rollover checks for the audit history index in hours. + The time between rollover checks for the audit history index in hours. + """ + ismHistoryRolloverRetentionPeriod: float | None = None + """ + (Number) How long audit history indices are kept in days. + How long audit history indices are kept in days. + """ + jwt: Jwt | None = None + """ + (Block List) OpenSearch JWT Configuration. (see below for nested schema) + OpenSearch JWT Configuration. + """ + keepIndexRefreshInterval: bool | None = None + """ + (Boolean) Don't reset index.refresh_interval to the default value. Aiven automation resets index.refresh_interval to default value for every index to be sure that indices are always visible to search. If it doesn't fit your case, you can disable this by setting up this flag to true. + Don't reset index.refresh_interval to the default value. Aiven automation resets index.refresh_interval to default value for every index to be sure that indices are always visible to search. If it doesn't fit your case, you can disable this by setting up this flag to true. + """ + knnCacheItemExpiryEnabled: bool | None = None + """ + (Boolean) Enable or disable removing KNN graphs from the cache when they are idle. Disabled by default. + Enable or disable removing KNN graphs from the cache when they are idle. Disabled by default. + """ + knnCacheItemExpiryMinutes: float | None = None + """ + (Number) If enabled, the amount of time in minutes a KNN graph can be idle in the cache before being evicted. + If enabled, the amount of time in minutes a KNN graph can be idle in the cache before being evicted. + """ + knnCircuitBreakerUnsetPercentage: float | None = None + """ + (Number) The native memory usage, as a percentage below the KNN memory circuit breaker limit, at which a tripped circuit breaker resets. Defaults to 5%. + The native memory usage, as a percentage below the KNN memory circuit breaker limit, at which a tripped circuit breaker resets. Defaults to 5%. + """ + knnMemoryCircuitBreakerEnabled: bool | None = None + """ + (Boolean) Enable or disable KNN memory circuit breaker. Defaults to true. + Enable or disable KNN memory circuit breaker. Defaults to true. + """ + knnMemoryCircuitBreakerLimit: float | None = None + """ + (Number) Maximum amount of memory in percentage that can be used for the KNN index. Defaults to 50% of the JVM heap size. 0 is used to set it to null which can be used to invalidate caches. + Maximum amount of memory in percentage that can be used for the KNN index. Defaults to 50% of the JVM heap size. 0 is used to set it to null which can be used to invalidate caches. + """ + mlCommonsConnectorAccessControlEnabled: bool | None = None + """ + (Boolean) plugins.ml_commons.connector_access_control_enabled. When set to true, the setting allows admins to control access and permissions to the connector API using backend_roles. Defaults to false. + plugins.ml_commons.connector_access_control_enabled. When set to true, the setting allows admins to control access and permissions to the connector API using backend_roles. Defaults to false. + """ + mlCommonsMaxModelOnNode: float | None = None + """ + (Number) plugins.ml_commons.max_model_on_node. Maximum number of ML models that can be deployed on a single ML node. Defaults to 10. + plugins.ml_commons.max_model_on_node. Maximum number of ML models that can be deployed on a single ML node. Defaults to 10. + """ + mlCommonsModelAccessControlEnabled: bool | None = None + """ + (Boolean) plugins.ml_commons.model_access_control.enabled. Enable or disable model access control for ML Commons. When enabled, access to ML models is controlled by security permissions. Defaults to false. + plugins.ml_commons.model_access_control.enabled. Enable or disable model access control for ML Commons. When enabled, access to ML models is controlled by security permissions. Defaults to false. + """ + mlCommonsModelAutoDeployEnable: bool | None = None + """ + (Boolean) plugins.ml_commons.model_auto_deploy.enable. For externally hosted models only: automatically deploy a model on its first predict request instead of requiring an explicit deploy call first. Defaults to true. + plugins.ml_commons.model_auto_deploy.enable. For externally hosted models only: automatically deploy a model on its first predict request instead of requiring an explicit deploy call first. Defaults to true. + """ + mlCommonsModelAutoRedeployEnable: bool | None = None + """ + (Boolean) plugins.ml_commons.model_auto_redeploy.enable. Automatically redeploy deployed or partially deployed models after ML nodes rejoin the cluster, e.g. after a node replacement. Defaults to true. + plugins.ml_commons.model_auto_redeploy.enable. Automatically redeploy deployed or partially deployed models after ML nodes rejoin the cluster, e.g. after a node replacement. Defaults to true. + """ + mlCommonsNativeMemoryThreshold: float | None = None + """ + (Number) plugins.ml_commons.native_memory_threshold. Native memory threshold percentage for ML Commons. Controls the maximum percentage of native memory that can be used by ML Commons operations. Defaults to 90%. + plugins.ml_commons.native_memory_threshold. Native memory threshold percentage for ML Commons. Controls the maximum percentage of native memory that can be used by ML Commons operations. Defaults to 90%. + """ + mlCommonsOnlyRunOnMlNode: bool | None = None + """ + (Boolean) plugins.ml_commons.only_run_on_ml_node. Enable or disable running ML Commons tasks only on ML nodes. When enabled, ML tasks will only execute on nodes designated as ML nodes. Defaults to true. + plugins.ml_commons.only_run_on_ml_node. Enable or disable running ML Commons tasks only on ML nodes. When enabled, ML tasks will only execute on nodes designated as ML nodes. Defaults to true. + """ + mlCommonsTrustedConnectorEndpointsRegex: list[str] | None = None + """ + (List of String) plugins.ml_commons.trusted_connector_endpoints_regex. Adds the trusted endpoints to the cluster settings. Supports Java regex expressions. + plugins.ml_commons.trusted_connector_endpoints_regex. Adds the trusted endpoints to the cluster settings. Supports Java regex expressions. + """ + nodeSearchCacheSize: str | None = None + """ + (String) The limit of how much total remote data can be referenced. Defines a limit of how much total remote data can be referenced as a ratio of the size of the disk reserved for the file cache. This is designed to be a safeguard to prevent oversubscribing a cluster. Defaults to 5gb. Requires restarting all OpenSearch nodes. + The limit of how much total remote data can be referenced. Defines a limit of how much total remote data can be referenced as a ratio of the size of the disk reserved for the file cache. This is designed to be a safeguard to prevent oversubscribing a cluster. Defaults to 5gb. Requires restarting all OpenSearch nodes. + """ + openid: Openid | None = None + """ + (Block List) OpenSearch OpenID Connect Configuration. (see below for nested schema) + OpenSearch OpenID Connect Configuration. + """ + opensearchDashboards: OpensearchDashboards | None = None + """ + (Block List) OpenSearch Dashboards settings. (see below for nested schema) + OpenSearch Dashboards settings. + """ + overrideMainResponseVersion: bool | None = None + """ + (Boolean) Compatibility mode sets OpenSearch to report its version as 7.10 so clients continue to work. Default is false. Deprecated and ignored for service version 3.3 and higher. + Compatibility mode sets OpenSearch to report its version as 7.10 so clients continue to work. Default is false. Deprecated and ignored for service version 3.3 and higher. + """ + pluginsAlertingFilterByBackendRoles: bool | None = None + """ + (Boolean) Enable or disable filtering of alerting by backend roles. Requires Security plugin. Defaults to false. + Enable or disable filtering of alerting by backend roles. Requires Security plugin. Defaults to false. + """ + publicAccess: bool | None = None + """ + (Boolean) Public Access. Allow access to the service from the public Internet. + Public Access. Allow access to the service from the public Internet. + """ + publicAccessPrometheus: bool | None = None + """ + (Boolean) Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + """ + reindexRemoteWhitelist: list[str] | None = None + """ + (List of String) reindex_remote_allowlist. Whitelisted addresses for reindexing. Changing this value will cause all OpenSearch instances to restart. + reindex_remote_allowlist. Whitelisted addresses for reindexing. Changing this value will cause all OpenSearch instances to restart. + """ + remoteStore: RemoteStore | None = None + """ + (Block List) (see below for nested schema) + """ + saml: Saml | None = None + """ + (Block List) OpenSearch SAML configuration. (see below for nested schema) + OpenSearch SAML configuration. + """ + scriptMaxCompilationsRate: str | None = None + """ + circuit breaker to prevent/minimize OOMs. Script compilation circuit breaker limits the number of inline script compilations within a period of time. Default is use-context. + Script max compilation rate - circuit breaker to prevent/minimize OOMs. Script compilation circuit breaker limits the number of inline script compilations within a period of time. Default is use-context. + """ + searchBackpressure: SearchBackpressure | None = None + """ + (Block List) Search Backpressure Settings. (see below for nested schema) + Search Backpressure Settings. + """ + searchInsightsTopQueries: SearchInsightsTopQueries | None = None + """ + (Block List) (see below for nested schema) + """ + searchMaxBuckets: float | None = None + """ + (Number) Maximum number of aggregation buckets allowed in a single response. OpenSearch default value is used when this is not defined. + Maximum number of aggregation buckets allowed in a single response. OpenSearch default value is used when this is not defined. + """ + segrep: Segrep | None = None + """ + (Block List) Segment Replication Backpressure Settings. (see below for nested schema) + Segment Replication Backpressure Settings. + """ + serviceLog: bool | None = None + """ + (Boolean) Service logging. Store logs for the service so that they are available in the HTTP API and console. + Service logging. Store logs for the service so that they are available in the HTTP API and console. + """ + shardIndexingPressure: ShardIndexingPressure | None = None + """ + (Block List) Shard indexing back pressure settings. (see below for nested schema) + Shard indexing back pressure settings. + """ + threadPoolAnalyzeQueueSize: float | None = None + """ + (Number) analyze thread pool queue size. Size for the thread pool queue. See documentation for exact details. + analyze thread pool queue size. Size for the thread pool queue. See documentation for exact details. + """ + threadPoolAnalyzeSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + analyze thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + threadPoolForceMergeSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + force_merge thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + threadPoolGetQueueSize: float | None = None + """ + (Number) get thread pool queue size. Size for the thread pool queue. See documentation for exact details. + get thread pool queue size. Size for the thread pool queue. See documentation for exact details. + """ + threadPoolGetSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + get thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + threadPoolSearchQueueSize: float | None = None + """ + (Number) search thread pool queue size. Size for the thread pool queue. See documentation for exact details. + search thread pool queue size. Size for the thread pool queue. See documentation for exact details. + """ + threadPoolSearchSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + search thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + threadPoolSearchThrottledQueueSize: float | None = None + """ + (Number) search_throttled thread pool queue size. Size for the thread pool queue. See documentation for exact details. + search_throttled thread pool queue size. Size for the thread pool queue. See documentation for exact details. + """ + threadPoolSearchThrottledSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + search_throttled thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + threadPoolWriteQueueSize: float | None = None + """ + (Number) write thread pool queue size. Size for the thread pool queue. See documentation for exact details. + write thread pool queue size. Size for the thread pool queue. See documentation for exact details. + """ + threadPoolWriteSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + write thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + version: str | None = None + """ + (String) OpenSearch version. + OpenSearch version. + """ + + +class ForProvider(BaseModel): + accessControl: bool | None = None + """ + (Boolean) Enables users access control for OpenSearch service. User access control rules will only be enforced if this attribute is enabled. + Enables users access control for OpenSearch service. User access control rules will only be enforced if this attribute is enabled. + """ + additionalDiskSpaceGib: float | None = None + """ + (Number) Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + """ + extendedAccessControl: bool | None = None + """ + level _mget, _msearch and _bulk APIs. Users are limited to perform operations on indices based on the user-specific access control rules. + Grant access to top-level `_mget`, `_msearch` and `_bulk` APIs. Users are limited to perform operations on indices based on the user-specific access control rules. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItem] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + plan: str | None = None + """ + (String) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans opensearch. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans opensearch`. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + properties: Properties | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +class InitProvider(BaseModel): + accessControl: bool | None = None + """ + (Boolean) Enables users access control for OpenSearch service. User access control rules will only be enforced if this attribute is enabled. + Enables users access control for OpenSearch service. User access control rules will only be enforced if this attribute is enabled. + """ + additionalDiskSpaceGib: float | None = None + """ + (Number) Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + """ + extendedAccessControl: bool | None = None + """ + level _mget, _msearch and _bulk APIs. Users are limited to perform operations on indices based on the user-specific access control rules. + Grant access to top-level `_mget`, `_msearch` and `_bulk` APIs. Users are limited to perform operations on indices based on the user-specific access control rules. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItem] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + plan: str | None = None + """ + (String) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans opensearch. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans opensearch`. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + properties: Properties | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 Component(BaseModel): + component: str | None = None + """ + (String) Component name. + Component name. + """ + host: str | None = None + """ + (String) Hostname of the component + Hostname of the component + """ + port: float | None = None + """ + (Number) Port number of the component + Port number of the component + """ + route: str | None = None + """ + (String) Component network route type + Component network route type + """ + usage: str | None = None + """ + (String) Usage of the component + Usage of the component + """ + + +class NetworkItemModel(BaseModel): + family: str | None = None + """ + (String) Network family. Currently only IPv4 is supported. + Network family. Currently only `IPv4` is supported. + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + The name of the network. Must be unique within the service. + """ + type: str | None = None + """ + (String) Type of the managed database instance + The type of the network. Must be private. + """ + uuid: str | None = None + """ + (String) Private network UUID. Must reside in the same zone as the database. + Private network UUID. Must reside in the same zone as the database. + """ + + +class NodeState(BaseModel): + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name plus a node iteration + """ + role: str | None = None + """ + (String) Role of the node + Role of the node + """ + state: str | None = None + """ + (String) The current state of the service + Current state of the node + """ + + +class PropertiesModel(BaseModel): + actionAutoCreateIndexEnabled: bool | None = None + """ + (Boolean) action.auto_create_index. Explicitly allow or block automatic creation of indices. Defaults to true. + action.auto_create_index. Explicitly allow or block automatic creation of indices. Defaults to true. + """ + actionDestructiveRequiresName: bool | None = None + """ + (Boolean) Require explicit index names when deleting. + Require explicit index names when deleting. + """ + authFailureListeners: AuthFailureListeners | None = None + """ + (Block List) Opensearch Security Plugin Settings. (see below for nested schema) + Opensearch Security Plugin Settings. + """ + automaticUtilityNetworkIpFilter: bool | None = None + """ + (Boolean) Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + """ + clusterFilecacheRemoteDataRatio: float | None = None + """ + (Number) The limit of how much total remote data can be referenced. Defines a limit of how much total remote data can be referenced as a ratio of the size of the disk reserved for the file cache. This is designed to be a safeguard to prevent oversubscribing a cluster. Defaults to 0. + The limit of how much total remote data can be referenced. Defines a limit of how much total remote data can be referenced as a ratio of the size of the disk reserved for the file cache. This is designed to be a safeguard to prevent oversubscribing a cluster. Defaults to 0. + """ + clusterMaxShardsPerNode: float | None = None + """ + (Number) Controls the number of shards allowed in the cluster per data node. + Controls the number of shards allowed in the cluster per data node. + """ + clusterRemoteStore: ClusterRemoteStore | None = None + """ + (Block List) (see below for nested schema) + """ + clusterRoutingAllocationBalancePreferPrimary: bool | None = None + """ + (Boolean) When set to true, OpenSearch attempts to evenly distribute the primary shards between the cluster nodes. Enabling this setting does not always guarantee an equal number of primary shards on each node, especially in the event of a failover. Changing this setting to false after it was set to true does not invoke redistribution of primary shards. Default is false. + When set to true, OpenSearch attempts to evenly distribute the primary shards between the cluster nodes. Enabling this setting does not always guarantee an equal number of primary shards on each node, especially in the event of a failover. Changing this setting to false after it was set to true does not invoke redistribution of primary shards. Default is false. + """ + clusterRoutingAllocationNodeConcurrentRecoveries: float | None = None + """ + (Number) Concurrent incoming/outgoing shard recoveries per node. How many concurrent incoming/outgoing shard recoveries (normally replicas) are allowed to happen on a node. Defaults to node cpu count * 2. + Concurrent incoming/outgoing shard recoveries per node. How many concurrent incoming/outgoing shard recoveries (normally replicas) are allowed to happen on a node. Defaults to node cpu count * 2. + """ + clusterSearchRequestSlowlog: ClusterSearchRequestSlowlog | None = None + """ + (Block List) (see below for nested schema) + """ + customDomain: str | None = None + """ + * hostname and the custom domain. + Custom domain. Serve the web frontend using a custom CNAME pointing to the Aiven DNS name. When you set a custom domain for a service deployed in a VPC, the service certificate is only created for the public-* hostname and the custom domain. + """ + customKeystores: list[str] | None = None + """ + (List of String) OpenSearch custom keystores. Allow to register custom keystores in OpenSearch. + OpenSearch custom keystores. Allow to register custom keystores in OpenSearch. + """ + customRepos: list[str] | None = None + """ + (List of String) OpenSearch custom repositories. Allow to register object storage repositories in OpenSearch. + OpenSearch custom repositories. Allow to register object storage repositories in OpenSearch. + """ + diskWatermarks: DiskWatermarks | None = None + """ + (Block List) Watermark settings. (see below for nested schema) + Watermark settings. + """ + elasticsearchVersion: str | None = None + """ + (String) OpenSearch version. + OpenSearch version. + """ + emailSenderName: str | None = None + """ + (String) Sender name placeholder to be used in Opensearch Dashboards and Opensearch keystore. This should be identical to the Sender name defined in Opensearch dashboards. + Sender name placeholder to be used in Opensearch Dashboards and Opensearch keystore. This should be identical to the Sender name defined in Opensearch dashboards. + """ + emailSenderUsername: str | None = None + """ + (String) Sender username for Opensearch alerts. + Sender username for Opensearch alerts. + """ + enableRemoteBackedStorage: bool | None = None + """ + backed storage. + Enable remote-backed storage. + """ + enableSearchableSnapshots: bool | None = None + """ + (Boolean) Enable searchable snapshots. + Enable searchable snapshots. + """ + enableSecurityAudit: bool | None = None + """ + (Boolean) Enable/Disable security audit. + Enable/Disable security audit. + """ + enableSnapshotApi: bool | None = None + """ + (Boolean) Enable/Disable snapshot API. Enable/Disable snapshot API for custom repositories, this requires security management to be enabled. + Enable/Disable snapshot API. Enable/Disable snapshot API for custom repositories, this requires security management to be enabled. + """ + httpMaxContentLength: float | None = None + """ + (Number) Maximum content length for HTTP requests to the OpenSearch HTTP API, in bytes. + Maximum content length for HTTP requests to the OpenSearch HTTP API, in bytes. + """ + httpMaxHeaderSize: float | None = None + """ + (Number) The max size of allowed headers, in bytes. + The max size of allowed headers, in bytes. + """ + httpMaxInitialLineLength: float | None = None + """ + (Number) The max length of an HTTP URL, in bytes. + The max length of an HTTP URL, in bytes. + """ + indexPatterns: list[str] | None = None + """ + (List of String) Index patterns. + Index patterns. + """ + indexRollup: IndexRollup | None = None + """ + (Block List) Index rollup settings. (see below for nested schema) + Index rollup settings. + """ + indexTemplate: IndexTemplate | None = None + """ + (Block List) Template settings for all new indexes. (see below for nested schema) + Template settings for all new indexes. + """ + indicesFielddataCacheSize: float | None = None + """ + (Number) Relative amount. Maximum amount of heap memory used for field data cache. This is an expert setting; decreasing the value too much will increase overhead of loading field data; too much memory used for field data cache will decrease amount of heap available for other operations. + Relative amount. Maximum amount of heap memory used for field data cache. This is an expert setting; decreasing the value too much will increase overhead of loading field data; too much memory used for field data cache will decrease amount of heap available for other operations. + """ + indicesMemoryIndexBufferSize: float | None = None + """ + (Number) Percentage value. Default is 10%. Total amount of heap used for indexing buffer, before writing segments to disk. This is an expert setting. Too low value will slow down indexing; too high value will increase indexing performance but causes performance issues for query performance. + Percentage value. Default is 10%. Total amount of heap used for indexing buffer, before writing segments to disk. This is an expert setting. Too low value will slow down indexing; too high value will increase indexing performance but causes performance issues for query performance. + """ + indicesMemoryMaxIndexBufferSize: float | None = None + """ + (Number) Absolute value. Default is unbound. Doesn't work without indices.memory.index_buffer_size. Maximum amount of heap used for query cache, an absolute indices.memory.index_buffer_size maximum hard limit. + Absolute value. Default is unbound. Doesn't work without indices.memory.index_buffer_size. Maximum amount of heap used for query cache, an absolute indices.memory.index_buffer_size maximum hard limit. + """ + indicesMemoryMinIndexBufferSize: float | None = None + """ + (Number) Absolute value. Default is 48mb. Doesn't work without indices.memory.index_buffer_size. Minimum amount of heap used for query cache, an absolute indices.memory.index_buffer_size minimal hard limit. + Absolute value. Default is 48mb. Doesn't work without indices.memory.index_buffer_size. Minimum amount of heap used for query cache, an absolute indices.memory.index_buffer_size minimal hard limit. + """ + indicesQueriesCacheSize: float | None = None + """ + (Number) Percentage value. Default is 10%. Maximum amount of heap used for query cache. This is an expert setting. Too low value will decrease query performance and increase performance for other operations; too high value will cause issues with other OpenSearch functionality. + Percentage value. Default is 10%. Maximum amount of heap used for query cache. This is an expert setting. Too low value will decrease query performance and increase performance for other operations; too high value will cause issues with other OpenSearch functionality. + """ + indicesQueryBoolMaxClauseCount: float | None = None + """ + (Number) Maximum number of clauses Lucene BooleanQuery can have. The default value (1024) is relatively high, and increasing it may cause performance issues. Investigate other approaches first before increasing this value. + Maximum number of clauses Lucene BooleanQuery can have. The default value (1024) is relatively high, and increasing it may cause performance issues. Investigate other approaches first before increasing this value. + """ + indicesRecoveryMaxBytesPerSec: float | None = None + """ + (Number) Limits total inbound and outbound recovery traffic for each node. Applies to both peer recoveries as well as snapshot recoveries (i.e., restores from a snapshot). Defaults to 40mb. + Limits total inbound and outbound recovery traffic for each node. Applies to both peer recoveries as well as snapshot recoveries (i.e., restores from a snapshot). Defaults to 40mb. + """ + indicesRecoveryMaxConcurrentFileChunks: float | None = None + """ + (Number) Number of file chunks sent in parallel for each recovery. Defaults to 2. + Number of file chunks sent in parallel for each recovery. Defaults to 2. + """ + ipFilter: list[str] | None = None + """ + (List of String) IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + """ + ismEnabled: bool | None = None + """ + (Boolean) Specifies whether ISM is enabled or not. + Specifies whether ISM is enabled or not. + """ + ismHistoryEnabled: bool | None = None + """ + (Boolean) Specifies whether audit history is enabled or not. The logs from ISM are automatically indexed to a logs document. + Specifies whether audit history is enabled or not. The logs from ISM are automatically indexed to a logs document. + """ + ismHistoryMaxAge: float | None = None + """ + (Number) The maximum age before rolling over the audit history index in hours. + The maximum age before rolling over the audit history index in hours. + """ + ismHistoryMaxDocs: float | None = None + """ + (Number) The maximum number of documents before rolling over the audit history index. + The maximum number of documents before rolling over the audit history index. + """ + ismHistoryRolloverCheckPeriod: float | None = None + """ + (Number) The time between rollover checks for the audit history index in hours. + The time between rollover checks for the audit history index in hours. + """ + ismHistoryRolloverRetentionPeriod: float | None = None + """ + (Number) How long audit history indices are kept in days. + How long audit history indices are kept in days. + """ + jwt: Jwt | None = None + """ + (Block List) OpenSearch JWT Configuration. (see below for nested schema) + OpenSearch JWT Configuration. + """ + keepIndexRefreshInterval: bool | None = None + """ + (Boolean) Don't reset index.refresh_interval to the default value. Aiven automation resets index.refresh_interval to default value for every index to be sure that indices are always visible to search. If it doesn't fit your case, you can disable this by setting up this flag to true. + Don't reset index.refresh_interval to the default value. Aiven automation resets index.refresh_interval to default value for every index to be sure that indices are always visible to search. If it doesn't fit your case, you can disable this by setting up this flag to true. + """ + knnCacheItemExpiryEnabled: bool | None = None + """ + (Boolean) Enable or disable removing KNN graphs from the cache when they are idle. Disabled by default. + Enable or disable removing KNN graphs from the cache when they are idle. Disabled by default. + """ + knnCacheItemExpiryMinutes: float | None = None + """ + (Number) If enabled, the amount of time in minutes a KNN graph can be idle in the cache before being evicted. + If enabled, the amount of time in minutes a KNN graph can be idle in the cache before being evicted. + """ + knnCircuitBreakerUnsetPercentage: float | None = None + """ + (Number) The native memory usage, as a percentage below the KNN memory circuit breaker limit, at which a tripped circuit breaker resets. Defaults to 5%. + The native memory usage, as a percentage below the KNN memory circuit breaker limit, at which a tripped circuit breaker resets. Defaults to 5%. + """ + knnMemoryCircuitBreakerEnabled: bool | None = None + """ + (Boolean) Enable or disable KNN memory circuit breaker. Defaults to true. + Enable or disable KNN memory circuit breaker. Defaults to true. + """ + knnMemoryCircuitBreakerLimit: float | None = None + """ + (Number) Maximum amount of memory in percentage that can be used for the KNN index. Defaults to 50% of the JVM heap size. 0 is used to set it to null which can be used to invalidate caches. + Maximum amount of memory in percentage that can be used for the KNN index. Defaults to 50% of the JVM heap size. 0 is used to set it to null which can be used to invalidate caches. + """ + mlCommonsConnectorAccessControlEnabled: bool | None = None + """ + (Boolean) plugins.ml_commons.connector_access_control_enabled. When set to true, the setting allows admins to control access and permissions to the connector API using backend_roles. Defaults to false. + plugins.ml_commons.connector_access_control_enabled. When set to true, the setting allows admins to control access and permissions to the connector API using backend_roles. Defaults to false. + """ + mlCommonsMaxModelOnNode: float | None = None + """ + (Number) plugins.ml_commons.max_model_on_node. Maximum number of ML models that can be deployed on a single ML node. Defaults to 10. + plugins.ml_commons.max_model_on_node. Maximum number of ML models that can be deployed on a single ML node. Defaults to 10. + """ + mlCommonsModelAccessControlEnabled: bool | None = None + """ + (Boolean) plugins.ml_commons.model_access_control.enabled. Enable or disable model access control for ML Commons. When enabled, access to ML models is controlled by security permissions. Defaults to false. + plugins.ml_commons.model_access_control.enabled. Enable or disable model access control for ML Commons. When enabled, access to ML models is controlled by security permissions. Defaults to false. + """ + mlCommonsModelAutoDeployEnable: bool | None = None + """ + (Boolean) plugins.ml_commons.model_auto_deploy.enable. For externally hosted models only: automatically deploy a model on its first predict request instead of requiring an explicit deploy call first. Defaults to true. + plugins.ml_commons.model_auto_deploy.enable. For externally hosted models only: automatically deploy a model on its first predict request instead of requiring an explicit deploy call first. Defaults to true. + """ + mlCommonsModelAutoRedeployEnable: bool | None = None + """ + (Boolean) plugins.ml_commons.model_auto_redeploy.enable. Automatically redeploy deployed or partially deployed models after ML nodes rejoin the cluster, e.g. after a node replacement. Defaults to true. + plugins.ml_commons.model_auto_redeploy.enable. Automatically redeploy deployed or partially deployed models after ML nodes rejoin the cluster, e.g. after a node replacement. Defaults to true. + """ + mlCommonsNativeMemoryThreshold: float | None = None + """ + (Number) plugins.ml_commons.native_memory_threshold. Native memory threshold percentage for ML Commons. Controls the maximum percentage of native memory that can be used by ML Commons operations. Defaults to 90%. + plugins.ml_commons.native_memory_threshold. Native memory threshold percentage for ML Commons. Controls the maximum percentage of native memory that can be used by ML Commons operations. Defaults to 90%. + """ + mlCommonsOnlyRunOnMlNode: bool | None = None + """ + (Boolean) plugins.ml_commons.only_run_on_ml_node. Enable or disable running ML Commons tasks only on ML nodes. When enabled, ML tasks will only execute on nodes designated as ML nodes. Defaults to true. + plugins.ml_commons.only_run_on_ml_node. Enable or disable running ML Commons tasks only on ML nodes. When enabled, ML tasks will only execute on nodes designated as ML nodes. Defaults to true. + """ + mlCommonsTrustedConnectorEndpointsRegex: list[str] | None = None + """ + (List of String) plugins.ml_commons.trusted_connector_endpoints_regex. Adds the trusted endpoints to the cluster settings. Supports Java regex expressions. + plugins.ml_commons.trusted_connector_endpoints_regex. Adds the trusted endpoints to the cluster settings. Supports Java regex expressions. + """ + nodeSearchCacheSize: str | None = None + """ + (String) The limit of how much total remote data can be referenced. Defines a limit of how much total remote data can be referenced as a ratio of the size of the disk reserved for the file cache. This is designed to be a safeguard to prevent oversubscribing a cluster. Defaults to 5gb. Requires restarting all OpenSearch nodes. + The limit of how much total remote data can be referenced. Defines a limit of how much total remote data can be referenced as a ratio of the size of the disk reserved for the file cache. This is designed to be a safeguard to prevent oversubscribing a cluster. Defaults to 5gb. Requires restarting all OpenSearch nodes. + """ + openid: Openid | None = None + """ + (Block List) OpenSearch OpenID Connect Configuration. (see below for nested schema) + OpenSearch OpenID Connect Configuration. + """ + opensearchDashboards: OpensearchDashboards | None = None + """ + (Block List) OpenSearch Dashboards settings. (see below for nested schema) + OpenSearch Dashboards settings. + """ + overrideMainResponseVersion: bool | None = None + """ + (Boolean) Compatibility mode sets OpenSearch to report its version as 7.10 so clients continue to work. Default is false. Deprecated and ignored for service version 3.3 and higher. + Compatibility mode sets OpenSearch to report its version as 7.10 so clients continue to work. Default is false. Deprecated and ignored for service version 3.3 and higher. + """ + pluginsAlertingFilterByBackendRoles: bool | None = None + """ + (Boolean) Enable or disable filtering of alerting by backend roles. Requires Security plugin. Defaults to false. + Enable or disable filtering of alerting by backend roles. Requires Security plugin. Defaults to false. + """ + publicAccess: bool | None = None + """ + (Boolean) Public Access. Allow access to the service from the public Internet. + Public Access. Allow access to the service from the public Internet. + """ + publicAccessPrometheus: bool | None = None + """ + (Boolean) Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + """ + reindexRemoteWhitelist: list[str] | None = None + """ + (List of String) reindex_remote_allowlist. Whitelisted addresses for reindexing. Changing this value will cause all OpenSearch instances to restart. + reindex_remote_allowlist. Whitelisted addresses for reindexing. Changing this value will cause all OpenSearch instances to restart. + """ + remoteStore: RemoteStore | None = None + """ + (Block List) (see below for nested schema) + """ + saml: Saml | None = None + """ + (Block List) OpenSearch SAML configuration. (see below for nested schema) + OpenSearch SAML configuration. + """ + scriptMaxCompilationsRate: str | None = None + """ + circuit breaker to prevent/minimize OOMs. Script compilation circuit breaker limits the number of inline script compilations within a period of time. Default is use-context. + Script max compilation rate - circuit breaker to prevent/minimize OOMs. Script compilation circuit breaker limits the number of inline script compilations within a period of time. Default is use-context. + """ + searchBackpressure: SearchBackpressure | None = None + """ + (Block List) Search Backpressure Settings. (see below for nested schema) + Search Backpressure Settings. + """ + searchInsightsTopQueries: SearchInsightsTopQueries | None = None + """ + (Block List) (see below for nested schema) + """ + searchMaxBuckets: float | None = None + """ + (Number) Maximum number of aggregation buckets allowed in a single response. OpenSearch default value is used when this is not defined. + Maximum number of aggregation buckets allowed in a single response. OpenSearch default value is used when this is not defined. + """ + segrep: Segrep | None = None + """ + (Block List) Segment Replication Backpressure Settings. (see below for nested schema) + Segment Replication Backpressure Settings. + """ + serviceLog: bool | None = None + """ + (Boolean) Service logging. Store logs for the service so that they are available in the HTTP API and console. + Service logging. Store logs for the service so that they are available in the HTTP API and console. + """ + shardIndexingPressure: ShardIndexingPressure | None = None + """ + (Block List) Shard indexing back pressure settings. (see below for nested schema) + Shard indexing back pressure settings. + """ + threadPoolAnalyzeQueueSize: float | None = None + """ + (Number) analyze thread pool queue size. Size for the thread pool queue. See documentation for exact details. + analyze thread pool queue size. Size for the thread pool queue. See documentation for exact details. + """ + threadPoolAnalyzeSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + analyze thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + threadPoolForceMergeSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + force_merge thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + threadPoolGetQueueSize: float | None = None + """ + (Number) get thread pool queue size. Size for the thread pool queue. See documentation for exact details. + get thread pool queue size. Size for the thread pool queue. See documentation for exact details. + """ + threadPoolGetSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + get thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + threadPoolSearchQueueSize: float | None = None + """ + (Number) search thread pool queue size. Size for the thread pool queue. See documentation for exact details. + search thread pool queue size. Size for the thread pool queue. See documentation for exact details. + """ + threadPoolSearchSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + search thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + threadPoolSearchThrottledQueueSize: float | None = None + """ + (Number) search_throttled thread pool queue size. Size for the thread pool queue. See documentation for exact details. + search_throttled thread pool queue size. Size for the thread pool queue. See documentation for exact details. + """ + threadPoolSearchThrottledSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + search_throttled thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + threadPoolWriteQueueSize: float | None = None + """ + (Number) write thread pool queue size. Size for the thread pool queue. See documentation for exact details. + write thread pool queue size. Size for the thread pool queue. See documentation for exact details. + """ + threadPoolWriteSize: float | None = None + """ + value is automatically lowered if set to higher than maximum value. + write thread pool size. Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + """ + version: str | None = None + """ + (String) OpenSearch version. + OpenSearch version. + """ + + +class AtProvider(BaseModel): + accessControl: bool | None = None + """ + (Boolean) Enables users access control for OpenSearch service. User access control rules will only be enforced if this attribute is enabled. + Enables users access control for OpenSearch service. User access control rules will only be enforced if this attribute is enabled. + """ + additionalDiskSpaceGib: float | None = None + """ + (Number) Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + """ + components: list[Component] | None = None + """ + (Attributes List) Service component information (see below for nested schema) + """ + extendedAccessControl: bool | None = None + """ + level _mget, _msearch and _bulk APIs. Users are limited to perform operations on indices based on the user-specific access control rules. + Grant access to top-level `_mget`, `_msearch` and `_bulk` APIs. Users are limited to perform operations on indices based on the user-specific access control rules. + """ + id: str | None = None + """ + (String) UUID of the database. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItemModel] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + nodeStates: list[NodeState] | None = None + """ + (Attributes List) Information about nodes providing the managed service (see below for nested schema) + """ + plan: str | None = None + """ + (String) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans opensearch. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans opensearch`. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + primaryDatabase: str | None = None + """ + (String) Primary database name + Primary database name + """ + properties: PropertiesModel | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + serviceHost: str | None = None + """ + (String) Hostname to the service instance + Hostname to the service instance + """ + servicePort: str | None = None + """ + (String) Port to the service instance + Port to the service instance + """ + serviceUsername: str | None = None + """ + (String) Primary username to the service instance + Primary username to the service instance + """ + state: str | None = None + """ + (String) The current state of the service + The current state of the service + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + type: str | None = None + """ + (String) Type of the managed database instance + Type of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 ManagedDatabaseOpensearch(BaseModel): + apiVersion: Literal['database.m.upcloud.com/v1alpha1'] | None = ( + 'database.m.upcloud.com/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['ManagedDatabaseOpensearch'] | None = 'ManagedDatabaseOpensearch' + """ + 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 + """ + ManagedDatabaseOpensearchSpec defines the desired state of ManagedDatabaseOpensearch + """ + status: Status | None = None + """ + ManagedDatabaseOpensearchStatus defines the observed state of ManagedDatabaseOpensearch. + """ + + +class ManagedDatabaseOpensearchList(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[ManagedDatabaseOpensearch] + """ + List of manageddatabaseopensearches. 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/com/upcloud/m/database/manageddatabasepostgresql/__init__.py b/schemas/python/models/com/upcloud/m/database/manageddatabasepostgresql/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/database/manageddatabasepostgresql/v1alpha1.py b/schemas/python/models/com/upcloud/m/database/manageddatabasepostgresql/v1alpha1.py new file mode 100644 index 000000000..4336d2322 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/database/manageddatabasepostgresql/v1alpha1.py @@ -0,0 +1,1731 @@ +# generated by datamodel-codegen: +# filename: workdir/database_m_upcloud_com_v1alpha1_manageddatabasepostgresql.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 UuidRef(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 UuidSelector(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 NetworkItem(BaseModel): + family: str | None = None + """ + (String) Network family. Currently only IPv4 is supported. + Network family. Currently only `IPv4` is supported. + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + The name of the network. Must be unique within the service. + """ + type: str | None = None + """ + (String) Type of the managed database instance + The type of the network. Must be private. + """ + uuid: str | None = None + """ + (String) Private network UUID. Must reside in the same zone as the database. + Private network UUID. Must reside in the same zone as the database. + """ + uuidRef: UuidRef | None = None + """ + Reference to a Network in network to populate uuid. + """ + uuidSelector: UuidSelector | None = None + """ + Selector for a Network in network to populate uuid. + """ + + +class AdminPasswordSecretRef(BaseModel): + key: str + name: str + """ + Name of the secret. + """ + + +class PasswordSecretRef(BaseModel): + key: str + name: str + """ + Name of the secret. + """ + + +class Migration(BaseModel): + dbname: str | None = None + """ + (String) Database name for bootstrapping the initial connection. + Database name for bootstrapping the initial connection. + """ + host: str | None = None + """ + (String) Hostname or IP address of the server where to migrate data from. + Hostname or IP address of the server where to migrate data from. + """ + ignoreDbs: str | None = None + """ + separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + """ + ignoreRoles: str | None = None + """ + separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + """ + method: str | None = None + """ + (String) The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + """ + passwordSecretRef: PasswordSecretRef | None = None + """ + (String, Sensitive) Password for authentication with the server where to migrate data from. + Password for authentication with the server where to migrate data from. + """ + port: float | None = None + """ + (Number) Port number of the server where to migrate data from. + Port number of the server where to migrate data from. + """ + ssl: bool | None = None + """ + (Boolean) The server where to migrate data from is secured with SSL. + The server where to migrate data from is secured with SSL. + """ + username: str | None = None + """ + (String) User name for authentication with the server where to migrate data from. + User name for authentication with the server where to migrate data from. + """ + + +class PasswordEncryptionSecretRef(BaseModel): + key: str + name: str + """ + Name of the secret. + """ + + +class Pgaudit(BaseModel): + featureEnabled: bool | None = None + """ + (Boolean) Enable pgaudit extension. Enable pgaudit extension. When enabled, pgaudit extension will be automatically installed.Otherwise, extension will be uninstalled but auditing configurations will be preserved. + Enable pgaudit extension. Enable pgaudit extension. When enabled, pgaudit extension will be automatically installed.Otherwise, extension will be uninstalled but auditing configurations will be preserved. + """ + log: list[str] | None = None + """ + (List of String) Log. Specifies which classes of statements will be logged by session audit logging. + Log. Specifies which classes of statements will be logged by session audit logging. + """ + logCatalog: bool | None = None + """ + (Boolean) Log Catalog. Specifies that session logging should be enabled in the case where all relations + in a statement are in pg_catalog. + Log Catalog. Specifies that session logging should be enabled in the case where all relations + in a statement are in pg_catalog. + """ + logClient: bool | None = None + """ + (Boolean) Log Client. Specifies whether log messages will be visible to a client process such as psql. + Log Client. Specifies whether log messages will be visible to a client process such as psql. + """ + logLevel: str | None = None + """ + (String) Log level. Specifies the log level that will be used for log entries. + Log level. Specifies the log level that will be used for log entries. + """ + logMaxStringLength: float | None = None + """ + 1 disable the truncation. + Log Max String Length. Crop parameters representation and whole statements if they exceed this threshold. + A (default) value of -1 disable the truncation. + """ + logNestedStatements: bool | None = None + """ + (Boolean) Log Nested Statements. This GUC allows to turn off logging nested statements, that is, statements that are + executed as part of another ExecutorRun. + Log Nested Statements. This GUC allows to turn off logging nested statements, that is, statements that are + executed as part of another ExecutorRun. + """ + logParameter: bool | None = None + """ + (Boolean) Log Parameter. Specifies that audit logging should include the parameters that were passed with the statement. + Log Parameter. Specifies that audit logging should include the parameters that were passed with the statement. + """ + logParameterMaxSize: float | None = None + """ + (Number) Log Parameter Max Size. Specifies that parameter values longer than this setting (in bytes) should not be logged, + but replaced with . + Log Parameter Max Size. Specifies that parameter values longer than this setting (in bytes) should not be logged, + but replaced with . + """ + logRelation: bool | None = None + """ + (Boolean) Log Relation. Specifies whether session audit logging should create a separate log entry + for each relation (TABLE, VIEW, etc.) referenced in a SELECT or DML statement. + Log Relation. Specifies whether session audit logging should create a separate log entry + for each relation (TABLE, VIEW, etc.) referenced in a SELECT or DML statement. + """ + logRows: bool | None = None + """ + (Boolean) Log Rows. + Log Rows. + """ + logStatement: bool | None = None + """ + (Boolean) Log Statement. Specifies whether logging will include the statement text and parameters (if enabled). + Log Statement. Specifies whether logging will include the statement text and parameters (if enabled). + """ + logStatementOnce: bool | None = None + """ + (Boolean) Log Statement Once. Specifies whether logging will include the statement text and parameters with + the first log entry for a statement/substatement combination or with every entry. + Log Statement Once. Specifies whether logging will include the statement text and parameters with + the first log entry for a statement/substatement combination or with every entry. + """ + role: str | None = None + """ + (String) Role. Specifies the master role to use for object audit logging. + Role. Specifies the master role to use for object audit logging. + """ + + +class Pgbouncer(BaseModel): + autodbIdleTimeout: float | None = None + """ + (Number) If the automatically created database pools have been unused this many seconds, they are freed. If 0 then timeout is disabled. [seconds]. + If the automatically created database pools have been unused this many seconds, they are freed. If 0 then timeout is disabled. [seconds]. + """ + autodbMaxDbConnections: float | None = None + """ + (Number) Do not allow more than this many server connections per database (regardless of user). Setting it to 0 means unlimited. + Do not allow more than this many server connections per database (regardless of user). Setting it to 0 means unlimited. + """ + autodbPoolMode: str | None = None + """ + (String) PGBouncer pool mode. + PGBouncer pool mode. + """ + autodbPoolSize: float | None = None + """ + zero then create automatically a pool of that size per user when a pool doesn't exist. + If non-zero then create automatically a pool of that size per user when a pool doesn't exist. + """ + ignoreStartupParameters: list[str] | None = None + """ + (List of String) List of parameters to ignore when given in startup packet. + List of parameters to ignore when given in startup packet. + """ + maxPreparedStatements: float | None = None + """ + level named prepared statements related commands sent by the client in transaction and statement pooling modes when max_prepared_statements is set to a non-zero value. Setting it to 0 disables prepared statements. max_prepared_statements defaults to 100, and its maximum is 3000. + PgBouncer tracks protocol-level named prepared statements related commands sent by the client in transaction and statement pooling modes when max_prepared_statements is set to a non-zero value. Setting it to 0 disables prepared statements. max_prepared_statements defaults to 100, and its maximum is 3000. + """ + minPoolSize: float | None = None + """ + (Number) Add more server connections to pool if below this number. Improves behavior when usual load comes suddenly back after period of total inactivity. The value is effectively capped at the pool size. + Add more server connections to pool if below this number. Improves behavior when usual load comes suddenly back after period of total inactivity. The value is effectively capped at the pool size. + """ + serverConnectTimeout: float | None = None + """ + (Number) If connection and login don’t finish in this amount of time, the connection will be closed. [seconds]. + If connection and login don’t finish in this amount of time, the connection will be closed. [seconds]. + """ + serverIdleTimeout: float | None = None + """ + (Number) If a server connection has been idle more than this many seconds it will be dropped. If 0 then timeout is disabled. [seconds]. + If a server connection has been idle more than this many seconds it will be dropped. If 0 then timeout is disabled. [seconds]. + """ + serverLifetime: float | None = None + """ + (Number) The pooler will close an unused server connection that has been connected longer than this. [seconds]. + The pooler will close an unused server connection that has been connected longer than this. [seconds]. + """ + serverLoginRetry: float | None = None + """ + (Number) If login to the server failed, because of failure to connect or from authentication, the pooler waits this much before retrying to connect. During the waiting interval, new clients trying to connect to the failing server will get an error immediately without another connection attempt. [seconds]. + If login to the server failed, because of failure to connect or from authentication, the pooler waits this much before retrying to connect. During the waiting interval, new clients trying to connect to the failing server will get an error immediately without another connection attempt. [seconds]. + """ + serverResetQueryAlways: bool | None = None + """ + (Boolean) Run server_reset_query (DISCARD ALL) in all pooling modes. + Run server_reset_query (DISCARD ALL) in all pooling modes. + """ + + +class Pglookout(BaseModel): + maxFailoverReplicationTimeLag: float | None = None + """ + (Number) Max Failover Replication Time Lag. Number of seconds of master unavailability before triggering database failover to standby. + Max Failover Replication Time Lag. Number of seconds of master unavailability before triggering database failover to standby. + """ + + +class Timescaledb(BaseModel): + maxBackgroundWorkers: float | None = None + """ + (Number) The number of background workers for timescaledb operations. You should configure this setting to the sum of your number of databases and the total number of concurrent background workers you want running at any given point in time. Changing this parameter causes a service restart. + The number of background workers for timescaledb operations. You should configure this setting to the sum of your number of databases and the total number of concurrent background workers you want running at any given point in time. Changing this parameter causes a service restart. + """ + + +class Properties(BaseModel): + adminPasswordSecretRef: AdminPasswordSecretRef | None = None + """ + (String, Sensitive) Custom password for admin user. Defaults to random string. This must be set only when a new service is being created. + Custom password for admin user. Defaults to random string. This must be set only when a new service is being created. + """ + adminUsername: str | None = None + """ + (String) Custom username for admin user. This must be set only when a new service is being created. + Custom username for admin user. This must be set only when a new service is being created. + """ + automaticUtilityNetworkIpFilter: bool | None = None + """ + (Boolean) Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + """ + autovacuumAnalyzeScaleFactor: float | None = None + """ + (Number) Specifies a fraction of the table size to add to autovacuum_analyze_threshold when deciding whether to trigger an ANALYZE (e.g. 0.2 for 20% of the table size). The default is 0.2. + Specifies a fraction of the table size to add to autovacuum_analyze_threshold when deciding whether to trigger an ANALYZE (e.g. `0.2` for 20% of the table size). The default is `0.2`. + """ + autovacuumAnalyzeThreshold: float | None = None + """ + (Number) Specifies the minimum number of inserted, updated or deleted tuples needed to trigger an ANALYZE in any one table. The default is 50. + Specifies the minimum number of inserted, updated or deleted tuples needed to trigger an ANALYZE in any one table. The default is `50`. + """ + autovacuumFreezeMaxAge: float | None = None + """ + (Number) Specifies the maximum age (in transactions) that a table's pg_class.relfrozenxid field can attain before a VACUUM operation is forced to prevent transaction ID wraparound within the table. The system launches autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. Changing this parameter causes a service restart. + Specifies the maximum age (in transactions) that a table's pg_class.relfrozenxid field can attain before a VACUUM operation is forced to prevent transaction ID wraparound within the table. The system launches autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. Changing this parameter causes a service restart. + """ + autovacuumMaxWorkers: float | None = None + """ + (Number) Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time. The default is 3. Changing this parameter causes a service restart. + Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time. The default is `3`. Changing this parameter causes a service restart. + """ + autovacuumNaptime: float | None = None + """ + (Number) Specifies the minimum delay between autovacuum runs on any given database. The delay is measured in seconds. The default is 60. + Specifies the minimum delay between autovacuum runs on any given database. The delay is measured in seconds. The default is `60`. + """ + autovacuumVacuumCostDelay: float | None = None + """ + 1 is specified, the regular vacuum_cost_delay value will be used. The default is 2 (upstream default). + Specifies the cost delay value that will be used in automatic VACUUM operations. If `-1` is specified, the regular vacuum_cost_delay value will be used. The default is `2` (upstream default). + """ + autovacuumVacuumCostLimit: float | None = None + """ + 1 is specified, the regular vacuum_cost_limit value will be used. The default is -1 (upstream default). + Specifies the cost limit value that will be used in automatic VACUUM operations. If `-1` is specified, the regular vacuum_cost_limit value will be used. The default is `-1` (upstream default). + """ + autovacuumVacuumScaleFactor: float | None = None + """ + (Number) Specifies a fraction of the table size to add to autovacuum_vacuum_threshold when deciding whether to trigger a VACUUM (e.g. 0.2 for 20% of the table size). The default is 0.2. + Specifies a fraction of the table size to add to autovacuum_vacuum_threshold when deciding whether to trigger a VACUUM (e.g. `0.2` for 20% of the table size). The default is `0.2`. + """ + autovacuumVacuumThreshold: float | None = None + """ + (Number) Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is 50. + Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is `50`. + """ + backupHour: float | None = None + """ + (Number) The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed. + The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed. + """ + backupIntervalHours: float | None = None + """ + (Number) Backup interval in hours. Interval in hours between automatic backups. Minimum value is 3 hours. Must be a divisor of 24 (3, 4, 6, 8, 12, 24). (Applicable to ACU plans only). + Backup interval in hours. Interval in hours between automatic backups. Minimum value is 3 hours. Must be a divisor of 24 (3, 4, 6, 8, 12, 24). (Applicable to ACU plans only). + """ + backupMinute: float | None = None + """ + (Number) The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed. + The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed. + """ + backupRetentionDays: float | None = None + """ + (Number) Backup retention in days. Number of days to retain automatic backups. Backups older than this value will be automatically deleted. (Applicable to ACU plans only). + Backup retention in days. Number of days to retain automatic backups. Backups older than this value will be automatically deleted. (Applicable to ACU plans only). + """ + bgwriterDelay: float | None = None + """ + (Number) Specifies the delay between activity rounds for the background writer in milliseconds. The default is 200. + Specifies the delay between activity rounds for the background writer in milliseconds. The default is `200`. + """ + bgwriterFlushAfter: float | None = None + """ + (Number) Whenever more than bgwriter_flush_after bytes have been written by the background writer, attempt to force the OS to issue these writes to the underlying storage. Specified in kilobytes. Setting of 0 disables forced writeback. The default is 512. + Whenever more than bgwriter_flush_after bytes have been written by the background writer, attempt to force the OS to issue these writes to the underlying storage. Specified in kilobytes. Setting of 0 disables forced writeback. The default is `512`. + """ + bgwriterLruMaxpages: float | None = None + """ + (Number) In each round, no more than this many buffers will be written by the background writer. Setting this to zero disables background writing. The default is 100. + In each round, no more than this many buffers will be written by the background writer. Setting this to zero disables background writing. The default is `100`. + """ + bgwriterLruMultiplier: float | None = None + """ + (Number) The average recent need for new buffers is multiplied by bgwriter_lru_multiplier to arrive at an estimate of the number that will be needed during the next round, (up to bgwriter_lru_maxpages). 1.0 represents a “just in time” policy of writing exactly the number of buffers predicted to be needed. Larger values provide some cushion against spikes in demand, while smaller values intentionally leave writes to be done by server processes. The default is 2.0. + The average recent need for new buffers is multiplied by bgwriter_lru_multiplier to arrive at an estimate of the number that will be needed during the next round, (up to bgwriter_lru_maxpages). 1.0 represents a “just in time” policy of writing exactly the number of buffers predicted to be needed. Larger values provide some cushion against spikes in demand, while smaller values intentionally leave writes to be done by server processes. The default is `2.0`. + """ + deadlockTimeout: float | None = None + """ + (Number) This is the amount of time, in milliseconds, to wait on a lock before checking to see if there is a deadlock condition. The default is 1000 (upstream default). + This is the amount of time, in milliseconds, to wait on a lock before checking to see if there is a deadlock condition. The default is `1000` (upstream default). + """ + defaultToastCompression: str | None = None + """ + (String) Specifies the default TOAST compression method for values of compressible columns. The default is lz4. Only available for PostgreSQL 14+. + Specifies the default TOAST compression method for values of compressible columns. The default is `lz4`. Only available for PostgreSQL 14+. + """ + enableHaReplicaDns: bool | None = None + """ + only DNS that automatically falls back to the primary if standby nodes are unavailable. It switches back when a standby recovers. + Enable HA replica DNS. Creates a dedicated read-only DNS that automatically falls back to the primary if standby nodes are unavailable. It switches back when a standby recovers. + """ + idleInTransactionSessionTimeout: float | None = None + """ + (Number) Time out sessions with open transactions after this number of milliseconds. + Time out sessions with open transactions after this number of milliseconds. + """ + ioCombineLimit: float | None = None + """ + (Number) EXPERIMENTAL: Controls the largest I/O size in operations that combine I/O in 8kB units. Version 17 and up only. + EXPERIMENTAL: Controls the largest I/O size in operations that combine I/O in 8kB units. Version 17 and up only. + """ + ioMaxCombineLimit: float | None = None + """ + settable parameter io_combine_limit. Version 18 and up only. Changing this parameter causes a service restart. + EXPERIMENTAL: Controls the largest I/O size in operations that combine I/O in 8kB units, and silently limits the user-settable parameter io_combine_limit. Version 18 and up only. Changing this parameter causes a service restart. + """ + ioMaxConcurrency: float | None = None + """ + (Number) EXPERIMENTAL: Controls the maximum number of I/O operations that one process can execute simultaneously. Version 18 and up only. Changing this parameter causes a service restart. + EXPERIMENTAL: Controls the maximum number of I/O operations that one process can execute simultaneously. Version 18 and up only. Changing this parameter causes a service restart. + """ + ioMethod: str | None = None + """ + (String) EXPERIMENTAL: Controls the maximum number of I/O operations that one process can execute simultaneously. Version 18 and up only. Changing this parameter causes a service restart. + EXPERIMENTAL: Controls the maximum number of I/O operations that one process can execute simultaneously. Version 18 and up only. Changing this parameter causes a service restart. + """ + ioWorkers: float | None = None + """ + (Number) EXPERIMENTAL: Number of IO worker processes, for io_method=worker. Version 18 and up only. + EXPERIMENTAL: Number of IO worker processes, for io_method=worker. Version 18 and up only. + """ + ipFilter: list[str] | None = None + """ + (List of String) IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + """ + jit: bool | None = None + """ + wide use of Just-in-Time Compilation (JIT). + Controls system-wide use of Just-in-Time Compilation (JIT). + """ + logAutovacuumMinDuration: float | None = None + """ + one disables logging autovacuum actions. The default is 1000. + Causes each action executed by autovacuum to be logged if it ran for at least the specified number of milliseconds. Setting this to zero logs all autovacuum actions. Minus-one disables logging autovacuum actions. The default is `1000`. + """ + logErrorVerbosity: str | None = None + """ + (String) Controls the amount of detail written in the server log for each message that is logged. + Controls the amount of detail written in the server log for each message that is logged. + """ + logLinePrefix: str | None = None + """ + (String) Choose from one of the available log formats. + Choose from one of the available log formats. + """ + logMinDurationStatement: float | None = None + """ + 1 disables. + Log statements that take more than this number of milliseconds to run, -1 disables. + """ + logTempFiles: float | None = None + """ + 1 disables. + Log statements for each temporary file created larger than this number of kilobytes, -1 disables. + """ + maxConnections: float | None = None + """ + (Number) Sets the PostgreSQL maximum number of concurrent connections to the database server. For services with a read replica, first increase the read replica's value. After the change is applied to the replica, you can increase the primary service's value. Changing this parameter causes a service restart. + Sets the PostgreSQL maximum number of concurrent connections to the database server. For services with a read replica, first increase the read replica's value. After the change is applied to the replica, you can increase the primary service's value. Changing this parameter causes a service restart. + """ + maxFilesPerProcess: float | None = None + """ + (Number) PostgreSQL maximum number of files that can be open per process. The default is 1000 (upstream default). Changing this parameter causes a service restart. + PostgreSQL maximum number of files that can be open per process. The default is `1000` (upstream default). Changing this parameter causes a service restart. + """ + maxLocksPerTransaction: float | None = None + """ + (Number) PostgreSQL maximum locks per transaction. Changing this parameter causes a service restart. + PostgreSQL maximum locks per transaction. Changing this parameter causes a service restart. + """ + maxLogicalReplicationWorkers: float | None = None + """ + (Number) PostgreSQL maximum logical replication workers (taken from the pool defined by max_worker_processes). The default is 4 (upstream default). Changing this parameter causes a service restart. + PostgreSQL maximum logical replication workers (taken from the pool defined by max_worker_processes). The default is `4` (upstream default). Changing this parameter causes a service restart. + """ + maxParallelWorkers: float | None = None + """ + (Number) Sets the maximum number of workers that the system can support for parallel queries. The default is 8 (upstream default). + Sets the maximum number of workers that the system can support for parallel queries. The default is `8` (upstream default). + """ + maxParallelWorkersPerGather: float | None = None + """ + (Number) Sets the maximum number of workers that can be started by a single Gather or Gather Merge node. The default is 2 (upstream default). + Sets the maximum number of workers that can be started by a single Gather or Gather Merge node. The default is `2` (upstream default). + """ + maxPredLocksPerTransaction: float | None = None + """ + (Number) PostgreSQL maximum predicate locks per transaction. The default is 64 (upstream default). Changing this parameter causes a service restart. + PostgreSQL maximum predicate locks per transaction. The default is `64` (upstream default). Changing this parameter causes a service restart. + """ + maxPreparedTransactions: float | None = None + """ + (Number) PostgreSQL maximum prepared transactions. The default is 0. Changing this parameter causes a service restart. + PostgreSQL maximum prepared transactions. The default is `0`. Changing this parameter causes a service restart. + """ + maxReplicationSlots: float | None = None + """ + (Number) PostgreSQL maximum replication slots. The default is 20. Changing this parameter causes a service restart. + PostgreSQL maximum replication slots. The default is `20`. Changing this parameter causes a service restart. + """ + maxSlotWalKeepSize: float | None = None + """ + 1 is specified, replication slots may retain an unlimited amount of WAL files. The default is -1 (upstream default). wal_keep_size minimum WAL size setting takes precedence over this. + PostgreSQL maximum WAL size (MB) reserved for replication slots. If `-1` is specified, replication slots may retain an unlimited amount of WAL files. The default is `-1` (upstream default). wal_keep_size minimum WAL size setting takes precedence over this. + """ + maxStackDepth: float | None = None + """ + (Number) Maximum depth of the stack in bytes. The default is 2097152 (upstream default). + Maximum depth of the stack in bytes. The default is `2097152` (upstream default). + """ + maxStandbyArchiveDelay: float | None = None + """ + (Number) Max standby archive delay in milliseconds. The default is 30000 (upstream default). + Max standby archive delay in milliseconds. The default is `30000` (upstream default). + """ + maxStandbyStreamingDelay: float | None = None + """ + (Number) Max standby streaming delay in milliseconds. The default is 30000 (upstream default). + Max standby streaming delay in milliseconds. The default is `30000` (upstream default). + """ + maxSyncWorkersPerSubscription: float | None = None + """ + (Number) Maximum number of synchronization workers per subscription. The default is 2. + Maximum number of synchronization workers per subscription. The default is `2`. + """ + maxWalSenders: float | None = None + """ + (Number) PostgreSQL maximum WAL senders. The default is 20. Changing this parameter causes a service restart. + PostgreSQL maximum WAL senders. The default is `20`. Changing this parameter causes a service restart. + """ + maxWorkerProcesses: float | None = None + """ + (Number) Sets the maximum number of background processes that the system can support. The default is 8. Changing this parameter causes a service restart. + Sets the maximum number of background processes that the system can support. The default is `8`. Changing this parameter causes a service restart. + """ + migration: Migration | None = None + """ + (Block List) Migrate data from existing server. (see below for nested schema) + Migrate data from existing server. + """ + nodeCount: float | None = None + """ + (Number) Number of nodes for the service. + Number of nodes for the service. + """ + passwordEncryptionSecretRef: PasswordEncryptionSecretRef | None = None + """ + (String, Sensitive) Chooses the algorithm for encrypting passwords. + Chooses the algorithm for encrypting passwords. + """ + pgPartmanBgwInterval: float | None = None + """ + (Number) Sets the time interval in seconds to run pg_partman's scheduled tasks. The default is 3600. + Sets the time interval in seconds to run pg_partman's scheduled tasks. The default is `3600`. + """ + pgPartmanBgwRole: str | None = None + """ + (String) Controls which role to use for pg_partman's scheduled background tasks. + Controls which role to use for pg_partman's scheduled background tasks. + """ + pgStatMonitorEnable: bool | None = None + """ + (Boolean) Enable pg_stat_monitor extension if available for the current cluster. Enable the pg_stat_monitor extension. Changing this parameter causes a service restart. When this extension is enabled, pg_stat_statements results for utility commands are unreliable. + Enable pg_stat_monitor extension if available for the current cluster. Enable the pg_stat_monitor extension. Changing this parameter causes a service restart. When this extension is enabled, pg_stat_statements results for utility commands are unreliable. + """ + pgStatMonitorPgsmEnableQueryPlan: bool | None = None + """ + (Boolean) Enables or disables query plan monitoring. Only available for PostgreSQL 13+. + Enables or disables query plan monitoring. Only available for PostgreSQL 13+. + """ + pgStatMonitorPgsmMaxBuckets: float | None = None + """ + (Number) Sets the maximum number of buckets. Changing this parameter causes a service restart. Only available for PostgreSQL 13+. + Sets the maximum number of buckets. Changing this parameter causes a service restart. Only available for PostgreSQL 13+. + """ + pgStatPlansEnable: bool | None = None + """ + (Boolean) Enable pg_stat_plans extension if available for the current cluster. Enable the pg_stat_plans extension. Changing this parameter causes a service restart. Tracks execution plans for SQL queries. + Enable pg_stat_plans extension if available for the current cluster. Enable the pg_stat_plans extension. Changing this parameter causes a service restart. Tracks execution plans for SQL queries. + """ + pgStatPlansTrack: str | None = None + """ + level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable plan tracking. The default is top. + Controls which statements' plans are tracked. Specify top to track top-level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable plan tracking. The default is `top`. + """ + pgStatStatementsTrack: str | None = None + """ + level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable statement statistics collection. The default is top. + Controls which statements are counted. Specify top to track top-level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable statement statistics collection. The default is `top`. + """ + pgaudit: Pgaudit | None = None + """ + wide settings for the pgaudit extension. (see below for nested schema) + PGAudit settings. System-wide settings for the pgaudit extension. + """ + pgbouncer: Pgbouncer | None = None + """ + wide settings for pgbouncer. (see below for nested schema) + PGBouncer connection pooling settings. System-wide settings for pgbouncer. + """ + pglookout: Pglookout | None = None + """ + wide settings for pglookout. (see below for nested schema) + PGLookout settings. System-wide settings for pglookout. + """ + publicAccess: bool | None = None + """ + (Boolean) Public Access. Allow access to the service from the public Internet. + Public Access. Allow access to the service from the public Internet. + """ + publicAccessPrometheus: bool | None = None + """ + (Boolean) Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + """ + serviceLog: bool | None = None + """ + (Boolean) Service logging. Store logs for the service so that they are available in the HTTP API and console. + Service logging. Store logs for the service so that they are available in the HTTP API and console. + """ + sharedBuffersPercentage: float | None = None + """ + 60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value. Changing this parameter causes a service restart. + Percentage of total RAM that the database server uses for shared memory buffers. Valid range is 20-60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value. Changing this parameter causes a service restart. + """ + synchronousCommit: str | None = None + """ + (String) Sets the current transaction's synchronization level. The default is off. This setting takes precedence over synchronous_replication. + Sets the current transaction's synchronization level. The default is `off`. This setting takes precedence over `synchronous_replication`. + """ + synchronousReplication: str | None = None + """ + (String) Synchronous replication type. (deprecated, use synchronous_commit instead). Note that the service plan also needs to support synchronous replication. This setting is deprecated. Use synchronous_commit instead. Any change to this setting will automatically update synchronous_commit. Setting the value to quorum changes synchronous_commit to remote_write, while setting it to off changes synchronous_commit to off. + Synchronous replication type. (deprecated, use synchronous_commit instead). Note that the service plan also needs to support synchronous replication. This setting is deprecated. Use synchronous_commit instead. Any change to this setting will automatically update synchronous_commit. Setting the value to quorum changes synchronous_commit to remote_write, while setting it to off changes synchronous_commit to off. + """ + tempFileLimit: float | None = None + """ + 1 for unlimited. + PostgreSQL temporary file limit in KiB, -1 for unlimited. + """ + timescaledb: Timescaledb | None = None + """ + wide settings for the timescaledb extension. (see below for nested schema) + TimescaleDB extension configuration values. System-wide settings for the timescaledb extension. + """ + timezone: str | None = None + """ + (String) PostgreSQL service timezone. + PostgreSQL service timezone. + """ + trackActivityQuerySize: float | None = None + """ + (Number) Specifies the number of bytes reserved to track the currently executing command for each active session. Changing this parameter causes a service restart. + Specifies the number of bytes reserved to track the currently executing command for each active session. Changing this parameter causes a service restart. + """ + trackCommitTimestamp: str | None = None + """ + (String) Record commit time of transactions. Changing this parameter causes a service restart. + Record commit time of transactions. Changing this parameter causes a service restart. + """ + trackFunctions: str | None = None + """ + (String) Enables tracking of function call counts and time used. + Enables tracking of function call counts and time used. + """ + trackIoTiming: str | None = None + """ + (String) Enables timing of database I/O calls. The default is off. When on, it will repeatedly query the operating system for the current time, which may cause significant overhead on some platforms. + Enables timing of database I/O calls. The default is `off`. When on, it will repeatedly query the operating system for the current time, which may cause significant overhead on some platforms. + """ + variant: str | None = None + """ + (String) Variant of the PostgreSQL service, may affect the features that are exposed by default. + Variant of the PostgreSQL service, may affect the features that are exposed by default. + """ + version: str | None = None + """ + (String) PostgreSQL major version. + PostgreSQL major version. + """ + walSenderTimeout: float | None = None + """ + (Number) Terminate replication connections that are inactive for longer than this amount of time, in milliseconds. Setting this value to zero disables the timeout. + Terminate replication connections that are inactive for longer than this amount of time, in milliseconds. Setting this value to zero disables the timeout. + """ + walWriterDelay: float | None = None + """ + (Number) WAL flush interval in milliseconds. The default is 200. Setting this parameter to a lower value may negatively impact performance. + WAL flush interval in milliseconds. The default is `200`. Setting this parameter to a lower value may negatively impact performance. + """ + workMem: float | None = None + """ + (Number) Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files, in MB. The default is 1MB + 0.075% of total RAM (up to 32MB). + Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files, in MB. The default is 1MB + 0.075% of total RAM (up to 32MB). + """ + + +class ForProvider(BaseModel): + additionalDiskSpaceGib: float | None = None + """ + (Number, Deprecated) Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItem] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + plan: str | None = None + """ + (String, Deprecated) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans pg. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans pg`. + """ + planBackups: str | None = None + """ + (String) Backup tier for the database plan. + Backup tier for the database plan. + """ + planCompute: str | None = None + """ + (String) Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + """ + planNodeCount: float | None = None + """ + (Number) Number of nodes in the database plan. + Number of nodes in the database plan. + """ + planStorageGib: float | None = None + """ + (Number) Total storage per node in GiB. + Total storage per node in GiB. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + properties: Properties | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +class InitProvider(BaseModel): + additionalDiskSpaceGib: float | None = None + """ + (Number, Deprecated) Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItem] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + plan: str | None = None + """ + (String, Deprecated) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans pg. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans pg`. + """ + planBackups: str | None = None + """ + (String) Backup tier for the database plan. + Backup tier for the database plan. + """ + planCompute: str | None = None + """ + (String) Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + """ + planNodeCount: float | None = None + """ + (Number) Number of nodes in the database plan. + Number of nodes in the database plan. + """ + planStorageGib: float | None = None + """ + (Number) Total storage per node in GiB. + Total storage per node in GiB. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + properties: Properties | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 Component(BaseModel): + component: str | None = None + """ + (String) Component name. + Component name. + """ + host: str | None = None + """ + (String) Hostname or IP address of the server where to migrate data from. + Hostname of the component + """ + port: float | None = None + """ + (Number) Port number of the server where to migrate data from. + Port number of the component + """ + route: str | None = None + """ + (String) Component network route type + Component network route type + """ + usage: str | None = None + """ + (String) Usage of the component + Usage of the component + """ + + +class NetworkItemModel(BaseModel): + family: str | None = None + """ + (String) Network family. Currently only IPv4 is supported. + Network family. Currently only `IPv4` is supported. + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + The name of the network. Must be unique within the service. + """ + type: str | None = None + """ + (String) Type of the managed database instance + The type of the network. Must be private. + """ + uuid: str | None = None + """ + (String) Private network UUID. Must reside in the same zone as the database. + Private network UUID. Must reside in the same zone as the database. + """ + + +class NodeState(BaseModel): + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name plus a node iteration + """ + role: str | None = None + """ + (String) Role. Specifies the master role to use for object audit logging. + Role of the node + """ + state: str | None = None + """ + (String) The current state of the service + Current state of the node + """ + + +class MigrationModel(BaseModel): + dbname: str | None = None + """ + (String) Database name for bootstrapping the initial connection. + Database name for bootstrapping the initial connection. + """ + host: str | None = None + """ + (String) Hostname or IP address of the server where to migrate data from. + Hostname or IP address of the server where to migrate data from. + """ + ignoreDbs: str | None = None + """ + separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + """ + ignoreRoles: str | None = None + """ + separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + """ + method: str | None = None + """ + (String) The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + """ + port: float | None = None + """ + (Number) Port number of the server where to migrate data from. + Port number of the server where to migrate data from. + """ + ssl: bool | None = None + """ + (Boolean) The server where to migrate data from is secured with SSL. + The server where to migrate data from is secured with SSL. + """ + username: str | None = None + """ + (String) User name for authentication with the server where to migrate data from. + User name for authentication with the server where to migrate data from. + """ + + +class PropertiesModel(BaseModel): + adminUsername: str | None = None + """ + (String) Custom username for admin user. This must be set only when a new service is being created. + Custom username for admin user. This must be set only when a new service is being created. + """ + automaticUtilityNetworkIpFilter: bool | None = None + """ + (Boolean) Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + """ + autovacuumAnalyzeScaleFactor: float | None = None + """ + (Number) Specifies a fraction of the table size to add to autovacuum_analyze_threshold when deciding whether to trigger an ANALYZE (e.g. 0.2 for 20% of the table size). The default is 0.2. + Specifies a fraction of the table size to add to autovacuum_analyze_threshold when deciding whether to trigger an ANALYZE (e.g. `0.2` for 20% of the table size). The default is `0.2`. + """ + autovacuumAnalyzeThreshold: float | None = None + """ + (Number) Specifies the minimum number of inserted, updated or deleted tuples needed to trigger an ANALYZE in any one table. The default is 50. + Specifies the minimum number of inserted, updated or deleted tuples needed to trigger an ANALYZE in any one table. The default is `50`. + """ + autovacuumFreezeMaxAge: float | None = None + """ + (Number) Specifies the maximum age (in transactions) that a table's pg_class.relfrozenxid field can attain before a VACUUM operation is forced to prevent transaction ID wraparound within the table. The system launches autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. Changing this parameter causes a service restart. + Specifies the maximum age (in transactions) that a table's pg_class.relfrozenxid field can attain before a VACUUM operation is forced to prevent transaction ID wraparound within the table. The system launches autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. Changing this parameter causes a service restart. + """ + autovacuumMaxWorkers: float | None = None + """ + (Number) Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time. The default is 3. Changing this parameter causes a service restart. + Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time. The default is `3`. Changing this parameter causes a service restart. + """ + autovacuumNaptime: float | None = None + """ + (Number) Specifies the minimum delay between autovacuum runs on any given database. The delay is measured in seconds. The default is 60. + Specifies the minimum delay between autovacuum runs on any given database. The delay is measured in seconds. The default is `60`. + """ + autovacuumVacuumCostDelay: float | None = None + """ + 1 is specified, the regular vacuum_cost_delay value will be used. The default is 2 (upstream default). + Specifies the cost delay value that will be used in automatic VACUUM operations. If `-1` is specified, the regular vacuum_cost_delay value will be used. The default is `2` (upstream default). + """ + autovacuumVacuumCostLimit: float | None = None + """ + 1 is specified, the regular vacuum_cost_limit value will be used. The default is -1 (upstream default). + Specifies the cost limit value that will be used in automatic VACUUM operations. If `-1` is specified, the regular vacuum_cost_limit value will be used. The default is `-1` (upstream default). + """ + autovacuumVacuumScaleFactor: float | None = None + """ + (Number) Specifies a fraction of the table size to add to autovacuum_vacuum_threshold when deciding whether to trigger a VACUUM (e.g. 0.2 for 20% of the table size). The default is 0.2. + Specifies a fraction of the table size to add to autovacuum_vacuum_threshold when deciding whether to trigger a VACUUM (e.g. `0.2` for 20% of the table size). The default is `0.2`. + """ + autovacuumVacuumThreshold: float | None = None + """ + (Number) Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is 50. + Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is `50`. + """ + backupHour: float | None = None + """ + (Number) The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed. + The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed. + """ + backupIntervalHours: float | None = None + """ + (Number) Backup interval in hours. Interval in hours between automatic backups. Minimum value is 3 hours. Must be a divisor of 24 (3, 4, 6, 8, 12, 24). (Applicable to ACU plans only). + Backup interval in hours. Interval in hours between automatic backups. Minimum value is 3 hours. Must be a divisor of 24 (3, 4, 6, 8, 12, 24). (Applicable to ACU plans only). + """ + backupMinute: float | None = None + """ + (Number) The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed. + The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed. + """ + backupRetentionDays: float | None = None + """ + (Number) Backup retention in days. Number of days to retain automatic backups. Backups older than this value will be automatically deleted. (Applicable to ACU plans only). + Backup retention in days. Number of days to retain automatic backups. Backups older than this value will be automatically deleted. (Applicable to ACU plans only). + """ + bgwriterDelay: float | None = None + """ + (Number) Specifies the delay between activity rounds for the background writer in milliseconds. The default is 200. + Specifies the delay between activity rounds for the background writer in milliseconds. The default is `200`. + """ + bgwriterFlushAfter: float | None = None + """ + (Number) Whenever more than bgwriter_flush_after bytes have been written by the background writer, attempt to force the OS to issue these writes to the underlying storage. Specified in kilobytes. Setting of 0 disables forced writeback. The default is 512. + Whenever more than bgwriter_flush_after bytes have been written by the background writer, attempt to force the OS to issue these writes to the underlying storage. Specified in kilobytes. Setting of 0 disables forced writeback. The default is `512`. + """ + bgwriterLruMaxpages: float | None = None + """ + (Number) In each round, no more than this many buffers will be written by the background writer. Setting this to zero disables background writing. The default is 100. + In each round, no more than this many buffers will be written by the background writer. Setting this to zero disables background writing. The default is `100`. + """ + bgwriterLruMultiplier: float | None = None + """ + (Number) The average recent need for new buffers is multiplied by bgwriter_lru_multiplier to arrive at an estimate of the number that will be needed during the next round, (up to bgwriter_lru_maxpages). 1.0 represents a “just in time” policy of writing exactly the number of buffers predicted to be needed. Larger values provide some cushion against spikes in demand, while smaller values intentionally leave writes to be done by server processes. The default is 2.0. + The average recent need for new buffers is multiplied by bgwriter_lru_multiplier to arrive at an estimate of the number that will be needed during the next round, (up to bgwriter_lru_maxpages). 1.0 represents a “just in time” policy of writing exactly the number of buffers predicted to be needed. Larger values provide some cushion against spikes in demand, while smaller values intentionally leave writes to be done by server processes. The default is `2.0`. + """ + deadlockTimeout: float | None = None + """ + (Number) This is the amount of time, in milliseconds, to wait on a lock before checking to see if there is a deadlock condition. The default is 1000 (upstream default). + This is the amount of time, in milliseconds, to wait on a lock before checking to see if there is a deadlock condition. The default is `1000` (upstream default). + """ + defaultToastCompression: str | None = None + """ + (String) Specifies the default TOAST compression method for values of compressible columns. The default is lz4. Only available for PostgreSQL 14+. + Specifies the default TOAST compression method for values of compressible columns. The default is `lz4`. Only available for PostgreSQL 14+. + """ + enableHaReplicaDns: bool | None = None + """ + only DNS that automatically falls back to the primary if standby nodes are unavailable. It switches back when a standby recovers. + Enable HA replica DNS. Creates a dedicated read-only DNS that automatically falls back to the primary if standby nodes are unavailable. It switches back when a standby recovers. + """ + idleInTransactionSessionTimeout: float | None = None + """ + (Number) Time out sessions with open transactions after this number of milliseconds. + Time out sessions with open transactions after this number of milliseconds. + """ + ioCombineLimit: float | None = None + """ + (Number) EXPERIMENTAL: Controls the largest I/O size in operations that combine I/O in 8kB units. Version 17 and up only. + EXPERIMENTAL: Controls the largest I/O size in operations that combine I/O in 8kB units. Version 17 and up only. + """ + ioMaxCombineLimit: float | None = None + """ + settable parameter io_combine_limit. Version 18 and up only. Changing this parameter causes a service restart. + EXPERIMENTAL: Controls the largest I/O size in operations that combine I/O in 8kB units, and silently limits the user-settable parameter io_combine_limit. Version 18 and up only. Changing this parameter causes a service restart. + """ + ioMaxConcurrency: float | None = None + """ + (Number) EXPERIMENTAL: Controls the maximum number of I/O operations that one process can execute simultaneously. Version 18 and up only. Changing this parameter causes a service restart. + EXPERIMENTAL: Controls the maximum number of I/O operations that one process can execute simultaneously. Version 18 and up only. Changing this parameter causes a service restart. + """ + ioMethod: str | None = None + """ + (String) EXPERIMENTAL: Controls the maximum number of I/O operations that one process can execute simultaneously. Version 18 and up only. Changing this parameter causes a service restart. + EXPERIMENTAL: Controls the maximum number of I/O operations that one process can execute simultaneously. Version 18 and up only. Changing this parameter causes a service restart. + """ + ioWorkers: float | None = None + """ + (Number) EXPERIMENTAL: Number of IO worker processes, for io_method=worker. Version 18 and up only. + EXPERIMENTAL: Number of IO worker processes, for io_method=worker. Version 18 and up only. + """ + ipFilter: list[str] | None = None + """ + (List of String) IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + """ + jit: bool | None = None + """ + wide use of Just-in-Time Compilation (JIT). + Controls system-wide use of Just-in-Time Compilation (JIT). + """ + logAutovacuumMinDuration: float | None = None + """ + one disables logging autovacuum actions. The default is 1000. + Causes each action executed by autovacuum to be logged if it ran for at least the specified number of milliseconds. Setting this to zero logs all autovacuum actions. Minus-one disables logging autovacuum actions. The default is `1000`. + """ + logErrorVerbosity: str | None = None + """ + (String) Controls the amount of detail written in the server log for each message that is logged. + Controls the amount of detail written in the server log for each message that is logged. + """ + logLinePrefix: str | None = None + """ + (String) Choose from one of the available log formats. + Choose from one of the available log formats. + """ + logMinDurationStatement: float | None = None + """ + 1 disables. + Log statements that take more than this number of milliseconds to run, -1 disables. + """ + logTempFiles: float | None = None + """ + 1 disables. + Log statements for each temporary file created larger than this number of kilobytes, -1 disables. + """ + maxConnections: float | None = None + """ + (Number) Sets the PostgreSQL maximum number of concurrent connections to the database server. For services with a read replica, first increase the read replica's value. After the change is applied to the replica, you can increase the primary service's value. Changing this parameter causes a service restart. + Sets the PostgreSQL maximum number of concurrent connections to the database server. For services with a read replica, first increase the read replica's value. After the change is applied to the replica, you can increase the primary service's value. Changing this parameter causes a service restart. + """ + maxFilesPerProcess: float | None = None + """ + (Number) PostgreSQL maximum number of files that can be open per process. The default is 1000 (upstream default). Changing this parameter causes a service restart. + PostgreSQL maximum number of files that can be open per process. The default is `1000` (upstream default). Changing this parameter causes a service restart. + """ + maxLocksPerTransaction: float | None = None + """ + (Number) PostgreSQL maximum locks per transaction. Changing this parameter causes a service restart. + PostgreSQL maximum locks per transaction. Changing this parameter causes a service restart. + """ + maxLogicalReplicationWorkers: float | None = None + """ + (Number) PostgreSQL maximum logical replication workers (taken from the pool defined by max_worker_processes). The default is 4 (upstream default). Changing this parameter causes a service restart. + PostgreSQL maximum logical replication workers (taken from the pool defined by max_worker_processes). The default is `4` (upstream default). Changing this parameter causes a service restart. + """ + maxParallelWorkers: float | None = None + """ + (Number) Sets the maximum number of workers that the system can support for parallel queries. The default is 8 (upstream default). + Sets the maximum number of workers that the system can support for parallel queries. The default is `8` (upstream default). + """ + maxParallelWorkersPerGather: float | None = None + """ + (Number) Sets the maximum number of workers that can be started by a single Gather or Gather Merge node. The default is 2 (upstream default). + Sets the maximum number of workers that can be started by a single Gather or Gather Merge node. The default is `2` (upstream default). + """ + maxPredLocksPerTransaction: float | None = None + """ + (Number) PostgreSQL maximum predicate locks per transaction. The default is 64 (upstream default). Changing this parameter causes a service restart. + PostgreSQL maximum predicate locks per transaction. The default is `64` (upstream default). Changing this parameter causes a service restart. + """ + maxPreparedTransactions: float | None = None + """ + (Number) PostgreSQL maximum prepared transactions. The default is 0. Changing this parameter causes a service restart. + PostgreSQL maximum prepared transactions. The default is `0`. Changing this parameter causes a service restart. + """ + maxReplicationSlots: float | None = None + """ + (Number) PostgreSQL maximum replication slots. The default is 20. Changing this parameter causes a service restart. + PostgreSQL maximum replication slots. The default is `20`. Changing this parameter causes a service restart. + """ + maxSlotWalKeepSize: float | None = None + """ + 1 is specified, replication slots may retain an unlimited amount of WAL files. The default is -1 (upstream default). wal_keep_size minimum WAL size setting takes precedence over this. + PostgreSQL maximum WAL size (MB) reserved for replication slots. If `-1` is specified, replication slots may retain an unlimited amount of WAL files. The default is `-1` (upstream default). wal_keep_size minimum WAL size setting takes precedence over this. + """ + maxStackDepth: float | None = None + """ + (Number) Maximum depth of the stack in bytes. The default is 2097152 (upstream default). + Maximum depth of the stack in bytes. The default is `2097152` (upstream default). + """ + maxStandbyArchiveDelay: float | None = None + """ + (Number) Max standby archive delay in milliseconds. The default is 30000 (upstream default). + Max standby archive delay in milliseconds. The default is `30000` (upstream default). + """ + maxStandbyStreamingDelay: float | None = None + """ + (Number) Max standby streaming delay in milliseconds. The default is 30000 (upstream default). + Max standby streaming delay in milliseconds. The default is `30000` (upstream default). + """ + maxSyncWorkersPerSubscription: float | None = None + """ + (Number) Maximum number of synchronization workers per subscription. The default is 2. + Maximum number of synchronization workers per subscription. The default is `2`. + """ + maxWalSenders: float | None = None + """ + (Number) PostgreSQL maximum WAL senders. The default is 20. Changing this parameter causes a service restart. + PostgreSQL maximum WAL senders. The default is `20`. Changing this parameter causes a service restart. + """ + maxWorkerProcesses: float | None = None + """ + (Number) Sets the maximum number of background processes that the system can support. The default is 8. Changing this parameter causes a service restart. + Sets the maximum number of background processes that the system can support. The default is `8`. Changing this parameter causes a service restart. + """ + migration: MigrationModel | None = None + """ + (Block List) Migrate data from existing server. (see below for nested schema) + Migrate data from existing server. + """ + nodeCount: float | None = None + """ + (Number) Number of nodes for the service. + Number of nodes for the service. + """ + pgPartmanBgwInterval: float | None = None + """ + (Number) Sets the time interval in seconds to run pg_partman's scheduled tasks. The default is 3600. + Sets the time interval in seconds to run pg_partman's scheduled tasks. The default is `3600`. + """ + pgPartmanBgwRole: str | None = None + """ + (String) Controls which role to use for pg_partman's scheduled background tasks. + Controls which role to use for pg_partman's scheduled background tasks. + """ + pgStatMonitorEnable: bool | None = None + """ + (Boolean) Enable pg_stat_monitor extension if available for the current cluster. Enable the pg_stat_monitor extension. Changing this parameter causes a service restart. When this extension is enabled, pg_stat_statements results for utility commands are unreliable. + Enable pg_stat_monitor extension if available for the current cluster. Enable the pg_stat_monitor extension. Changing this parameter causes a service restart. When this extension is enabled, pg_stat_statements results for utility commands are unreliable. + """ + pgStatMonitorPgsmEnableQueryPlan: bool | None = None + """ + (Boolean) Enables or disables query plan monitoring. Only available for PostgreSQL 13+. + Enables or disables query plan monitoring. Only available for PostgreSQL 13+. + """ + pgStatMonitorPgsmMaxBuckets: float | None = None + """ + (Number) Sets the maximum number of buckets. Changing this parameter causes a service restart. Only available for PostgreSQL 13+. + Sets the maximum number of buckets. Changing this parameter causes a service restart. Only available for PostgreSQL 13+. + """ + pgStatPlansEnable: bool | None = None + """ + (Boolean) Enable pg_stat_plans extension if available for the current cluster. Enable the pg_stat_plans extension. Changing this parameter causes a service restart. Tracks execution plans for SQL queries. + Enable pg_stat_plans extension if available for the current cluster. Enable the pg_stat_plans extension. Changing this parameter causes a service restart. Tracks execution plans for SQL queries. + """ + pgStatPlansTrack: str | None = None + """ + level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable plan tracking. The default is top. + Controls which statements' plans are tracked. Specify top to track top-level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable plan tracking. The default is `top`. + """ + pgStatStatementsTrack: str | None = None + """ + level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable statement statistics collection. The default is top. + Controls which statements are counted. Specify top to track top-level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable statement statistics collection. The default is `top`. + """ + pgaudit: Pgaudit | None = None + """ + wide settings for the pgaudit extension. (see below for nested schema) + PGAudit settings. System-wide settings for the pgaudit extension. + """ + pgbouncer: Pgbouncer | None = None + """ + wide settings for pgbouncer. (see below for nested schema) + PGBouncer connection pooling settings. System-wide settings for pgbouncer. + """ + pglookout: Pglookout | None = None + """ + wide settings for pglookout. (see below for nested schema) + PGLookout settings. System-wide settings for pglookout. + """ + publicAccess: bool | None = None + """ + (Boolean) Public Access. Allow access to the service from the public Internet. + Public Access. Allow access to the service from the public Internet. + """ + publicAccessPrometheus: bool | None = None + """ + (Boolean) Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + """ + serviceLog: bool | None = None + """ + (Boolean) Service logging. Store logs for the service so that they are available in the HTTP API and console. + Service logging. Store logs for the service so that they are available in the HTTP API and console. + """ + sharedBuffersPercentage: float | None = None + """ + 60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value. Changing this parameter causes a service restart. + Percentage of total RAM that the database server uses for shared memory buffers. Valid range is 20-60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value. Changing this parameter causes a service restart. + """ + synchronousCommit: str | None = None + """ + (String) Sets the current transaction's synchronization level. The default is off. This setting takes precedence over synchronous_replication. + Sets the current transaction's synchronization level. The default is `off`. This setting takes precedence over `synchronous_replication`. + """ + synchronousReplication: str | None = None + """ + (String) Synchronous replication type. (deprecated, use synchronous_commit instead). Note that the service plan also needs to support synchronous replication. This setting is deprecated. Use synchronous_commit instead. Any change to this setting will automatically update synchronous_commit. Setting the value to quorum changes synchronous_commit to remote_write, while setting it to off changes synchronous_commit to off. + Synchronous replication type. (deprecated, use synchronous_commit instead). Note that the service plan also needs to support synchronous replication. This setting is deprecated. Use synchronous_commit instead. Any change to this setting will automatically update synchronous_commit. Setting the value to quorum changes synchronous_commit to remote_write, while setting it to off changes synchronous_commit to off. + """ + tempFileLimit: float | None = None + """ + 1 for unlimited. + PostgreSQL temporary file limit in KiB, -1 for unlimited. + """ + timescaledb: Timescaledb | None = None + """ + wide settings for the timescaledb extension. (see below for nested schema) + TimescaleDB extension configuration values. System-wide settings for the timescaledb extension. + """ + timezone: str | None = None + """ + (String) PostgreSQL service timezone. + PostgreSQL service timezone. + """ + trackActivityQuerySize: float | None = None + """ + (Number) Specifies the number of bytes reserved to track the currently executing command for each active session. Changing this parameter causes a service restart. + Specifies the number of bytes reserved to track the currently executing command for each active session. Changing this parameter causes a service restart. + """ + trackCommitTimestamp: str | None = None + """ + (String) Record commit time of transactions. Changing this parameter causes a service restart. + Record commit time of transactions. Changing this parameter causes a service restart. + """ + trackFunctions: str | None = None + """ + (String) Enables tracking of function call counts and time used. + Enables tracking of function call counts and time used. + """ + trackIoTiming: str | None = None + """ + (String) Enables timing of database I/O calls. The default is off. When on, it will repeatedly query the operating system for the current time, which may cause significant overhead on some platforms. + Enables timing of database I/O calls. The default is `off`. When on, it will repeatedly query the operating system for the current time, which may cause significant overhead on some platforms. + """ + variant: str | None = None + """ + (String) Variant of the PostgreSQL service, may affect the features that are exposed by default. + Variant of the PostgreSQL service, may affect the features that are exposed by default. + """ + version: str | None = None + """ + (String) PostgreSQL major version. + PostgreSQL major version. + """ + walSenderTimeout: float | None = None + """ + (Number) Terminate replication connections that are inactive for longer than this amount of time, in milliseconds. Setting this value to zero disables the timeout. + Terminate replication connections that are inactive for longer than this amount of time, in milliseconds. Setting this value to zero disables the timeout. + """ + walWriterDelay: float | None = None + """ + (Number) WAL flush interval in milliseconds. The default is 200. Setting this parameter to a lower value may negatively impact performance. + WAL flush interval in milliseconds. The default is `200`. Setting this parameter to a lower value may negatively impact performance. + """ + workMem: float | None = None + """ + (Number) Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files, in MB. The default is 1MB + 0.075% of total RAM (up to 32MB). + Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files, in MB. The default is 1MB + 0.075% of total RAM (up to 32MB). + """ + + +class AtProvider(BaseModel): + additionalDiskSpaceGib: float | None = None + """ + (Number, Deprecated) Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + Additional disk space in GiB. Note that changes in additional disk space might require disk maintenance. This pending maintenance blocks some operations, such as version upgrades, until the maintenance is completed. + """ + components: list[Component] | None = None + """ + (Attributes List) Service component information (see below for nested schema) + """ + id: str | None = None + """ + (String) UUID of the database. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItemModel] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + nodeStates: list[NodeState] | None = None + """ + (Attributes List) Information about nodes providing the managed service (see below for nested schema) + """ + plan: str | None = None + """ + (String, Deprecated) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans pg. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans pg`. + """ + planBackups: str | None = None + """ + (String) Backup tier for the database plan. + Backup tier for the database plan. + """ + planCompute: str | None = None + """ + (String) Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + Compute shape combining family, CPU, and memory, as listed in the database plan catalog. + """ + planNodeCount: float | None = None + """ + (Number) Number of nodes in the database plan. + Number of nodes in the database plan. + """ + planStorageGib: float | None = None + """ + (Number) Total storage per node in GiB. + Total storage per node in GiB. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + primaryDatabase: str | None = None + """ + (String) Primary database name + Primary database name + """ + properties: PropertiesModel | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + serviceHost: str | None = None + """ + (String) Hostname to the service instance + Hostname to the service instance + """ + servicePort: str | None = None + """ + (String) Port to the service instance + Port to the service instance + """ + serviceUsername: str | None = None + """ + (String) Primary username to the service instance + Primary username to the service instance + """ + sslmode: str | None = None + """ + (String) SSL Connection Mode for PostgreSQL + SSL Connection Mode for PostgreSQL + """ + state: str | None = None + """ + (String) The current state of the service + The current state of the service + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + type: str | None = None + """ + (String) Type of the managed database instance + Type of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 ManagedDatabasePostgresql(BaseModel): + apiVersion: Literal['database.m.upcloud.com/v1alpha1'] | None = ( + 'database.m.upcloud.com/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['ManagedDatabasePostgresql'] | None = 'ManagedDatabasePostgresql' + """ + 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 + """ + ManagedDatabasePostgresqlSpec defines the desired state of ManagedDatabasePostgresql + """ + status: Status | None = None + """ + ManagedDatabasePostgresqlStatus defines the observed state of ManagedDatabasePostgresql. + """ + + +class ManagedDatabasePostgresqlList(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[ManagedDatabasePostgresql] + """ + List of manageddatabasepostgresqls. 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/com/upcloud/m/database/manageddatabaseuser/__init__.py b/schemas/python/models/com/upcloud/m/database/manageddatabaseuser/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/database/manageddatabaseuser/v1alpha1.py b/schemas/python/models/com/upcloud/m/database/manageddatabaseuser/v1alpha1.py new file mode 100644 index 000000000..2e2a0a0d5 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/database/manageddatabaseuser/v1alpha1.py @@ -0,0 +1,387 @@ +# generated by datamodel-codegen: +# filename: workdir/database_m_upcloud_com_v1alpha1_manageddatabaseuser.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.k8s.apimachinery.pkg.apis.meta import v1 + + +class Rule(BaseModel): + index: str | None = None + """ + (String) Set index name, pattern or top level API. + Set index name, pattern or top level API. + """ + permission: str | None = None + """ + (String) Set permission access. + Set permission access. + """ + + +class OpensearchAccessControl(BaseModel): + rules: list[Rule] | None = None + """ + (Block List) Set user access control rules. (see below for nested schema) + Set user access control rules. + """ + + +class PasswordSecretRef(BaseModel): + key: str + name: str + """ + Name of the secret. + """ + + +class PgAccessControl(BaseModel): + allowReplication: bool | None = None + """ + (Boolean) Grant replication privilege + Grant replication privilege + """ + + +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 ServiceRef(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 ServiceSelector(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 ValkeyAccessControl(BaseModel): + categories: list[str] | None = None + """ + (List of String) Set access control to all commands in specified categories. + Set access control to all commands in specified categories. + """ + channels: list[str] | None = None + """ + (List of String) Set access control to Pub/Sub channels. + Set access control to Pub/Sub channels. + """ + commands: list[str] | None = None + """ + (List of String) Set access control to commands. + Set access control to commands. + """ + keys: list[str] | None = None + """ + (List of String) Set access control to keys. + Set access control to keys. + """ + + +class ForProvider(BaseModel): + authentication: str | None = None + """ + (String) MySQL only, authentication type. + MySQL only, authentication type. + """ + opensearchAccessControl: OpensearchAccessControl | None = None + """ + (Block List) OpenSearch access control object. (see below for nested schema) + OpenSearch access control object. + """ + passwordSecretRef: PasswordSecretRef | None = None + """ + (String, Sensitive) Password for the database user. Defaults to a random value + Password for the database user. Defaults to a random value + """ + pgAccessControl: PgAccessControl | None = None + """ + (Block List) PostgreSQL access control object. (see below for nested schema) + PostgreSQL access control object. + """ + service: str | None = None + """ + (String) Service's UUID for which this user belongs to + The service to which the resource belongs. Please note that reference fields (`serviceRef` and `serviceSelector`) only work for PostgreSQL databases. For other databases you need to leverage compositions and patches to pass the database service ID to the `service` field. See https://docs.crossplane.io/latest/concepts/patch-and-transform/#patching-between-resources for more info. + """ + serviceRef: ServiceRef | None = None + """ + Reference to a ManagedDatabasePostgresql in database to populate service. + """ + serviceSelector: ServiceSelector | None = None + """ + Selector for a ManagedDatabasePostgresql in database to populate service. + """ + valkeyAccessControl: ValkeyAccessControl | None = None + """ + (Block List) Valkey access control object. (see below for nested schema) + Valkey access control object. + """ + + +class InitProvider(BaseModel): + authentication: str | None = None + """ + (String) MySQL only, authentication type. + MySQL only, authentication type. + """ + opensearchAccessControl: OpensearchAccessControl | None = None + """ + (Block List) OpenSearch access control object. (see below for nested schema) + OpenSearch access control object. + """ + passwordSecretRef: PasswordSecretRef | None = None + """ + (String, Sensitive) Password for the database user. Defaults to a random value + Password for the database user. Defaults to a random value + """ + pgAccessControl: PgAccessControl | None = None + """ + (Block List) PostgreSQL access control object. (see below for nested schema) + PostgreSQL access control object. + """ + valkeyAccessControl: ValkeyAccessControl | None = None + """ + (Block List) Valkey access control object. (see below for nested schema) + Valkey access control object. + """ + + +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): + authentication: str | None = None + """ + (String) MySQL only, authentication type. + MySQL only, authentication type. + """ + id: str | None = None + """ + (String) ID of the user. ID is in {service UUID}/{username} format. + """ + opensearchAccessControl: OpensearchAccessControl | None = None + """ + (Block List) OpenSearch access control object. (see below for nested schema) + OpenSearch access control object. + """ + pgAccessControl: PgAccessControl | None = None + """ + (Block List) PostgreSQL access control object. (see below for nested schema) + PostgreSQL access control object. + """ + service: str | None = None + """ + (String) Service's UUID for which this user belongs to + The service to which the resource belongs. Please note that reference fields (`serviceRef` and `serviceSelector`) only work for PostgreSQL databases. For other databases you need to leverage compositions and patches to pass the database service ID to the `service` field. See https://docs.crossplane.io/latest/concepts/patch-and-transform/#patching-between-resources for more info. + """ + type: str | None = None + """ + (String) Type of the user. Only normal type users can be created + Type of the user. Only normal type users can be created + """ + valkeyAccessControl: ValkeyAccessControl | None = None + """ + (Block List) Valkey access control object. (see below for nested schema) + Valkey access control object. + """ + + +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 ManagedDatabaseUser(BaseModel): + apiVersion: Literal['database.m.upcloud.com/v1alpha1'] | None = ( + 'database.m.upcloud.com/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['ManagedDatabaseUser'] | None = 'ManagedDatabaseUser' + """ + 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 + """ + ManagedDatabaseUserSpec defines the desired state of ManagedDatabaseUser + """ + status: Status | None = None + """ + ManagedDatabaseUserStatus defines the observed state of ManagedDatabaseUser. + """ + + +class ManagedDatabaseUserList(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[ManagedDatabaseUser] + """ + List of manageddatabaseusers. 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/com/upcloud/m/database/manageddatabasevalkey/__init__.py b/schemas/python/models/com/upcloud/m/database/manageddatabasevalkey/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/database/manageddatabasevalkey/v1alpha1.py b/schemas/python/models/com/upcloud/m/database/manageddatabasevalkey/v1alpha1.py new file mode 100644 index 000000000..730707173 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/database/manageddatabasevalkey/v1alpha1.py @@ -0,0 +1,789 @@ +# generated by datamodel-codegen: +# filename: workdir/database_m_upcloud_com_v1alpha1_manageddatabasevalkey.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 UuidRef(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 UuidSelector(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 NetworkItem(BaseModel): + family: str | None = None + """ + (String) Network family. Currently only IPv4 is supported. + Network family. Currently only `IPv4` is supported. + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + The name of the network. Must be unique within the service. + """ + type: str | None = None + """ + (String) Type of the managed database instance + The type of the network. Must be private. + """ + uuid: str | None = None + """ + (String) Private network UUID. Must reside in the same zone as the database. + Private network UUID. Must reside in the same zone as the database. + """ + uuidRef: UuidRef | None = None + """ + Reference to a Network in network to populate uuid. + """ + uuidSelector: UuidSelector | None = None + """ + Selector for a Network in network to populate uuid. + """ + + +class PasswordSecretRef(BaseModel): + key: str + name: str + """ + Name of the secret. + """ + + +class Migration(BaseModel): + dbname: str | None = None + """ + (String) Database name for bootstrapping the initial connection. + Database name for bootstrapping the initial connection. + """ + host: str | None = None + """ + (String) Hostname or IP address of the server where to migrate data from. + Hostname or IP address of the server where to migrate data from. + """ + ignoreDbs: str | None = None + """ + separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + """ + ignoreRoles: str | None = None + """ + separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + """ + method: str | None = None + """ + (String) The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + """ + passwordSecretRef: PasswordSecretRef | None = None + """ + (String, Sensitive) Password for authentication with the server where to migrate data from. + Password for authentication with the server where to migrate data from. + """ + port: float | None = None + """ + (Number) Port number of the server where to migrate data from. + Port number of the server where to migrate data from. + """ + ssl: bool | None = None + """ + (Boolean) The server where to migrate data from is secured with SSL. + The server where to migrate data from is secured with SSL. + """ + username: str | None = None + """ + (String) User name for authentication with the server where to migrate data from. + User name for authentication with the server where to migrate data from. + """ + + +class Properties(BaseModel): + automaticUtilityNetworkIpFilter: bool | None = None + """ + (Boolean) Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + Automatic utility network IP Filter. Automatically allow connections from servers in the utility network within the same zone. + """ + backupHour: float | None = None + """ + (Number) The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed. + The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed. + """ + backupMinute: float | None = None + """ + (Number) The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed. + The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed. + """ + frequentSnapshots: bool | None = None + """ + (Boolean) Frequent RDB snapshots. When enabled, Valkey will create frequent local RDB snapshots. When disabled, Valkey will only take RDB snapshots when a backup is created, based on the backup schedule. This setting is ignored when valkey_persistence is set to off. + Frequent RDB snapshots. When enabled, Valkey will create frequent local RDB snapshots. When disabled, Valkey will only take RDB snapshots when a backup is created, based on the backup schedule. This setting is ignored when `valkey_persistence` is set to `off`. + """ + ipFilter: list[str] | None = None + """ + (List of String) IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + IP filter. Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. + """ + migration: Migration | None = None + """ + (Block List) Migrate data from existing server. (see below for nested schema) + Migrate data from existing server. + """ + publicAccess: bool | None = None + """ + (Boolean) Public Access. Allow access to the service from the public Internet. + Public Access. Allow access to the service from the public Internet. + """ + publicAccessPrometheus: bool | None = None + """ + (Boolean) Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + Prometheus Public Access. Allow access to Prometheus metrics from the public Internet. + """ + replicas: float | None = None + """ + (Number) Number of replicas per shard. Number of replicas per shard in the Valkey cluster. Only applies to cluster plans. + Number of replicas per shard. Number of replicas per shard in the Valkey cluster. Only applies to cluster plans. + """ + serviceLog: bool | None = None + """ + (Boolean) Service logging. Store logs for the service so that they are available in the HTTP API and console. + Service logging. Store logs for the service so that they are available in the HTTP API and console. + """ + shardCount: float | None = None + """ + (Number) Number of shards. Number of shards (primaries) in the Valkey cluster. Required for cluster plans. + Number of shards. Number of shards (primaries) in the Valkey cluster. Required for cluster plans. + """ + valkeyAclChannelsDefault: str | None = None + """ + pubsub-default. + Default ACL for pub/sub channels used when a Valkey user is created. Determines default pub/sub channels' ACL for new users if ACL is not supplied. When this option is not defined, all_channels is assumed to keep backward compatibility. This option doesn't affect Valkey configuration acl-pubsub-default. + """ + valkeyActiveDefragIgnoreBytes: float | None = None + """ + (Number) Active defrag minimum fragmentation waste. Minimum amount of fragmentation waste, in bytes, before active defragmentation starts. Only takes effect when valkey_activedefrag is enabled. + Active defrag minimum fragmentation waste. Minimum amount of fragmentation waste, in bytes, before active defragmentation starts. Only takes effect when `valkey_activedefrag` is enabled. + """ + valkeyActiveDefragThresholdLower: float | None = None + """ + (Number) Active defrag minimum fragmentation percentage. Minimum percentage of fragmentation before active defragmentation starts. Only takes effect when valkey_activedefrag is enabled. + Active defrag minimum fragmentation percentage. Minimum percentage of fragmentation before active defragmentation starts. Only takes effect when `valkey_activedefrag` is enabled. + """ + valkeyActiveExpireEffort: float | None = None + """ + expire-effort setting (default 1, max 10) uses more CPU to reclaim expired keys faster, reducing memory usage but potentially increasing latency. + Active expire effort. Valkey reclaims expired keys both when accessed and in the background. The background process scans for expired keys to free memory. Increasing the active-expire-effort setting (default 1, max 10) uses more CPU to reclaim expired keys faster, reducing memory usage but potentially increasing latency. + """ + valkeyActivedefrag: bool | None = None + """ + used memory pages to reduce fragmentation and return memory to the operating system. Defragmentation runs on the main thread and consumes CPU, so it may increase latency under load. + Active memory defragmentation. Enable active memory defragmentation. When enabled, Valkey relocates objects off sparsely-used memory pages to reduce fragmentation and return memory to the operating system. Defragmentation runs on the main thread and consumes CPU, so it may increase latency under load. + """ + valkeyIoThreads: float | None = None + """ + (Number) Valkey IO thread count. Set Valkey IO thread count. Changing this will cause a restart of the Valkey service. + Valkey IO thread count. Set Valkey IO thread count. Changing this will cause a restart of the Valkey service. + """ + valkeyLfuDecayTime: float | None = None + """ + policy counter decay time in minutes. + LFU maxmemory-policy counter decay time in minutes. + """ + valkeyLfuLogFactor: float | None = None + """ + lfu and allkeys-lfu maxmemory-policies. + Counter logarithm factor for volatile-lfu and allkeys-lfu maxmemory-policies. + """ + valkeyMaxmemoryPolicy: str | None = None + """ + policy. + Valkey maxmemory-policy. + """ + valkeyNotifyKeyspaceEvents: str | None = None + """ + keyspace-events option. + Set notify-keyspace-events option. + """ + valkeyNumberOfDatabases: float | None = None + """ + (Number) Number of Valkey databases. Set number of Valkey databases. Changing this will cause a restart of the Valkey service. + Number of Valkey databases. Set number of Valkey databases. Changing this will cause a restart of the Valkey service. + """ + valkeyPersistence: str | None = None + """ + (String) Valkey persistence. Controls whether Valkey writes RDB dumps to disk. With rdb, RDB dumps are written for backups on the backup schedule and, if frequent_snapshots is enabled, every 10 minutes so the service can recover recent data after a restart. With off, no RDB dumps are written at all: backups and forking are unavailable, frequent_snapshots and backup_hour/backup_minute have no effect, and all data is lost if the service restarts or is powered off. + Valkey persistence. Controls whether Valkey writes RDB dumps to disk. With `rdb`, RDB dumps are written for backups on the backup schedule and, if `frequent_snapshots` is enabled, every 10 minutes so the service can recover recent data after a restart. With `off`, no RDB dumps are written at all: backups and forking are unavailable, `frequent_snapshots` and `backup_hour`/`backup_minute` have no effect, and all data is lost if the service restarts or is powered off. + """ + valkeyPubsubClientOutputBufferLimit: float | None = None + """ + (Number) Pub/sub client output buffer hard limit in MB. Set output buffer limit for pub / sub clients in MB. The value is the hard limit, the soft limit is 1/4 of the hard limit. When setting the limit, be mindful of the available memory in the selected service plan. + Pub/sub client output buffer hard limit in MB. Set output buffer limit for pub / sub clients in MB. The value is the hard limit, the soft limit is 1/4 of the hard limit. When setting the limit, be mindful of the available memory in the selected service plan. + """ + valkeySsl: bool | None = None + """ + (Boolean) Require SSL to access Valkey. + Require SSL to access Valkey. + """ + valkeyTimeout: float | None = None + """ + (Number) Valkey idle connection timeout in seconds. + Valkey idle connection timeout in seconds. + """ + valkeyVersion: str | None = None + """ + (String) Valkey major version. + Valkey major version. + """ + + +class ForProvider(BaseModel): + additionalDiskSpaceGib: float | None = None + """ + (Number) Not supported for valkey databases. Should be left unconfigured. + Not supported for `valkey` databases. Should be left unconfigured. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItem] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + plan: str | None = None + """ + (String) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans valkey. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans valkey`. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + properties: Properties | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +class InitProvider(BaseModel): + additionalDiskSpaceGib: float | None = None + """ + (Number) Not supported for valkey databases. Should be left unconfigured. + Not supported for `valkey` databases. Should be left unconfigured. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItem] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + plan: str | None = None + """ + (String) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans valkey. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans valkey`. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + properties: Properties | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 Component(BaseModel): + component: str | None = None + """ + (String) Component name. + Component name. + """ + host: str | None = None + """ + (String) Hostname or IP address of the server where to migrate data from. + Hostname of the component + """ + port: float | None = None + """ + (Number) Port number of the server where to migrate data from. + Port number of the component + """ + route: str | None = None + """ + (String) Component network route type + Component network route type + """ + usage: str | None = None + """ + (String) Usage of the component + Usage of the component + """ + + +class NetworkItemModel(BaseModel): + family: str | None = None + """ + (String) Network family. Currently only IPv4 is supported. + Network family. Currently only `IPv4` is supported. + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + The name of the network. Must be unique within the service. + """ + type: str | None = None + """ + (String) Type of the managed database instance + The type of the network. Must be private. + """ + uuid: str | None = None + """ + (String) Private network UUID. Must reside in the same zone as the database. + Private network UUID. Must reside in the same zone as the database. + """ + + +class NodeState(BaseModel): + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name plus a node iteration + """ + role: str | None = None + """ + (String) Role of the node + Role of the node + """ + state: str | None = None + """ + (String) The current state of the service + Current state of the node + """ + + +class MigrationModel(BaseModel): + dbname: str | None = None + """ + (String) Database name for bootstrapping the initial connection. + Database name for bootstrapping the initial connection. + """ + host: str | None = None + """ + (String) Hostname or IP address of the server where to migrate data from. + Hostname or IP address of the server where to migrate data from. + """ + ignoreDbs: str | None = None + """ + separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment). + """ + ignoreRoles: str | None = None + """ + separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment). + """ + method: str | None = None + """ + (String) The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types). + """ + port: float | None = None + """ + (Number) Port number of the server where to migrate data from. + Port number of the server where to migrate data from. + """ + ssl: bool | None = None + """ + (Boolean) The server where to migrate data from is secured with SSL. + The server where to migrate data from is secured with SSL. + """ + username: str | None = None + """ + (String) User name for authentication with the server where to migrate data from. + User name for authentication with the server where to migrate data from. + """ + + +class AtProvider(BaseModel): + additionalDiskSpaceGib: float | None = None + """ + (Number) Not supported for valkey databases. Should be left unconfigured. + Not supported for `valkey` databases. Should be left unconfigured. + """ + components: list[Component] | None = None + """ + (Attributes List) Service component information (see below for nested schema) + """ + id: str | None = None + """ + (String) UUID of the database. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the database. + User defined key-value pairs to classify the database. + """ + maintenanceWindowDow: str | None = None + """ + (String) Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + Maintenance window day of week. Lower case weekday name (monday, tuesday, ...) + """ + maintenanceWindowTime: str | None = None + """ + (String) Maintenance window UTC time in hh:mm:ss format + Maintenance window UTC time in hh:mm:ss format + """ + name: str | None = None + """ + (String) Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + Name of the service. The name is used as a prefix for the logical hostname. Must be unique within an account + """ + network: list[NetworkItemModel] | None = None + """ + (Block Set) Private networks attached to the managed database (see below for nested schema) + Private networks attached to the managed database + """ + nodeStates: list[NodeState] | None = None + """ + (Attributes List) Information about nodes providing the managed service (see below for nested schema) + """ + plan: str | None = None + """ + (String) Service plan to use. This determines how much resources the instance will have. You can list available plans with upctl database plans valkey. + Service plan to use. This determines how much resources the instance will have. You can list available plans with `upctl database plans valkey`. + """ + powered: bool | None = None + """ + (Boolean) The administrative power state of the service + The administrative power state of the service + """ + primaryDatabase: str | None = None + """ + (String) Primary database name + Primary database name + """ + properties: Properties | None = None + """ + (Block List) Database engine properties. (see below for nested schema) + Database engine properties. + """ + serviceHost: str | None = None + """ + (String) Hostname to the service instance + Hostname to the service instance + """ + servicePort: str | None = None + """ + (String) Port to the service instance + Port to the service instance + """ + serviceUsername: str | None = None + """ + (String) Primary username to the service instance + Primary username to the service instance + """ + state: str | None = None + """ + (String) The current state of the service + The current state of the service + """ + terminationProtection: bool | None = None + """ + (Boolean) If set to true, prevents the managed service from being powered off, or deleted. + If set to true, prevents the managed service from being powered off, or deleted. + """ + title: str | None = None + """ + (String) Title of the managed database instance + Title of the managed database instance + """ + type: str | None = None + """ + (String) Type of the managed database instance + Type of the managed database instance + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone where the instance resides, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 ManagedDatabaseValkey(BaseModel): + apiVersion: Literal['database.m.upcloud.com/v1alpha1'] | None = ( + 'database.m.upcloud.com/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['ManagedDatabaseValkey'] | None = 'ManagedDatabaseValkey' + """ + 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 + """ + ManagedDatabaseValkeySpec defines the desired state of ManagedDatabaseValkey + """ + status: Status | None = None + """ + ManagedDatabaseValkeyStatus defines the observed state of ManagedDatabaseValkey. + """ + + +class ManagedDatabaseValkeyList(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[ManagedDatabaseValkey] + """ + List of manageddatabasevalkeys. 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/com/upcloud/m/network/__init__.py b/schemas/python/models/com/upcloud/m/network/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/network/firewallruleset/__init__.py b/schemas/python/models/com/upcloud/m/network/firewallruleset/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/network/firewallruleset/v1alpha1.py b/schemas/python/models/com/upcloud/m/network/firewallruleset/v1alpha1.py new file mode 100644 index 000000000..7c05d9a3a --- /dev/null +++ b/schemas/python/models/com/upcloud/m/network/firewallruleset/v1alpha1.py @@ -0,0 +1,465 @@ +# generated by datamodel-codegen: +# filename: workdir/network_m_upcloud_com_v1alpha1_firewallruleset.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.k8s.apimachinery.pkg.apis.meta import v1 + + +class Rule(BaseModel): + action: str | None = None + """ + (String) Rule action. + Rule action. + """ + comment: str | None = None + """ + (String) Rule comment. + Rule comment. + """ + destinationAddressCidr: str | None = None + """ + (String) Destination CIDR block. + Destination CIDR block. + """ + destinationAddressEnd: str | None = None + """ + (String) End of destination IP address range. + End of destination IP address range. + """ + destinationAddressStart: str | None = None + """ + (String) Start of destination IP address range. + Start of destination IP address range. + """ + destinationPortEnd: float | None = None + """ + (Number) End of destination port range. + End of destination port range. + """ + destinationPortStart: float | None = None + """ + (Number) Start of destination port range. + Start of destination port range. + """ + direction: str | None = None + """ + (String) Traffic direction the rule applies to. + Traffic direction the rule applies to. + """ + enabled: bool | None = None + """ + (Boolean) Whether the ruleset is enabled. + Whether the rule is enabled. + """ + family: str | None = None + """ + (String) Address family. + Address family. + """ + icmpType: float | None = None + """ + (Number) ICMP type number. + ICMP type number. + """ + protocol: str | None = None + """ + (String) IP protocol. + IP protocol. + """ + sourceAddressCidr: str | None = None + """ + (String) Source CIDR block. + Source CIDR block. + """ + sourceAddressEnd: str | None = None + """ + (String) End of source IP address range. + End of source IP address range. + """ + sourceAddressStart: str | None = None + """ + (String) Start of source IP address range. + Start of source IP address range. + """ + sourcePortEnd: float | None = None + """ + (Number) End of source port range. + End of source port range. + """ + sourcePortStart: float | None = None + """ + (Number) Start of source port range. + Start of source port range. + """ + + +class ForProvider(BaseModel): + defaultDnsRulesEnabled: bool | None = None + """ + (Boolean) Whether default DNS rules are enabled. + Whether default DNS rules are enabled. + """ + description: str | None = None + """ + (String) Description of the firewall ruleset. + Description of the firewall ruleset. + """ + enabled: bool | None = None + """ + (Boolean) Whether the ruleset is enabled. + Whether the ruleset is enabled. + """ + labels: dict[str, str] | None = None + """ + (Map of String) Ruleset labels as key/value pairs. + Ruleset labels as key/value pairs. + """ + name: str | None = None + """ + (String) Name of the firewall ruleset. + Name of the firewall ruleset. + """ + rules: list[Rule] | None = None + """ + based index assigned by the API and cannot be configured. (see below for nested schema) + """ + + +class InitProvider(BaseModel): + defaultDnsRulesEnabled: bool | None = None + """ + (Boolean) Whether default DNS rules are enabled. + Whether default DNS rules are enabled. + """ + description: str | None = None + """ + (String) Description of the firewall ruleset. + Description of the firewall ruleset. + """ + enabled: bool | None = None + """ + (Boolean) Whether the ruleset is enabled. + Whether the ruleset is enabled. + """ + labels: dict[str, str] | None = None + """ + (Map of String) Ruleset labels as key/value pairs. + Ruleset labels as key/value pairs. + """ + name: str | None = None + """ + (String) Name of the firewall ruleset. + Name of the firewall ruleset. + """ + rules: list[Rule] | None = None + """ + based index assigned by the API and cannot be configured. (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 RuleModel(BaseModel): + action: str | None = None + """ + (String) Rule action. + Rule action. + """ + comment: str | None = None + """ + (String) Rule comment. + Rule comment. + """ + destinationAddressCidr: str | None = None + """ + (String) Destination CIDR block. + Destination CIDR block. + """ + destinationAddressEnd: str | None = None + """ + (String) End of destination IP address range. + End of destination IP address range. + """ + destinationAddressStart: str | None = None + """ + (String) Start of destination IP address range. + Start of destination IP address range. + """ + destinationPortEnd: float | None = None + """ + (Number) End of destination port range. + End of destination port range. + """ + destinationPortStart: float | None = None + """ + (Number) Start of destination port range. + Start of destination port range. + """ + direction: str | None = None + """ + (String) Traffic direction the rule applies to. + Traffic direction the rule applies to. + """ + enabled: bool | None = None + """ + (Boolean) Whether the ruleset is enabled. + Whether the rule is enabled. + """ + family: str | None = None + """ + (String) Address family. + Address family. + """ + icmpType: float | None = None + """ + (Number) ICMP type number. + ICMP type number. + """ + position: float | None = None + """ + based). Computed from the rule's index in the list. + Rule position (1-based). Computed from the rule's index in the list. + """ + protocol: str | None = None + """ + (String) IP protocol. + IP protocol. + """ + sourceAddressCidr: str | None = None + """ + (String) Source CIDR block. + Source CIDR block. + """ + sourceAddressEnd: str | None = None + """ + (String) End of source IP address range. + End of source IP address range. + """ + sourceAddressStart: str | None = None + """ + (String) Start of source IP address range. + Start of source IP address range. + """ + sourcePortEnd: float | None = None + """ + (Number) End of source port range. + End of source port range. + """ + sourcePortStart: float | None = None + """ + (Number) Start of source port range. + Start of source port range. + """ + + +class AtProvider(BaseModel): + createdAt: str | None = None + """ + (String) Creation timestamp. + Creation timestamp. + """ + defaultDnsRulesEnabled: bool | None = None + """ + (Boolean) Whether default DNS rules are enabled. + Whether default DNS rules are enabled. + """ + description: str | None = None + """ + (String) Description of the firewall ruleset. + Description of the firewall ruleset. + """ + enabled: bool | None = None + """ + (Boolean) Whether the ruleset is enabled. + Whether the ruleset is enabled. + """ + id: str | None = None + """ + (String) Firewall ruleset UUID. + """ + labels: dict[str, str] | None = None + """ + (Map of String) Ruleset labels as key/value pairs. + Ruleset labels as key/value pairs. + """ + name: str | None = None + """ + (String) Name of the firewall ruleset. + Name of the firewall ruleset. + """ + rules: list[RuleModel] | None = None + """ + based index assigned by the API and cannot be configured. (see below for nested schema) + """ + updatedAt: str | None = None + """ + (String) Last update timestamp. + Last update timestamp. + """ + version: float | None = None + """ + (Number) Ruleset version. + Ruleset version. + """ + + +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 FirewallRuleset(BaseModel): + apiVersion: Literal['network.m.upcloud.com/v1alpha1'] | None = ( + 'network.m.upcloud.com/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['FirewallRuleset'] | None = 'FirewallRuleset' + """ + 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 + """ + FirewallRulesetSpec defines the desired state of FirewallRuleset + """ + status: Status | None = None + """ + FirewallRulesetStatus defines the observed state of FirewallRuleset. + """ + + +class FirewallRulesetList(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[FirewallRuleset] + """ + List of firewallrulesets. 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/com/upcloud/m/network/floatingipaddress/__init__.py b/schemas/python/models/com/upcloud/m/network/floatingipaddress/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/network/floatingipaddress/v1alpha1.py b/schemas/python/models/com/upcloud/m/network/floatingipaddress/v1alpha1.py new file mode 100644 index 000000000..9e2d765c8 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/network/floatingipaddress/v1alpha1.py @@ -0,0 +1,330 @@ +# generated by datamodel-codegen: +# filename: workdir/network_m_upcloud_com_v1alpha1_floatingipaddress.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 MacAddressRef(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 MacAddressSelector(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): + access: str | None = None + """ + (String) Network access for the floating IP address. Supported value: public. + Network access for the floating IP address. Supported value: `public`. + """ + family: str | None = None + """ + (String) The address family of the floating IP address. + The address family of the floating IP address. + """ + macAddress: str | None = None + """ + (String) MAC address of a server interface to assign address to. + MAC address of a server interface to assign address to. + """ + macAddressRef: MacAddressRef | None = None + """ + Reference to a Server in server to populate macAddress. + """ + macAddressSelector: MacAddressSelector | None = None + """ + Selector for a Server in server to populate macAddress. + """ + releasePolicy: str | None = None + """ + (String) The release policy of the floating IP address. + The release policy of the floating IP address. + """ + zone: str | None = None + """ + fra1. Required when assigning a detached floating IP address. You can list available zones with upctl zone list. + Zone of the address, e.g. `de-fra1`. Required when assigning a detached floating IP address. You can list available zones with `upctl zone list`. + """ + + +class InitProvider(BaseModel): + access: str | None = None + """ + (String) Network access for the floating IP address. Supported value: public. + Network access for the floating IP address. Supported value: `public`. + """ + family: str | None = None + """ + (String) The address family of the floating IP address. + The address family of the floating IP address. + """ + macAddress: str | None = None + """ + (String) MAC address of a server interface to assign address to. + MAC address of a server interface to assign address to. + """ + macAddressRef: MacAddressRef | None = None + """ + Reference to a Server in server to populate macAddress. + """ + macAddressSelector: MacAddressSelector | None = None + """ + Selector for a Server in server to populate macAddress. + """ + releasePolicy: str | None = None + """ + (String) The release policy of the floating IP address. + The release policy of the floating IP address. + """ + zone: str | None = None + """ + fra1. Required when assigning a detached floating IP address. You can list available zones with upctl zone list. + Zone of the address, e.g. `de-fra1`. Required when assigning a detached floating IP address. You can list available zones with `upctl zone list`. + """ + + +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): + access: str | None = None + """ + (String) Network access for the floating IP address. Supported value: public. + Network access for the floating IP address. Supported value: `public`. + """ + family: str | None = None + """ + (String) The address family of the floating IP address. + The address family of the floating IP address. + """ + id: str | None = None + """ + (String) Identifier of the floating IP address. Contains the same value as ip_address. + """ + ipAddress: str | None = None + """ + (String) An UpCloud assigned IP Address. + An UpCloud assigned IP Address. + """ + macAddress: str | None = None + """ + (String) MAC address of a server interface to assign address to. + MAC address of a server interface to assign address to. + """ + releasePolicy: str | None = None + """ + (String) The release policy of the floating IP address. + The release policy of the floating IP address. + """ + zone: str | None = None + """ + fra1. Required when assigning a detached floating IP address. You can list available zones with upctl zone list. + Zone of the address, e.g. `de-fra1`. Required when assigning a detached floating IP address. You can list available zones with `upctl zone list`. + """ + + +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 FloatingIPAddress(BaseModel): + apiVersion: Literal['network.m.upcloud.com/v1alpha1'] | None = ( + 'network.m.upcloud.com/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['FloatingIPAddress'] | None = 'FloatingIPAddress' + """ + 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 + """ + FloatingIPAddressSpec defines the desired state of FloatingIPAddress + """ + status: Status | None = None + """ + FloatingIPAddressStatus defines the observed state of FloatingIPAddress. + """ + + +class FloatingIPAddressList(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[FloatingIPAddress] + """ + List of floatingipaddresses. 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/com/upcloud/m/network/gateway/__init__.py b/schemas/python/models/com/upcloud/m/network/gateway/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/network/gateway/v1alpha1.py b/schemas/python/models/com/upcloud/m/network/gateway/v1alpha1.py new file mode 100644 index 000000000..acb815589 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/network/gateway/v1alpha1.py @@ -0,0 +1,426 @@ +# generated by datamodel-codegen: +# filename: workdir/network_m_upcloud_com_v1alpha1_gateway.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.k8s.apimachinery.pkg.apis.meta import v1 + + +class Address(BaseModel): + name: str | None = None + """ + (String) Gateway name. Needs to be unique within the account. + Name of the IP address. + """ + + +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 IdRef(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 IdSelector(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 Router(BaseModel): + id: str | None = None + """ + (String) Gateway UUID. + ID of the router attached to the gateway. + """ + idRef: IdRef | None = None + """ + Reference to a Router in network to populate id. + """ + idSelector: IdSelector | None = None + """ + Selector for a Router in network to populate id. + """ + + +class ForProvider(BaseModel): + address: Address | None = None + """ + (Block Set) IP addresses assigned to the gateway. (see below for nested schema) + IP addresses assigned to the gateway. + """ + configuredStatus: str | None = None + """ + (String) The service configured status indicates the service's current intended status. Managed by the customer. + The service configured status indicates the service's current intended status. Managed by the customer. + """ + features: list[str] | None = None + """ + (Set of String) Features enabled for the gateway. Valid item values are nat and vpn. For more details, see documentation on NAT and VPN gateways. + Features enabled for the gateway. Valid item values are `nat` and `vpn`. For more details, see documentation on [NAT](https://upcloud.com/docs/products/nat-gateway/) and [VPN](https://upcloud.com/docs/products/vpn-gateway/) gateways. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the gateway. + User defined key-value pairs to classify the gateway. + """ + name: str | None = None + """ + (String) Gateway name. Needs to be unique within the account. + Gateway name. Needs to be unique within the account. + """ + plan: str | None = None + """ + (String) Gateway pricing plan, defaults to development. You can list available plans with upctl gateway plans. + Gateway pricing plan, defaults to `development`. You can list available plans with `upctl gateway plans`. + """ + router: Router | None = None + """ + (Block List) Attached Router from where traffic is routed towards the network gateway service. (see below for nested schema) + Attached Router from where traffic is routed towards the network gateway service. + """ + zone: str | None = None + """ + fra1. + Zone in which the gateway will be hosted, e.g. `de-fra1`. + """ + + +class InitProvider(BaseModel): + address: Address | None = None + """ + (Block Set) IP addresses assigned to the gateway. (see below for nested schema) + IP addresses assigned to the gateway. + """ + configuredStatus: str | None = None + """ + (String) The service configured status indicates the service's current intended status. Managed by the customer. + The service configured status indicates the service's current intended status. Managed by the customer. + """ + features: list[str] | None = None + """ + (Set of String) Features enabled for the gateway. Valid item values are nat and vpn. For more details, see documentation on NAT and VPN gateways. + Features enabled for the gateway. Valid item values are `nat` and `vpn`. For more details, see documentation on [NAT](https://upcloud.com/docs/products/nat-gateway/) and [VPN](https://upcloud.com/docs/products/vpn-gateway/) gateways. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the gateway. + User defined key-value pairs to classify the gateway. + """ + name: str | None = None + """ + (String) Gateway name. Needs to be unique within the account. + Gateway name. Needs to be unique within the account. + """ + plan: str | None = None + """ + (String) Gateway pricing plan, defaults to development. You can list available plans with upctl gateway plans. + Gateway pricing plan, defaults to `development`. You can list available plans with `upctl gateway plans`. + """ + router: Router | None = None + """ + (Block List) Attached Router from where traffic is routed towards the network gateway service. (see below for nested schema) + Attached Router from where traffic is routed towards the network gateway service. + """ + zone: str | None = None + """ + fra1. + Zone in which the gateway will be hosted, e.g. `de-fra1`. + """ + + +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 AddressModel(BaseModel): + address: str | None = None + """ + (Block Set) IP addresses assigned to the gateway. (see below for nested schema) + IP address. + """ + name: str | None = None + """ + (String) Gateway name. Needs to be unique within the account. + Name of the IP address. + """ + + +class AddressModel1(BaseModel): + address: str | None = None + """ + (Block Set) IP addresses assigned to the gateway. (see below for nested schema) + IP address. + """ + name: str | None = None + """ + (String) Gateway name. Needs to be unique within the account. + Name of the address. + """ + + +class RouterModel(BaseModel): + id: str | None = None + """ + (String) Gateway UUID. + ID of the router attached to the gateway. + """ + + +class AtProvider(BaseModel): + address: AddressModel | None = None + """ + (Block Set) IP addresses assigned to the gateway. (see below for nested schema) + IP addresses assigned to the gateway. + """ + addresses: list[AddressModel1] | None = None + """ + (Attributes Set) Use 'address' attribute instead. This attribute will be removed in the next major version of the provider. (see below for nested schema) + """ + configuredStatus: str | None = None + """ + (String) The service configured status indicates the service's current intended status. Managed by the customer. + The service configured status indicates the service's current intended status. Managed by the customer. + """ + connections: list[str] | None = None + """ + (List of String) Names of connections attached to the gateway. Note that this field can have outdated information as connections are created by a separate resource. + Names of connections attached to the gateway. Note that this field can have outdated information as connections are created by a separate resource. + """ + features: list[str] | None = None + """ + (Set of String) Features enabled for the gateway. Valid item values are nat and vpn. For more details, see documentation on NAT and VPN gateways. + Features enabled for the gateway. Valid item values are `nat` and `vpn`. For more details, see documentation on [NAT](https://upcloud.com/docs/products/nat-gateway/) and [VPN](https://upcloud.com/docs/products/vpn-gateway/) gateways. + """ + id: str | None = None + """ + (String) Gateway UUID. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the gateway. + User defined key-value pairs to classify the gateway. + """ + name: str | None = None + """ + (String) Gateway name. Needs to be unique within the account. + Gateway name. Needs to be unique within the account. + """ + operationalState: str | None = None + """ + (String) The service operational state indicates the service's current operational, effective state. Managed by the system. + The service operational state indicates the service's current operational, effective state. Managed by the system. + """ + plan: str | None = None + """ + (String) Gateway pricing plan, defaults to development. You can list available plans with upctl gateway plans. + Gateway pricing plan, defaults to `development`. You can list available plans with `upctl gateway plans`. + """ + router: RouterModel | None = None + """ + (Block List) Attached Router from where traffic is routed towards the network gateway service. (see below for nested schema) + Attached Router from where traffic is routed towards the network gateway service. + """ + zone: str | None = None + """ + fra1. + Zone in which the gateway will be hosted, e.g. `de-fra1`. + """ + + +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 Gateway(BaseModel): + apiVersion: Literal['network.m.upcloud.com/v1alpha1'] | None = ( + 'network.m.upcloud.com/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['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/com/upcloud/m/network/gatewayconnection/__init__.py b/schemas/python/models/com/upcloud/m/network/gatewayconnection/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/network/gatewayconnection/v1alpha1.py b/schemas/python/models/com/upcloud/m/network/gatewayconnection/v1alpha1.py new file mode 100644 index 000000000..52a114b0d --- /dev/null +++ b/schemas/python/models/com/upcloud/m/network/gatewayconnection/v1alpha1.py @@ -0,0 +1,371 @@ +# generated by datamodel-codegen: +# filename: workdir/network_m_upcloud_com_v1alpha1_gatewayconnection.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 GatewayRef(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 GatewaySelector(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 LocalRouteItem(BaseModel): + name: str | None = None + """ + (String) The name of the connection, should be unique within the gateway. + Name of the route + """ + staticNetwork: str | None = None + """ + (String) Destination prefix of the route; needs to be a valid IPv4 prefix + Destination prefix of the route; needs to be a valid IPv4 prefix + """ + type: str | None = None + """ + (String) The type of the connection; currently the only supported type is 'ipsec'. + Type of route; currently the only supported type is 'static' + """ + + +class RemoteRouteItem(BaseModel): + name: str | None = None + """ + (String) The name of the connection, should be unique within the gateway. + Name of the route + """ + staticNetwork: str | None = None + """ + (String) Destination prefix of the route; needs to be a valid IPv4 prefix + Destination prefix of the route; needs to be a valid IPv4 prefix + """ + type: str | None = None + """ + (String) The type of the connection; currently the only supported type is 'ipsec'. + Type of route; currently the only supported type is 'static' + """ + + +class ForProvider(BaseModel): + gateway: str | None = None + """ + (String) The ID of the upcloud_gateway resource to which the connection belongs. + The ID of the upcloud_gateway resource to which the connection belongs. + """ + gatewayRef: GatewayRef | None = None + """ + Reference to a Gateway in network to populate gateway. + """ + gatewaySelector: GatewaySelector | None = None + """ + Selector for a Gateway in network to populate gateway. + """ + localRoute: list[LocalRouteItem] | None = None + """ + (Block Set) Route for the UpCloud side of the network. (see below for nested schema) + Route for the UpCloud side of the network. + """ + name: str | None = None + """ + (String) The name of the connection, should be unique within the gateway. + The name of the connection, should be unique within the gateway. + """ + remoteRoute: list[RemoteRouteItem] | None = None + """ + (Block Set) Route for the remote side of the network. (see below for nested schema) + Route for the remote side of the network. + """ + type: str | None = None + """ + (String) The type of the connection; currently the only supported type is 'ipsec'. + The type of the connection; currently the only supported type is 'ipsec'. + """ + + +class InitProvider(BaseModel): + gateway: str | None = None + """ + (String) The ID of the upcloud_gateway resource to which the connection belongs. + The ID of the upcloud_gateway resource to which the connection belongs. + """ + gatewayRef: GatewayRef | None = None + """ + Reference to a Gateway in network to populate gateway. + """ + gatewaySelector: GatewaySelector | None = None + """ + Selector for a Gateway in network to populate gateway. + """ + localRoute: list[LocalRouteItem] | None = None + """ + (Block Set) Route for the UpCloud side of the network. (see below for nested schema) + Route for the UpCloud side of the network. + """ + name: str | None = None + """ + (String) The name of the connection, should be unique within the gateway. + The name of the connection, should be unique within the gateway. + """ + remoteRoute: list[RemoteRouteItem] | None = None + """ + (Block Set) Route for the remote side of the network. (see below for nested schema) + Route for the remote side of the network. + """ + type: str | None = None + """ + (String) The type of the connection; currently the only supported type is 'ipsec'. + The type of the connection; currently the only supported type is 'ipsec'. + """ + + +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): + gateway: str | None = None + """ + (String) The ID of the upcloud_gateway resource to which the connection belongs. + The ID of the upcloud_gateway resource to which the connection belongs. + """ + id: str | None = None + """ + (String) The ID of this resource. + """ + localRoute: list[LocalRouteItem] | None = None + """ + (Block Set) Route for the UpCloud side of the network. (see below for nested schema) + Route for the UpCloud side of the network. + """ + name: str | None = None + """ + (String) The name of the connection, should be unique within the gateway. + The name of the connection, should be unique within the gateway. + """ + remoteRoute: list[RemoteRouteItem] | None = None + """ + (Block Set) Route for the remote side of the network. (see below for nested schema) + Route for the remote side of the network. + """ + tunnels: list[str] | None = None + """ + (List of String) List of connection's tunnels names. Note that this field can have outdated information as connections are created by a separate resource. To make sure that you have the most recent data run 'terrafrom refresh'. + List of connection's tunnels names. Note that this field can have outdated information as connections are created by a separate resource. To make sure that you have the most recent data run 'terrafrom refresh'. + """ + type: str | None = None + """ + (String) The type of the connection; currently the only supported type is 'ipsec'. + The type of the connection; currently the only supported type is 'ipsec'. + """ + uuid: str | None = None + """ + (String) The UUID of the connection + The UUID of the connection + """ + + +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 GatewayConnection(BaseModel): + apiVersion: Literal['network.m.upcloud.com/v1alpha1'] | None = ( + 'network.m.upcloud.com/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['GatewayConnection'] | None = 'GatewayConnection' + """ + 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 + """ + GatewayConnectionSpec defines the desired state of GatewayConnection + """ + status: Status | None = None + """ + GatewayConnectionStatus defines the observed state of GatewayConnection. + """ + + +class GatewayConnectionList(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[GatewayConnection] + """ + List of gatewayconnections. 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/com/upcloud/m/network/gatewayconnectiontunnel/__init__.py b/schemas/python/models/com/upcloud/m/network/gatewayconnectiontunnel/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/network/gatewayconnectiontunnel/v1alpha1.py b/schemas/python/models/com/upcloud/m/network/gatewayconnectiontunnel/v1alpha1.py new file mode 100644 index 000000000..176d4061d --- /dev/null +++ b/schemas/python/models/com/upcloud/m/network/gatewayconnectiontunnel/v1alpha1.py @@ -0,0 +1,440 @@ +# generated by datamodel-codegen: +# filename: workdir/network_m_upcloud_com_v1alpha1_gatewayconnectiontunnel.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 ConnectionIdRef(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 ConnectionIdSelector(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 PskSecretRef(BaseModel): + key: str + name: str + """ + Name of the secret. + """ + + +class IpsecAuthPsk(BaseModel): + pskSecretRef: PskSecretRef | None = None + """ + shared key. This value is only used during resource creation and is not returned in the state. It is not possible to update this value. If you need to update it, delete the connection and create a new one. + The pre-shared key. This value is only used during resource creation and is not returned in the state. It is not possible to update this value. If you need to update it, delete the connection and create a new one. + """ + + +class IpsecProperties(BaseModel): + childRekeyTime: int | None = None + """ + (Number) IKE child SA rekey time in seconds. + IKE child SA rekey time in seconds. + """ + dpdDelay: int | None = None + """ + (Number) Delay before sending Dead Peer Detection packets if no traffic is detected, in seconds. + Delay before sending Dead Peer Detection packets if no traffic is detected, in seconds. + """ + dpdTimeout: int | None = None + """ + (Number) Timeout period for DPD reply before considering the peer to be dead, in seconds. + Timeout period for DPD reply before considering the peer to be dead, in seconds. + """ + ikeLifetime: int | None = None + """ + (Number) Maximum IKE SA lifetime in seconds. + Maximum IKE SA lifetime in seconds. + """ + phase1Algorithms: list[str] | None = None + """ + (Set of String) List of Phase 1: Proposal algorithms. + List of Phase 1: Proposal algorithms. + """ + phase1DhGroupNumbers: list[int] | None = None + """ + Hellman group numbers. + List of Phase 1 Diffie-Hellman group numbers. + """ + phase1IntegrityAlgorithms: list[str] | None = None + """ + (Set of String) List of Phase 1 integrity algorithms. + List of Phase 1 integrity algorithms. + """ + phase2Algorithms: list[str] | None = None + """ + (Set of String) List of Phase 2: Security Association algorithms. + List of Phase 2: Security Association algorithms. + """ + phase2DhGroupNumbers: list[int] | None = None + """ + Hellman group numbers. + List of Phase 2 Diffie-Hellman group numbers. + """ + phase2IntegrityAlgorithms: list[str] | None = None + """ + (Set of String) List of Phase 2 integrity algorithms. + List of Phase 2 integrity algorithms. + """ + rekeyTime: int | None = None + """ + (Number) IKE SA rekey time in seconds. + IKE SA rekey time in seconds. + """ + + +class ForProvider(BaseModel): + connectionId: str | None = None + """ + (String) ID of the upcloud_gateway_connection resource to which the tunnel belongs + ID of the upcloud_gateway_connection resource to which the tunnel belongs + """ + connectionIdRef: ConnectionIdRef | None = None + """ + Reference to a GatewayConnection in network to populate connectionId. + """ + connectionIdSelector: ConnectionIdSelector | None = None + """ + Selector for a GatewayConnection in network to populate connectionId. + """ + ipsecAuthPsk: IpsecAuthPsk | None = None + """ + shared key (see below for nested schema) + Configuration for authenticating with pre-shared key + """ + ipsecProperties: IpsecProperties | None = None + """ + (Block List, Max: 1) IPsec configuration for the tunnel (see below for nested schema) + IPsec configuration for the tunnel + """ + localAddressName: str | None = None + """ + (String) Public (UpCloud) endpoint address of this tunnel + Public (UpCloud) endpoint address of this tunnel + """ + name: str | None = None + """ + (String) The name of the tunnel, should be unique within the connection + The name of the tunnel, should be unique within the connection + """ + remoteAddress: str | None = None + """ + (String) Remote public IP address of the tunnel + Remote public IP address of the tunnel + """ + + +class IpsecAuthPskModel(BaseModel): + pskSecretRef: PskSecretRef + """ + shared key. This value is only used during resource creation and is not returned in the state. It is not possible to update this value. If you need to update it, delete the connection and create a new one. + The pre-shared key. This value is only used during resource creation and is not returned in the state. It is not possible to update this value. If you need to update it, delete the connection and create a new one. + """ + + +class InitProvider(BaseModel): + connectionId: str | None = None + """ + (String) ID of the upcloud_gateway_connection resource to which the tunnel belongs + ID of the upcloud_gateway_connection resource to which the tunnel belongs + """ + connectionIdRef: ConnectionIdRef | None = None + """ + Reference to a GatewayConnection in network to populate connectionId. + """ + connectionIdSelector: ConnectionIdSelector | None = None + """ + Selector for a GatewayConnection in network to populate connectionId. + """ + ipsecAuthPsk: IpsecAuthPskModel | None = None + """ + shared key (see below for nested schema) + Configuration for authenticating with pre-shared key + """ + ipsecProperties: IpsecProperties | None = None + """ + (Block List, Max: 1) IPsec configuration for the tunnel (see below for nested schema) + IPsec configuration for the tunnel + """ + localAddressName: str | None = None + """ + (String) Public (UpCloud) endpoint address of this tunnel + Public (UpCloud) endpoint address of this tunnel + """ + name: str | None = None + """ + (String) The name of the tunnel, should be unique within the connection + The name of the tunnel, should be unique within the connection + """ + remoteAddress: str | None = None + """ + (String) Remote public IP address of the tunnel + Remote public IP address of the tunnel + """ + + +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 IpsecAuthPskModel1(BaseModel): + pskSecretRef: PskSecretRef | None = None + """ + shared key. This value is only used during resource creation and is not returned in the state. It is not possible to update this value. If you need to update it, delete the connection and create a new one. + The pre-shared key. This value is only used during resource creation and is not returned in the state. It is not possible to update this value. If you need to update it, delete the connection and create a new one. + """ + + +class AtProvider(BaseModel): + connectionId: str | None = None + """ + (String) ID of the upcloud_gateway_connection resource to which the tunnel belongs + ID of the upcloud_gateway_connection resource to which the tunnel belongs + """ + id: str | None = None + """ + (String) The ID of this resource. + """ + ipsecAuthPsk: IpsecAuthPskModel1 | None = None + """ + shared key (see below for nested schema) + Configuration for authenticating with pre-shared key + """ + ipsecProperties: IpsecProperties | None = None + """ + (Block List, Max: 1) IPsec configuration for the tunnel (see below for nested schema) + IPsec configuration for the tunnel + """ + localAddressName: str | None = None + """ + (String) Public (UpCloud) endpoint address of this tunnel + Public (UpCloud) endpoint address of this tunnel + """ + name: str | None = None + """ + (String) The name of the tunnel, should be unique within the connection + The name of the tunnel, should be unique within the connection + """ + operationalState: str | None = None + """ + (String) Tunnel's current operational, effective state + Tunnel's current operational, effective state + """ + remoteAddress: str | None = None + """ + (String) Remote public IP address of the tunnel + Remote public IP address of the tunnel + """ + uuid: str | None = None + """ + (String) The UUID of the tunnel + The UUID of the tunnel + """ + + +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 GatewayConnectionTunnel(BaseModel): + apiVersion: Literal['network.m.upcloud.com/v1alpha1'] | None = ( + 'network.m.upcloud.com/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['GatewayConnectionTunnel'] | None = 'GatewayConnectionTunnel' + """ + 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 + """ + GatewayConnectionTunnelSpec defines the desired state of GatewayConnectionTunnel + """ + status: Status | None = None + """ + GatewayConnectionTunnelStatus defines the observed state of GatewayConnectionTunnel. + """ + + +class GatewayConnectionTunnelList(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[GatewayConnectionTunnel] + """ + List of gatewayconnectiontunnels. 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/com/upcloud/m/network/loadbalancer/__init__.py b/schemas/python/models/com/upcloud/m/network/loadbalancer/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/network/loadbalancer/v1alpha1.py b/schemas/python/models/com/upcloud/m/network/loadbalancer/v1alpha1.py new file mode 100644 index 000000000..b666e7927 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/network/loadbalancer/v1alpha1.py @@ -0,0 +1,545 @@ +# generated by datamodel-codegen: +# filename: workdir/network_m_upcloud_com_v1alpha1_loadbalancer.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.k8s.apimachinery.pkg.apis.meta import v1 + + +class IpAddress(BaseModel): + address: str | None = None + """ + (String) Floating IP address to attach to the load balancer. + Floating IP address to attach to the load balancer. + """ + networkName: str | None = None + """ + (String) Name of the network where to attach the IP address. + Name of the network where to attach the IP address. + """ + + +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 NetworkRef(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 NetworkSelector(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 Network(BaseModel): + family: str | None = None + """ + (String) Network family. Currently only IPv4 is supported. + Network family. Currently only `IPv4` is supported. + """ + name: str | None = None + """ + (String) The name of the service. Must be unique within customer account. + The name of the network. Must be unique within the service. + """ + network: str | None = None + """ + (String, Deprecated) Private network UUID where traffic will be routed. Must reside in load balancer zone. + Private network UUID. Required for private networks and must reside in loadbalancer zone. For public network the field should be omitted. + """ + networkRef: NetworkRef | None = None + """ + Reference to a Network in network to populate network. + """ + networkSelector: NetworkSelector | None = None + """ + Selector for a Network in network to populate network. + """ + type: str | None = None + """ + (String) The type of the network. Only one public network can be attached and at least one private network must be attached. + The type of the network. Only one public network can be attached and at least one private network must be attached. + """ + + +class ForProvider(BaseModel): + configuredStatus: str | None = None + """ + (String) The service configured status indicates the service's current intended status. Managed by the customer. + The service configured status indicates the service's current intended status. Managed by the customer. + """ + ipAddresses: list[IpAddress] | None = None + """ + (Attributes Set) Floating IP addresses connected to the load balancer. (see below for nested schema) + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the load balancer. + User defined key-value pairs to classify the load balancer. + """ + maintenanceDow: str | None = None + """ + (String) The day of the week on which maintenance will be performed. If not provided, we will randomly select a weekend day. Valid values monday|tuesday|wednesday|thursday|friday|saturday|sunday. + The day of the week on which maintenance will be performed. If not provided, we will randomly select a weekend day. Valid values `monday|tuesday|wednesday|thursday|friday|saturday|sunday`. + """ + maintenanceTime: str | None = None + """ + hour timeframe has been allocated for maintenance. During this period, the multi-node production plans will not experience any downtime, while the one-node plans will have a downtime of 1-2 minutes. If not provided, we will randomly select an off-peak time. Needs to be a valid time format in UTC HH:MM:SSZ, for example 20:01:01Z. + The time at which the maintenance will begin in UTC. A 2-hour timeframe has been allocated for maintenance. During this period, the multi-node production plans will not experience any downtime, while the one-node plans will have a downtime of 1-2 minutes. If not provided, we will randomly select an off-peak time. Needs to be a valid time format in UTC HH:MM:SSZ, for example `20:01:01Z`. + """ + name: str | None = None + """ + (String) The name of the service. Must be unique within customer account. + The name of the service. Must be unique within customer account. + """ + network: str | None = None + """ + (String, Deprecated) Private network UUID where traffic will be routed. Must reside in load balancer zone. + Private network UUID where traffic will be routed. Must reside in load balancer zone. + """ + networkRef: NetworkRef | None = None + """ + Reference to a Network in network to populate network. + """ + networkSelector: NetworkSelector | None = None + """ + Selector for a Network in network to populate network. + """ + networks: list[Network] | None = None + """ + (Block List) Attached Networks from where traffic consumed and routed. Private networks must reside in loadbalancer zone. (see below for nested schema) + Attached Networks from where traffic consumed and routed. Private networks must reside in loadbalancer zone. + """ + plan: str | None = None + """ + (String) Plan which the service will have. You can list available load balancer plans with upctl loadbalancer plans + Plan which the service will have. You can list available load balancer plans with `upctl loadbalancer plans` + """ + zone: str | None = None + """ + hel1. You can list available zones with upctl zone list. + Zone in which the service will be hosted, e.g. `fi-hel1`. You can list available zones with `upctl zone list`. + """ + + +class InitProvider(BaseModel): + configuredStatus: str | None = None + """ + (String) The service configured status indicates the service's current intended status. Managed by the customer. + The service configured status indicates the service's current intended status. Managed by the customer. + """ + ipAddresses: list[IpAddress] | None = None + """ + (Attributes Set) Floating IP addresses connected to the load balancer. (see below for nested schema) + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the load balancer. + User defined key-value pairs to classify the load balancer. + """ + maintenanceDow: str | None = None + """ + (String) The day of the week on which maintenance will be performed. If not provided, we will randomly select a weekend day. Valid values monday|tuesday|wednesday|thursday|friday|saturday|sunday. + The day of the week on which maintenance will be performed. If not provided, we will randomly select a weekend day. Valid values `monday|tuesday|wednesday|thursday|friday|saturday|sunday`. + """ + maintenanceTime: str | None = None + """ + hour timeframe has been allocated for maintenance. During this period, the multi-node production plans will not experience any downtime, while the one-node plans will have a downtime of 1-2 minutes. If not provided, we will randomly select an off-peak time. Needs to be a valid time format in UTC HH:MM:SSZ, for example 20:01:01Z. + The time at which the maintenance will begin in UTC. A 2-hour timeframe has been allocated for maintenance. During this period, the multi-node production plans will not experience any downtime, while the one-node plans will have a downtime of 1-2 minutes. If not provided, we will randomly select an off-peak time. Needs to be a valid time format in UTC HH:MM:SSZ, for example `20:01:01Z`. + """ + name: str | None = None + """ + (String) The name of the service. Must be unique within customer account. + The name of the service. Must be unique within customer account. + """ + network: str | None = None + """ + (String, Deprecated) Private network UUID where traffic will be routed. Must reside in load balancer zone. + Private network UUID where traffic will be routed. Must reside in load balancer zone. + """ + networkRef: NetworkRef | None = None + """ + Reference to a Network in network to populate network. + """ + networkSelector: NetworkSelector | None = None + """ + Selector for a Network in network to populate network. + """ + networks: list[Network] | None = None + """ + (Block List) Attached Networks from where traffic consumed and routed. Private networks must reside in loadbalancer zone. (see below for nested schema) + Attached Networks from where traffic consumed and routed. Private networks must reside in loadbalancer zone. + """ + plan: str | None = None + """ + (String) Plan which the service will have. You can list available load balancer plans with upctl loadbalancer plans + Plan which the service will have. You can list available load balancer plans with `upctl loadbalancer plans` + """ + zone: str | None = None + """ + hel1. You can list available zones with upctl zone list. + Zone in which the service will be hosted, e.g. `fi-hel1`. You can list available zones with `upctl zone list`. + """ + + +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 NetworkModel(BaseModel): + dnsName: str | None = None + """ + (String, Deprecated) DNS name of the load balancer + DNS name of the load balancer network + """ + family: str | None = None + """ + (String) Network family. Currently only IPv4 is supported. + Network family. Currently only `IPv4` is supported. + """ + id: str | None = None + """ + (String) The unique identifier of the load balancer. + The unique identifier of the network. + """ + name: str | None = None + """ + (String) The name of the service. Must be unique within customer account. + The name of the network. Must be unique within the service. + """ + network: str | None = None + """ + (String, Deprecated) Private network UUID where traffic will be routed. Must reside in load balancer zone. + Private network UUID. Required for private networks and must reside in loadbalancer zone. For public network the field should be omitted. + """ + type: str | None = None + """ + (String) The type of the network. Only one public network can be attached and at least one private network must be attached. + The type of the network. Only one public network can be attached and at least one private network must be attached. + """ + + +class IpAddressModel(BaseModel): + address: str | None = None + """ + (String) Floating IP address to attach to the load balancer. + Node's IP address + """ + listen: bool | None = None + """ + (Boolean) Whether the node listens to the traffic + Whether the node listens to the traffic + """ + + +class NetworkModel1(BaseModel): + ipAddresses: list[IpAddressModel] | None = None + """ + (Attributes Set) Floating IP addresses connected to the load balancer. (see below for nested schema) + """ + name: str | None = None + """ + (String) The name of the service. Must be unique within customer account. + The name of the network + """ + type: str | None = None + """ + (String) The type of the network. Only one public network can be attached and at least one private network must be attached. + The type of the network + """ + + +class Node(BaseModel): + networks: list[NetworkModel1] | None = None + """ + (Block List) Attached Networks from where traffic consumed and routed. Private networks must reside in loadbalancer zone. (see below for nested schema) + """ + operationalState: str | None = None + """ + (String) The service operational state indicates the service's current operational, effective state. Managed by the system. + Node's operational state. Managed by the system. + """ + + +class AtProvider(BaseModel): + backends: list[str] | None = None + """ + (List of String) Backends are groups of customer servers whose traffic should be balanced. + Backends are groups of customer servers whose traffic should be balanced. + """ + configuredStatus: str | None = None + """ + (String) The service configured status indicates the service's current intended status. Managed by the customer. + The service configured status indicates the service's current intended status. Managed by the customer. + """ + dnsName: str | None = None + """ + (String, Deprecated) DNS name of the load balancer + DNS name of the load balancer + """ + frontends: list[str] | None = None + """ + (List of String) Frontends receive the traffic before dispatching it to the backends. + Frontends receive the traffic before dispatching it to the backends. + """ + id: str | None = None + """ + (String) The unique identifier of the load balancer. + """ + ipAddresses: list[IpAddress] | None = None + """ + (Attributes Set) Floating IP addresses connected to the load balancer. (see below for nested schema) + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the load balancer. + User defined key-value pairs to classify the load balancer. + """ + maintenanceDow: str | None = None + """ + (String) The day of the week on which maintenance will be performed. If not provided, we will randomly select a weekend day. Valid values monday|tuesday|wednesday|thursday|friday|saturday|sunday. + The day of the week on which maintenance will be performed. If not provided, we will randomly select a weekend day. Valid values `monday|tuesday|wednesday|thursday|friday|saturday|sunday`. + """ + maintenanceTime: str | None = None + """ + hour timeframe has been allocated for maintenance. During this period, the multi-node production plans will not experience any downtime, while the one-node plans will have a downtime of 1-2 minutes. If not provided, we will randomly select an off-peak time. Needs to be a valid time format in UTC HH:MM:SSZ, for example 20:01:01Z. + The time at which the maintenance will begin in UTC. A 2-hour timeframe has been allocated for maintenance. During this period, the multi-node production plans will not experience any downtime, while the one-node plans will have a downtime of 1-2 minutes. If not provided, we will randomly select an off-peak time. Needs to be a valid time format in UTC HH:MM:SSZ, for example `20:01:01Z`. + """ + name: str | None = None + """ + (String) The name of the service. Must be unique within customer account. + The name of the service. Must be unique within customer account. + """ + network: str | None = None + """ + (String, Deprecated) Private network UUID where traffic will be routed. Must reside in load balancer zone. + Private network UUID where traffic will be routed. Must reside in load balancer zone. + """ + networks: list[NetworkModel] | None = None + """ + (Block List) Attached Networks from where traffic consumed and routed. Private networks must reside in loadbalancer zone. (see below for nested schema) + Attached Networks from where traffic consumed and routed. Private networks must reside in loadbalancer zone. + """ + nodes: list[Node] | None = None + """ + (Attributes List) Nodes are instances running load balancer service (see below for nested schema) + """ + operationalState: str | None = None + """ + (String) The service operational state indicates the service's current operational, effective state. Managed by the system. + The service operational state indicates the service's current operational, effective state. Managed by the system. + """ + plan: str | None = None + """ + (String) Plan which the service will have. You can list available load balancer plans with upctl loadbalancer plans + Plan which the service will have. You can list available load balancer plans with `upctl loadbalancer plans` + """ + resolvers: list[str] | None = None + """ + (List of String) Domain Name Resolvers. + Domain Name Resolvers. + """ + zone: str | None = None + """ + hel1. You can list available zones with upctl zone list. + Zone in which the service will be hosted, e.g. `fi-hel1`. You can list available zones with `upctl zone list`. + """ + + +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 LoadBalancer(BaseModel): + apiVersion: Literal['network.m.upcloud.com/v1alpha1'] | None = ( + 'network.m.upcloud.com/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['LoadBalancer'] | None = 'LoadBalancer' + """ + 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 + """ + LoadBalancerSpec defines the desired state of LoadBalancer + """ + status: Status | None = None + """ + LoadBalancerStatus defines the observed state of LoadBalancer. + """ + + +class LoadBalancerList(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[LoadBalancer] + """ + List of loadbalancers. 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/com/upcloud/m/network/loadbalancerbackend/__init__.py b/schemas/python/models/com/upcloud/m/network/loadbalancerbackend/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/network/loadbalancerbackend/v1alpha1.py b/schemas/python/models/com/upcloud/m/network/loadbalancerbackend/v1alpha1.py new file mode 100644 index 000000000..27e2555a8 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/network/loadbalancerbackend/v1alpha1.py @@ -0,0 +1,421 @@ +# generated by datamodel-codegen: +# filename: workdir/network_m_upcloud_com_v1alpha1_loadbalancerbackend.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 LoadbalancerRef(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 LoadbalancerSelector(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 Properties(BaseModel): + healthCheckExpectedStatus: float | None = None + """ + (Number) Expected HTTP status code returned by the customer application to mark server as healthy. Ignored for tcp health_check_type. + Expected HTTP status code returned by the customer application to mark server as healthy. Ignored for `tcp` `health_check_type`. + """ + healthCheckFall: float | None = None + """ + (Number) Sets how many failed health checks are allowed until the backend member is taken off from the rotation. + Sets how many failed health checks are allowed until the backend member is taken off from the rotation. + """ + healthCheckInterval: float | None = None + """ + (Number) Interval between health checks in seconds. + Interval between health checks in seconds. + """ + healthCheckRise: float | None = None + """ + (Number) Sets how many successful health checks are required to put the backend member back into rotation. + Sets how many successful health checks are required to put the backend member back into rotation. + """ + healthCheckTlsVerify: bool | None = None + """ + (Boolean) Enables certificate verification with the system CA certificate bundle. Works with https scheme in health_check_url, otherwise ignored. + Enables certificate verification with the system CA certificate bundle. Works with https scheme in health_check_url, otherwise ignored. + """ + healthCheckType: str | None = None + """ + (String) Health check type. + Health check type. + """ + healthCheckUrl: str | None = None + """ + (String) Target path for health check HTTP GET requests. Ignored for tcp health_check_type. + Target path for health check HTTP GET requests. Ignored for `tcp` `health_check_type`. + """ + http2Enabled: bool | None = None + """ + (Boolean) Allow HTTP/2 connections to backend members by utilizing ALPN extension of TLS protocol, therefore it can only be enabled when tls_enabled is set to true. Note: members should support HTTP/2 for this setting to work. + Allow HTTP/2 connections to backend members by utilizing ALPN extension of TLS protocol, therefore it can only be enabled when tls_enabled is set to true. Note: members should support HTTP/2 for this setting to work. + """ + outboundProxyProtocol: str | None = None + """ + (String) Enable outbound proxy protocol by setting the desired version. Defaults to empty string. Empty string disables proxy protocol. + Enable outbound proxy protocol by setting the desired version. Defaults to empty string. Empty string disables proxy protocol. + """ + stickySessionCookieName: str | None = None + """ + (String) Sets sticky session cookie name. Empty string disables sticky session. + Sets sticky session cookie name. Empty string disables sticky session. + """ + timeoutServer: float | None = None + """ + (Number) Backend server timeout in seconds. + Backend server timeout in seconds. + """ + timeoutTunnel: float | None = None + """ + (Number) Maximum inactivity time on the client and server side for tunnels in seconds. + Maximum inactivity time on the client and server side for tunnels in seconds. + """ + tlsEnabled: bool | None = None + """ + (Boolean) Enables TLS connection from the load balancer to backend servers. + Enables TLS connection from the load balancer to backend servers. + """ + tlsUseSystemCa: bool | None = None + """ + (Boolean) If enabled, then the system CA certificate bundle will be used for the certificate verification. + If enabled, then the system CA certificate bundle will be used for the certificate verification. + """ + tlsVerify: bool | None = None + """ + (Boolean) Enables backend servers certificate verification. Please make sure that TLS config with the certificate bundle of type authority attached to the backend or tls_use_system_ca enabled. Note: tls_verify has preference over health_check_tls_verify when tls_enabled in true. + Enables backend servers certificate verification. Please make sure that TLS config with the certificate bundle of type authority attached to the backend or `tls_use_system_ca` enabled. Note: `tls_verify` has preference over `health_check_tls_verify` when `tls_enabled` in true. + """ + + +class ResolverNameRef(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 ResolverNameSelector(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): + loadbalancer: str | None = None + """ + (String) UUID of the load balancer to which the backend is connected. + UUID of the load balancer to which the backend is connected. + """ + loadbalancerRef: LoadbalancerRef | None = None + """ + Reference to a LoadBalancer in network to populate loadbalancer. + """ + loadbalancerSelector: LoadbalancerSelector | None = None + """ + Selector for a LoadBalancer in network to populate loadbalancer. + """ + properties: Properties | None = None + """ + empty block is also required. (see below for nested schema) + Backend properties. Properties can be set back to defaults by defining an empty `properties {}` block. + """ + resolverName: str | None = None + """ + (String) Domain name resolver used with dynamic type members. + Domain name resolver used with dynamic type members. + """ + resolverNameRef: ResolverNameRef | None = None + """ + Reference to a LoadBalancerResolver in network to populate resolverName. + """ + resolverNameSelector: ResolverNameSelector | None = None + """ + Selector for a LoadBalancerResolver in network to populate resolverName. + """ + + +class InitProvider(BaseModel): + properties: Properties | None = None + """ + empty block is also required. (see below for nested schema) + Backend properties. Properties can be set back to defaults by defining an empty `properties {}` block. + """ + resolverName: str | None = None + """ + (String) Domain name resolver used with dynamic type members. + Domain name resolver used with dynamic type members. + """ + resolverNameRef: ResolverNameRef | None = None + """ + Reference to a LoadBalancerResolver in network to populate resolverName. + """ + resolverNameSelector: ResolverNameSelector | None = None + """ + Selector for a LoadBalancerResolver in network to populate resolverName. + """ + + +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 + """ + (String) ID of the backend. ID is in {load balancer UUID}/{backend name} format. + """ + loadbalancer: str | None = None + """ + (String) UUID of the load balancer to which the backend is connected. + UUID of the load balancer to which the backend is connected. + """ + members: list[str] | None = None + """ + (List of String) Backend member server UUIDs. Members receive traffic dispatched from the frontends. + Backend member server UUIDs. Members receive traffic dispatched from the frontends. + """ + properties: Properties | None = None + """ + empty block is also required. (see below for nested schema) + Backend properties. Properties can be set back to defaults by defining an empty `properties {}` block. + """ + resolverName: str | None = None + """ + (String) Domain name resolver used with dynamic type members. + Domain name resolver used with dynamic type members. + """ + tlsConfigs: list[str] | None = None + """ + (List of String) Set of TLS config names. + Set of TLS config names. + """ + + +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 LoadBalancerBackend(BaseModel): + apiVersion: Literal['network.m.upcloud.com/v1alpha1'] | None = ( + 'network.m.upcloud.com/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['LoadBalancerBackend'] | None = 'LoadBalancerBackend' + """ + 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 + """ + LoadBalancerBackendSpec defines the desired state of LoadBalancerBackend + """ + status: Status | None = None + """ + LoadBalancerBackendStatus defines the observed state of LoadBalancerBackend. + """ + + +class LoadBalancerBackendList(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[LoadBalancerBackend] + """ + List of loadbalancerbackends. 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/com/upcloud/m/network/loadbalancerbackendtlsconfig/__init__.py b/schemas/python/models/com/upcloud/m/network/loadbalancerbackendtlsconfig/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/network/loadbalancerbackendtlsconfig/v1alpha1.py b/schemas/python/models/com/upcloud/m/network/loadbalancerbackendtlsconfig/v1alpha1.py new file mode 100644 index 000000000..b1882bd3b --- /dev/null +++ b/schemas/python/models/com/upcloud/m/network/loadbalancerbackendtlsconfig/v1alpha1.py @@ -0,0 +1,312 @@ +# generated by datamodel-codegen: +# filename: workdir/network_m_upcloud_com_v1alpha1_loadbalancerbackendtlsconfig.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 BackendRef(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 BackendSelector(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 CertificateBundleRef(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 CertificateBundleSelector(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): + backend: str | None = None + """ + ID of the load balancer backend to which the TLS config is connected. + """ + backendRef: BackendRef | None = None + """ + Reference to a LoadBalancerBackend in network to populate backend. + """ + backendSelector: BackendSelector | None = None + """ + Selector for a LoadBalancerBackend in network to populate backend. + """ + certificateBundle: str | None = None + """ + Reference to certificate bundle ID. + """ + certificateBundleRef: CertificateBundleRef | None = None + """ + Reference to a LoadBalancerManualCertificateBundle in network to populate certificateBundle. + """ + certificateBundleSelector: CertificateBundleSelector | None = None + """ + Selector for a LoadBalancerManualCertificateBundle in network to populate certificateBundle. + """ + + +class InitProvider(BaseModel): + certificateBundle: str | None = None + """ + Reference to certificate bundle ID. + """ + certificateBundleRef: CertificateBundleRef | None = None + """ + Reference to a LoadBalancerManualCertificateBundle in network to populate certificateBundle. + """ + certificateBundleSelector: CertificateBundleSelector | None = None + """ + Selector for a LoadBalancerManualCertificateBundle in network to populate certificateBundle. + """ + + +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): + backend: str | None = None + """ + ID of the load balancer backend to which the TLS config is connected. + """ + certificateBundle: str | None = None + """ + Reference to certificate bundle ID. + """ + 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 LoadBalancerBackendTLSConfig(BaseModel): + apiVersion: Literal['network.m.upcloud.com/v1alpha1'] | None = ( + 'network.m.upcloud.com/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['LoadBalancerBackendTLSConfig'] | None = ( + 'LoadBalancerBackendTLSConfig' + ) + """ + 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 + """ + LoadBalancerBackendTLSConfigSpec defines the desired state of LoadBalancerBackendTLSConfig + """ + status: Status | None = None + """ + LoadBalancerBackendTLSConfigStatus defines the observed state of LoadBalancerBackendTLSConfig. + """ + + +class LoadBalancerBackendTLSConfigList(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[LoadBalancerBackendTLSConfig] + """ + List of loadbalancerbackendtlsconfigs. 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/com/upcloud/m/network/loadbalancerdynamicbackendmember/__init__.py b/schemas/python/models/com/upcloud/m/network/loadbalancerdynamicbackendmember/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/network/loadbalancerdynamicbackendmember/v1alpha1.py b/schemas/python/models/com/upcloud/m/network/loadbalancerdynamicbackendmember/v1alpha1.py new file mode 100644 index 000000000..147122f0c --- /dev/null +++ b/schemas/python/models/com/upcloud/m/network/loadbalancerdynamicbackendmember/v1alpha1.py @@ -0,0 +1,329 @@ +# generated by datamodel-codegen: +# filename: workdir/network_m_upcloud_com_v1alpha1_loadbalancerdynamicbackendmember.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 BackendRef(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 BackendSelector(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): + backend: str | None = None + """ + (String) ID of the load balancer backend to which the member is connected. + ID of the load balancer backend to which the member is connected. + """ + backendRef: BackendRef | None = None + """ + Reference to a LoadBalancerBackend in network to populate backend. + """ + backendSelector: BackendSelector | None = None + """ + Selector for a LoadBalancerBackend in network to populate backend. + """ + enabled: bool | None = None + """ + (Boolean) Indicates if the member is enabled. Disabled members are excluded from load balancing. + Indicates if the member is enabled. Disabled members are excluded from load balancing. + """ + ip: str | None = None + """ + (String) Optional fallback IP address in case of failure on DNS resolving. + Optional fallback IP address in case of failure on DNS resolving. + """ + maxSessions: float | None = None + """ + (Number) Maximum number of sessions before queueing. + Maximum number of sessions before queueing. + """ + port: float | None = None + """ + (Number) Server port. Port is optional and can be specified in DNS SRV record. + Server port. Port is optional and can be specified in DNS SRV record. + """ + weight: float | None = None + """ + (Number) Weight of the member. The higher the weight, the more traffic the member receives. + Weight of the member. The higher the weight, the more traffic the member receives. + """ + + +class InitProvider(BaseModel): + enabled: bool | None = None + """ + (Boolean) Indicates if the member is enabled. Disabled members are excluded from load balancing. + Indicates if the member is enabled. Disabled members are excluded from load balancing. + """ + ip: str | None = None + """ + (String) Optional fallback IP address in case of failure on DNS resolving. + Optional fallback IP address in case of failure on DNS resolving. + """ + maxSessions: float | None = None + """ + (Number) Maximum number of sessions before queueing. + Maximum number of sessions before queueing. + """ + port: float | None = None + """ + (Number) Server port. Port is optional and can be specified in DNS SRV record. + Server port. Port is optional and can be specified in DNS SRV record. + """ + weight: float | None = None + """ + (Number) Weight of the member. The higher the weight, the more traffic the member receives. + Weight of the member. The higher the weight, the more traffic the member receives. + """ + + +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): + backend: str | None = None + """ + (String) ID of the load balancer backend to which the member is connected. + ID of the load balancer backend to which the member is connected. + """ + enabled: bool | None = None + """ + (Boolean) Indicates if the member is enabled. Disabled members are excluded from load balancing. + Indicates if the member is enabled. Disabled members are excluded from load balancing. + """ + id: str | None = None + """ + (String) ID of the backend member. ID is in {load balancer UUID}/{backend name}/{member name} format. + """ + ip: str | None = None + """ + (String) Optional fallback IP address in case of failure on DNS resolving. + Optional fallback IP address in case of failure on DNS resolving. + """ + maxSessions: float | None = None + """ + (Number) Maximum number of sessions before queueing. + Maximum number of sessions before queueing. + """ + port: float | None = None + """ + (Number) Server port. Port is optional and can be specified in DNS SRV record. + Server port. Port is optional and can be specified in DNS SRV record. + """ + weight: float | None = None + """ + (Number) Weight of the member. The higher the weight, the more traffic the member receives. + Weight of the member. The higher the weight, the more traffic the member receives. + """ + + +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 LoadBalancerDynamicBackendMember(BaseModel): + apiVersion: Literal['network.m.upcloud.com/v1alpha1'] | None = ( + 'network.m.upcloud.com/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['LoadBalancerDynamicBackendMember'] | None = ( + 'LoadBalancerDynamicBackendMember' + ) + """ + 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 + """ + LoadBalancerDynamicBackendMemberSpec defines the desired state of LoadBalancerDynamicBackendMember + """ + status: Status | None = None + """ + LoadBalancerDynamicBackendMemberStatus defines the observed state of LoadBalancerDynamicBackendMember. + """ + + +class LoadBalancerDynamicBackendMemberList(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[LoadBalancerDynamicBackendMember] + """ + List of loadbalancerdynamicbackendmembers. 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/com/upcloud/m/network/loadbalancerdynamiccertificatebundle/__init__.py b/schemas/python/models/com/upcloud/m/network/loadbalancerdynamiccertificatebundle/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/network/loadbalancerdynamiccertificatebundle/v1alpha1.py b/schemas/python/models/com/upcloud/m/network/loadbalancerdynamiccertificatebundle/v1alpha1.py new file mode 100644 index 000000000..a0b3f019a --- /dev/null +++ b/schemas/python/models/com/upcloud/m/network/loadbalancerdynamiccertificatebundle/v1alpha1.py @@ -0,0 +1,259 @@ +# generated by datamodel-codegen: +# filename: workdir/network_m_upcloud_com_v1alpha1_loadbalancerdynamiccertificatebundle.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.k8s.apimachinery.pkg.apis.meta import v1 + + +class ForProvider(BaseModel): + hostnames: list[str] | None = None + """ + (List of String) Certificate hostnames. + Certificate hostnames. + """ + keyType: str | None = None + """ + (String) Private key type (rsa / ecdsa). + Private key type (`rsa` / `ecdsa`). + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the dynamic certificate bundle. + User defined key-value pairs to classify the dynamic certificate bundle. + """ + name: str | None = None + """ + (String) The name of the certificate bundle. Must be unique within customer account. + The name of the certificate bundle. Must be unique within customer account. + """ + + +class InitProvider(BaseModel): + hostnames: list[str] | None = None + """ + (List of String) Certificate hostnames. + Certificate hostnames. + """ + keyType: str | None = None + """ + (String) Private key type (rsa / ecdsa). + Private key type (`rsa` / `ecdsa`). + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the dynamic certificate bundle. + User defined key-value pairs to classify the dynamic certificate bundle. + """ + name: str | None = None + """ + (String) The name of the certificate bundle. Must be unique within customer account. + The name of the certificate bundle. Must be unique within customer account. + """ + + +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): + hostnames: list[str] | None = None + """ + (List of String) Certificate hostnames. + Certificate hostnames. + """ + id: str | None = None + """ + (String) The UUID of the certificate bundle. + """ + keyType: str | None = None + """ + (String) Private key type (rsa / ecdsa). + Private key type (`rsa` / `ecdsa`). + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the dynamic certificate bundle. + User defined key-value pairs to classify the dynamic certificate bundle. + """ + name: str | None = None + """ + (String) The name of the certificate bundle. Must be unique within customer account. + The name of the certificate bundle. Must be unique within customer account. + """ + notAfter: str | None = None + """ + (String) The time after which a certificate is no longer valid. + The time after which a certificate is no longer valid. + """ + notBefore: str | None = None + """ + (String) The time on which a certificate becomes valid. + The time on which a certificate becomes valid. + """ + operationalState: str | None = None + """ + (String) The service operational state indicates the service's current operational, effective state. Managed by the system. + The service operational state indicates the service's current operational, effective state. Managed by the system. + """ + + +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 LoadBalancerDynamicCertificateBundle(BaseModel): + apiVersion: Literal['network.m.upcloud.com/v1alpha1'] | None = ( + 'network.m.upcloud.com/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['LoadBalancerDynamicCertificateBundle'] | None = ( + 'LoadBalancerDynamicCertificateBundle' + ) + """ + 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 + """ + LoadBalancerDynamicCertificateBundleSpec defines the desired state of LoadBalancerDynamicCertificateBundle + """ + status: Status | None = None + """ + LoadBalancerDynamicCertificateBundleStatus defines the observed state of LoadBalancerDynamicCertificateBundle. + """ + + +class LoadBalancerDynamicCertificateBundleList(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[LoadBalancerDynamicCertificateBundle] + """ + List of loadbalancerdynamiccertificatebundles. 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/com/upcloud/m/network/loadbalancerfrontend/__init__.py b/schemas/python/models/com/upcloud/m/network/loadbalancerfrontend/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/network/loadbalancerfrontend/v1alpha1.py b/schemas/python/models/com/upcloud/m/network/loadbalancerfrontend/v1alpha1.py new file mode 100644 index 000000000..e708d7429 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/network/loadbalancerfrontend/v1alpha1.py @@ -0,0 +1,420 @@ +# generated by datamodel-codegen: +# filename: workdir/network_m_upcloud_com_v1alpha1_loadbalancerfrontend.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 DefaultBackendNameRef(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 DefaultBackendNameSelector(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 LoadbalancerRef(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 LoadbalancerSelector(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 Network(BaseModel): + name: str | None = None + """ + field of a backend resource as the value for this field (like in the example above) or the depends_on meta argument to ensure the resources are created and destroyed in the correct order. + Name of the load balancer network. + """ + + +class Properties(BaseModel): + http2Enabled: bool | None = None + """ + (Boolean) Enable or disable HTTP/2 support. + Enable or disable HTTP/2 support. + """ + inboundProxyProtocol: bool | None = None + """ + (Boolean) Enable or disable inbound proxy protocol support. + Enable or disable inbound proxy protocol support. + """ + timeoutClient: float | None = None + """ + (Number) Client request timeout in seconds. + Client request timeout in seconds. + """ + + +class ForProvider(BaseModel): + defaultBackendName: str | None = None + """ + (String) The name of the backend where traffic will be routed by default. The default backend can be overridden in frontend rules. + The name of the backend where traffic will be routed by default. The default backend can be overridden in frontend rules. + + Note that the frontend resource depends on the default backend resource. Use the `name` field of a backend resource as the value for this field (like in the example above) or the `depends_on` meta argument to ensure the resources are created and destroyed in the correct order. + """ + defaultBackendNameRef: DefaultBackendNameRef | None = None + """ + Reference to a LoadBalancerBackend in network to populate defaultBackendName. + """ + defaultBackendNameSelector: DefaultBackendNameSelector | None = None + """ + Selector for a LoadBalancerBackend in network to populate defaultBackendName. + """ + loadbalancer: str | None = None + """ + (String) UUID of the load balancer to which the frontend is connected. + UUID of the load balancer to which the frontend is connected. + """ + loadbalancerRef: LoadbalancerRef | None = None + """ + Reference to a LoadBalancer in network to populate loadbalancer. + """ + loadbalancerSelector: LoadbalancerSelector | None = None + """ + Selector for a LoadBalancer in network to populate loadbalancer. + """ + mode: str | None = None + """ + (String) When load balancer operating in tcp mode it acts as a layer 4 proxy. In http mode it acts as a layer 7 proxy. + When load balancer operating in `tcp` mode it acts as a layer 4 proxy. In `http` mode it acts as a layer 7 proxy. + """ + networks: list[Network] | None = None + """ + (Block Set) Networks that frontend will be listening. Networks are required if load balancer has networks defined. This field will be required when deprecated field network is removed from load balancer resource. (see below for nested schema) + Networks that frontend will be listening. Networks are required if load balancer has `networks` defined. This field will be required when deprecated field `network` is removed from load balancer resource. + """ + port: float | None = None + """ + (Number) Port to listen for incoming requests. + Port to listen for incoming requests. + """ + properties: Properties | None = None + """ + empty block is also required. (see below for nested schema) + Frontend properties. Properties can be set back to defaults by defining an empty `properties {}` block. + """ + + +class InitProvider(BaseModel): + defaultBackendName: str | None = None + """ + (String) The name of the backend where traffic will be routed by default. The default backend can be overridden in frontend rules. + The name of the backend where traffic will be routed by default. The default backend can be overridden in frontend rules. + + Note that the frontend resource depends on the default backend resource. Use the `name` field of a backend resource as the value for this field (like in the example above) or the `depends_on` meta argument to ensure the resources are created and destroyed in the correct order. + """ + defaultBackendNameRef: DefaultBackendNameRef | None = None + """ + Reference to a LoadBalancerBackend in network to populate defaultBackendName. + """ + defaultBackendNameSelector: DefaultBackendNameSelector | None = None + """ + Selector for a LoadBalancerBackend in network to populate defaultBackendName. + """ + mode: str | None = None + """ + (String) When load balancer operating in tcp mode it acts as a layer 4 proxy. In http mode it acts as a layer 7 proxy. + When load balancer operating in `tcp` mode it acts as a layer 4 proxy. In `http` mode it acts as a layer 7 proxy. + """ + networks: list[Network] | None = None + """ + (Block Set) Networks that frontend will be listening. Networks are required if load balancer has networks defined. This field will be required when deprecated field network is removed from load balancer resource. (see below for nested schema) + Networks that frontend will be listening. Networks are required if load balancer has `networks` defined. This field will be required when deprecated field `network` is removed from load balancer resource. + """ + port: float | None = None + """ + (Number) Port to listen for incoming requests. + Port to listen for incoming requests. + """ + properties: Properties | None = None + """ + empty block is also required. (see below for nested schema) + Frontend properties. Properties can be set back to defaults by defining an empty `properties {}` block. + """ + + +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): + defaultBackendName: str | None = None + """ + (String) The name of the backend where traffic will be routed by default. The default backend can be overridden in frontend rules. + The name of the backend where traffic will be routed by default. The default backend can be overridden in frontend rules. + + Note that the frontend resource depends on the default backend resource. Use the `name` field of a backend resource as the value for this field (like in the example above) or the `depends_on` meta argument to ensure the resources are created and destroyed in the correct order. + """ + id: str | None = None + """ + (String) ID of the frontend. ID is in {load balancer UUID}/{frontend name} format. + """ + loadbalancer: str | None = None + """ + (String) UUID of the load balancer to which the frontend is connected. + UUID of the load balancer to which the frontend is connected. + """ + mode: str | None = None + """ + (String) When load balancer operating in tcp mode it acts as a layer 4 proxy. In http mode it acts as a layer 7 proxy. + When load balancer operating in `tcp` mode it acts as a layer 4 proxy. In `http` mode it acts as a layer 7 proxy. + """ + networks: list[Network] | None = None + """ + (Block Set) Networks that frontend will be listening. Networks are required if load balancer has networks defined. This field will be required when deprecated field network is removed from load balancer resource. (see below for nested schema) + Networks that frontend will be listening. Networks are required if load balancer has `networks` defined. This field will be required when deprecated field `network` is removed from load balancer resource. + """ + port: float | None = None + """ + (Number) Port to listen for incoming requests. + Port to listen for incoming requests. + """ + properties: Properties | None = None + """ + empty block is also required. (see below for nested schema) + Frontend properties. Properties can be set back to defaults by defining an empty `properties {}` block. + """ + rules: list[str] | None = None + """ + (List of String) Set of frontend rule names. + Set of frontend rule names. + """ + tlsConfigs: list[str] | None = None + """ + (List of String) Set of TLS config names. + Set of TLS config names. + """ + + +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 LoadBalancerFrontend(BaseModel): + apiVersion: Literal['network.m.upcloud.com/v1alpha1'] | None = ( + 'network.m.upcloud.com/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['LoadBalancerFrontend'] | None = 'LoadBalancerFrontend' + """ + 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 + """ + LoadBalancerFrontendSpec defines the desired state of LoadBalancerFrontend + """ + status: Status | None = None + """ + LoadBalancerFrontendStatus defines the observed state of LoadBalancerFrontend. + """ + + +class LoadBalancerFrontendList(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[LoadBalancerFrontend] + """ + List of loadbalancerfrontends. 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/com/upcloud/m/network/loadbalancerfrontendrule/__init__.py b/schemas/python/models/com/upcloud/m/network/loadbalancerfrontendrule/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/network/loadbalancerfrontendrule/v1alpha1.py b/schemas/python/models/com/upcloud/m/network/loadbalancerfrontendrule/v1alpha1.py new file mode 100644 index 000000000..6f2c968b0 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/network/loadbalancerfrontendrule/v1alpha1.py @@ -0,0 +1,994 @@ +# generated by datamodel-codegen: +# filename: workdir/network_m_upcloud_com_v1alpha1_loadbalancerfrontendrule.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.k8s.apimachinery.pkg.apis.meta import v1 + + +class HttpRedirectItem(BaseModel): + location: str | None = None + """ + (String) Target location. + Target location. + """ + scheme: str | None = None + """ + (String) Target scheme. + Target scheme. + """ + status: float | None = None + """ + (Number) HTTP status code. + HTTP status code. + """ + + +class HttpReturnItem(BaseModel): + contentType: str | None = None + """ + (String) Content type. + Content type. + """ + payload: str | None = None + """ + (String) The payload. + The payload. + """ + status: float | None = None + """ + (Number) HTTP status code. + HTTP status code. + """ + + +class HttpRewritePathItem(BaseModel): + matchPattern: str | None = None + """ + (String) Regex pattern to match against the request path. + Regex pattern to match against the request path. + """ + rewriteTo: str | None = None + """ + (String) Replacement pattern. + Replacement pattern. + """ + + +class HttpRewriteUriItem(BaseModel): + matchPattern: str | None = None + """ + (String) Regex pattern to match against the request path. + Regex pattern to match against the request URI. + """ + rewriteTo: str | None = None + """ + (String) Replacement pattern. + Replacement pattern. + """ + + +class SetForwardedHeader(BaseModel): + active: bool | None = None + """ + (Boolean) + """ + + +class SetRequestHeaderItem(BaseModel): + header: str | None = None + """ + (String) Header name. + Header name. + """ + value: str | None = None + """ + (String) Header value. + Header value. + """ + + +class SetResponseHeaderItem(BaseModel): + header: str | None = None + """ + (String) Header name. + Header name. + """ + value: str | None = None + """ + (String) Header value. + Header value. + """ + + +class TcpRejectItem(BaseModel): + active: bool | None = None + """ + (Boolean) + Indicates if the rule is active. + """ + + +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 BackendNameRef(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 BackendNameSelector(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 UseBackendItem(BaseModel): + backendName: str | None = None + """ + (String) The name of the backend where traffic will be routed. + The name of the backend where traffic will be routed. + """ + backendNameRef: BackendNameRef | None = None + """ + Reference to a LoadBalancerBackend in network to populate backendName. + """ + backendNameSelector: BackendNameSelector | None = None + """ + Selector for a LoadBalancerBackend in network to populate backendName. + """ + + +class Actions(BaseModel): + httpRedirect: list[HttpRedirectItem] | None = None + """ + (Block List) Redirects HTTP requests to specified location or URL scheme. Only either location or scheme can be defined at a time. (see below for nested schema) + Redirects HTTP requests to specified location or URL scheme. Only either location or scheme can be defined at a time. + """ + httpReturn: list[HttpReturnItem] | None = None + """ + (Block List) Returns HTTP response with specified HTTP status. (see below for nested schema) + Returns HTTP response with specified HTTP status. + """ + httpRewritePath: list[HttpRewritePathItem] | None = None + """ + (Block List) Rewrites the HTTP request path using regex pattern matching. (see below for nested schema) + Rewrites the HTTP request path using regex pattern matching. + """ + httpRewriteUri: list[HttpRewriteUriItem] | None = None + """ + (Block List) Rewrites the entire HTTP request URI using regex pattern matching. (see below for nested schema) + Rewrites the entire HTTP request URI using regex pattern matching. + """ + setForwardedHeaders: list[SetForwardedHeader] | None = None + """ + Forwarded-For / -Proto / -Port' headers in your forwarded requests (see below for nested schema) + Adds 'X-Forwarded-For / -Proto / -Port' headers in your forwarded requests + """ + setRequestHeader: list[SetRequestHeaderItem] | None = None + """ + (Block List) Set request header (see below for nested schema) + Set request header + """ + setResponseHeader: list[SetResponseHeaderItem] | None = None + """ + (Block List) Set response header (see below for nested schema) + Set response header + """ + tcpReject: list[TcpRejectItem] | None = None + """ + (Block List) Terminates a connection. (see below for nested schema) + Terminates a connection. + """ + useBackend: list[UseBackendItem] | None = None + """ + (Block List) Routes traffic to specified backend. (see below for nested schema) + Routes traffic to specified `backend`. + """ + + +class FrontendRef(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 FrontendSelector(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 BodySizeItem(BaseModel): + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`equal`, `greater`, `greater_or_equal`, `less`, `less_or_equal`). + """ + value: float | None = None + """ + (String) Header value. + Integer value. + """ + + +class BodySizeRangeItem(BaseModel): + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + rangeEnd: float | None = None + """ + (Number) Integer value. + Integer value. + """ + rangeStart: float | None = None + """ + (Number) Integer value. + Integer value. + """ + + +class CookieItem(BaseModel): + ignoreCase: bool | None = None + """ + (Boolean) Defines if case should be ignored. Defaults to false. + Defines if case should be ignored. Defaults to `false`. + """ + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`exact`, `substring`, `regexp`, `starts`, `ends`, `domain`, `ip`, `exists`). Matcher with `exists` and `ip` methods must be used without `value` and `ignore_case` fields. + """ + name: str | None = None + """ + (String) The name of the frontend rule. Must be unique within the frontend. + Name of the argument. + """ + value: str | None = None + """ + (String) Header value. + String value. + """ + + +class HeaderItem(BaseModel): + ignoreCase: bool | None = None + """ + (Boolean) Defines if case should be ignored. Defaults to false. + Defines if case should be ignored. Defaults to `false`. + """ + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`exact`, `substring`, `regexp`, `starts`, `ends`, `domain`, `ip`, `exists`). Matcher with `exists` and `ip` methods must be used without `value` and `ignore_case` fields. + """ + name: str | None = None + """ + (String) The name of the frontend rule. Must be unique within the frontend. + Name of the argument. + """ + value: str | None = None + """ + (String) Header value. + String value. + """ + + +class HostItem(BaseModel): + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + value: str | None = None + """ + (String) Header value. + String value. + """ + + +class HttpMethodItem(BaseModel): + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + value: str | None = None + """ + (String) Header value. + String value (`GET`, `HEAD`, `POST`, `PUT`, `PATCH`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`). + """ + + +class HttpStatu(BaseModel): + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`equal`, `greater`, `greater_or_equal`, `less`, `less_or_equal`). + """ + value: float | None = None + """ + (String) Header value. + Integer value. + """ + + +class HttpStatusRangeItem(BaseModel): + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + rangeEnd: float | None = None + """ + (Number) Integer value. + Integer value. + """ + rangeStart: float | None = None + """ + (Number) Integer value. + Integer value. + """ + + +class NumMembersUpItem(BaseModel): + backendName: str | None = None + """ + (String) The name of the backend where traffic will be routed. + The name of the `backend`. + """ + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`equal`, `greater`, `greater_or_equal`, `less`, `less_or_equal`). + """ + value: float | None = None + """ + (String) Header value. + Integer value. + """ + + +class PathItem(BaseModel): + ignoreCase: bool | None = None + """ + (Boolean) Defines if case should be ignored. Defaults to false. + Defines if case should be ignored. Defaults to `false`. + """ + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`exact`, `substring`, `regexp`, `starts`, `ends`, `domain`, `ip`, `exists`). Matcher with `exists` and `ip` methods must be used without `value` and `ignore_case` fields. + """ + value: str | None = None + """ + (String) Header value. + String value. + """ + + +class RequestHeaderItem(BaseModel): + ignoreCase: bool | None = None + """ + (Boolean) Defines if case should be ignored. Defaults to false. + Defines if case should be ignored. Defaults to `false`. + """ + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`exact`, `substring`, `regexp`, `starts`, `ends`, `domain`, `ip`, `exists`). Matcher with `exists` and `ip` methods must be used without `value` and `ignore_case` fields. + """ + name: str | None = None + """ + (String) The name of the frontend rule. Must be unique within the frontend. + Name of the argument. + """ + value: str | None = None + """ + (String) Header value. + String value. + """ + + +class ResponseHeaderItem(BaseModel): + ignoreCase: bool | None = None + """ + (Boolean) Defines if case should be ignored. Defaults to false. + Defines if case should be ignored. Defaults to `false`. + """ + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`exact`, `substring`, `regexp`, `starts`, `ends`, `domain`, `ip`, `exists`). Matcher with `exists` and `ip` methods must be used without `value` and `ignore_case` fields. + """ + name: str | None = None + """ + (String) The name of the frontend rule. Must be unique within the frontend. + Name of the argument. + """ + value: str | None = None + """ + (String) Header value. + String value. + """ + + +class SrcIpItem(BaseModel): + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + value: str | None = None + """ + (String) Header value. + IP address. CIDR masks are supported, e.g. `192.168.0.0/24`. + """ + + +class SrcPortItem(BaseModel): + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`equal`, `greater`, `greater_or_equal`, `less`, `less_or_equal`). + """ + value: float | None = None + """ + (String) Header value. + Integer value. + """ + + +class SrcPortRangeItem(BaseModel): + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + rangeEnd: float | None = None + """ + (Number) Integer value. + Integer value. + """ + rangeStart: float | None = None + """ + (Number) Integer value. + Integer value. + """ + + +class UrlItem(BaseModel): + ignoreCase: bool | None = None + """ + (Boolean) Defines if case should be ignored. Defaults to false. + Defines if case should be ignored. Defaults to `false`. + """ + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`exact`, `substring`, `regexp`, `starts`, `ends`, `domain`, `ip`, `exists`). Matcher with `exists` and `ip` methods must be used without `value` and `ignore_case` fields. + """ + value: str | None = None + """ + (String) Header value. + String value. + """ + + +class UrlParamItem(BaseModel): + ignoreCase: bool | None = None + """ + (Boolean) Defines if case should be ignored. Defaults to false. + Defines if case should be ignored. Defaults to `false`. + """ + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`exact`, `substring`, `regexp`, `starts`, `ends`, `domain`, `ip`, `exists`). Matcher with `exists` and `ip` methods must be used without `value` and `ignore_case` fields. + """ + name: str | None = None + """ + (String) The name of the frontend rule. Must be unique within the frontend. + Name of the argument. + """ + value: str | None = None + """ + (String) Header value. + String value. + """ + + +class UrlQueryItem(BaseModel): + ignoreCase: bool | None = None + """ + (Boolean) Defines if case should be ignored. Defaults to false. + Defines if case should be ignored. Defaults to `false`. + """ + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`exact`, `substring`, `regexp`, `starts`, `ends`, `domain`, `ip`, `exists`). Matcher with `exists` and `ip` methods must be used without `value` and `ignore_case` fields. + """ + value: str | None = None + """ + (String) Header value. + String value. + """ + + +class Matchers(BaseModel): + bodySize: list[BodySizeItem] | None = None + """ + (Block List) Matches by HTTP request body size. (see below for nested schema) + Matches by HTTP request body size. + """ + bodySizeRange: list[BodySizeRangeItem] | None = None + """ + (Block List) Matches by range of HTTP request body sizes. (see below for nested schema) + Matches by range of HTTP request body sizes. + """ + cookie: list[CookieItem] | None = None + """ + (Block List) Matches by HTTP cookie value. Cookie name must be provided. (see below for nested schema) + Matches by HTTP cookie value. Cookie name must be provided. + """ + header: list[HeaderItem] | None = None + """ + (String) Header name. + Matches by HTTP header value. Header name must be provided. + """ + host: list[HostItem] | None = None + """ + (Block List) Matches by hostname. Header extracted from HTTP Headers or from TLS certificate in case of secured connection. (see below for nested schema) + Matches by hostname. Header extracted from HTTP Headers or from TLS certificate in case of secured connection. + """ + httpMethod: list[HttpMethodItem] | None = None + """ + (Block List) Matches by HTTP method. (see below for nested schema) + Matches by HTTP method. + """ + httpStatus: list[HttpStatu] | None = None + """ + (Block List) Matches by HTTP status. (see below for nested schema) + Matches by HTTP status. + """ + httpStatusRange: list[HttpStatusRangeItem] | None = None + """ + (Block List) Matches by range of HTTP statuses. (see below for nested schema) + Matches by range of HTTP statuses. + """ + numMembersUp: list[NumMembersUpItem] | None = None + """ + (Block List) Matches by number of healthy backend members. (see below for nested schema) + Matches by number of healthy backend members. + """ + path: list[PathItem] | None = None + """ + (Block List) Matches by URL path. (see below for nested schema) + Matches by URL path. + """ + requestHeader: list[RequestHeaderItem] | None = None + """ + (Block List) Matches by HTTP request header value. Header name must be provided. (see below for nested schema) + Matches by HTTP request header value. Header name must be provided. + """ + responseHeader: list[ResponseHeaderItem] | None = None + """ + (Block List) Matches by HTTP response header value. Header name must be provided. (see below for nested schema) + Matches by HTTP response header value. Header name must be provided. + """ + srcIp: list[SrcIpItem] | None = None + """ + (Block List) Matches by source IP address. (see below for nested schema) + Matches by source IP address. + """ + srcPort: list[SrcPortItem] | None = None + """ + (Block List) Matches by source port number. (see below for nested schema) + Matches by source port number. + """ + srcPortRange: list[SrcPortRangeItem] | None = None + """ + (Block List) Matches by range of source port numbers. (see below for nested schema) + Matches by range of source port numbers. + """ + url: list[UrlItem] | None = None + """ + (Block List) Matches by URL without schema, e.g. example.com/dashboard. (see below for nested schema) + Matches by URL without schema, e.g. `example.com/dashboard`. + """ + urlParam: list[UrlParamItem] | None = None + """ + (Block List) Matches by URL query parameter value. Query parameter name must be provided (see below for nested schema) + Matches by URL query parameter value. Query parameter name must be provided + """ + urlQuery: list[UrlQueryItem] | None = None + """ + (Block List) Matches by URL query string. (see below for nested schema) + Matches by URL query string. + """ + + +class ForProvider(BaseModel): + actions: Actions | None = None + """ + (Block List) Rule actions. (see below for nested schema) + Rule actions. + """ + frontend: str | None = None + """ + (String) ID of the load balancer frontend to which the frontend rule is connected. + ID of the load balancer frontend to which the frontend rule is connected. + """ + frontendRef: FrontendRef | None = None + """ + Reference to a LoadBalancerFrontend in network to populate frontend. + """ + frontendSelector: FrontendSelector | None = None + """ + Selector for a LoadBalancerFrontend in network to populate frontend. + """ + matchers: Matchers | None = None + """ + (Block List) Set of rule matchers. If rule doesn't have matchers, then action applies to all incoming requests. (see below for nested schema) + Set of rule matchers. If rule doesn't have matchers, then action applies to all incoming requests. + """ + matchingCondition: str | None = None + """ + (String) Defines boolean operator used to combine multiple matchers. Defaults to and. + Defines boolean operator used to combine multiple matchers. Defaults to `and`. + """ + priority: float | None = None + """ + (Number) Rule with the higher priority goes first. Rules with the same priority processed in alphabetical order. + Rule with the higher priority goes first. Rules with the same priority processed in alphabetical order. + """ + + +class InitProvider(BaseModel): + actions: Actions | None = None + """ + (Block List) Rule actions. (see below for nested schema) + Rule actions. + """ + matchers: Matchers | None = None + """ + (Block List) Set of rule matchers. If rule doesn't have matchers, then action applies to all incoming requests. (see below for nested schema) + Set of rule matchers. If rule doesn't have matchers, then action applies to all incoming requests. + """ + matchingCondition: str | None = None + """ + (String) Defines boolean operator used to combine multiple matchers. Defaults to and. + Defines boolean operator used to combine multiple matchers. Defaults to `and`. + """ + priority: float | None = None + """ + (Number) Rule with the higher priority goes first. Rules with the same priority processed in alphabetical order. + Rule with the higher priority goes first. Rules with the same priority processed in alphabetical order. + """ + + +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 UseBackendItemModel(BaseModel): + backendName: str | None = None + """ + (String) The name of the backend where traffic will be routed. + The name of the backend where traffic will be routed. + """ + + +class AtProvider(BaseModel): + actions: Actions | None = None + """ + (Block List) Rule actions. (see below for nested schema) + Rule actions. + """ + frontend: str | None = None + """ + (String) ID of the load balancer frontend to which the frontend rule is connected. + ID of the load balancer frontend to which the frontend rule is connected. + """ + id: str | None = None + """ + (String) ID of the frontend rule. ID is in {load balancer UUID}/{frontend name}/{frontend rule name} format. + """ + matchers: Matchers | None = None + """ + (Block List) Set of rule matchers. If rule doesn't have matchers, then action applies to all incoming requests. (see below for nested schema) + Set of rule matchers. If rule doesn't have matchers, then action applies to all incoming requests. + """ + matchingCondition: str | None = None + """ + (String) Defines boolean operator used to combine multiple matchers. Defaults to and. + Defines boolean operator used to combine multiple matchers. Defaults to `and`. + """ + priority: float | None = None + """ + (Number) Rule with the higher priority goes first. Rules with the same priority processed in alphabetical order. + Rule with the higher priority goes first. Rules with the same priority processed in alphabetical order. + """ + + +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 LoadBalancerFrontendRule(BaseModel): + apiVersion: Literal['network.m.upcloud.com/v1alpha1'] | None = ( + 'network.m.upcloud.com/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['LoadBalancerFrontendRule'] | None = 'LoadBalancerFrontendRule' + """ + 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 + """ + LoadBalancerFrontendRuleSpec defines the desired state of LoadBalancerFrontendRule + """ + status: Status | None = None + """ + LoadBalancerFrontendRuleStatus defines the observed state of LoadBalancerFrontendRule. + """ + + +class LoadBalancerFrontendRuleList(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[LoadBalancerFrontendRule] + """ + List of loadbalancerfrontendrules. 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/com/upcloud/m/network/loadbalancerfrontendtlsconfig/__init__.py b/schemas/python/models/com/upcloud/m/network/loadbalancerfrontendtlsconfig/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/network/loadbalancerfrontendtlsconfig/v1alpha1.py b/schemas/python/models/com/upcloud/m/network/loadbalancerfrontendtlsconfig/v1alpha1.py new file mode 100644 index 000000000..0f37a0fe3 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/network/loadbalancerfrontendtlsconfig/v1alpha1.py @@ -0,0 +1,320 @@ +# generated by datamodel-codegen: +# filename: workdir/network_m_upcloud_com_v1alpha1_loadbalancerfrontendtlsconfig.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 CertificateBundleRef(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 CertificateBundleSelector(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 FrontendRef(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 FrontendSelector(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): + certificateBundle: str | None = None + """ + (String) Reference to certificate bundle ID. + Reference to certificate bundle ID. + """ + certificateBundleRef: CertificateBundleRef | None = None + """ + Reference to a LoadBalancerManualCertificateBundle in network to populate certificateBundle. + """ + certificateBundleSelector: CertificateBundleSelector | None = None + """ + Selector for a LoadBalancerManualCertificateBundle in network to populate certificateBundle. + """ + frontend: str | None = None + """ + (String) ID of the load balancer frontend to which the TLS config is connected. + ID of the load balancer frontend to which the TLS config is connected. + """ + frontendRef: FrontendRef | None = None + """ + Reference to a LoadBalancerFrontend in network to populate frontend. + """ + frontendSelector: FrontendSelector | None = None + """ + Selector for a LoadBalancerFrontend in network to populate frontend. + """ + + +class InitProvider(BaseModel): + certificateBundle: str | None = None + """ + (String) Reference to certificate bundle ID. + Reference to certificate bundle ID. + """ + certificateBundleRef: CertificateBundleRef | None = None + """ + Reference to a LoadBalancerManualCertificateBundle in network to populate certificateBundle. + """ + certificateBundleSelector: CertificateBundleSelector | None = None + """ + Selector for a LoadBalancerManualCertificateBundle in network to populate certificateBundle. + """ + + +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): + certificateBundle: str | None = None + """ + (String) Reference to certificate bundle ID. + Reference to certificate bundle ID. + """ + frontend: str | None = None + """ + (String) ID of the load balancer frontend to which the TLS config is connected. + ID of the load balancer frontend to which the TLS config is connected. + """ + id: str | None = None + """ + (String) ID of the TLS config. ID is in {load balancer UUID}/{frontend name}/{TLS config name} 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 LoadBalancerFrontendTLSConfig(BaseModel): + apiVersion: Literal['network.m.upcloud.com/v1alpha1'] | None = ( + 'network.m.upcloud.com/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['LoadBalancerFrontendTLSConfig'] | None = ( + 'LoadBalancerFrontendTLSConfig' + ) + """ + 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 + """ + LoadBalancerFrontendTLSConfigSpec defines the desired state of LoadBalancerFrontendTLSConfig + """ + status: Status | None = None + """ + LoadBalancerFrontendTLSConfigStatus defines the observed state of LoadBalancerFrontendTLSConfig. + """ + + +class LoadBalancerFrontendTLSConfigList(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[LoadBalancerFrontendTLSConfig] + """ + List of loadbalancerfrontendtlsconfigs. 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/com/upcloud/m/network/loadbalancermanualcertificatebundle/__init__.py b/schemas/python/models/com/upcloud/m/network/loadbalancermanualcertificatebundle/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/network/loadbalancermanualcertificatebundle/v1alpha1.py b/schemas/python/models/com/upcloud/m/network/loadbalancermanualcertificatebundle/v1alpha1.py new file mode 100644 index 000000000..1fe9da8f2 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/network/loadbalancermanualcertificatebundle/v1alpha1.py @@ -0,0 +1,277 @@ +# generated by datamodel-codegen: +# filename: workdir/network_m_upcloud_com_v1alpha1_loadbalancermanualcertificatebundle.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.k8s.apimachinery.pkg.apis.meta import v1 + + +class PrivateKeySecretRef(BaseModel): + key: str + name: str + """ + Name of the secret. + """ + + +class ForProvider(BaseModel): + certificate: str | None = None + """ + (String) Certificate as base64 encoded string. Must be in PEM format. + Certificate as base64 encoded string. Must be in PEM format. + """ + intermediates: str | None = None + """ + (String) Intermediate certificates as base64 encoded string. Must be in PEM format. + Intermediate certificates as base64 encoded string. Must be in PEM format. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the manual certificate bundle. + User defined key-value pairs to classify the manual certificate bundle. + """ + name: str | None = None + """ + (String) The name of the certificate bundle. Must be unique within customer account. + The name of the certificate bundle. Must be unique within customer account. + """ + privateKeySecretRef: PrivateKeySecretRef | None = None + """ + (String, Sensitive) Private key as base64 encoded string. Must be in PEM format. + Private key as base64 encoded string. Must be in PEM format. + """ + + +class InitProvider(BaseModel): + certificate: str | None = None + """ + (String) Certificate as base64 encoded string. Must be in PEM format. + Certificate as base64 encoded string. Must be in PEM format. + """ + intermediates: str | None = None + """ + (String) Intermediate certificates as base64 encoded string. Must be in PEM format. + Intermediate certificates as base64 encoded string. Must be in PEM format. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the manual certificate bundle. + User defined key-value pairs to classify the manual certificate bundle. + """ + name: str | None = None + """ + (String) The name of the certificate bundle. Must be unique within customer account. + The name of the certificate bundle. Must be unique within customer account. + """ + privateKeySecretRef: PrivateKeySecretRef + """ + (String, Sensitive) Private key as base64 encoded string. Must be in PEM format. + Private key as base64 encoded string. Must be in PEM format. + """ + + +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): + certificate: str | None = None + """ + (String) Certificate as base64 encoded string. Must be in PEM format. + Certificate as base64 encoded string. Must be in PEM format. + """ + id: str | None = None + """ + (String) The UUID of the certificate bundle. + """ + intermediates: str | None = None + """ + (String) Intermediate certificates as base64 encoded string. Must be in PEM format. + Intermediate certificates as base64 encoded string. Must be in PEM format. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the manual certificate bundle. + User defined key-value pairs to classify the manual certificate bundle. + """ + name: str | None = None + """ + (String) The name of the certificate bundle. Must be unique within customer account. + The name of the certificate bundle. Must be unique within customer account. + """ + notAfter: str | None = None + """ + (String) The time after which a certificate is no longer valid. + The time after which a certificate is no longer valid. + """ + notBefore: str | None = None + """ + (String) The time on which a certificate becomes valid. + The time on which a certificate becomes valid. + """ + operationalState: str | None = None + """ + (String) The service operational state indicates the service's current operational, effective state. Managed by the system. + The service operational state indicates the service's current operational, effective state. Managed by the system. + """ + + +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 LoadBalancerManualCertificateBundle(BaseModel): + apiVersion: Literal['network.m.upcloud.com/v1alpha1'] | None = ( + 'network.m.upcloud.com/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['LoadBalancerManualCertificateBundle'] | None = ( + 'LoadBalancerManualCertificateBundle' + ) + """ + 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 + """ + LoadBalancerManualCertificateBundleSpec defines the desired state of LoadBalancerManualCertificateBundle + """ + status: Status | None = None + """ + LoadBalancerManualCertificateBundleStatus defines the observed state of LoadBalancerManualCertificateBundle. + """ + + +class LoadBalancerManualCertificateBundleList(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[LoadBalancerManualCertificateBundle] + """ + List of loadbalancermanualcertificatebundles. 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/com/upcloud/m/network/loadbalancerresolver/__init__.py b/schemas/python/models/com/upcloud/m/network/loadbalancerresolver/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/network/loadbalancerresolver/v1alpha1.py b/schemas/python/models/com/upcloud/m/network/loadbalancerresolver/v1alpha1.py new file mode 100644 index 000000000..ae05d1ca3 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/network/loadbalancerresolver/v1alpha1.py @@ -0,0 +1,342 @@ +# generated by datamodel-codegen: +# filename: workdir/network_m_upcloud_com_v1alpha1_loadbalancerresolver.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 LoadbalancerRef(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 LoadbalancerSelector(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): + cacheInvalid: float | None = None + """ + (Number) Time in seconds to cache invalid results. + Time in seconds to cache invalid results. + """ + cacheValid: float | None = None + """ + (Number) Time in seconds to cache valid results. + Time in seconds to cache valid results. + """ + loadbalancer: str | None = None + """ + (String) ID of the load balancer to which the resolver is connected. + ID of the load balancer to which the resolver is connected. + """ + loadbalancerRef: LoadbalancerRef | None = None + """ + Reference to a LoadBalancer in network to populate loadbalancer. + """ + loadbalancerSelector: LoadbalancerSelector | None = None + """ + Selector for a LoadBalancer in network to populate loadbalancer. + """ + nameservers: list[str] | None = None + """ + (List of String) List of nameserver IP addresses. Nameserver can reside in public internet or in customer private network. Port is optional, if missing then default 53 will be used. + List of nameserver IP addresses. Nameserver can reside in public internet or in customer private network. Port is optional, if missing then default 53 will be used. + """ + retries: float | None = None + """ + (Number) Number of retries on failure. + Number of retries on failure. + """ + timeout: float | None = None + """ + (Number) Timeout for the query in seconds. + Timeout for the query in seconds. + """ + timeoutRetry: float | None = None + """ + (Number) Timeout for the query retries in seconds. + Timeout for the query retries in seconds. + """ + + +class InitProvider(BaseModel): + cacheInvalid: float | None = None + """ + (Number) Time in seconds to cache invalid results. + Time in seconds to cache invalid results. + """ + cacheValid: float | None = None + """ + (Number) Time in seconds to cache valid results. + Time in seconds to cache valid results. + """ + nameservers: list[str] | None = None + """ + (List of String) List of nameserver IP addresses. Nameserver can reside in public internet or in customer private network. Port is optional, if missing then default 53 will be used. + List of nameserver IP addresses. Nameserver can reside in public internet or in customer private network. Port is optional, if missing then default 53 will be used. + """ + retries: float | None = None + """ + (Number) Number of retries on failure. + Number of retries on failure. + """ + timeout: float | None = None + """ + (Number) Timeout for the query in seconds. + Timeout for the query in seconds. + """ + timeoutRetry: float | None = None + """ + (Number) Timeout for the query retries in seconds. + Timeout for the query retries in seconds. + """ + + +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): + cacheInvalid: float | None = None + """ + (Number) Time in seconds to cache invalid results. + Time in seconds to cache invalid results. + """ + cacheValid: float | None = None + """ + (Number) Time in seconds to cache valid results. + Time in seconds to cache valid results. + """ + id: str | None = None + """ + (String) ID of the resolver. ID is in {load balancer UUID}/{resolver name} format. + """ + loadbalancer: str | None = None + """ + (String) ID of the load balancer to which the resolver is connected. + ID of the load balancer to which the resolver is connected. + """ + nameservers: list[str] | None = None + """ + (List of String) List of nameserver IP addresses. Nameserver can reside in public internet or in customer private network. Port is optional, if missing then default 53 will be used. + List of nameserver IP addresses. Nameserver can reside in public internet or in customer private network. Port is optional, if missing then default 53 will be used. + """ + retries: float | None = None + """ + (Number) Number of retries on failure. + Number of retries on failure. + """ + timeout: float | None = None + """ + (Number) Timeout for the query in seconds. + Timeout for the query in seconds. + """ + timeoutRetry: float | None = None + """ + (Number) Timeout for the query retries in seconds. + Timeout for the query retries in seconds. + """ + + +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 LoadBalancerResolver(BaseModel): + apiVersion: Literal['network.m.upcloud.com/v1alpha1'] | None = ( + 'network.m.upcloud.com/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['LoadBalancerResolver'] | None = 'LoadBalancerResolver' + """ + 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 + """ + LoadBalancerResolverSpec defines the desired state of LoadBalancerResolver + """ + status: Status | None = None + """ + LoadBalancerResolverStatus defines the observed state of LoadBalancerResolver. + """ + + +class LoadBalancerResolverList(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[LoadBalancerResolver] + """ + List of loadbalancerresolvers. 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/com/upcloud/m/network/loadbalancerstaticbackendmember/__init__.py b/schemas/python/models/com/upcloud/m/network/loadbalancerstaticbackendmember/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/network/loadbalancerstaticbackendmember/v1alpha1.py b/schemas/python/models/com/upcloud/m/network/loadbalancerstaticbackendmember/v1alpha1.py new file mode 100644 index 000000000..55ea10056 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/network/loadbalancerstaticbackendmember/v1alpha1.py @@ -0,0 +1,329 @@ +# generated by datamodel-codegen: +# filename: workdir/network_m_upcloud_com_v1alpha1_loadbalancerstaticbackendmember.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 BackendRef(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 BackendSelector(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): + backend: str | None = None + """ + (String) ID of the load balancer backend to which the member is connected. + ID of the load balancer backend to which the member is connected. + """ + backendRef: BackendRef | None = None + """ + Reference to a LoadBalancerBackend in network to populate backend. + """ + backendSelector: BackendSelector | None = None + """ + Selector for a LoadBalancerBackend in network to populate backend. + """ + enabled: bool | None = None + """ + (Boolean) Indicates if the member is enabled. Disabled members are excluded from load balancing. + Indicates if the member is enabled. Disabled members are excluded from load balancing. + """ + ip: str | None = None + """ + (String) Optional fallback IP address in case of failure on DNS resolving. + Optional fallback IP address in case of failure on DNS resolving. + """ + maxSessions: float | None = None + """ + (Number) Maximum number of sessions before queueing. + Maximum number of sessions before queueing. + """ + port: float | None = None + """ + (Number) Server port. Port is optional and can be specified in DNS SRV record. + Server port. Port is optional and can be specified in DNS SRV record. + """ + weight: float | None = None + """ + (Number) Weight of the member. The higher the weight, the more traffic the member receives. + Weight of the member. The higher the weight, the more traffic the member receives. + """ + + +class InitProvider(BaseModel): + enabled: bool | None = None + """ + (Boolean) Indicates if the member is enabled. Disabled members are excluded from load balancing. + Indicates if the member is enabled. Disabled members are excluded from load balancing. + """ + ip: str | None = None + """ + (String) Optional fallback IP address in case of failure on DNS resolving. + Optional fallback IP address in case of failure on DNS resolving. + """ + maxSessions: float | None = None + """ + (Number) Maximum number of sessions before queueing. + Maximum number of sessions before queueing. + """ + port: float | None = None + """ + (Number) Server port. Port is optional and can be specified in DNS SRV record. + Server port. Port is optional and can be specified in DNS SRV record. + """ + weight: float | None = None + """ + (Number) Weight of the member. The higher the weight, the more traffic the member receives. + Weight of the member. The higher the weight, the more traffic the member receives. + """ + + +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): + backend: str | None = None + """ + (String) ID of the load balancer backend to which the member is connected. + ID of the load balancer backend to which the member is connected. + """ + enabled: bool | None = None + """ + (Boolean) Indicates if the member is enabled. Disabled members are excluded from load balancing. + Indicates if the member is enabled. Disabled members are excluded from load balancing. + """ + id: str | None = None + """ + (String) ID of the backend member. ID is in {load balancer UUID}/{backend name}/{member name} format. + """ + ip: str | None = None + """ + (String) Optional fallback IP address in case of failure on DNS resolving. + Optional fallback IP address in case of failure on DNS resolving. + """ + maxSessions: float | None = None + """ + (Number) Maximum number of sessions before queueing. + Maximum number of sessions before queueing. + """ + port: float | None = None + """ + (Number) Server port. Port is optional and can be specified in DNS SRV record. + Server port. Port is optional and can be specified in DNS SRV record. + """ + weight: float | None = None + """ + (Number) Weight of the member. The higher the weight, the more traffic the member receives. + Weight of the member. The higher the weight, the more traffic the member receives. + """ + + +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 LoadBalancerStaticBackendMember(BaseModel): + apiVersion: Literal['network.m.upcloud.com/v1alpha1'] | None = ( + 'network.m.upcloud.com/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['LoadBalancerStaticBackendMember'] | None = ( + 'LoadBalancerStaticBackendMember' + ) + """ + 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 + """ + LoadBalancerStaticBackendMemberSpec defines the desired state of LoadBalancerStaticBackendMember + """ + status: Status | None = None + """ + LoadBalancerStaticBackendMemberStatus defines the observed state of LoadBalancerStaticBackendMember. + """ + + +class LoadBalancerStaticBackendMemberList(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[LoadBalancerStaticBackendMember] + """ + List of loadbalancerstaticbackendmembers. 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/com/upcloud/m/network/networkpeering/__init__.py b/schemas/python/models/com/upcloud/m/network/networkpeering/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/network/networkpeering/v1alpha1.py b/schemas/python/models/com/upcloud/m/network/networkpeering/v1alpha1.py new file mode 100644 index 000000000..3f6fb5bb7 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/network/networkpeering/v1alpha1.py @@ -0,0 +1,357 @@ +# generated by datamodel-codegen: +# filename: workdir/network_m_upcloud_com_v1alpha1_networkpeering.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 UuidRef(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 UuidSelector(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 NetworkItem(BaseModel): + uuid: str | None = None + """ + (String) The UUID of the network. + The UUID of the network. + """ + uuidRef: UuidRef | None = None + """ + Reference to a Network in network to populate uuid. + """ + uuidSelector: UuidSelector | None = None + """ + Selector for a Network in network to populate uuid. + """ + + +class PeerNetworkItem(BaseModel): + uuid: str | None = None + """ + (String) The UUID of the network. + The UUID of the network. + """ + uuidRef: UuidRef | None = None + """ + Reference to a Network in network to populate uuid. + """ + uuidSelector: UuidSelector | None = None + """ + Selector for a Network in network to populate uuid. + """ + + +class ForProvider(BaseModel): + configuredStatus: str | None = None + """ + (String) Configured status of the network peering. + Configured status of the network peering. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the network peering. + User defined key-value pairs to classify the network peering. + """ + name: str | None = None + """ + (String) Name of the network peering. + Name of the network peering. + """ + network: list[NetworkItem] | None = None + """ + (Block List) Local network of the network peering. (see below for nested schema) + Local network of the network peering. + """ + peerNetwork: list[PeerNetworkItem] | None = None + """ + (Block List) Peer network of the network peering. (see below for nested schema) + Peer network of the network peering. + """ + + +class InitProvider(BaseModel): + configuredStatus: str | None = None + """ + (String) Configured status of the network peering. + Configured status of the network peering. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the network peering. + User defined key-value pairs to classify the network peering. + """ + name: str | None = None + """ + (String) Name of the network peering. + Name of the network peering. + """ + network: list[NetworkItem] | None = None + """ + (Block List) Local network of the network peering. (see below for nested schema) + Local network of the network peering. + """ + peerNetwork: list[PeerNetworkItem] | None = None + """ + (Block List) Peer network of the network peering. (see below for nested schema) + Peer network of the network peering. + """ + + +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 NetworkItemModel(BaseModel): + uuid: str | None = None + """ + (String) The UUID of the network. + The UUID of the network. + """ + + +class PeerNetworkItemModel(BaseModel): + uuid: str | None = None + """ + (String) The UUID of the network. + The UUID of the network. + """ + + +class AtProvider(BaseModel): + configuredStatus: str | None = None + """ + (String) Configured status of the network peering. + Configured status of the network peering. + """ + id: str | None = None + """ + (String) UUID of the network peering. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the network peering. + User defined key-value pairs to classify the network peering. + """ + name: str | None = None + """ + (String) Name of the network peering. + Name of the network peering. + """ + network: list[NetworkItemModel] | None = None + """ + (Block List) Local network of the network peering. (see below for nested schema) + Local network of the network peering. + """ + peerNetwork: list[PeerNetworkItemModel] | None = None + """ + (Block List) Peer network of the network peering. (see below for nested schema) + Peer network of the network peering. + """ + + +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 NetworkPeering(BaseModel): + apiVersion: Literal['network.m.upcloud.com/v1alpha1'] | None = ( + 'network.m.upcloud.com/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['NetworkPeering'] | None = 'NetworkPeering' + """ + 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 + """ + NetworkPeeringSpec defines the desired state of NetworkPeering + """ + status: Status | None = None + """ + NetworkPeeringStatus defines the observed state of NetworkPeering. + """ + + +class NetworkPeeringList(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[NetworkPeering] + """ + List of networkpeerings. 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/com/upcloud/m/network/router/__init__.py b/schemas/python/models/com/upcloud/m/network/router/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/network/router/v1alpha1.py b/schemas/python/models/com/upcloud/m/network/router/v1alpha1.py new file mode 100644 index 000000000..7c1daec2d --- /dev/null +++ b/schemas/python/models/com/upcloud/m/network/router/v1alpha1.py @@ -0,0 +1,302 @@ +# generated by datamodel-codegen: +# filename: workdir/network_m_upcloud_com_v1alpha1_router.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.k8s.apimachinery.pkg.apis.meta import v1 + + +class StaticRouteItem(BaseModel): + name: str | None = None + """ + (String) Name of the router. + Name or description of the route. + """ + nexthop: str | None = None + """ + (String) Next hop address. NOTE: For static route to be active the next hop has to be an address of a reachable running Cloud Server in one of the Private Networks attached to the router. + Next hop address. NOTE: For static route to be active the next hop has to be an address of a reachable running Cloud Server in one of the Private Networks attached to the router. + """ + route: str | None = None + """ + (String) Destination prefix of the route. + Destination prefix of the route. + """ + + +class ForProvider(BaseModel): + labels: dict[str, str] | None = None + """ + value pairs to classify the router. + User defined key-value pairs to classify the router. + """ + name: str | None = None + """ + (String) Name of the router. + Name of the router. + """ + staticRoute: list[StaticRouteItem] | None = None + """ + (Block Set) A collection of user managed static routes for this router. (see below for nested schema) + A collection of user managed static routes for this router. + """ + + +class InitProvider(BaseModel): + labels: dict[str, str] | None = None + """ + value pairs to classify the router. + User defined key-value pairs to classify the router. + """ + name: str | None = None + """ + (String) Name of the router. + Name of the router. + """ + staticRoute: list[StaticRouteItem] | None = None + """ + (Block Set) A collection of user managed static routes for this router. (see below for nested schema) + A collection of user managed static routes for this router. + """ + + +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 StaticRouteItemModel(BaseModel): + name: str | None = None + """ + (String) Name of the router. + Name or description of the route. + """ + nexthop: str | None = None + """ + (String) Next hop address. NOTE: For static route to be active the next hop has to be an address of a reachable running Cloud Server in one of the Private Networks attached to the router. + Next hop address. NOTE: For static route to be active the next hop has to be an address of a reachable running Cloud Server in one of the Private Networks attached to the router. + """ + route: str | None = None + """ + (String) Destination prefix of the route. + Destination prefix of the route. + """ + type: str | None = None + """ + (String) Type of the router + Type of the route. + """ + + +class StaticRoute(BaseModel): + name: str | None = None + """ + (String) Name of the router. + """ + nexthop: str | None = None + """ + (String) Next hop address. NOTE: For static route to be active the next hop has to be an address of a reachable running Cloud Server in one of the Private Networks attached to the router. + """ + route: str | None = None + """ + (String) Destination prefix of the route. + """ + type: str | None = None + """ + (String) Type of the router + """ + + +class AtProvider(BaseModel): + attachedNetworks: list[str] | None = None + """ + (List of String) List of UUIDs representing networks attached to this router. + List of UUIDs representing networks attached to this router. + """ + id: str | None = None + """ + (String) UUID of the router. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the router. + User defined key-value pairs to classify the router. + """ + name: str | None = None + """ + (String) Name of the router. + Name of the router. + """ + staticRoute: list[StaticRouteItemModel] | None = None + """ + (Block Set) A collection of user managed static routes for this router. (see below for nested schema) + A collection of user managed static routes for this router. + """ + staticRoutes: list[StaticRoute] | None = None + """ + (Set of Object) A collection of static routes for this router. This set includes both user and service defined static routes. The objects in this set use the same schema as static_route blocks. (see below for nested schema) + A collection of static routes for this router. This set includes both user and service defined static routes. The objects in this set use the same schema as `static_route` blocks. + """ + type: str | None = None + """ + (String) Type of the router + Type of the router + """ + + +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 Router(BaseModel): + apiVersion: Literal['network.m.upcloud.com/v1alpha1'] | None = ( + 'network.m.upcloud.com/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['Router'] | None = 'Router' + """ + 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 + """ + RouterSpec defines the desired state of Router + """ + status: Status | None = None + """ + RouterStatus defines the observed state of Router. + """ + + +class RouterList(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[Router] + """ + List of routers. 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/com/upcloud/m/network/v1alpha1.py b/schemas/python/models/com/upcloud/m/network/v1alpha1.py new file mode 100644 index 000000000..5769b096f --- /dev/null +++ b/schemas/python/models/com/upcloud/m/network/v1alpha1.py @@ -0,0 +1,498 @@ +# generated by datamodel-codegen: +# filename: workdir/network_m_upcloud_com_v1alpha1_network.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.k8s.apimachinery.pkg.apis.meta import v1 + + +class EffectiveRoutesAutoPopulation(BaseModel): + enabled: bool | None = None + """ + population. + Enable or disable route auto-population. + """ + excludeBySource: list[str] | None = None + """ + connected-networks, static-route). + Exclude routes coming from specific sources (router-connected-networks, static-route). + """ + filterByDestination: list[str] | None = None + """ + populating routes. + CIDR destinations to include when auto-populating routes. + """ + filterByRouteType: list[str] | None = None + """ + (Set of String) Include only routes of given types (service, user). + Include only routes of given types (service, user). + """ + + +class DhcpRoutesConfiguration(BaseModel): + effectiveRoutesAutoPopulation: EffectiveRoutesAutoPopulation | None = None + """ + (Attributes) Automatically populate effective routes. (see below for nested schema) + """ + + +class IpNetwork(BaseModel): + address: str | None = None + """ + (String) The CIDR range of the subnet + The CIDR range of the subnet + """ + dhcp: bool | None = None + """ + (Boolean) Is DHCP enabled? + Is DHCP enabled? + """ + dhcpDefaultRoute: bool | None = None + """ + (Boolean) Is the gateway the DHCP default route? + Is the gateway the DHCP default route? + """ + dhcpDns: list[str] | None = None + """ + (Set of String) The DNS servers given by DHCP + The DNS servers given by DHCP + """ + dhcpRoutes: list[str] | None = None + """ + (Set of String) The additional DHCP classless static routes given by DHCP + The additional DHCP classless static routes given by DHCP + """ + dhcpRoutesConfiguration: DhcpRoutesConfiguration | None = None + """ + population configuration. (see below for nested schema) + """ + family: str | None = None + """ + (String) IP address family + IP address family + """ + gateway: str | None = None + """ + (String) Gateway address given by DHCP + Gateway address given by DHCP + """ + + +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 RouterRef(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 RouterSelector(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): + ipNetwork: IpNetwork | None = None + """ + (Block List) IP subnet within the network. Network must have exactly one IP subnet. (see below for nested schema) + IP subnet within the network. Network must have exactly one IP subnet. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the network. + User defined key-value pairs to classify the network. + """ + name: str | None = None + """ + (String) Name of the network. + Name of the network. + """ + router: str | None = None + """ + (String) UUID of a router to attach to this network. + UUID of a router to attach to this network. + """ + routerRef: RouterRef | None = None + """ + Reference to a Router in network to populate router. + """ + routerSelector: RouterSelector | None = None + """ + Selector for a Router in network to populate router. + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + The zone the network is in, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +class InitProvider(BaseModel): + ipNetwork: IpNetwork | None = None + """ + (Block List) IP subnet within the network. Network must have exactly one IP subnet. (see below for nested schema) + IP subnet within the network. Network must have exactly one IP subnet. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the network. + User defined key-value pairs to classify the network. + """ + name: str | None = None + """ + (String) Name of the network. + Name of the network. + """ + router: str | None = None + """ + (String) UUID of a router to attach to this network. + UUID of a router to attach to this network. + """ + routerRef: RouterRef | None = None + """ + Reference to a Router in network to populate router. + """ + routerSelector: RouterSelector | None = None + """ + Selector for a Router in network to populate router. + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + The zone the network is in, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 EffectiveRoute(BaseModel): + nexthop: str | None = None + """ + (String) Next hop address for this DHCP route. + Next hop address for this route. + """ + route: str | None = None + """ + (String) Destination prefix (CIDR) of the DHCP route. + Destination CIDR of the route. + """ + source: str | None = None + """ + route, router-connected-networks). + Origin of the route (e.g., static-route, router-connected-networks). + """ + sourceResourceId: str | None = None + """ + (String) UUID of the source resource that provided this route, if applicable. + UUID of the source resource that provided this route, if applicable. + """ + type: str | None = None + """ + (String) The network type + Route type (service or user). + """ + + +class DhcpEffectiveRoute(BaseModel): + autoPopulated: bool | None = None + """ + populated by DHCP. + Whether the route was auto-populated by DHCP. + """ + nexthop: str | None = None + """ + (String) Next hop address for this DHCP route. + Next hop address for this DHCP route. + """ + route: str | None = None + """ + (String) Destination prefix (CIDR) of the DHCP route. + Destination prefix (CIDR) of the DHCP route. + """ + + +class IpNetworkModel(BaseModel): + address: str | None = None + """ + (String) The CIDR range of the subnet + The CIDR range of the subnet + """ + dhcp: bool | None = None + """ + (Boolean) Is DHCP enabled? + Is DHCP enabled? + """ + dhcpDefaultRoute: bool | None = None + """ + (Boolean) Is the gateway the DHCP default route? + Is the gateway the DHCP default route? + """ + dhcpDns: list[str] | None = None + """ + (Set of String) The DNS servers given by DHCP + The DNS servers given by DHCP + """ + dhcpEffectiveRoutes: list[DhcpEffectiveRoute] | None = None + """ + only). (see below for nested schema) + """ + dhcpRoutes: list[str] | None = None + """ + (Set of String) The additional DHCP classless static routes given by DHCP + The additional DHCP classless static routes given by DHCP + """ + dhcpRoutesConfiguration: DhcpRoutesConfiguration | None = None + """ + population configuration. (see below for nested schema) + """ + family: str | None = None + """ + (String) IP address family + IP address family + """ + gateway: str | None = None + """ + (String) Gateway address given by DHCP + Gateway address given by DHCP + """ + + +class AtProvider(BaseModel): + effectiveRoutes: list[EffectiveRoute] | None = None + """ + only). (see below for nested schema) + """ + id: str | None = None + """ + (String) UUID of the network. + """ + ipNetwork: IpNetworkModel | None = None + """ + (Block List) IP subnet within the network. Network must have exactly one IP subnet. (see below for nested schema) + IP subnet within the network. Network must have exactly one IP subnet. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the network. + User defined key-value pairs to classify the network. + """ + name: str | None = None + """ + (String) Name of the network. + Name of the network. + """ + router: str | None = None + """ + (String) UUID of a router to attach to this network. + UUID of a router to attach to this network. + """ + type: str | None = None + """ + (String) The network type + The network type + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + The zone the network is in, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 Network(BaseModel): + apiVersion: Literal['network.m.upcloud.com/v1alpha1'] | None = ( + 'network.m.upcloud.com/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['Network'] | None = 'Network' + """ + 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 + """ + NetworkSpec defines the desired state of Network + """ + status: Status | None = None + """ + NetworkStatus defines the observed state of Network. + """ + + +class NetworkList(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[Network] + """ + List of networks. 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/com/upcloud/m/objectstorage/__init__.py b/schemas/python/models/com/upcloud/m/objectstorage/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstorage/__init__.py b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstorage/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstorage/v1alpha1.py b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstorage/v1alpha1.py new file mode 100644 index 000000000..dd4cefe3a --- /dev/null +++ b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstorage/v1alpha1.py @@ -0,0 +1,322 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_m_upcloud_com_v1alpha1_managedobjectstorage.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.k8s.apimachinery.pkg.apis.meta import v1 + + +class NetworkItem(BaseModel): + family: str | None = None + """ + (String) Network family. Currently only IPv4 is supported. + Network family. Currently only `IPv4` is supported. + """ + name: str | None = None + """ + (String) Name of the Managed Object Storage service. Must be unique within account. + Network name. Must be unique within the service. + """ + type: str | None = None + """ + (String) Network type (private or public). + Network type (`private` or `public`). + """ + uuid: str | None = None + """ + (String) Private network uuid. For public networks the field should be omitted. + Private network uuid. For public networks the field should be omitted. + """ + + +class ForProvider(BaseModel): + configuredStatus: str | None = None + """ + (String) Service status managed by the end user. + Service status managed by the end user. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the managed object storage. + User defined key-value pairs to classify the managed object storage. + """ + name: str | None = None + """ + (String) Name of the Managed Object Storage service. Must be unique within account. + Name of the Managed Object Storage service. Must be unique within account. + """ + network: list[NetworkItem] | None = None + """ + (Block Set) Attached networks from where object storage can be used. Private networks must reside in object storage region. To gain access from multiple private networks that might reside in different zones, create the networks and a corresponding router for each network. (see below for nested schema) + Attached networks from where object storage can be used. Private networks must reside in object storage region. To gain access from multiple private networks that might reside in different zones, create the networks and a corresponding router for each network. + """ + region: str | None = None + """ + storage regions to list available regions. + Region in which the service will be hosted, see `upcloud_managed_object_storage_regions` data source or use `upctl object-storage regions` to list available regions. + """ + + +class InitProvider(BaseModel): + configuredStatus: str | None = None + """ + (String) Service status managed by the end user. + Service status managed by the end user. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the managed object storage. + User defined key-value pairs to classify the managed object storage. + """ + name: str | None = None + """ + (String) Name of the Managed Object Storage service. Must be unique within account. + Name of the Managed Object Storage service. Must be unique within account. + """ + network: list[NetworkItem] | None = None + """ + (Block Set) Attached networks from where object storage can be used. Private networks must reside in object storage region. To gain access from multiple private networks that might reside in different zones, create the networks and a corresponding router for each network. (see below for nested schema) + Attached networks from where object storage can be used. Private networks must reside in object storage region. To gain access from multiple private networks that might reside in different zones, create the networks and a corresponding router for each network. + """ + region: str | None = None + """ + storage regions to list available regions. + Region in which the service will be hosted, see `upcloud_managed_object_storage_regions` data source or use `upctl object-storage regions` to list available regions. + """ + + +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 EndpointItem(BaseModel): + domainName: str | None = None + """ + (String) Domain name of the endpoint. + Domain name of the endpoint. + """ + iamUrl: str | None = None + """ + (String) URL for IAM. + URL for IAM. + """ + stsUrl: str | None = None + """ + (String) URL for STS. + URL for STS. + """ + type: str | None = None + """ + (String) Network type (private or public). + Type of the endpoint (`private` / `public`). + """ + + +class AtProvider(BaseModel): + configuredStatus: str | None = None + """ + (String) Service status managed by the end user. + Service status managed by the end user. + """ + createdAt: str | None = None + """ + (String) Creation time. + Creation time. + """ + endpoint: list[EndpointItem] | None = None + """ + (Attributes Set) Endpoints for accessing the Managed Object Storage service. (see below for nested schema) + """ + id: str | None = None + """ + (String) The UUID of the managed object storage instance. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the managed object storage. + User defined key-value pairs to classify the managed object storage. + """ + name: str | None = None + """ + (String) Name of the Managed Object Storage service. Must be unique within account. + Name of the Managed Object Storage service. Must be unique within account. + """ + network: list[NetworkItem] | None = None + """ + (Block Set) Attached networks from where object storage can be used. Private networks must reside in object storage region. To gain access from multiple private networks that might reside in different zones, create the networks and a corresponding router for each network. (see below for nested schema) + Attached networks from where object storage can be used. Private networks must reside in object storage region. To gain access from multiple private networks that might reside in different zones, create the networks and a corresponding router for each network. + """ + operationalState: str | None = None + """ + (String) Operational state of the Managed Object Storage service. + Operational state of the Managed Object Storage service. + """ + region: str | None = None + """ + storage regions to list available regions. + Region in which the service will be hosted, see `upcloud_managed_object_storage_regions` data source or use `upctl object-storage regions` to list available regions. + """ + updatedAt: str | None = None + """ + (String) Update time. + Update time. + """ + + +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 ManagedObjectStorage(BaseModel): + apiVersion: Literal['objectstorage.m.upcloud.com/v1alpha1'] | None = ( + 'objectstorage.m.upcloud.com/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['ManagedObjectStorage'] | None = 'ManagedObjectStorage' + """ + 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 + """ + ManagedObjectStorageSpec defines the desired state of ManagedObjectStorage + """ + status: Status | None = None + """ + ManagedObjectStorageStatus defines the observed state of ManagedObjectStorage. + """ + + +class ManagedObjectStorageList(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[ManagedObjectStorage] + """ + List of managedobjectstorages. 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/com/upcloud/m/objectstorage/managedobjectstoragebucket/__init__.py b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstoragebucket/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstoragebucket/v1alpha1.py b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstoragebucket/v1alpha1.py new file mode 100644 index 000000000..5db9469c1 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstoragebucket/v1alpha1.py @@ -0,0 +1,259 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_m_upcloud_com_v1alpha1_managedobjectstoragebucket.yaml + +from __future__ import annotations + +from typing import Any, Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 ServiceUuidRef(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 ServiceUuidSelector(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): + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + serviceUuidRef: ServiceUuidRef | None = None + """ + Reference to a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + serviceUuidSelector: ServiceUuidSelector | None = None + """ + Selector for a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + + +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: dict[str, Any] | 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 + """ + (String) ID of the bucket. ID is in {object storage UUID}/{bucket name} format. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + totalObjects: float | None = None + """ + (Number) Number of objects stored in the bucket. + Number of objects stored in the bucket. + """ + totalSizeBytes: float | None = None + """ + (Number) Total size of objects stored in the bucket. + Total size of objects stored in the bucket. + """ + + +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 ManagedObjectStorageBucket(BaseModel): + apiVersion: Literal['objectstorage.m.upcloud.com/v1alpha1'] | None = ( + 'objectstorage.m.upcloud.com/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['ManagedObjectStorageBucket'] | None = 'ManagedObjectStorageBucket' + """ + 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 + """ + ManagedObjectStorageBucketSpec defines the desired state of ManagedObjectStorageBucket + """ + status: Status | None = None + """ + ManagedObjectStorageBucketStatus defines the observed state of ManagedObjectStorageBucket. + """ + + +class ManagedObjectStorageBucketList(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[ManagedObjectStorageBucket] + """ + List of managedobjectstoragebuckets. 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/com/upcloud/m/objectstorage/managedobjectstoragecustomdomain/__init__.py b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstoragecustomdomain/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstoragecustomdomain/v1alpha1.py b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstoragecustomdomain/v1alpha1.py new file mode 100644 index 000000000..5df685d1c --- /dev/null +++ b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstoragecustomdomain/v1alpha1.py @@ -0,0 +1,284 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_m_upcloud_com_v1alpha1_managedobjectstoragecustomdomain.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 ServiceUuidRef(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 ServiceUuidSelector(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): + mode: str | None = None + """ + (String) Routing mode for the domain. Defaults to api. + Routing mode for the domain. Defaults to `api`. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + serviceUuidRef: ServiceUuidRef | None = None + """ + Reference to a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + serviceUuidSelector: ServiceUuidSelector | None = None + """ + Selector for a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + type: str | None = None + """ + (String) At the moment only public is accepted. + At the moment only `public` is accepted. + """ + + +class InitProvider(BaseModel): + mode: str | None = None + """ + (String) Routing mode for the domain. Defaults to api. + Routing mode for the domain. Defaults to `api`. + """ + type: str | None = None + """ + (String) At the moment only public is accepted. + At the moment only `public` is accepted. + """ + + +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 + """ + (String) ID of the custom domain. ID is in {object storage UUID}/{domain name} format. + """ + mode: str | None = None + """ + (String) Routing mode for the domain. Defaults to api. + Routing mode for the domain. Defaults to `api`. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + type: str | None = None + """ + (String) At the moment only public is accepted. + At the moment only `public` is accepted. + """ + + +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 ManagedObjectStorageCustomDomain(BaseModel): + apiVersion: Literal['objectstorage.m.upcloud.com/v1alpha1'] | None = ( + 'objectstorage.m.upcloud.com/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['ManagedObjectStorageCustomDomain'] | None = ( + 'ManagedObjectStorageCustomDomain' + ) + """ + 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 + """ + ManagedObjectStorageCustomDomainSpec defines the desired state of ManagedObjectStorageCustomDomain + """ + status: Status | None = None + """ + ManagedObjectStorageCustomDomainStatus defines the observed state of ManagedObjectStorageCustomDomain. + """ + + +class ManagedObjectStorageCustomDomainList(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[ManagedObjectStorageCustomDomain] + """ + List of managedobjectstoragecustomdomains. 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/com/upcloud/m/objectstorage/managedobjectstoragepolicy/__init__.py b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstoragepolicy/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstoragepolicy/v1alpha1.py b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstoragepolicy/v1alpha1.py new file mode 100644 index 000000000..bb5ccef5d --- /dev/null +++ b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstoragepolicy/v1alpha1.py @@ -0,0 +1,312 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_m_upcloud_com_v1alpha1_managedobjectstoragepolicy.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 ServiceUuidRef(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 ServiceUuidSelector(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): + description: str | None = None + """ + (String) Description of the policy. This property is immutable after creation. + Description of the policy. This property is immutable after creation. + """ + document: str | None = None + """ + encoded compliant with RFC 3986. Extra whitespace and escapes are ignored when determining if the document has changed. + Policy document, URL-encoded compliant with RFC 3986. Extra whitespace and escapes are ignored when determining if the document has changed. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + serviceUuidRef: ServiceUuidRef | None = None + """ + Reference to a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + serviceUuidSelector: ServiceUuidSelector | None = None + """ + Selector for a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + + +class InitProvider(BaseModel): + description: str | None = None + """ + (String) Description of the policy. This property is immutable after creation. + Description of the policy. This property is immutable after creation. + """ + document: str | None = None + """ + encoded compliant with RFC 3986. Extra whitespace and escapes are ignored when determining if the document has changed. + Policy document, URL-encoded compliant with RFC 3986. Extra whitespace and escapes are ignored when determining if the document has changed. + """ + + +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): + arn: str | None = None + """ + (String) Policy ARN. + Policy ARN. + """ + attachmentCount: float | None = None + """ + (Number) Attachment count. + Attachment count. + """ + createdAt: str | None = None + """ + (String) Creation time. + Creation time. + """ + defaultVersionId: str | None = None + """ + (String) Default version id. + Default version id. + """ + description: str | None = None + """ + (String) Description of the policy. This property is immutable after creation. + Description of the policy. This property is immutable after creation. + """ + document: str | None = None + """ + encoded compliant with RFC 3986. Extra whitespace and escapes are ignored when determining if the document has changed. + Policy document, URL-encoded compliant with RFC 3986. Extra whitespace and escapes are ignored when determining if the document has changed. + """ + id: str | None = None + """ + (String) ID of the policy. ID is in {object storage UUID}/{policy name} format. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + system: bool | None = None + """ + (Boolean) Defines whether the policy was set up by the system. + Defines whether the policy was set up by the system. + """ + updatedAt: str | None = None + """ + (String) Update time. + Update time. + """ + + +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 ManagedObjectStoragePolicy(BaseModel): + apiVersion: Literal['objectstorage.m.upcloud.com/v1alpha1'] | None = ( + 'objectstorage.m.upcloud.com/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['ManagedObjectStoragePolicy'] | None = 'ManagedObjectStoragePolicy' + """ + 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 + """ + ManagedObjectStoragePolicySpec defines the desired state of ManagedObjectStoragePolicy + """ + status: Status | None = None + """ + ManagedObjectStoragePolicyStatus defines the observed state of ManagedObjectStoragePolicy. + """ + + +class ManagedObjectStoragePolicyList(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[ManagedObjectStoragePolicy] + """ + List of managedobjectstoragepolicies. 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/com/upcloud/m/objectstorage/managedobjectstoragestaticsite/__init__.py b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstoragestaticsite/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstoragestaticsite/v1alpha1.py b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstoragestaticsite/v1alpha1.py new file mode 100644 index 000000000..8eff1566b --- /dev/null +++ b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstoragestaticsite/v1alpha1.py @@ -0,0 +1,443 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_m_upcloud_com_v1alpha1_managedobjectstoragestaticsite.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 BucketNameRef(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 BucketNameSelector(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 ErrorPage(BaseModel): + errorDocument: str | None = None + """ + (String) Path to the error page document within the bucket. + Path to the error page document within the bucket. + """ + statusCode: float | None = None + """ + (Number) Exact HTTP status code to match. Mutually exclusive with status range. + Exact HTTP status code to match. Mutually exclusive with status range. + """ + statusRangeEnd: float | None = None + """ + (Number) End of the status code range (inclusive). Must be greater than start. + End of the status code range (inclusive). Must be greater than start. + """ + statusRangeStart: float | None = None + """ + (Number) Start of the status code range (inclusive). + Start of the status code range (inclusive). + """ + + +class ServiceUuidRef(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 ServiceUuidSelector(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): + bucketName: str | None = None + """ + (String) S3 bucket from which static content is served. Must have a public read policy. + S3 bucket from which static content is served. Must have a public read policy. + """ + bucketNameRef: BucketNameRef | None = None + """ + Reference to a ManagedObjectStorageBucket in objectstorage to populate bucketName. + """ + bucketNameSelector: BucketNameSelector | None = None + """ + Selector for a ManagedObjectStorageBucket in objectstorage to populate bucketName. + """ + bucketPrefix: str | None = None + """ + (String) Path prefix within the bucket. For example, dist/ serves content from the dist/ folder. Defaults to empty string (bucket root). + Path prefix within the bucket. For example, `dist/` serves content from the `dist/` folder. Defaults to empty string (bucket root). + """ + domainName: str | None = None + """ + website mode attached to the service. + A custom domain in `static-website` mode attached to the service. + """ + enabled: bool | None = None + """ + (Boolean) Enable or disable serving content on this domain. Defaults to true. + Enable or disable serving content on this domain. Defaults to true. + """ + errorPages: list[ErrorPage] | None = None + """ + (Attributes List) Custom error pages served when the storage backend returns an error status. (see below for nested schema) + """ + indexDocument: str | None = None + """ + (String) Name of the index document. Defaults to index.html. + Name of the index document. Defaults to `index.html`. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + serviceUuidRef: ServiceUuidRef | None = None + """ + Reference to a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + serviceUuidSelector: ServiceUuidSelector | None = None + """ + Selector for a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + spaMode: bool | None = None + """ + page application mode. In SPA mode, the index document is served for all paths, which is useful for client-side routing. + Whether to enable single-page application mode. In SPA mode, the index document is served for all paths, which is useful for client-side routing. + """ + + +class InitProvider(BaseModel): + bucketName: str | None = None + """ + (String) S3 bucket from which static content is served. Must have a public read policy. + S3 bucket from which static content is served. Must have a public read policy. + """ + bucketNameRef: BucketNameRef | None = None + """ + Reference to a ManagedObjectStorageBucket in objectstorage to populate bucketName. + """ + bucketNameSelector: BucketNameSelector | None = None + """ + Selector for a ManagedObjectStorageBucket in objectstorage to populate bucketName. + """ + bucketPrefix: str | None = None + """ + (String) Path prefix within the bucket. For example, dist/ serves content from the dist/ folder. Defaults to empty string (bucket root). + Path prefix within the bucket. For example, `dist/` serves content from the `dist/` folder. Defaults to empty string (bucket root). + """ + domainName: str | None = None + """ + website mode attached to the service. + A custom domain in `static-website` mode attached to the service. + """ + enabled: bool | None = None + """ + (Boolean) Enable or disable serving content on this domain. Defaults to true. + Enable or disable serving content on this domain. Defaults to true. + """ + errorPages: list[ErrorPage] | None = None + """ + (Attributes List) Custom error pages served when the storage backend returns an error status. (see below for nested schema) + """ + indexDocument: str | None = None + """ + (String) Name of the index document. Defaults to index.html. + Name of the index document. Defaults to `index.html`. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + serviceUuidRef: ServiceUuidRef | None = None + """ + Reference to a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + serviceUuidSelector: ServiceUuidSelector | None = None + """ + Selector for a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + spaMode: bool | None = None + """ + page application mode. In SPA mode, the index document is served for all paths, which is useful for client-side routing. + Whether to enable single-page application mode. In SPA mode, the index document is served for all paths, which is useful for client-side routing. + """ + + +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): + bucketName: str | None = None + """ + (String) S3 bucket from which static content is served. Must have a public read policy. + S3 bucket from which static content is served. Must have a public read policy. + """ + bucketPrefix: str | None = None + """ + (String) Path prefix within the bucket. For example, dist/ serves content from the dist/ folder. Defaults to empty string (bucket root). + Path prefix within the bucket. For example, `dist/` serves content from the `dist/` folder. Defaults to empty string (bucket root). + """ + domainName: str | None = None + """ + website mode attached to the service. + A custom domain in `static-website` mode attached to the service. + """ + enabled: bool | None = None + """ + (Boolean) Enable or disable serving content on this domain. Defaults to true. + Enable or disable serving content on this domain. Defaults to true. + """ + errorPages: list[ErrorPage] | None = None + """ + (Attributes List) Custom error pages served when the storage backend returns an error status. (see below for nested schema) + """ + id: str | None = None + """ + (String) ID of the static site. ID is in {object storage UUID}/{domain name} format. + """ + indexDocument: str | None = None + """ + (String) Name of the index document. Defaults to index.html. + Name of the index document. Defaults to `index.html`. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + spaMode: bool | None = None + """ + page application mode. In SPA mode, the index document is served for all paths, which is useful for client-side routing. + Whether to enable single-page application mode. In SPA mode, the index document is served for all paths, which is useful for client-side routing. + """ + + +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 ManagedObjectStorageStaticSite(BaseModel): + apiVersion: Literal['objectstorage.m.upcloud.com/v1alpha1'] | None = ( + 'objectstorage.m.upcloud.com/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['ManagedObjectStorageStaticSite'] | None = ( + 'ManagedObjectStorageStaticSite' + ) + """ + 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 + """ + ManagedObjectStorageStaticSiteSpec defines the desired state of ManagedObjectStorageStaticSite + """ + status: Status | None = None + """ + ManagedObjectStorageStaticSiteStatus defines the observed state of ManagedObjectStorageStaticSite. + """ + + +class ManagedObjectStorageStaticSiteList(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[ManagedObjectStorageStaticSite] + """ + List of managedobjectstoragestaticsites. 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/com/upcloud/m/objectstorage/managedobjectstorageuser/__init__.py b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstorageuser/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstorageuser/v1alpha1.py b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstorageuser/v1alpha1.py new file mode 100644 index 000000000..08275aeaa --- /dev/null +++ b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstorageuser/v1alpha1.py @@ -0,0 +1,259 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_m_upcloud_com_v1alpha1_managedobjectstorageuser.yaml + +from __future__ import annotations + +from typing import Any, Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 ServiceUuidRef(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 ServiceUuidSelector(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): + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + serviceUuidRef: ServiceUuidRef | None = None + """ + Reference to a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + serviceUuidSelector: ServiceUuidSelector | None = None + """ + Selector for a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + + +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: dict[str, Any] | 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): + arn: str | None = None + """ + (String) User ARN. + User ARN. + """ + createdAt: str | None = None + """ + (String) Creation time. + Creation time. + """ + id: str | None = None + """ + (String) ID of the user. ID is in {object storage UUID}/{username} format. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + + +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 ManagedObjectStorageUser(BaseModel): + apiVersion: Literal['objectstorage.m.upcloud.com/v1alpha1'] | None = ( + 'objectstorage.m.upcloud.com/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['ManagedObjectStorageUser'] | None = 'ManagedObjectStorageUser' + """ + 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 + """ + ManagedObjectStorageUserSpec defines the desired state of ManagedObjectStorageUser + """ + status: Status | None = None + """ + ManagedObjectStorageUserStatus defines the observed state of ManagedObjectStorageUser. + """ + + +class ManagedObjectStorageUserList(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[ManagedObjectStorageUser] + """ + List of managedobjectstorageusers. 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/com/upcloud/m/objectstorage/managedobjectstorageuseraccesskey/__init__.py b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstorageuseraccesskey/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstorageuseraccesskey/v1alpha1.py b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstorageuseraccesskey/v1alpha1.py new file mode 100644 index 000000000..cf5fffad8 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstorageuseraccesskey/v1alpha1.py @@ -0,0 +1,337 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_m_upcloud_com_v1alpha1_managedobjectstorageuseraccesskey.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 ServiceUuidRef(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 ServiceUuidSelector(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 UsernameRef(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 UsernameSelector(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): + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + serviceUuidRef: ServiceUuidRef | None = None + """ + Reference to a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + serviceUuidSelector: ServiceUuidSelector | None = None + """ + Selector for a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + status: str | None = None + """ + (String) Status of the key. Valid values: Active|Inactive + Status of the key. Valid values: `Active`|`Inactive` + """ + username: str | None = None + """ + (String) Username. + Username. + """ + usernameRef: UsernameRef | None = None + """ + Reference to a ManagedObjectStorageUser in objectstorage to populate username. + """ + usernameSelector: UsernameSelector | None = None + """ + Selector for a ManagedObjectStorageUser in objectstorage to populate username. + """ + + +class InitProvider(BaseModel): + status: str | None = None + """ + (String) Status of the key. Valid values: Active|Inactive + Status of the key. Valid values: `Active`|`Inactive` + """ + + +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): + accessKeyId: str | None = None + """ + (String) Access key ID. + Access key ID. + """ + createdAt: str | None = None + """ + (String) Creation time. + Creation time. + """ + id: str | None = None + """ + (String) ID of the user. ID is in {object storage UUID}/{username}/{access key id} format. + """ + lastUsedAt: str | None = None + """ + (String) Last used. + Last used. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + status: str | None = None + """ + (String) Status of the key. Valid values: Active|Inactive + Status of the key. Valid values: `Active`|`Inactive` + """ + username: str | None = None + """ + (String) Username. + Username. + """ + + +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 ManagedObjectStorageUserAccessKey(BaseModel): + apiVersion: Literal['objectstorage.m.upcloud.com/v1alpha1'] | None = ( + 'objectstorage.m.upcloud.com/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['ManagedObjectStorageUserAccessKey'] | None = ( + 'ManagedObjectStorageUserAccessKey' + ) + """ + 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 + """ + ManagedObjectStorageUserAccessKeySpec defines the desired state of ManagedObjectStorageUserAccessKey + """ + status: Status | None = None + """ + ManagedObjectStorageUserAccessKeyStatus defines the observed state of ManagedObjectStorageUserAccessKey. + """ + + +class ManagedObjectStorageUserAccessKeyList(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[ManagedObjectStorageUserAccessKey] + """ + List of managedobjectstorageuseraccesskeys. 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/com/upcloud/m/objectstorage/managedobjectstorageuserpolicy/__init__.py b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstorageuserpolicy/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstorageuserpolicy/v1alpha1.py b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstorageuserpolicy/v1alpha1.py new file mode 100644 index 000000000..216e37d59 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/objectstorage/managedobjectstorageuserpolicy/v1alpha1.py @@ -0,0 +1,399 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_m_upcloud_com_v1alpha1_managedobjectstorageuserpolicy.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 NameRef(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 NameSelector(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 ServiceUuidRef(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 ServiceUuidSelector(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 UsernameRef(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 UsernameSelector(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): + name: str | None = None + """ + (String) Policy name. + Policy name. + """ + nameRef: NameRef | None = None + """ + Reference to a ManagedObjectStoragePolicy in objectstorage to populate name. + """ + nameSelector: NameSelector | None = None + """ + Selector for a ManagedObjectStoragePolicy in objectstorage to populate name. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + serviceUuidRef: ServiceUuidRef | None = None + """ + Reference to a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + serviceUuidSelector: ServiceUuidSelector | None = None + """ + Selector for a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + username: str | None = None + """ + (String) Username. + Username. + """ + usernameRef: UsernameRef | None = None + """ + Reference to a ManagedObjectStorageUser in objectstorage to populate username. + """ + usernameSelector: UsernameSelector | None = None + """ + Selector for a ManagedObjectStorageUser in objectstorage to populate username. + """ + + +class InitProvider(BaseModel): + name: str | None = None + """ + (String) Policy name. + Policy name. + """ + nameRef: NameRef | None = None + """ + Reference to a ManagedObjectStoragePolicy in objectstorage to populate name. + """ + nameSelector: NameSelector | None = None + """ + Selector for a ManagedObjectStoragePolicy in objectstorage to populate name. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + serviceUuidRef: ServiceUuidRef | None = None + """ + Reference to a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + serviceUuidSelector: ServiceUuidSelector | None = None + """ + Selector for a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + username: str | None = None + """ + (String) Username. + Username. + """ + usernameRef: UsernameRef | None = None + """ + Reference to a ManagedObjectStorageUser in objectstorage to populate username. + """ + usernameSelector: UsernameSelector | None = None + """ + Selector for a ManagedObjectStorageUser in objectstorage to populate username. + """ + + +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 + """ + (String) ID of the user. ID is in {object storage UUID}/{username}/{policy name} format. + """ + name: str | None = None + """ + (String) Policy name. + Policy name. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + username: str | None = None + """ + (String) Username. + Username. + """ + + +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 ManagedObjectStorageUserPolicy(BaseModel): + apiVersion: Literal['objectstorage.m.upcloud.com/v1alpha1'] | None = ( + 'objectstorage.m.upcloud.com/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['ManagedObjectStorageUserPolicy'] | None = ( + 'ManagedObjectStorageUserPolicy' + ) + """ + 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 + """ + ManagedObjectStorageUserPolicySpec defines the desired state of ManagedObjectStorageUserPolicy + """ + status: Status | None = None + """ + ManagedObjectStorageUserPolicyStatus defines the observed state of ManagedObjectStorageUserPolicy. + """ + + +class ManagedObjectStorageUserPolicyList(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[ManagedObjectStorageUserPolicy] + """ + List of managedobjectstorageuserpolicies. 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/com/upcloud/m/provider/__init__.py b/schemas/python/models/com/upcloud/m/provider/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/provider/clusterproviderconfig/__init__.py b/schemas/python/models/com/upcloud/m/provider/clusterproviderconfig/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/provider/clusterproviderconfig/v1beta1.py b/schemas/python/models/com/upcloud/m/provider/clusterproviderconfig/v1beta1.py new file mode 100644 index 000000000..434bc5839 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/provider/clusterproviderconfig/v1beta1.py @@ -0,0 +1,205 @@ +# generated by datamodel-codegen: +# filename: workdir/provider_m_upcloud_com_v1beta1_clusterproviderconfig.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, conint + +from ......io.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. + """ + 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. + """ + requestTimeoutSec: conint(ge=0) | None = None + """ + RequestTimeoutSec is the duration, in seconds, the provider waits for + an HTTP request to the UpCloud API to complete. Defaults to 120. + """ + retryMax: conint(ge=0) | None = None + """ + RetryMax is the maximum number of retries of a failed UpCloud API + request. Defaults to 4. + """ + retryWaitMaxSec: conint(ge=0) | None = None + """ + RetryWaitMaxSec is the maximum time, in seconds, to wait between + retries. Defaults to 30. + """ + retryWaitMinSec: conint(ge=0) | None = None + """ + RetryWaitMinSec is the minimum time, in seconds, to wait between + retries. Defaults to 1. + """ + + +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['provider.m.upcloud.com/v1beta1'] | None = ( + 'provider.m.upcloud.com/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/com/upcloud/m/provider/providerconfig/__init__.py b/schemas/python/models/com/upcloud/m/provider/providerconfig/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/provider/providerconfig/v1beta1.py b/schemas/python/models/com/upcloud/m/provider/providerconfig/v1beta1.py new file mode 100644 index 000000000..5935e6c3c --- /dev/null +++ b/schemas/python/models/com/upcloud/m/provider/providerconfig/v1beta1.py @@ -0,0 +1,198 @@ +# generated by datamodel-codegen: +# filename: workdir/provider_m_upcloud_com_v1beta1_providerconfig.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, conint + +from ......io.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. + """ + 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. + """ + requestTimeoutSec: conint(ge=0) | None = None + """ + RequestTimeoutSec is the duration, in seconds, the provider waits for + an HTTP request to the UpCloud API to complete. Defaults to 120. + """ + retryMax: conint(ge=0) | None = None + """ + RetryMax is the maximum number of retries of a failed UpCloud API + request. Defaults to 4. + """ + retryWaitMaxSec: conint(ge=0) | None = None + """ + RetryWaitMaxSec is the maximum time, in seconds, to wait between + retries. Defaults to 30. + """ + retryWaitMinSec: conint(ge=0) | None = None + """ + RetryWaitMinSec is the minimum time, in seconds, to wait between + retries. Defaults to 1. + """ + + +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['provider.m.upcloud.com/v1beta1'] | None = ( + 'provider.m.upcloud.com/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/com/upcloud/m/provider/providerconfigusage/__init__.py b/schemas/python/models/com/upcloud/m/provider/providerconfigusage/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/provider/providerconfigusage/v1beta1.py b/schemas/python/models/com/upcloud/m/provider/providerconfigusage/v1beta1.py new file mode 100644 index 000000000..f9fb2dc09 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/provider/providerconfigusage/v1beta1.py @@ -0,0 +1,84 @@ +# generated by datamodel-codegen: +# filename: workdir/provider_m_upcloud_com_v1beta1_providerconfigusage.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import BaseModel + +from ......io.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['provider.m.upcloud.com/v1beta1'] | None = ( + 'provider.m.upcloud.com/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/com/upcloud/m/server/__init__.py b/schemas/python/models/com/upcloud/m/server/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/server/firewallrules/__init__.py b/schemas/python/models/com/upcloud/m/server/firewallrules/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/server/firewallrules/v1alpha1.py b/schemas/python/models/com/upcloud/m/server/firewallrules/v1alpha1.py new file mode 100644 index 000000000..739cf28bf --- /dev/null +++ b/schemas/python/models/com/upcloud/m/server/firewallrules/v1alpha1.py @@ -0,0 +1,377 @@ +# generated by datamodel-codegen: +# filename: workdir/server_m_upcloud_com_v1alpha1_firewallrules.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.k8s.apimachinery.pkg.apis.meta import v1 + + +class FirewallRuleItem(BaseModel): + action: str | None = None + """ + address/port range. + Action to take if the rule conditions are met. Valid values `accept | drop`. + """ + comment: str | None = None + """ + (String) A comment for the rule. + A comment for the rule. + """ + destinationAddressEnd: str | None = None + """ + (String) The destination address range ends from this address + The destination address range ends from this address + """ + destinationAddressStart: str | None = None + """ + (String) The destination address range starts from this address + The destination address range starts from this address + """ + destinationPortEnd: str | None = None + """ + (String) The destination port range ends from this port number + The destination port range ends from this port number + """ + destinationPortStart: str | None = None + """ + (String) The destination port range starts from this port number + The destination port range starts from this port number + """ + direction: str | None = None + """ + (String) The direction of network traffic this rule will be applied to. Valid values are in and out. + The direction of network traffic this rule will be applied to. Valid values are `in` and `out`. + """ + family: str | None = None + """ + (String) The address family of new firewall rule + The address family of new firewall rule + """ + icmpType: str | None = None + """ + (String) The ICMP type of the rule. Only valid if protocol is ICMP. + The ICMP type of the rule. Only valid if protocol is ICMP. + """ + protocol: str | None = None + """ + (String) The protocol of the rule. Possible values are `` (empty), tcp, udp, icmp. + The protocol of the rule. Possible values are `` (empty), `tcp`, `udp`, `icmp`. + """ + sourceAddressEnd: str | None = None + """ + (String) The source address range ends from this address + The source address range ends from this address + """ + sourceAddressStart: str | None = None + """ + (String) The source address range starts from this address + The source address range starts from this address + """ + sourcePortEnd: str | None = None + """ + (String) The source port range ends from this port number + The source port range ends from this port number + """ + sourcePortStart: str | None = None + """ + (String) The source port range starts from this port number + The source port range starts from this port number + """ + + +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 ServerIdRef(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 ServerIdSelector(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): + firewallRule: list[FirewallRuleItem] | None = None + """ + (Block List) A single firewall rule. The rules are evaluated in order. The maximum number of firewall rules per server is 1000. + A single firewall rule. The rules are evaluated in order. The maximum number of firewall rules per server is 1000. + + Typical firewall rule should have `action`, `direction`, `protocol`, `family` and at least one destination/source-address/port range. + + A default rule can be created by providing only `action` and `direction` attributes. Default rule should be defined last. + + If used, IP address and port ranges must have both start and end values specified. These can be the same value if only one IP address or port number is specified. + Source and destination port numbers can only be set if the protocol is TCP or UDP. + The ICMP type may only be set if the protocol is ICMP. + """ + serverId: str | None = None + """ + (String) The UUID of the server to be protected with the firewall rules. + The UUID of the server to be protected with the firewall rules. + """ + serverIdRef: ServerIdRef | None = None + """ + Reference to a Server in server to populate serverId. + """ + serverIdSelector: ServerIdSelector | None = None + """ + Selector for a Server in server to populate serverId. + """ + + +class InitProvider(BaseModel): + firewallRule: list[FirewallRuleItem] | None = None + """ + (Block List) A single firewall rule. The rules are evaluated in order. The maximum number of firewall rules per server is 1000. + A single firewall rule. The rules are evaluated in order. The maximum number of firewall rules per server is 1000. + + Typical firewall rule should have `action`, `direction`, `protocol`, `family` and at least one destination/source-address/port range. + + A default rule can be created by providing only `action` and `direction` attributes. Default rule should be defined last. + + If used, IP address and port ranges must have both start and end values specified. These can be the same value if only one IP address or port number is specified. + Source and destination port numbers can only be set if the protocol is TCP or UDP. + The ICMP type may only be set if the protocol is ICMP. + """ + serverId: str | None = None + """ + (String) The UUID of the server to be protected with the firewall rules. + The UUID of the server to be protected with the firewall rules. + """ + serverIdRef: ServerIdRef | None = None + """ + Reference to a Server in server to populate serverId. + """ + serverIdSelector: ServerIdSelector | None = None + """ + Selector for a Server in server to populate serverId. + """ + + +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): + firewallRule: list[FirewallRuleItem] | None = None + """ + (Block List) A single firewall rule. The rules are evaluated in order. The maximum number of firewall rules per server is 1000. + A single firewall rule. The rules are evaluated in order. The maximum number of firewall rules per server is 1000. + + Typical firewall rule should have `action`, `direction`, `protocol`, `family` and at least one destination/source-address/port range. + + A default rule can be created by providing only `action` and `direction` attributes. Default rule should be defined last. + + If used, IP address and port ranges must have both start and end values specified. These can be the same value if only one IP address or port number is specified. + Source and destination port numbers can only be set if the protocol is TCP or UDP. + The ICMP type may only be set if the protocol is ICMP. + """ + id: str | None = None + """ + (String) The ID of this resource. + """ + serverId: str | None = None + """ + (String) The UUID of the server to be protected with the firewall rules. + The UUID of the server to be protected with the firewall rules. + """ + + +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 FirewallRules(BaseModel): + apiVersion: Literal['server.m.upcloud.com/v1alpha1'] | None = ( + 'server.m.upcloud.com/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['FirewallRules'] | None = 'FirewallRules' + """ + 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 + """ + FirewallRulesSpec defines the desired state of FirewallRules + """ + status: Status | None = None + """ + FirewallRulesStatus defines the observed state of FirewallRules. + """ + + +class FirewallRulesList(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[FirewallRules] + """ + List of firewallrules. 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/com/upcloud/m/server/servergroup/__init__.py b/schemas/python/models/com/upcloud/m/server/servergroup/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/server/servergroup/v1alpha1.py b/schemas/python/models/com/upcloud/m/server/servergroup/v1alpha1.py new file mode 100644 index 000000000..27065b499 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/server/servergroup/v1alpha1.py @@ -0,0 +1,364 @@ +# generated by datamodel-codegen: +# filename: workdir/server_m_upcloud_com_v1alpha1_servergroup.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 MembersRef(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 MembersSelector(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): + antiAffinityPolicy: str | None = None + """ + affinity group. Setting this to strict or yes will + result in all servers in the group being placed on separate compute hosts. The value can be strict, yes, or no. + Defines if a server group is an anti-affinity group. Setting this to `strict` or `yes` will + result in all servers in the group being placed on separate compute hosts. The value can be `strict`, `yes`, or `no`. + + * `strict` policy doesn't allow servers in the same server group to be on the same host + * `yes` refers to best-effort policy and tries to put servers on different hosts, but this is not guaranteed + * `no` refers to having no policy and thus no effect on server host affinity + + To verify if the anti-affinity policies are met by requesting a server group details from API. For more information + please see UpCloud API documentation on server groups. + + Plese also note that anti-affinity policies are only applied on server start. This means that if anti-affinity + policies in server group are not met, you need to manually restart the servers in said group, + for example via API, UpCloud Control Panel or upctl (UpCloud CLI) + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the server group. + User defined key-value pairs to classify the server group. + """ + members: list[str] | None = None + """ + (Set of String) UUIDs of the servers that are members of this group. Servers can also be attached to the server group via server_group property of upcloud_server. See also track_members property. + UUIDs of the servers that are members of this group. Servers can also be attached to the server group via `server_group` property of `upcloud_server`. See also `track_members` property. + """ + membersRefs: list[MembersRef] | None = None + """ + References to Server in server to populate members. + """ + membersSelector: MembersSelector | None = None + """ + Selector for a list of Server in server to populate members. + """ + title: str | None = None + """ + (String) Title of your server group + Title of your server group + """ + trackMembers: bool | None = None + """ + (Boolean) Controls if members of the server group are being tracked in this resource. Set to false when using server_group property of upcloud_server to attach servers to the server group to avoid delayed state updates. + Controls if members of the server group are being tracked in this resource. Set to `false` when using `server_group` property of `upcloud_server` to attach servers to the server group to avoid delayed state updates. + """ + + +class InitProvider(BaseModel): + antiAffinityPolicy: str | None = None + """ + affinity group. Setting this to strict or yes will + result in all servers in the group being placed on separate compute hosts. The value can be strict, yes, or no. + Defines if a server group is an anti-affinity group. Setting this to `strict` or `yes` will + result in all servers in the group being placed on separate compute hosts. The value can be `strict`, `yes`, or `no`. + + * `strict` policy doesn't allow servers in the same server group to be on the same host + * `yes` refers to best-effort policy and tries to put servers on different hosts, but this is not guaranteed + * `no` refers to having no policy and thus no effect on server host affinity + + To verify if the anti-affinity policies are met by requesting a server group details from API. For more information + please see UpCloud API documentation on server groups. + + Plese also note that anti-affinity policies are only applied on server start. This means that if anti-affinity + policies in server group are not met, you need to manually restart the servers in said group, + for example via API, UpCloud Control Panel or upctl (UpCloud CLI) + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the server group. + User defined key-value pairs to classify the server group. + """ + members: list[str] | None = None + """ + (Set of String) UUIDs of the servers that are members of this group. Servers can also be attached to the server group via server_group property of upcloud_server. See also track_members property. + UUIDs of the servers that are members of this group. Servers can also be attached to the server group via `server_group` property of `upcloud_server`. See also `track_members` property. + """ + membersRefs: list[MembersRef] | None = None + """ + References to Server in server to populate members. + """ + membersSelector: MembersSelector | None = None + """ + Selector for a list of Server in server to populate members. + """ + title: str | None = None + """ + (String) Title of your server group + Title of your server group + """ + trackMembers: bool | None = None + """ + (Boolean) Controls if members of the server group are being tracked in this resource. Set to false when using server_group property of upcloud_server to attach servers to the server group to avoid delayed state updates. + Controls if members of the server group are being tracked in this resource. Set to `false` when using `server_group` property of `upcloud_server` to attach servers to the server group to avoid delayed state updates. + """ + + +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): + antiAffinityPolicy: str | None = None + """ + affinity group. Setting this to strict or yes will + result in all servers in the group being placed on separate compute hosts. The value can be strict, yes, or no. + Defines if a server group is an anti-affinity group. Setting this to `strict` or `yes` will + result in all servers in the group being placed on separate compute hosts. The value can be `strict`, `yes`, or `no`. + + * `strict` policy doesn't allow servers in the same server group to be on the same host + * `yes` refers to best-effort policy and tries to put servers on different hosts, but this is not guaranteed + * `no` refers to having no policy and thus no effect on server host affinity + + To verify if the anti-affinity policies are met by requesting a server group details from API. For more information + please see UpCloud API documentation on server groups. + + Plese also note that anti-affinity policies are only applied on server start. This means that if anti-affinity + policies in server group are not met, you need to manually restart the servers in said group, + for example via API, UpCloud Control Panel or upctl (UpCloud CLI) + """ + id: str | None = None + """ + (String) UUID of the server group. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the server group. + User defined key-value pairs to classify the server group. + """ + members: list[str] | None = None + """ + (Set of String) UUIDs of the servers that are members of this group. Servers can also be attached to the server group via server_group property of upcloud_server. See also track_members property. + UUIDs of the servers that are members of this group. Servers can also be attached to the server group via `server_group` property of `upcloud_server`. See also `track_members` property. + """ + title: str | None = None + """ + (String) Title of your server group + Title of your server group + """ + trackMembers: bool | None = None + """ + (Boolean) Controls if members of the server group are being tracked in this resource. Set to false when using server_group property of upcloud_server to attach servers to the server group to avoid delayed state updates. + Controls if members of the server group are being tracked in this resource. Set to `false` when using `server_group` property of `upcloud_server` to attach servers to the server group to avoid delayed state updates. + """ + + +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 ServerGroup(BaseModel): + apiVersion: Literal['server.m.upcloud.com/v1alpha1'] | None = ( + 'server.m.upcloud.com/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['ServerGroup'] | None = 'ServerGroup' + """ + 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 + """ + ServerGroupSpec defines the desired state of ServerGroup + """ + status: Status | None = None + """ + ServerGroupStatus defines the observed state of ServerGroup. + """ + + +class ServerGroupList(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[ServerGroup] + """ + List of servergroups. 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/com/upcloud/m/server/serverprivatefirewallruleset/__init__.py b/schemas/python/models/com/upcloud/m/server/serverprivatefirewallruleset/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/server/serverprivatefirewallruleset/v1alpha1.py b/schemas/python/models/com/upcloud/m/server/serverprivatefirewallruleset/v1alpha1.py new file mode 100644 index 000000000..9968174fb --- /dev/null +++ b/schemas/python/models/com/upcloud/m/server/serverprivatefirewallruleset/v1alpha1.py @@ -0,0 +1,333 @@ +# generated by datamodel-codegen: +# filename: workdir/server_m_upcloud_com_v1alpha1_serverprivatefirewallruleset.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 RulesetIdRef(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 RulesetIdSelector(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 ServerIdRef(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 ServerIdSelector(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): + rulesetId: str | None = None + """ + (String) The UUID of the firewall ruleset to attach. + The UUID of the firewall ruleset to attach. + """ + rulesetIdRef: RulesetIdRef | None = None + """ + Reference to a FirewallRuleset in network to populate rulesetId. + """ + rulesetIdSelector: RulesetIdSelector | None = None + """ + Selector for a FirewallRuleset in network to populate rulesetId. + """ + serverId: str | None = None + """ + (String) The UUID of the server to attach the firewall ruleset to. + The UUID of the server to attach the firewall ruleset to. + """ + serverIdRef: ServerIdRef | None = None + """ + Reference to a Server in server to populate serverId. + """ + serverIdSelector: ServerIdSelector | None = None + """ + Selector for a Server in server to populate serverId. + """ + + +class InitProvider(BaseModel): + rulesetId: str | None = None + """ + (String) The UUID of the firewall ruleset to attach. + The UUID of the firewall ruleset to attach. + """ + rulesetIdRef: RulesetIdRef | None = None + """ + Reference to a FirewallRuleset in network to populate rulesetId. + """ + rulesetIdSelector: RulesetIdSelector | None = None + """ + Selector for a FirewallRuleset in network to populate rulesetId. + """ + serverId: str | None = None + """ + (String) The UUID of the server to attach the firewall ruleset to. + The UUID of the server to attach the firewall ruleset to. + """ + serverIdRef: ServerIdRef | None = None + """ + Reference to a Server in server to populate serverId. + """ + serverIdSelector: ServerIdSelector | None = None + """ + Selector for a Server in server to populate serverId. + """ + + +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 + """ + (String) Composite identifier in format {server_id}/{ruleset_id}. + """ + rulesetId: str | None = None + """ + (String) The UUID of the firewall ruleset to attach. + The UUID of the firewall ruleset to attach. + """ + serverId: str | None = None + """ + (String) The UUID of the server to attach the firewall ruleset to. + The UUID of the server to attach the firewall ruleset to. + """ + + +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 ServerPrivateFirewallRuleset(BaseModel): + apiVersion: Literal['server.m.upcloud.com/v1alpha1'] | None = ( + 'server.m.upcloud.com/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['ServerPrivateFirewallRuleset'] | None = ( + 'ServerPrivateFirewallRuleset' + ) + """ + 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 + """ + ServerPrivateFirewallRulesetSpec defines the desired state of ServerPrivateFirewallRuleset + """ + status: Status | None = None + """ + ServerPrivateFirewallRulesetStatus defines the observed state of ServerPrivateFirewallRuleset. + """ + + +class ServerPrivateFirewallRulesetList(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[ServerPrivateFirewallRuleset] + """ + List of serverprivatefirewallrulesets. 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/com/upcloud/m/server/tag/__init__.py b/schemas/python/models/com/upcloud/m/server/tag/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/server/tag/v1alpha1.py b/schemas/python/models/com/upcloud/m/server/tag/v1alpha1.py new file mode 100644 index 000000000..01799855e --- /dev/null +++ b/schemas/python/models/com/upcloud/m/server/tag/v1alpha1.py @@ -0,0 +1,271 @@ +# generated by datamodel-codegen: +# filename: workdir/server_m_upcloud_com_v1alpha1_tag.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 ServersRef(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 ServersSelector(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): + description: str | None = None + """ + Free form text representing the meaning of the tag. + """ + servers: list[str] | None = None + """ + A collection of servers that have been assigned the tag. + """ + serversRefs: list[ServersRef] | None = None + """ + References to Server in server to populate servers. + """ + serversSelector: ServersSelector | None = None + """ + Selector for a list of Server in server to populate servers. + """ + + +class InitProvider(BaseModel): + description: str | None = None + """ + Free form text representing the meaning of the tag. + """ + servers: list[str] | None = None + """ + A collection of servers that have been assigned the tag. + """ + serversRefs: list[ServersRef] | None = None + """ + References to Server in server to populate servers. + """ + serversSelector: ServersSelector | None = None + """ + Selector for a list of Server in server to populate servers. + """ + + +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): + description: str | None = None + """ + Free form text representing the meaning of the tag. + """ + id: str | None = None + servers: list[str] | None = None + """ + A collection of servers that have been assigned the tag. + """ + + +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 Tag(BaseModel): + apiVersion: Literal['server.m.upcloud.com/v1alpha1'] | None = ( + 'server.m.upcloud.com/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['Tag'] | None = 'Tag' + """ + 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 + """ + TagSpec defines the desired state of Tag + """ + status: Status | None = None + """ + TagStatus defines the observed state of Tag. + """ + + +class TagList(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[Tag] + """ + List of tags. 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/com/upcloud/m/server/v1alpha1.py b/schemas/python/models/com/upcloud/m/server/v1alpha1.py new file mode 100644 index 000000000..c2a3b73e0 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/server/v1alpha1.py @@ -0,0 +1,1002 @@ +# generated by datamodel-codegen: +# filename: workdir/server_m_upcloud_com_v1alpha1_server.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.k8s.apimachinery.pkg.apis.meta import v1 + + +class Login(BaseModel): + createPassword: bool | None = None + """ + (Boolean) Indicates a password should be create to allow access + Indicates a password should be create to allow access + """ + keys: list[str] | None = None + """ + (List of String) A list of ssh keys to access the server + A list of ssh keys to access the server + """ + passwordDelivery: str | None = None + """ + (String) The delivery method for the server's root password (one of none, email or sms) + The delivery method for the server's root password (one of `none`, `email` or `sms`) + """ + user: str | None = None + """ + (String) Username to be create to access the server + Username to be create to access the server + """ + + +class AdditionalIpAddres(BaseModel): + ipAddress: str | None = None + """ + (String) The primary IP address of this interface. + An additional IP address for this interface. + """ + ipAddressFamily: str | None = None + """ + (String) The type of the primary IP address of this interface (one of IPv4 or IPv6). + The type of the additional IP address of this interface (one of `IPv4` or `IPv6`). + """ + + +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 NetworkRef(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 NetworkSelector(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 NetworkInterfaceItem(BaseModel): + additionalIpAddress: list[AdditionalIpAddres] | None = None + """ + 31 blocks of additional IP addresses to assign to this interface. Allowed only with network interfaces of type private (see below for nested schema) + 0-31 blocks of additional IP addresses to assign to this interface. Allowed only with network interfaces of type `private` + """ + bootable: bool | None = None + """ + (Boolean) true if this interface should be used for network booting. + `true` if this interface should be used for network booting. + """ + index: float | None = None + """ + assigned when the server is updated. This might result to inaccurate diffs in the plan, when interfaces are re-ordered or when interface is removed from the middle of the list. + The interface index. + """ + ipAddress: str | None = None + """ + (String) The primary IP address of this interface. + The primary IP address of this interface. + """ + ipAddressFamily: str | None = None + """ + (String) The type of the primary IP address of this interface (one of IPv4 or IPv6). + The type of the primary IP address of this interface (one of `IPv4` or `IPv6`). + """ + network: str | None = None + """ + (String) The UUID of the network to attach this interface to. Required for private network interfaces. + The UUID of the network to attach this interface to. Required for private network interfaces. + """ + networkRef: NetworkRef | None = None + """ + Reference to a Network in network to populate network. + """ + networkSelector: NetworkSelector | None = None + """ + Selector for a Network in network to populate network. + """ + sourceIpFiltering: bool | None = None + """ + (Boolean) true if source IP should be filtered. + `true` if source IP should be filtered. + """ + type: str | None = None + """ + (String) Network interface type. For private network interfaces, a network must be specified with an existing network id. + Network interface type. For private network interfaces, a network must be specified with an existing network id. + """ + + +class SimpleBackup(BaseModel): + plan: str | None = None + """ + (String) The pricing plan used for the server. You can list available server plans with upctl server plans + Simple backup plan. Accepted values: daily, dailies, weeklies, monthlies. + """ + time: str | None = None + """ + (String) Time of the day at which backup will be taken. Should be provided in a hhmm format (e.g. 2230). + Time of the day at which backup will be taken. Should be provided in a hhmm format (e.g. 2230). + """ + + +class StorageRef(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 StorageSelector(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 StorageDevice(BaseModel): + address: str | None = None + """ + select next available address from that bus. + The device address the storage will be attached to (`scsi`|`virtio`|`ide`). Leave `address_position` field empty to auto-select next available address from that bus. + """ + addressPosition: str | None = None + """ + 15 (0, for example). Valid values for scsi or ide are 0-1:0-1 (0:0, for example). Leave empty to auto-select next available address in the given bus. + The device position in the given bus (defined via field `address`). Valid values for address `virtio` are `0-15` (`0`, for example). Valid values for `scsi` or `ide` are `0-1:0-1` (`0:0`, for example). Leave empty to auto-select next available address in the given bus. + """ + storage: str | None = None + """ + (String) The UUID of the storage to attach to the server. + The UUID of the storage to attach to the server. + """ + storageRef: StorageRef | None = None + """ + Reference to a Storage in storage to populate storage. + """ + storageSelector: StorageSelector | None = None + """ + Selector for a Storage in storage to populate storage. + """ + type: str | None = None + """ + (String) Network interface type. For private network interfaces, a network must be specified with an existing network id. + The device type the storage will be attached as + """ + + +class BackupRuleItem(BaseModel): + interval: str | None = None + """ + (String) The weekday when the backup is created + The weekday when the backup is created + """ + retention: float | None = None + """ + (Number) The number of days before a backup is automatically deleted + The number of days before a backup is automatically deleted + """ + time: str | None = None + """ + (String) Time of the day at which backup will be taken. Should be provided in a hhmm format (e.g. 2230). + The time of day (UTC) when the backup is created + """ + + +class Template(BaseModel): + address: str | None = None + """ + select next available address from that bus. + The device address the storage will be attached to (`scsi`|`virtio`|`ide`). Leave `address_position` field empty to auto-select next available address from that bus. + """ + addressPosition: str | None = None + """ + 15 (0, for example). Valid values for scsi or ide are 0-1:0-1 (0:0, for example). Leave empty to auto-select next available address in the given bus. + The device position in the given bus (defined via field `address`). For example `0:0`, or `0`. Leave empty to auto-select next available address in the given bus. + """ + backupRule: list[BackupRuleItem] | None = None + """ + (Block List) The criteria to backup the storage. + The criteria to backup the storage. + + Please keep in mind that it's not possible to have a storage with `backup_rule` attached to a server with `simple_backup` specified. Such configurations will throw errors during execution. + """ + deleteAutoresizeBackup: bool | None = None + """ + (Boolean) If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after success. + If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after success. + """ + encrypt: bool | None = None + """ + (Boolean) Sets if the storage is encrypted at rest + Sets if the storage is encrypted at rest + """ + filesystemAutoresize: bool | None = None + """ + (Boolean) If set to true, provider will attempt to resize partition and filesystem when the size of template storage changes. + Please note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the backup will be used + to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless delete_autoresize_backup option is set to true). + Taking and keeping backups incure costs. + If set to true, provider will attempt to resize partition and filesystem when the size of template storage changes. + Please note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the backup will be used + to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless delete_autoresize_backup option is set to true). + Taking and keeping backups incure costs. + """ + size: float | None = None + """ + (Number) The size of the storage in gigabytes + The size of the storage in gigabytes + """ + storage: str | None = None + """ + (String) The UUID of the storage to attach to the server. + A valid storage UUID or template name. You can list available public templates with `upctl storage list --public --template` and available private templates with `upctl storage list --template`. + """ + tier: str | None = None + """ + (String) The storage tier to use. + The storage tier to use. + """ + title: str | None = None + """ + (String) A short, informational description of the server. + A short, informative description + """ + + +class ForProvider(BaseModel): + bootOrder: str | None = None + """ + (String) The boot device order, cdrom|disk|network or comma separated combination of those values. Defaults to disk + The boot device order, `cdrom`|`disk`|`network` or comma separated combination of those values. Defaults to `disk` + """ + cpu: float | None = None + """ + (Number) The number of CPU cores for the server + The number of CPU cores for the server + """ + firewall: bool | None = None + """ + (Boolean) Are firewall rules active for the server + Are firewall rules active for the server + """ + host: float | None = None + """ + attribute. Only available for private cloud hosts + Use this to start the VM on a specific host. Refers to value from host -attribute. Only available for private cloud hosts + """ + hostname: str | None = None + """ + (String) The hostname of the server. + The hostname of the server. + """ + hotResize: bool | None = None + """ + (Boolean) If set to true, allows changing the server plan without requiring a reboot. This enables hot resizing of the server. If hot resizing fails, the apply operation will fail. + If set to true, allows changing the server plan without requiring a reboot. This enables hot resizing of the server. If hot resizing fails, the apply operation will fail. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the server. + User defined key-value pairs to classify the server. + """ + login: Login | None = None + """ + (Block List) Configure access credentials to the server (see below for nested schema) + Configure access credentials to the server + """ + mem: float | None = None + """ + (Number) The amount of memory for the server (in megabytes) + The amount of memory for the server (in megabytes) + """ + metadata: bool | None = None + """ + init based templates. + Is metadata service active for the server. The metadata service must be enabled when using recent cloud-init based templates. + """ + networkInterface: list[NetworkInterfaceItem] | None = None + """ + (Block List) One or more blocks describing the network interfaces of the server. + One or more blocks describing the network interfaces of the server. + + In addition to list order, the configured network interfaces are matched to the server's actual network interfaces by `index` and `ip_address` fields. This is to avoid public and utility network interfaces being re-assigned when the server is updated. This might result to inaccurate diffs in the plan, when interfaces are re-ordered or when interface is removed from the middle of the list. + + We recommend explicitly setting the value for `index` in configuration, when re-ordering interfaces or when removing interface from middle of the list. + """ + nicModel: str | None = None + """ + (String) The model of the server's network interfaces + The model of the server's network interfaces + """ + plan: str | None = None + """ + (String) The pricing plan used for the server. You can list available server plans with upctl server plans + The pricing plan used for the server. You can list available server plans with `upctl server plans` + """ + serverGroup: str | None = None + """ + zero value. + The UUID of a server group to attach this server to. Note that the server can also be attached to a server group via the `members` property of `upcloud_server_group`. Only one of the these should be defined at a time. This value is only updated if it has been set to non-zero value. + """ + simpleBackup: SimpleBackup | None = None + """ + (Block Set) Simple backup schedule configuration + Simple backup schedule configuration + + The simple backups provide a simplified way to back up *all* of the storages attached to a given server. This means you cannot have simple backup set for a server, and individual `backup_rules` on the storages attached to the server. Such configuration will throw an error during execution. This also applies to `backup_rules` defined for server templates. + """ + storageDevices: list[StorageDevice] | None = None + """ + (Block Set) A set of storage devices associated with the server (see below for nested schema) + A set of storage devices associated with the server + """ + tags: list[str] | None = None + """ + (Set of String) Tags to attach to the server. Note that tags are an access control feature and only available for a limited set of resources. Use labels to describe and filter your resources. + Tags to attach to the server. Note that tags are an access control feature and only available for a limited set of resources. Use labels to describe and filter your resources. + """ + template: Template | None = None + """ + (Block List) Block describing the preconfigured operating system (see below for nested schema) + Block describing the preconfigured operating system + """ + timezone: str | None = None + """ + (String) The timezone of the server. The timezone must be a valid timezone string, e.g. Europe/Helsinki. + The timezone of the server. The timezone must be a valid timezone string, e.g. `Europe/Helsinki`. + """ + title: str | None = None + """ + (String) A short, informational description of the server. + A short, informational description of the server. + """ + userData: str | None = None + """ + (String) Defines URL for a server setup script, or the script body itself + Defines URL for a server setup script, or the script body itself + """ + videoModel: str | None = None + """ + (String) The model of the server's video interface + The model of the server's video interface + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + The zone in which the server will be hosted, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +class InitProvider(BaseModel): + bootOrder: str | None = None + """ + (String) The boot device order, cdrom|disk|network or comma separated combination of those values. Defaults to disk + The boot device order, `cdrom`|`disk`|`network` or comma separated combination of those values. Defaults to `disk` + """ + cpu: float | None = None + """ + (Number) The number of CPU cores for the server + The number of CPU cores for the server + """ + firewall: bool | None = None + """ + (Boolean) Are firewall rules active for the server + Are firewall rules active for the server + """ + host: float | None = None + """ + attribute. Only available for private cloud hosts + Use this to start the VM on a specific host. Refers to value from host -attribute. Only available for private cloud hosts + """ + hostname: str | None = None + """ + (String) The hostname of the server. + The hostname of the server. + """ + hotResize: bool | None = None + """ + (Boolean) If set to true, allows changing the server plan without requiring a reboot. This enables hot resizing of the server. If hot resizing fails, the apply operation will fail. + If set to true, allows changing the server plan without requiring a reboot. This enables hot resizing of the server. If hot resizing fails, the apply operation will fail. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the server. + User defined key-value pairs to classify the server. + """ + login: Login | None = None + """ + (Block List) Configure access credentials to the server (see below for nested schema) + Configure access credentials to the server + """ + mem: float | None = None + """ + (Number) The amount of memory for the server (in megabytes) + The amount of memory for the server (in megabytes) + """ + metadata: bool | None = None + """ + init based templates. + Is metadata service active for the server. The metadata service must be enabled when using recent cloud-init based templates. + """ + networkInterface: list[NetworkInterfaceItem] | None = None + """ + (Block List) One or more blocks describing the network interfaces of the server. + One or more blocks describing the network interfaces of the server. + + In addition to list order, the configured network interfaces are matched to the server's actual network interfaces by `index` and `ip_address` fields. This is to avoid public and utility network interfaces being re-assigned when the server is updated. This might result to inaccurate diffs in the plan, when interfaces are re-ordered or when interface is removed from the middle of the list. + + We recommend explicitly setting the value for `index` in configuration, when re-ordering interfaces or when removing interface from middle of the list. + """ + nicModel: str | None = None + """ + (String) The model of the server's network interfaces + The model of the server's network interfaces + """ + plan: str | None = None + """ + (String) The pricing plan used for the server. You can list available server plans with upctl server plans + The pricing plan used for the server. You can list available server plans with `upctl server plans` + """ + serverGroup: str | None = None + """ + zero value. + The UUID of a server group to attach this server to. Note that the server can also be attached to a server group via the `members` property of `upcloud_server_group`. Only one of the these should be defined at a time. This value is only updated if it has been set to non-zero value. + """ + simpleBackup: SimpleBackup | None = None + """ + (Block Set) Simple backup schedule configuration + Simple backup schedule configuration + + The simple backups provide a simplified way to back up *all* of the storages attached to a given server. This means you cannot have simple backup set for a server, and individual `backup_rules` on the storages attached to the server. Such configuration will throw an error during execution. This also applies to `backup_rules` defined for server templates. + """ + storageDevices: list[StorageDevice] | None = None + """ + (Block Set) A set of storage devices associated with the server (see below for nested schema) + A set of storage devices associated with the server + """ + tags: list[str] | None = None + """ + (Set of String) Tags to attach to the server. Note that tags are an access control feature and only available for a limited set of resources. Use labels to describe and filter your resources. + Tags to attach to the server. Note that tags are an access control feature and only available for a limited set of resources. Use labels to describe and filter your resources. + """ + template: Template | None = None + """ + (Block List) Block describing the preconfigured operating system (see below for nested schema) + Block describing the preconfigured operating system + """ + timezone: str | None = None + """ + (String) The timezone of the server. The timezone must be a valid timezone string, e.g. Europe/Helsinki. + The timezone of the server. The timezone must be a valid timezone string, e.g. `Europe/Helsinki`. + """ + title: str | None = None + """ + (String) A short, informational description of the server. + A short, informational description of the server. + """ + userData: str | None = None + """ + (String) Defines URL for a server setup script, or the script body itself + Defines URL for a server setup script, or the script body itself + """ + videoModel: str | None = None + """ + (String) The model of the server's video interface + The model of the server's video interface + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + The zone in which the server will be hosted, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 AdditionalIpAddresModel(BaseModel): + ipAddress: str | None = None + """ + (String) The primary IP address of this interface. + An additional IP address for this interface. + """ + ipAddressFamily: str | None = None + """ + (String) The type of the primary IP address of this interface (one of IPv4 or IPv6). + The type of the additional IP address of this interface (one of `IPv4` or `IPv6`). + """ + ipAddressFloating: bool | None = None + """ + (Boolean) true indicates that the primary IP address is a floating IP address. + `true` indicates that the additional IP address is a floating IP address. + """ + + +class NetworkInterfaceItemModel(BaseModel): + additionalIpAddress: list[AdditionalIpAddresModel] | None = None + """ + 31 blocks of additional IP addresses to assign to this interface. Allowed only with network interfaces of type private (see below for nested schema) + 0-31 blocks of additional IP addresses to assign to this interface. Allowed only with network interfaces of type `private` + """ + bootable: bool | None = None + """ + (Boolean) true if this interface should be used for network booting. + `true` if this interface should be used for network booting. + """ + index: float | None = None + """ + assigned when the server is updated. This might result to inaccurate diffs in the plan, when interfaces are re-ordered or when interface is removed from the middle of the list. + The interface index. + """ + ipAddress: str | None = None + """ + (String) The primary IP address of this interface. + The primary IP address of this interface. + """ + ipAddressFamily: str | None = None + """ + (String) The type of the primary IP address of this interface (one of IPv4 or IPv6). + The type of the primary IP address of this interface (one of `IPv4` or `IPv6`). + """ + ipAddressFloating: bool | None = None + """ + (Boolean) true indicates that the primary IP address is a floating IP address. + `true` indicates that the primary IP address is a floating IP address. + """ + macAddress: str | None = None + """ + (String) The MAC address of the interface. + The MAC address of the interface. + """ + network: str | None = None + """ + (String) The UUID of the network to attach this interface to. Required for private network interfaces. + The UUID of the network to attach this interface to. Required for private network interfaces. + """ + sourceIpFiltering: bool | None = None + """ + (Boolean) true if source IP should be filtered. + `true` if source IP should be filtered. + """ + type: str | None = None + """ + (String) Network interface type. For private network interfaces, a network must be specified with an existing network id. + Network interface type. For private network interfaces, a network must be specified with an existing network id. + """ + + +class StorageDeviceModel(BaseModel): + address: str | None = None + """ + select next available address from that bus. + The device address the storage will be attached to (`scsi`|`virtio`|`ide`). Leave `address_position` field empty to auto-select next available address from that bus. + """ + addressPosition: str | None = None + """ + 15 (0, for example). Valid values for scsi or ide are 0-1:0-1 (0:0, for example). Leave empty to auto-select next available address in the given bus. + The device position in the given bus (defined via field `address`). Valid values for address `virtio` are `0-15` (`0`, for example). Valid values for `scsi` or `ide` are `0-1:0-1` (`0:0`, for example). Leave empty to auto-select next available address in the given bus. + """ + storage: str | None = None + """ + (String) The UUID of the storage to attach to the server. + The UUID of the storage to attach to the server. + """ + type: str | None = None + """ + (String) Network interface type. For private network interfaces, a network must be specified with an existing network id. + The device type the storage will be attached as + """ + + +class TemplateModel(BaseModel): + address: str | None = None + """ + select next available address from that bus. + The device address the storage will be attached to (`scsi`|`virtio`|`ide`). Leave `address_position` field empty to auto-select next available address from that bus. + """ + addressPosition: str | None = None + """ + 15 (0, for example). Valid values for scsi or ide are 0-1:0-1 (0:0, for example). Leave empty to auto-select next available address in the given bus. + The device position in the given bus (defined via field `address`). For example `0:0`, or `0`. Leave empty to auto-select next available address in the given bus. + """ + backupRule: list[BackupRuleItem] | None = None + """ + (Block List) The criteria to backup the storage. + The criteria to backup the storage. + + Please keep in mind that it's not possible to have a storage with `backup_rule` attached to a server with `simple_backup` specified. Such configurations will throw errors during execution. + """ + deleteAutoresizeBackup: bool | None = None + """ + (Boolean) If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after success. + If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after success. + """ + encrypt: bool | None = None + """ + (Boolean) Sets if the storage is encrypted at rest + Sets if the storage is encrypted at rest + """ + filesystemAutoresize: bool | None = None + """ + (Boolean) If set to true, provider will attempt to resize partition and filesystem when the size of template storage changes. + Please note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the backup will be used + to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless delete_autoresize_backup option is set to true). + Taking and keeping backups incure costs. + If set to true, provider will attempt to resize partition and filesystem when the size of template storage changes. + Please note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the backup will be used + to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless delete_autoresize_backup option is set to true). + Taking and keeping backups incure costs. + """ + id: str | None = None + """ + (String) UUID of the server. + The unique identifier for the storage + """ + size: float | None = None + """ + (Number) The size of the storage in gigabytes + The size of the storage in gigabytes + """ + storage: str | None = None + """ + (String) The UUID of the storage to attach to the server. + A valid storage UUID or template name. You can list available public templates with `upctl storage list --public --template` and available private templates with `upctl storage list --template`. + """ + tier: str | None = None + """ + (String) The storage tier to use. + The storage tier to use. + """ + title: str | None = None + """ + (String) A short, informational description of the server. + A short, informative description + """ + + +class AtProvider(BaseModel): + bootOrder: str | None = None + """ + (String) The boot device order, cdrom|disk|network or comma separated combination of those values. Defaults to disk + The boot device order, `cdrom`|`disk`|`network` or comma separated combination of those values. Defaults to `disk` + """ + cpu: float | None = None + """ + (Number) The number of CPU cores for the server + The number of CPU cores for the server + """ + firewall: bool | None = None + """ + (Boolean) Are firewall rules active for the server + Are firewall rules active for the server + """ + host: float | None = None + """ + attribute. Only available for private cloud hosts + Use this to start the VM on a specific host. Refers to value from host -attribute. Only available for private cloud hosts + """ + hostname: str | None = None + """ + (String) The hostname of the server. + The hostname of the server. + """ + hotResize: bool | None = None + """ + (Boolean) If set to true, allows changing the server plan without requiring a reboot. This enables hot resizing of the server. If hot resizing fails, the apply operation will fail. + If set to true, allows changing the server plan without requiring a reboot. This enables hot resizing of the server. If hot resizing fails, the apply operation will fail. + """ + id: str | None = None + """ + (String) UUID of the server. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the server. + User defined key-value pairs to classify the server. + """ + login: Login | None = None + """ + (Block List) Configure access credentials to the server (see below for nested schema) + Configure access credentials to the server + """ + mem: float | None = None + """ + (Number) The amount of memory for the server (in megabytes) + The amount of memory for the server (in megabytes) + """ + metadata: bool | None = None + """ + init based templates. + Is metadata service active for the server. The metadata service must be enabled when using recent cloud-init based templates. + """ + networkInterface: list[NetworkInterfaceItemModel] | None = None + """ + (Block List) One or more blocks describing the network interfaces of the server. + One or more blocks describing the network interfaces of the server. + + In addition to list order, the configured network interfaces are matched to the server's actual network interfaces by `index` and `ip_address` fields. This is to avoid public and utility network interfaces being re-assigned when the server is updated. This might result to inaccurate diffs in the plan, when interfaces are re-ordered or when interface is removed from the middle of the list. + + We recommend explicitly setting the value for `index` in configuration, when re-ordering interfaces or when removing interface from middle of the list. + """ + nicModel: str | None = None + """ + (String) The model of the server's network interfaces + The model of the server's network interfaces + """ + plan: str | None = None + """ + (String) The pricing plan used for the server. You can list available server plans with upctl server plans + The pricing plan used for the server. You can list available server plans with `upctl server plans` + """ + serverGroup: str | None = None + """ + zero value. + The UUID of a server group to attach this server to. Note that the server can also be attached to a server group via the `members` property of `upcloud_server_group`. Only one of the these should be defined at a time. This value is only updated if it has been set to non-zero value. + """ + simpleBackup: SimpleBackup | None = None + """ + (Block Set) Simple backup schedule configuration + Simple backup schedule configuration + + The simple backups provide a simplified way to back up *all* of the storages attached to a given server. This means you cannot have simple backup set for a server, and individual `backup_rules` on the storages attached to the server. Such configuration will throw an error during execution. This also applies to `backup_rules` defined for server templates. + """ + storageDevices: list[StorageDeviceModel] | None = None + """ + (Block Set) A set of storage devices associated with the server (see below for nested schema) + A set of storage devices associated with the server + """ + tags: list[str] | None = None + """ + (Set of String) Tags to attach to the server. Note that tags are an access control feature and only available for a limited set of resources. Use labels to describe and filter your resources. + Tags to attach to the server. Note that tags are an access control feature and only available for a limited set of resources. Use labels to describe and filter your resources. + """ + template: TemplateModel | None = None + """ + (Block List) Block describing the preconfigured operating system (see below for nested schema) + Block describing the preconfigured operating system + """ + timezone: str | None = None + """ + (String) The timezone of the server. The timezone must be a valid timezone string, e.g. Europe/Helsinki. + The timezone of the server. The timezone must be a valid timezone string, e.g. `Europe/Helsinki`. + """ + title: str | None = None + """ + (String) A short, informational description of the server. + A short, informational description of the server. + """ + userData: str | None = None + """ + (String) Defines URL for a server setup script, or the script body itself + Defines URL for a server setup script, or the script body itself + """ + videoModel: str | None = None + """ + (String) The model of the server's video interface + The model of the server's video interface + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + The zone in which the server will be hosted, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 Server(BaseModel): + apiVersion: Literal['server.m.upcloud.com/v1alpha1'] | None = ( + 'server.m.upcloud.com/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['Server'] | None = 'Server' + """ + 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 + """ + ServerSpec defines the desired state of Server + """ + status: Status | None = None + """ + ServerStatus defines the observed state of Server. + """ + + +class ServerList(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[Server] + """ + List of servers. 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/com/upcloud/m/storage/__init__.py b/schemas/python/models/com/upcloud/m/storage/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/storage/filestorage/__init__.py b/schemas/python/models/com/upcloud/m/storage/filestorage/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/storage/filestorage/v1alpha1.py b/schemas/python/models/com/upcloud/m/storage/filestorage/v1alpha1.py new file mode 100644 index 000000000..753ed81c9 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/storage/filestorage/v1alpha1.py @@ -0,0 +1,393 @@ +# generated by datamodel-codegen: +# filename: workdir/storage_m_upcloud_com_v1alpha1_filestorage.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 UuidRef(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 UuidSelector(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 Network(BaseModel): + family: str | None = None + """ + (String) IP family, e.g. IPv4. + IP family, e.g. IPv4. + """ + ipAddress: str | None = None + """ + assign otherwise). + IP address to assign (optional, auto-assign otherwise). + """ + name: str | None = None + """ + (String) Name of the file storage service. + Attachment name (unique per this service). + """ + uuid: str | None = None + """ + (String) UUID of an existing private network to attach. + UUID of an existing private network to attach. + """ + uuidRef: UuidRef | None = None + """ + Reference to a Network in network to populate uuid. + """ + uuidSelector: UuidSelector | None = None + """ + Selector for a Network in network to populate uuid. + """ + + +class ForProvider(BaseModel): + configuredStatus: str | None = None + """ + (String) The service configured status indicates the service's current intended status. Managed by the customer. + The service configured status indicates the service's current intended status. Managed by the customer. + """ + encrypt: bool | None = None + """ + (Boolean) Sets if the file storage is encrypted at rest. Encryption can only be enabled at creation time and cannot be changed later. Defaults to false. + Sets if the file storage is encrypted at rest. Encryption can only be enabled at creation time and cannot be changed later. Defaults to `false`. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the file storage. + User defined key-value pairs to classify the file storage. + """ + name: str | None = None + """ + (String) Name of the file storage service. + Name of the file storage service. + """ + network: Network | None = None + """ + (Block Set) Network attached to this file storage (currently supports at most one of these blocks). (see below for nested schema) + Network attached to this file storage (currently supports at most one of these blocks). + """ + size: float | None = None + """ + (Number) Size of the file storage in GB. + Size of the file storage in GB. + """ + zone: str | None = None + """ + hel1. You can list available zones with upctl zone list. + Zone in which the service will be hosted, e.g. `fi-hel1`. You can list available zones with `upctl zone list`. + """ + + +class InitProvider(BaseModel): + configuredStatus: str | None = None + """ + (String) The service configured status indicates the service's current intended status. Managed by the customer. + The service configured status indicates the service's current intended status. Managed by the customer. + """ + encrypt: bool | None = None + """ + (Boolean) Sets if the file storage is encrypted at rest. Encryption can only be enabled at creation time and cannot be changed later. Defaults to false. + Sets if the file storage is encrypted at rest. Encryption can only be enabled at creation time and cannot be changed later. Defaults to `false`. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the file storage. + User defined key-value pairs to classify the file storage. + """ + name: str | None = None + """ + (String) Name of the file storage service. + Name of the file storage service. + """ + network: Network | None = None + """ + (Block Set) Network attached to this file storage (currently supports at most one of these blocks). (see below for nested schema) + Network attached to this file storage (currently supports at most one of these blocks). + """ + size: float | None = None + """ + (Number) Size of the file storage in GB. + Size of the file storage in GB. + """ + zone: str | None = None + """ + hel1. You can list available zones with upctl zone list. + Zone in which the service will be hosted, e.g. `fi-hel1`. You can list available zones with `upctl zone list`. + """ + + +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 NetworkModel(BaseModel): + family: str | None = None + """ + (String) IP family, e.g. IPv4. + IP family, e.g. IPv4. + """ + ipAddress: str | None = None + """ + assign otherwise). + IP address to assign (optional, auto-assign otherwise). + """ + name: str | None = None + """ + (String) Name of the file storage service. + Attachment name (unique per this service). + """ + uuid: str | None = None + """ + (String) UUID of an existing private network to attach. + UUID of an existing private network to attach. + """ + + +class AtProvider(BaseModel): + configuredStatus: str | None = None + """ + (String) The service configured status indicates the service's current intended status. Managed by the customer. + The service configured status indicates the service's current intended status. Managed by the customer. + """ + encrypt: bool | None = None + """ + (Boolean) Sets if the file storage is encrypted at rest. Encryption can only be enabled at creation time and cannot be changed later. Defaults to false. + Sets if the file storage is encrypted at rest. Encryption can only be enabled at creation time and cannot be changed later. Defaults to `false`. + """ + id: str | None = None + """ + (String) UUID of the file storage. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the file storage. + User defined key-value pairs to classify the file storage. + """ + name: str | None = None + """ + (String) Name of the file storage service. + Name of the file storage service. + """ + network: NetworkModel | None = None + """ + (Block Set) Network attached to this file storage (currently supports at most one of these blocks). (see below for nested schema) + Network attached to this file storage (currently supports at most one of these blocks). + """ + size: float | None = None + """ + (Number) Size of the file storage in GB. + Size of the file storage in GB. + """ + zone: str | None = None + """ + hel1. You can list available zones with upctl zone list. + Zone in which the service will be hosted, e.g. `fi-hel1`. You can list available zones with `upctl zone list`. + """ + + +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 FileStorage(BaseModel): + apiVersion: Literal['storage.m.upcloud.com/v1alpha1'] | None = ( + 'storage.m.upcloud.com/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['FileStorage'] | None = 'FileStorage' + """ + 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 + """ + FileStorageSpec defines the desired state of FileStorage + """ + status: Status | None = None + """ + FileStorageStatus defines the observed state of FileStorage. + """ + + +class FileStorageList(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[FileStorage] + """ + List of filestorages. 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/com/upcloud/m/storage/filestorageshare/__init__.py b/schemas/python/models/com/upcloud/m/storage/filestorageshare/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/storage/filestorageshare/v1alpha1.py b/schemas/python/models/com/upcloud/m/storage/filestorageshare/v1alpha1.py new file mode 100644 index 000000000..57843c423 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/storage/filestorageshare/v1alpha1.py @@ -0,0 +1,259 @@ +# generated by datamodel-codegen: +# filename: workdir/storage_m_upcloud_com_v1alpha1_filestorageshare.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 FileStorageRef(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 FileStorageSelector(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): + fileStorage: str | None = None + """ + UUID of the file storage service. + """ + fileStorageRef: FileStorageRef | None = None + """ + Reference to a FileStorage in storage to populate fileStorage. + """ + fileStorageSelector: FileStorageSelector | None = None + """ + Selector for a FileStorage in storage to populate fileStorage. + """ + path: str | None = None + """ + Absolute path exported by the share (e.g. `/public`). + """ + + +class InitProvider(BaseModel): + path: str | None = None + """ + Absolute path exported by the share (e.g. `/public`). + """ + + +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): + fileStorage: str | None = None + """ + UUID of the file storage service. + """ + id: str | None = None + path: str | None = None + """ + Absolute path exported by the share (e.g. `/public`). + """ + + +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 FileStorageShare(BaseModel): + apiVersion: Literal['storage.m.upcloud.com/v1alpha1'] | None = ( + 'storage.m.upcloud.com/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['FileStorageShare'] | None = 'FileStorageShare' + """ + 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 + """ + FileStorageShareSpec defines the desired state of FileStorageShare + """ + status: Status | None = None + """ + FileStorageShareStatus defines the observed state of FileStorageShare. + """ + + +class FileStorageShareList(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[FileStorageShare] + """ + List of filestorageshares. 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/com/upcloud/m/storage/filestorageshareacl/__init__.py b/schemas/python/models/com/upcloud/m/storage/filestorageshareacl/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/storage/filestorageshareacl/v1alpha1.py b/schemas/python/models/com/upcloud/m/storage/filestorageshareacl/v1alpha1.py new file mode 100644 index 000000000..13aed93f8 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/storage/filestorageshareacl/v1alpha1.py @@ -0,0 +1,322 @@ +# generated by datamodel-codegen: +# filename: workdir/storage_m_upcloud_com_v1alpha1_filestorageshareacl.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 FileStorageRef(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 FileStorageSelector(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 ShareNameRef(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 ShareNameSelector(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): + fileStorage: str | None = None + """ + UUID of the file storage service. + """ + fileStorageRef: FileStorageRef | None = None + """ + Reference to a FileStorage in storage to populate fileStorage. + """ + fileStorageSelector: FileStorageSelector | None = None + """ + Selector for a FileStorage in storage to populate fileStorage. + """ + permission: str | None = None + """ + Access level: 'ro' or 'rw'. + """ + shareName: str | None = None + """ + Name of the share. + """ + shareNameRef: ShareNameRef | None = None + """ + Reference to a FileStorageShare in storage to populate shareName. + """ + shareNameSelector: ShareNameSelector | None = None + """ + Selector for a FileStorageShare in storage to populate shareName. + """ + target: str | None = None + """ + Target IP/CIDR or '*'. + """ + + +class InitProvider(BaseModel): + permission: str | None = None + """ + Access level: 'ro' or 'rw'. + """ + target: str | None = None + """ + Target IP/CIDR or '*'. + """ + + +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): + fileStorage: str | None = None + """ + UUID of the file storage service. + """ + id: str | None = None + permission: str | None = None + """ + Access level: 'ro' or 'rw'. + """ + shareName: str | None = None + """ + Name of the share. + """ + target: str | None = None + """ + Target IP/CIDR or '*'. + """ + + +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 FileStorageShareACL(BaseModel): + apiVersion: Literal['storage.m.upcloud.com/v1alpha1'] | None = ( + 'storage.m.upcloud.com/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['FileStorageShareACL'] | None = 'FileStorageShareACL' + """ + 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 + """ + FileStorageShareACLSpec defines the desired state of FileStorageShareACL + """ + status: Status | None = None + """ + FileStorageShareACLStatus defines the observed state of FileStorageShareACL. + """ + + +class FileStorageShareACLList(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[FileStorageShareACL] + """ + List of filestorageshareacls. 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/com/upcloud/m/storage/storagebackup/__init__.py b/schemas/python/models/com/upcloud/m/storage/storagebackup/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/storage/storagebackup/v1alpha1.py b/schemas/python/models/com/upcloud/m/storage/storagebackup/v1alpha1.py new file mode 100644 index 000000000..826fdeb91 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/storage/storagebackup/v1alpha1.py @@ -0,0 +1,330 @@ +# generated by datamodel-codegen: +# filename: workdir/storage_m_upcloud_com_v1alpha1_storagebackup.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 SourceStorageRef(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 SourceStorageSelector(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): + labels: dict[str, str] | None = None + """ + value pairs to classify the storage. + User defined key-value pairs to classify the storage. + """ + sourceStorage: str | None = None + """ + (String) The UUID of the storage to back up. + The UUID of the storage to back up. + """ + sourceStorageRef: SourceStorageRef | None = None + """ + Reference to a Storage in storage to populate sourceStorage. + """ + sourceStorageSelector: SourceStorageSelector | None = None + """ + Selector for a Storage in storage to populate sourceStorage. + """ + title: str | None = None + """ + (String) Title of the backup. + Title of the backup. + """ + + +class InitProvider(BaseModel): + labels: dict[str, str] | None = None + """ + value pairs to classify the storage. + User defined key-value pairs to classify the storage. + """ + sourceStorage: str | None = None + """ + (String) The UUID of the storage to back up. + The UUID of the storage to back up. + """ + sourceStorageRef: SourceStorageRef | None = None + """ + Reference to a Storage in storage to populate sourceStorage. + """ + sourceStorageSelector: SourceStorageSelector | None = None + """ + Selector for a Storage in storage to populate sourceStorage. + """ + title: str | None = None + """ + (String) Title of the backup. + Title of the backup. + """ + + +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): + createdAt: str | None = None + """ + (String) Timestamp of the backup creation. + Timestamp of the backup creation. + """ + encrypt: bool | None = None + """ + (Boolean) Sets if the storage is encrypted at rest. + Sets if the storage is encrypted at rest. + """ + id: str | None = None + """ + (String) ID of the created backup. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the storage. + User defined key-value pairs to classify the storage. + """ + size: float | None = None + """ + (Number) The size of the storage in gigabytes. + The size of the storage in gigabytes. + """ + sourceStorage: str | None = None + """ + (String) The UUID of the storage to back up. + The UUID of the storage to back up. + """ + systemLabels: dict[str, str] | None = None + """ + value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user. + System defined key-value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user. + """ + tier: str | None = None + """ + (String) The tier of the storage. + The tier of the storage. + """ + title: str | None = None + """ + (String) Title of the backup. + Title of the backup. + """ + type: str | None = None + """ + (String) The type of the storage. + The type of the storage. + """ + zone: str | None = None + """ + fra1. + The zone the storage is in, e.g. `de-fra1`. + """ + + +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 StorageBackup(BaseModel): + apiVersion: Literal['storage.m.upcloud.com/v1alpha1'] | None = ( + 'storage.m.upcloud.com/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['StorageBackup'] | None = 'StorageBackup' + """ + 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 + """ + StorageBackupSpec defines the desired state of StorageBackup + """ + status: Status | None = None + """ + StorageBackupStatus defines the observed state of StorageBackup. + """ + + +class StorageBackupList(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[StorageBackup] + """ + List of storagebackups. 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/com/upcloud/m/storage/storagetemplate/__init__.py b/schemas/python/models/com/upcloud/m/storage/storagetemplate/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/storage/storagetemplate/v1alpha1.py b/schemas/python/models/com/upcloud/m/storage/storagetemplate/v1alpha1.py new file mode 100644 index 000000000..71b682e88 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/storage/storagetemplate/v1alpha1.py @@ -0,0 +1,325 @@ +# generated by datamodel-codegen: +# filename: workdir/storage_m_upcloud_com_v1alpha1_storagetemplate.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 SourceStorageRef(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 SourceStorageSelector(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): + labels: dict[str, str] | None = None + """ + value pairs to classify the storage. + User defined key-value pairs to classify the storage. + """ + sourceStorage: str | None = None + """ + (String) The source storage that is used as a base for this storage template. + The source storage that is used as a base for this storage template. + """ + sourceStorageRef: SourceStorageRef | None = None + """ + Reference to a Storage in storage to populate sourceStorage. + """ + sourceStorageSelector: SourceStorageSelector | None = None + """ + Selector for a Storage in storage to populate sourceStorage. + """ + title: str | None = None + """ + (String) The title of the storage. + The title of the storage. + """ + + +class InitProvider(BaseModel): + labels: dict[str, str] | None = None + """ + value pairs to classify the storage. + User defined key-value pairs to classify the storage. + """ + sourceStorage: str | None = None + """ + (String) The source storage that is used as a base for this storage template. + The source storage that is used as a base for this storage template. + """ + sourceStorageRef: SourceStorageRef | None = None + """ + Reference to a Storage in storage to populate sourceStorage. + """ + sourceStorageSelector: SourceStorageSelector | None = None + """ + Selector for a Storage in storage to populate sourceStorage. + """ + title: str | None = None + """ + (String) The title of the storage. + The title of the storage. + """ + + +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): + encrypt: bool | None = None + """ + (Boolean) Sets if the storage is encrypted at rest. + Sets if the storage is encrypted at rest. + """ + id: str | None = None + """ + (String) UUID of the storage. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the storage. + User defined key-value pairs to classify the storage. + """ + size: float | None = None + """ + (Number) The size of the storage in gigabytes. + The size of the storage in gigabytes. + """ + sourceStorage: str | None = None + """ + (String) The source storage that is used as a base for this storage template. + The source storage that is used as a base for this storage template. + """ + systemLabels: dict[str, str] | None = None + """ + value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user. + System defined key-value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user. + """ + tier: str | None = None + """ + (String) The tier of the storage. + The tier of the storage. + """ + title: str | None = None + """ + (String) The title of the storage. + The title of the storage. + """ + type: str | None = None + """ + (String) The type of the storage. + The type of the storage. + """ + zone: str | None = None + """ + fra1. + The zone the storage is in, e.g. `de-fra1`. + """ + + +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 StorageTemplate(BaseModel): + apiVersion: Literal['storage.m.upcloud.com/v1alpha1'] | None = ( + 'storage.m.upcloud.com/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['StorageTemplate'] | None = 'StorageTemplate' + """ + 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 + """ + StorageTemplateSpec defines the desired state of StorageTemplate + """ + status: Status | None = None + """ + StorageTemplateStatus defines the observed state of StorageTemplate. + """ + + +class StorageTemplateList(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[StorageTemplate] + """ + List of storagetemplates. 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/com/upcloud/m/storage/v1alpha1.py b/schemas/python/models/com/upcloud/m/storage/v1alpha1.py new file mode 100644 index 000000000..517871138 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/storage/v1alpha1.py @@ -0,0 +1,441 @@ +# generated by datamodel-codegen: +# filename: workdir/storage_m_upcloud_com_v1alpha1_storage.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.k8s.apimachinery.pkg.apis.meta import v1 + + +class BackupRuleItem(BaseModel): + interval: str | None = None + """ + (String) The weekday when the backup is created + The weekday when the backup is created + """ + retention: float | None = None + """ + (Number) The number of days before a backup is automatically deleted + The number of days before a backup is automatically deleted + """ + time: str | None = None + """ + (String) The time of day (UTC) when the backup is created + The time of day (UTC) when the backup is created + """ + + +class Clone(BaseModel): + id: str | None = None + """ + (String) UUID of the storage. + The unique identifier of the storage/template to clone. + """ + + +class Import(BaseModel): + source: str | None = None + """ + (String) The mode of the import task. One of http_import or direct_upload. + The mode of the import task. One of `http_import` or `direct_upload`. + """ + sourceHash: str | None = None + """ + (String) SHA256 hash of the source content. This hash is used to verify the integrity of the imported data by comparing it to sha256sum after the import has completed. Possible filename is automatically removed from the hash before comparison. + SHA256 hash of the source content. This hash is used to verify the integrity of the imported data by comparing it to `sha256sum` after the import has completed. Possible filename is automatically removed from the hash before comparison. + """ + sourceLocation: str | None = None + """ + Type header of the PUT request is set automatically based on the file extension (.gz or .xz, case-insensitive). + The location of the file to import. For `http_import` an accessible URL. For `direct_upload` a local file. When direct uploading a compressed image, `Content-Type` header of the PUT request is set automatically based on the file extension (`.gz` or `.xz`, case-insensitive). + """ + + +class ForProvider(BaseModel): + backupRule: list[BackupRuleItem] | None = None + """ + (Block List) The criteria to backup the storage. + The criteria to backup the storage. + + Please keep in mind that it's not possible to have a storage with `backup_rule` attached to a server with `simple_backup` specified. Such configurations will throw errors during execution. + """ + clone: Clone | None = None + """ + (Block Set) Block defining another storage/template to clone to storage. (see below for nested schema) + Block defining another storage/template to clone to storage. + """ + deleteAutoresizeBackup: bool | None = None + """ + (Boolean) If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after success. + If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after success. + """ + encrypt: bool | None = None + """ + (Boolean) Sets if the storage is encrypted at rest. + Sets if the storage is encrypted at rest. + """ + filesystemAutoresize: bool | None = None + """ + (Boolean) If set to true, provider will attempt to resize partition and filesystem when the size of the storage changes. Please note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the backup will be used to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless delete_autoresize_backup option is set to true). + Taking and keeping backups incure costs. + If set to true, provider will attempt to resize partition and filesystem when the size of the storage changes. Please note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the backup will be used to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless `delete_autoresize_backup` option is set to true). + Taking and keeping backups incure costs. + """ + import_: Import | None = Field(None, alias='import') + """ + (Block Set) Block defining external data to import to storage (see below for nested schema) + Block defining external data to import to storage + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the storage. + User defined key-value pairs to classify the storage. + """ + size: float | None = None + """ + (Number) The size of the storage in gigabytes. + The size of the storage in gigabytes. + """ + tier: str | None = None + """ + (String) The tier of the storage. + The tier of the storage. + """ + title: str | None = None + """ + (String) The title of the storage. + The title of the storage. + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + The zone the storage is in, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +class InitProvider(BaseModel): + backupRule: list[BackupRuleItem] | None = None + """ + (Block List) The criteria to backup the storage. + The criteria to backup the storage. + + Please keep in mind that it's not possible to have a storage with `backup_rule` attached to a server with `simple_backup` specified. Such configurations will throw errors during execution. + """ + clone: Clone | None = None + """ + (Block Set) Block defining another storage/template to clone to storage. (see below for nested schema) + Block defining another storage/template to clone to storage. + """ + deleteAutoresizeBackup: bool | None = None + """ + (Boolean) If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after success. + If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after success. + """ + encrypt: bool | None = None + """ + (Boolean) Sets if the storage is encrypted at rest. + Sets if the storage is encrypted at rest. + """ + filesystemAutoresize: bool | None = None + """ + (Boolean) If set to true, provider will attempt to resize partition and filesystem when the size of the storage changes. Please note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the backup will be used to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless delete_autoresize_backup option is set to true). + Taking and keeping backups incure costs. + If set to true, provider will attempt to resize partition and filesystem when the size of the storage changes. Please note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the backup will be used to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless `delete_autoresize_backup` option is set to true). + Taking and keeping backups incure costs. + """ + import_: Import | None = Field(None, alias='import') + """ + (Block Set) Block defining external data to import to storage (see below for nested schema) + Block defining external data to import to storage + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the storage. + User defined key-value pairs to classify the storage. + """ + size: float | None = None + """ + (Number) The size of the storage in gigabytes. + The size of the storage in gigabytes. + """ + tier: str | None = None + """ + (String) The tier of the storage. + The tier of the storage. + """ + title: str | None = None + """ + (String) The title of the storage. + The title of the storage. + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + The zone the storage is in, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 ImportModel(BaseModel): + sha256sum: str | None = None + """ + (String) sha256 sum of the imported data + sha256 sum of the imported data + """ + source: str | None = None + """ + (String) The mode of the import task. One of http_import or direct_upload. + The mode of the import task. One of `http_import` or `direct_upload`. + """ + sourceHash: str | None = None + """ + (String) SHA256 hash of the source content. This hash is used to verify the integrity of the imported data by comparing it to sha256sum after the import has completed. Possible filename is automatically removed from the hash before comparison. + SHA256 hash of the source content. This hash is used to verify the integrity of the imported data by comparing it to `sha256sum` after the import has completed. Possible filename is automatically removed from the hash before comparison. + """ + sourceLocation: str | None = None + """ + Type header of the PUT request is set automatically based on the file extension (.gz or .xz, case-insensitive). + The location of the file to import. For `http_import` an accessible URL. For `direct_upload` a local file. When direct uploading a compressed image, `Content-Type` header of the PUT request is set automatically based on the file extension (`.gz` or `.xz`, case-insensitive). + """ + writtenBytes: float | None = None + """ + (Number) Number of bytes imported + Number of bytes imported + """ + + +class AtProvider(BaseModel): + backupRule: list[BackupRuleItem] | None = None + """ + (Block List) The criteria to backup the storage. + The criteria to backup the storage. + + Please keep in mind that it's not possible to have a storage with `backup_rule` attached to a server with `simple_backup` specified. Such configurations will throw errors during execution. + """ + clone: Clone | None = None + """ + (Block Set) Block defining another storage/template to clone to storage. (see below for nested schema) + Block defining another storage/template to clone to storage. + """ + deleteAutoresizeBackup: bool | None = None + """ + (Boolean) If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after success. + If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after success. + """ + encrypt: bool | None = None + """ + (Boolean) Sets if the storage is encrypted at rest. + Sets if the storage is encrypted at rest. + """ + filesystemAutoresize: bool | None = None + """ + (Boolean) If set to true, provider will attempt to resize partition and filesystem when the size of the storage changes. Please note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the backup will be used to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless delete_autoresize_backup option is set to true). + Taking and keeping backups incure costs. + If set to true, provider will attempt to resize partition and filesystem when the size of the storage changes. Please note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the backup will be used to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless `delete_autoresize_backup` option is set to true). + Taking and keeping backups incure costs. + """ + id: str | None = None + """ + (String) UUID of the storage. + """ + import_: ImportModel | None = Field(None, alias='import') + """ + (Block Set) Block defining external data to import to storage (see below for nested schema) + Block defining external data to import to storage + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the storage. + User defined key-value pairs to classify the storage. + """ + size: float | None = None + """ + (Number) The size of the storage in gigabytes. + The size of the storage in gigabytes. + """ + systemLabels: dict[str, str] | None = None + """ + value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user. + System defined key-value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user. + """ + tier: str | None = None + """ + (String) The tier of the storage. + The tier of the storage. + """ + title: str | None = None + """ + (String) The title of the storage. + The title of the storage. + """ + type: str | None = None + """ + (String) The type of the storage. + The type of the storage. + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + The zone the storage is in, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 Storage(BaseModel): + apiVersion: Literal['storage.m.upcloud.com/v1alpha1'] | None = ( + 'storage.m.upcloud.com/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['Storage'] | None = 'Storage' + """ + 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 + """ + StorageSpec defines the desired state of Storage + """ + status: Status | None = None + """ + StorageStatus defines the observed state of Storage. + """ + + +class StorageList(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[Storage] + """ + List of storages. 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/com/upcloud/m/uks/__init__.py b/schemas/python/models/com/upcloud/m/uks/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/uks/kubernetescluster/__init__.py b/schemas/python/models/com/upcloud/m/uks/kubernetescluster/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/uks/kubernetescluster/v1alpha1.py b/schemas/python/models/com/upcloud/m/uks/kubernetescluster/v1alpha1.py new file mode 100644 index 000000000..ed9aa7d60 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/uks/kubernetescluster/v1alpha1.py @@ -0,0 +1,458 @@ +# generated by datamodel-codegen: +# filename: workdir/uks_m_upcloud_com_v1alpha1_kubernetescluster.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.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 NetworkRef(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 NetworkSelector(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): + controlPlaneIpFilter: list[str] | None = None + """ + (Set of String) IP addresses or IP ranges in CIDR format which are allowed to access the cluster control plane. To allow access from any source, use ["0.0.0.0/0"]. To deny access from all sources, use []. Values set here do not restrict access to node groups or exposed Kubernetes services. + IP addresses or IP ranges in CIDR format which are allowed to access the cluster control plane. To allow access from any source, use `["0.0.0.0/0"]`. To deny access from all sources, use `[]`. Values set here do not restrict access to node groups or exposed Kubernetes services. + """ + fetchKubeconfig: bool | None = None + """ + (Boolean) Fetch the cluster kubeconfig and connection details into the kubeconfig attribute. Consider using the upcloud_kubernetes_cluster ephemeral resource instead to keep the credentials out of the state. Defaults to false. + Fetch the cluster kubeconfig and connection details into the `kubeconfig` attribute. Consider using the `upcloud_kubernetes_cluster` ephemeral resource instead to keep the credentials out of the state. Defaults to `false`. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the cluster. + User defined key-value pairs to classify the cluster. + """ + name: str | None = None + """ + (String) Cluster name. Needs to be unique within the account. + Cluster name. Needs to be unique within the account. + """ + network: str | None = None + """ + (String) Network ID for the cluster to run in. + Network ID for the cluster to run in. + """ + networkRef: NetworkRef | None = None + """ + Reference to a Network in network to populate network. + """ + networkSelector: NetworkSelector | None = None + """ + Selector for a Network in network to populate network. + """ + plan: str | None = None + """ + (String) The pricing plan used for the cluster. You can list available plans with upctl kubernetes plans. + The pricing plan used for the cluster. You can list available plans with `upctl kubernetes plans`. + """ + privateNodeGroups: bool | None = None + """ + (Boolean) Enable private node groups. Private node groups requires a network that is routed through NAT gateway. + Enable private node groups. Private node groups requires a network that is routed through NAT gateway. + """ + storageEncryption: str | None = None + """ + at-rest and none. + Set default storage encryption strategy for all nodes in the cluster. Valid values are `data-at-rest` and `none`. + """ + upgradeStrategyType: str | None = None + """ + groups to update them. + The upgrade strategy to use when changing the cluster `version`. If not set, `manual` strategy will be used by default. When using `manual` strategy, you must replace the existing node-groups to update them. + """ + version: str | None = None + """ + (String) Kubernetes version ID, e.g. 1.31. You can list available version IDs with upctl kubernetes versions. + Kubernetes version ID, e.g. `1.31`. You can list available version IDs with `upctl kubernetes versions`. + + Note that when changing the cluster version, `upgrade_strategy` will be taken into account. + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone in which the Kubernetes cluster will be hosted, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +class InitProvider(BaseModel): + controlPlaneIpFilter: list[str] | None = None + """ + (Set of String) IP addresses or IP ranges in CIDR format which are allowed to access the cluster control plane. To allow access from any source, use ["0.0.0.0/0"]. To deny access from all sources, use []. Values set here do not restrict access to node groups or exposed Kubernetes services. + IP addresses or IP ranges in CIDR format which are allowed to access the cluster control plane. To allow access from any source, use `["0.0.0.0/0"]`. To deny access from all sources, use `[]`. Values set here do not restrict access to node groups or exposed Kubernetes services. + """ + fetchKubeconfig: bool | None = None + """ + (Boolean) Fetch the cluster kubeconfig and connection details into the kubeconfig attribute. Consider using the upcloud_kubernetes_cluster ephemeral resource instead to keep the credentials out of the state. Defaults to false. + Fetch the cluster kubeconfig and connection details into the `kubeconfig` attribute. Consider using the `upcloud_kubernetes_cluster` ephemeral resource instead to keep the credentials out of the state. Defaults to `false`. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the cluster. + User defined key-value pairs to classify the cluster. + """ + name: str | None = None + """ + (String) Cluster name. Needs to be unique within the account. + Cluster name. Needs to be unique within the account. + """ + network: str | None = None + """ + (String) Network ID for the cluster to run in. + Network ID for the cluster to run in. + """ + networkRef: NetworkRef | None = None + """ + Reference to a Network in network to populate network. + """ + networkSelector: NetworkSelector | None = None + """ + Selector for a Network in network to populate network. + """ + plan: str | None = None + """ + (String) The pricing plan used for the cluster. You can list available plans with upctl kubernetes plans. + The pricing plan used for the cluster. You can list available plans with `upctl kubernetes plans`. + """ + privateNodeGroups: bool | None = None + """ + (Boolean) Enable private node groups. Private node groups requires a network that is routed through NAT gateway. + Enable private node groups. Private node groups requires a network that is routed through NAT gateway. + """ + storageEncryption: str | None = None + """ + at-rest and none. + Set default storage encryption strategy for all nodes in the cluster. Valid values are `data-at-rest` and `none`. + """ + upgradeStrategyType: str | None = None + """ + groups to update them. + The upgrade strategy to use when changing the cluster `version`. If not set, `manual` strategy will be used by default. When using `manual` strategy, you must replace the existing node-groups to update them. + """ + version: str | None = None + """ + (String) Kubernetes version ID, e.g. 1.31. You can list available version IDs with upctl kubernetes versions. + Kubernetes version ID, e.g. `1.31`. You can list available version IDs with `upctl kubernetes versions`. + + Note that when changing the cluster version, `upgrade_strategy` will be taken into account. + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone in which the Kubernetes cluster will be hosted, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 Kubeconfig(BaseModel): + clientCertificate: str | None = None + """ + (String) TLS authentication client certificate, encoded (PEM). + TLS authentication client certificate, encoded (PEM). + """ + clusterCaCertificate: str | None = None + """ + (String) TLS authentication root certificate bundle, encoded (PEM). + TLS authentication root certificate bundle, encoded (PEM). + """ + host: str | None = None + """ + (String) Hostname of the cluster API. Defined as URI. + Hostname of the cluster API. Defined as URI. + """ + + +class AtProvider(BaseModel): + controlPlaneIpFilter: list[str] | None = None + """ + (Set of String) IP addresses or IP ranges in CIDR format which are allowed to access the cluster control plane. To allow access from any source, use ["0.0.0.0/0"]. To deny access from all sources, use []. Values set here do not restrict access to node groups or exposed Kubernetes services. + IP addresses or IP ranges in CIDR format which are allowed to access the cluster control plane. To allow access from any source, use `["0.0.0.0/0"]`. To deny access from all sources, use `[]`. Values set here do not restrict access to node groups or exposed Kubernetes services. + """ + fetchKubeconfig: bool | None = None + """ + (Boolean) Fetch the cluster kubeconfig and connection details into the kubeconfig attribute. Consider using the upcloud_kubernetes_cluster ephemeral resource instead to keep the credentials out of the state. Defaults to false. + Fetch the cluster kubeconfig and connection details into the `kubeconfig` attribute. Consider using the `upcloud_kubernetes_cluster` ephemeral resource instead to keep the credentials out of the state. Defaults to `false`. + """ + id: str | None = None + """ + (String) UUID of the cluster. + """ + kubeconfig: Kubeconfig | None = None + """ + (Attributes) Cluster kubeconfig and connection details. Set only when fetch_kubeconfig is true. (see below for nested schema) + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the cluster. + User defined key-value pairs to classify the cluster. + """ + name: str | None = None + """ + (String) Cluster name. Needs to be unique within the account. + Cluster name. Needs to be unique within the account. + """ + network: str | None = None + """ + (String) Network ID for the cluster to run in. + Network ID for the cluster to run in. + """ + networkCidr: str | None = None + """ + (String) Network CIDR for the given network. Computed automatically. + Network CIDR for the given network. Computed automatically. + """ + nodeGroups: list[str] | None = None + """ + (List of String) Names of the node groups configured to cluster + Names of the node groups configured to cluster + """ + plan: str | None = None + """ + (String) The pricing plan used for the cluster. You can list available plans with upctl kubernetes plans. + The pricing plan used for the cluster. You can list available plans with `upctl kubernetes plans`. + """ + privateNodeGroups: bool | None = None + """ + (Boolean) Enable private node groups. Private node groups requires a network that is routed through NAT gateway. + Enable private node groups. Private node groups requires a network that is routed through NAT gateway. + """ + state: str | None = None + """ + (String) Operational state of the cluster. + Operational state of the cluster. + """ + storageEncryption: str | None = None + """ + at-rest and none. + Set default storage encryption strategy for all nodes in the cluster. Valid values are `data-at-rest` and `none`. + """ + upgradeStrategyType: str | None = None + """ + groups to update them. + The upgrade strategy to use when changing the cluster `version`. If not set, `manual` strategy will be used by default. When using `manual` strategy, you must replace the existing node-groups to update them. + """ + version: str | None = None + """ + (String) Kubernetes version ID, e.g. 1.31. You can list available version IDs with upctl kubernetes versions. + Kubernetes version ID, e.g. `1.31`. You can list available version IDs with `upctl kubernetes versions`. + + Note that when changing the cluster version, `upgrade_strategy` will be taken into account. + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone in which the Kubernetes cluster will be hosted, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 KubernetesCluster(BaseModel): + apiVersion: Literal['uks.m.upcloud.com/v1alpha1'] | None = ( + 'uks.m.upcloud.com/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['KubernetesCluster'] | None = 'KubernetesCluster' + """ + 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 + """ + KubernetesClusterSpec defines the desired state of KubernetesCluster + """ + status: Status | None = None + """ + KubernetesClusterStatus defines the observed state of KubernetesCluster. + """ + + +class KubernetesClusterList(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[KubernetesCluster] + """ + List of kubernetesclusters. 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/com/upcloud/m/uks/kubernetesnodegroup/__init__.py b/schemas/python/models/com/upcloud/m/uks/kubernetesnodegroup/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/m/uks/kubernetesnodegroup/v1alpha1.py b/schemas/python/models/com/upcloud/m/uks/kubernetesnodegroup/v1alpha1.py new file mode 100644 index 000000000..24b112e18 --- /dev/null +++ b/schemas/python/models/com/upcloud/m/uks/kubernetesnodegroup/v1alpha1.py @@ -0,0 +1,518 @@ +# generated by datamodel-codegen: +# filename: workdir/uks_m_upcloud_com_v1alpha1_kubernetesnodegroup.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ......io.k8s.apimachinery.pkg.apis.meta import v1 + + +class CloudNativePlan(BaseModel): + storageSize: float | None = None + """ + (Number) The size of the storage device in gigabytes. + The size of the storage device in gigabytes. + """ + storageTier: str | None = None + """ + (String) The storage tier to use. + The storage tier to use. + """ + + +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 ClusterRef(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 ClusterSelector(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 CustomPlan(BaseModel): + cores: float | None = None + """ + (Number) The number of CPU cores dedicated to individual node group nodes. + The number of CPU cores dedicated to individual node group nodes. + """ + memory: float | None = None + """ + (Number) The amount of memory in megabytes to assign to individual node group node. Value needs to be divisible by 1024. + The amount of memory in megabytes to assign to individual node group node. Value needs to be divisible by 1024. + """ + storageSize: float | None = None + """ + (Number) The size of the storage device in gigabytes. + The size of the storage device in gigabytes. + """ + storageTier: str | None = None + """ + (String) The storage tier to use. + The storage tier to use. + """ + + +class GpuPlan(BaseModel): + storageSize: float | None = None + """ + (Number) The size of the storage device in gigabytes. + The size of the storage device in gigabytes. + """ + storageTier: str | None = None + """ + (String) The storage tier to use. + The storage tier to use. + """ + + +class KubeletArg(BaseModel): + key: str | None = None + """ + (String) Kubelet argument key. + Kubelet argument key. + """ + value: str | None = None + """ + (String) Kubelet argument value. + Kubelet argument value. + """ + + +class TaintItem(BaseModel): + effect: str | None = None + """ + (String) Taint effect. + Taint effect. + """ + key: str | None = None + """ + (String) Kubelet argument key. + Taint key. + """ + value: str | None = None + """ + (String) Kubelet argument value. + Taint value. + """ + + +class ForProvider(BaseModel): + antiAffinity: bool | None = None + """ + affinity policy is considered 'best effort' and enabling it does not fully guarantee that the nodes will end up on different hardware. + If set to true, nodes in this group will be placed on separate compute hosts. Please note that anti-affinity policy is considered 'best effort' and enabling it does not fully guarantee that the nodes will end up on different hardware. + """ + cloudNativePlan: CloudNativePlan | None = None + """ + (Block List) Resource properties for Cloud Native plan storage configuration. This block is optional for Cloud Native plans. (see below for nested schema) + Resource properties for Cloud Native plan storage configuration. This block is optional for Cloud Native plans. + """ + cluster: str | None = None + """ + (String) UUID of the cluster. + UUID of the cluster. + """ + clusterRef: ClusterRef | None = None + """ + Reference to a KubernetesCluster in uks to populate cluster. + """ + clusterSelector: ClusterSelector | None = None + """ + Selector for a KubernetesCluster in uks to populate cluster. + """ + customPlan: CustomPlan | None = None + """ + (Block List) Resource properties for custom plan. This block is required for custom plans only. (see below for nested schema) + Resource properties for custom plan. This block is required for `custom` plans only. + """ + gpuPlan: GpuPlan | None = None + """ + (Block List) Resource properties for GPU plan storage configuration. This block is optional for GPU plans. (see below for nested schema) + Resource properties for GPU plan storage configuration. This block is optional for GPU plans. + """ + kubeletArgs: list[KubeletArg] | None = None + """ + -. The API will prefix the arguments with -- when preparing kubelet call. + Additional arguments for kubelet for the nodes in this group. Configure the arguments without leading `--`. The API will prefix the arguments with `--` when preparing kubelet call. + + Note that these arguments will be passed directly to kubelet CLI on each worker node without any validation. Passing invalid arguments can break your whole cluster. Be extra careful when adding kubelet args. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the node_group. + User defined key-value pairs to classify the node_group. + """ + nodeCount: float | None = None + """ + (Number) Amount of nodes to provision in the node group. + Amount of nodes to provision in the node group. + """ + plan: str | None = None + """ + (String) The server plan used for the node group. You can list available plans with upctl server plans + The server plan used for the node group. You can list available plans with `upctl server plans` + """ + sshKeys: list[str] | None = None + """ + (Set of String) You can optionally select SSH keys to be added as authorized keys to the nodes in this node group. This allows you to connect to the nodes via SSH once they are running. + You can optionally select SSH keys to be added as authorized keys to the nodes in this node group. This allows you to connect to the nodes via SSH once they are running. + """ + storageEncryption: str | None = None + """ + at-rest and none. + The storage encryption strategy to use for the nodes in this group. If not set, the cluster's storage encryption strategy will be used, if applicable. Valid values are `data-at-rest` and `none`. + """ + taint: list[TaintItem] | None = None + """ + (Block Set) Taints for the nodes in this group. (see below for nested schema) + Taints for the nodes in this group. + """ + utilityNetworkAccess: bool | None = None + """ + (Boolean) If set to false, nodes in this group will not have access to utility network. + If set to false, nodes in this group will not have access to utility network. + """ + + +class InitProvider(BaseModel): + antiAffinity: bool | None = None + """ + affinity policy is considered 'best effort' and enabling it does not fully guarantee that the nodes will end up on different hardware. + If set to true, nodes in this group will be placed on separate compute hosts. Please note that anti-affinity policy is considered 'best effort' and enabling it does not fully guarantee that the nodes will end up on different hardware. + """ + cloudNativePlan: CloudNativePlan | None = None + """ + (Block List) Resource properties for Cloud Native plan storage configuration. This block is optional for Cloud Native plans. (see below for nested schema) + Resource properties for Cloud Native plan storage configuration. This block is optional for Cloud Native plans. + """ + customPlan: CustomPlan | None = None + """ + (Block List) Resource properties for custom plan. This block is required for custom plans only. (see below for nested schema) + Resource properties for custom plan. This block is required for `custom` plans only. + """ + gpuPlan: GpuPlan | None = None + """ + (Block List) Resource properties for GPU plan storage configuration. This block is optional for GPU plans. (see below for nested schema) + Resource properties for GPU plan storage configuration. This block is optional for GPU plans. + """ + kubeletArgs: list[KubeletArg] | None = None + """ + -. The API will prefix the arguments with -- when preparing kubelet call. + Additional arguments for kubelet for the nodes in this group. Configure the arguments without leading `--`. The API will prefix the arguments with `--` when preparing kubelet call. + + Note that these arguments will be passed directly to kubelet CLI on each worker node without any validation. Passing invalid arguments can break your whole cluster. Be extra careful when adding kubelet args. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the node_group. + User defined key-value pairs to classify the node_group. + """ + nodeCount: float | None = None + """ + (Number) Amount of nodes to provision in the node group. + Amount of nodes to provision in the node group. + """ + plan: str | None = None + """ + (String) The server plan used for the node group. You can list available plans with upctl server plans + The server plan used for the node group. You can list available plans with `upctl server plans` + """ + sshKeys: list[str] | None = None + """ + (Set of String) You can optionally select SSH keys to be added as authorized keys to the nodes in this node group. This allows you to connect to the nodes via SSH once they are running. + You can optionally select SSH keys to be added as authorized keys to the nodes in this node group. This allows you to connect to the nodes via SSH once they are running. + """ + storageEncryption: str | None = None + """ + at-rest and none. + The storage encryption strategy to use for the nodes in this group. If not set, the cluster's storage encryption strategy will be used, if applicable. Valid values are `data-at-rest` and `none`. + """ + taint: list[TaintItem] | None = None + """ + (Block Set) Taints for the nodes in this group. (see below for nested schema) + Taints for the nodes in this group. + """ + utilityNetworkAccess: bool | None = None + """ + (Boolean) If set to false, nodes in this group will not have access to utility network. + If set to false, nodes in this group will not have access to utility network. + """ + + +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): + antiAffinity: bool | None = None + """ + affinity policy is considered 'best effort' and enabling it does not fully guarantee that the nodes will end up on different hardware. + If set to true, nodes in this group will be placed on separate compute hosts. Please note that anti-affinity policy is considered 'best effort' and enabling it does not fully guarantee that the nodes will end up on different hardware. + """ + cloudNativePlan: CloudNativePlan | None = None + """ + (Block List) Resource properties for Cloud Native plan storage configuration. This block is optional for Cloud Native plans. (see below for nested schema) + Resource properties for Cloud Native plan storage configuration. This block is optional for Cloud Native plans. + """ + cluster: str | None = None + """ + (String) UUID of the cluster. + UUID of the cluster. + """ + customPlan: CustomPlan | None = None + """ + (Block List) Resource properties for custom plan. This block is required for custom plans only. (see below for nested schema) + Resource properties for custom plan. This block is required for `custom` plans only. + """ + gpuPlan: GpuPlan | None = None + """ + (Block List) Resource properties for GPU plan storage configuration. This block is optional for GPU plans. (see below for nested schema) + Resource properties for GPU plan storage configuration. This block is optional for GPU plans. + """ + id: str | None = None + """ + (String) Computed ID of the node group. This is a combination of the cluster UUID and the node group name, separated with a /. + """ + kubeletArgs: list[KubeletArg] | None = None + """ + -. The API will prefix the arguments with -- when preparing kubelet call. + Additional arguments for kubelet for the nodes in this group. Configure the arguments without leading `--`. The API will prefix the arguments with `--` when preparing kubelet call. + + Note that these arguments will be passed directly to kubelet CLI on each worker node without any validation. Passing invalid arguments can break your whole cluster. Be extra careful when adding kubelet args. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the node_group. + User defined key-value pairs to classify the node_group. + """ + nodeCount: float | None = None + """ + (Number) Amount of nodes to provision in the node group. + Amount of nodes to provision in the node group. + """ + plan: str | None = None + """ + (String) The server plan used for the node group. You can list available plans with upctl server plans + The server plan used for the node group. You can list available plans with `upctl server plans` + """ + sshKeys: list[str] | None = None + """ + (Set of String) You can optionally select SSH keys to be added as authorized keys to the nodes in this node group. This allows you to connect to the nodes via SSH once they are running. + You can optionally select SSH keys to be added as authorized keys to the nodes in this node group. This allows you to connect to the nodes via SSH once they are running. + """ + storageEncryption: str | None = None + """ + at-rest and none. + The storage encryption strategy to use for the nodes in this group. If not set, the cluster's storage encryption strategy will be used, if applicable. Valid values are `data-at-rest` and `none`. + """ + taint: list[TaintItem] | None = None + """ + (Block Set) Taints for the nodes in this group. (see below for nested schema) + Taints for the nodes in this group. + """ + utilityNetworkAccess: bool | None = None + """ + (Boolean) If set to false, nodes in this group will not have access to utility network. + If set to false, nodes in this group will not have access to utility network. + """ + + +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 KubernetesNodeGroup(BaseModel): + apiVersion: Literal['uks.m.upcloud.com/v1alpha1'] | None = ( + 'uks.m.upcloud.com/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['KubernetesNodeGroup'] | None = 'KubernetesNodeGroup' + """ + 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 + """ + KubernetesNodeGroupSpec defines the desired state of KubernetesNodeGroup + """ + status: Status | None = None + """ + KubernetesNodeGroupStatus defines the observed state of KubernetesNodeGroup. + """ + + +class KubernetesNodeGroupList(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[KubernetesNodeGroup] + """ + List of kubernetesnodegroups. 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/com/upcloud/network/__init__.py b/schemas/python/models/com/upcloud/network/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/network/firewallruleset/__init__.py b/schemas/python/models/com/upcloud/network/firewallruleset/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/network/firewallruleset/v1alpha1.py b/schemas/python/models/com/upcloud/network/firewallruleset/v1alpha1.py new file mode 100644 index 000000000..ad367a030 --- /dev/null +++ b/schemas/python/models/com/upcloud/network/firewallruleset/v1alpha1.py @@ -0,0 +1,500 @@ +# generated by datamodel-codegen: +# filename: workdir/network_upcloud_com_v1alpha1_firewallruleset.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.k8s.apimachinery.pkg.apis.meta import v1 + + +class Rule(BaseModel): + action: str | None = None + """ + (String) Rule action. + Rule action. + """ + comment: str | None = None + """ + (String) Rule comment. + Rule comment. + """ + destinationAddressCidr: str | None = None + """ + (String) Destination CIDR block. + Destination CIDR block. + """ + destinationAddressEnd: str | None = None + """ + (String) End of destination IP address range. + End of destination IP address range. + """ + destinationAddressStart: str | None = None + """ + (String) Start of destination IP address range. + Start of destination IP address range. + """ + destinationPortEnd: float | None = None + """ + (Number) End of destination port range. + End of destination port range. + """ + destinationPortStart: float | None = None + """ + (Number) Start of destination port range. + Start of destination port range. + """ + direction: str | None = None + """ + (String) Traffic direction the rule applies to. + Traffic direction the rule applies to. + """ + enabled: bool | None = None + """ + (Boolean) Whether the ruleset is enabled. + Whether the rule is enabled. + """ + family: str | None = None + """ + (String) Address family. + Address family. + """ + icmpType: float | None = None + """ + (Number) ICMP type number. + ICMP type number. + """ + protocol: str | None = None + """ + (String) IP protocol. + IP protocol. + """ + sourceAddressCidr: str | None = None + """ + (String) Source CIDR block. + Source CIDR block. + """ + sourceAddressEnd: str | None = None + """ + (String) End of source IP address range. + End of source IP address range. + """ + sourceAddressStart: str | None = None + """ + (String) Start of source IP address range. + Start of source IP address range. + """ + sourcePortEnd: float | None = None + """ + (Number) End of source port range. + End of source port range. + """ + sourcePortStart: float | None = None + """ + (Number) Start of source port range. + Start of source port range. + """ + + +class ForProvider(BaseModel): + defaultDnsRulesEnabled: bool | None = None + """ + (Boolean) Whether default DNS rules are enabled. + Whether default DNS rules are enabled. + """ + description: str | None = None + """ + (String) Description of the firewall ruleset. + Description of the firewall ruleset. + """ + enabled: bool | None = None + """ + (Boolean) Whether the ruleset is enabled. + Whether the ruleset is enabled. + """ + labels: dict[str, str] | None = None + """ + (Map of String) Ruleset labels as key/value pairs. + Ruleset labels as key/value pairs. + """ + name: str | None = None + """ + (String) Name of the firewall ruleset. + Name of the firewall ruleset. + """ + rules: list[Rule] | None = None + """ + based index assigned by the API and cannot be configured. (see below for nested schema) + """ + + +class InitProvider(BaseModel): + defaultDnsRulesEnabled: bool | None = None + """ + (Boolean) Whether default DNS rules are enabled. + Whether default DNS rules are enabled. + """ + description: str | None = None + """ + (String) Description of the firewall ruleset. + Description of the firewall ruleset. + """ + enabled: bool | None = None + """ + (Boolean) Whether the ruleset is enabled. + Whether the ruleset is enabled. + """ + labels: dict[str, str] | None = None + """ + (Map of String) Ruleset labels as key/value pairs. + Ruleset labels as key/value pairs. + """ + name: str | None = None + """ + (String) Name of the firewall ruleset. + Name of the firewall ruleset. + """ + rules: list[Rule] | None = None + """ + based index assigned by the API and cannot be configured. (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 RuleModel(BaseModel): + action: str | None = None + """ + (String) Rule action. + Rule action. + """ + comment: str | None = None + """ + (String) Rule comment. + Rule comment. + """ + destinationAddressCidr: str | None = None + """ + (String) Destination CIDR block. + Destination CIDR block. + """ + destinationAddressEnd: str | None = None + """ + (String) End of destination IP address range. + End of destination IP address range. + """ + destinationAddressStart: str | None = None + """ + (String) Start of destination IP address range. + Start of destination IP address range. + """ + destinationPortEnd: float | None = None + """ + (Number) End of destination port range. + End of destination port range. + """ + destinationPortStart: float | None = None + """ + (Number) Start of destination port range. + Start of destination port range. + """ + direction: str | None = None + """ + (String) Traffic direction the rule applies to. + Traffic direction the rule applies to. + """ + enabled: bool | None = None + """ + (Boolean) Whether the ruleset is enabled. + Whether the rule is enabled. + """ + family: str | None = None + """ + (String) Address family. + Address family. + """ + icmpType: float | None = None + """ + (Number) ICMP type number. + ICMP type number. + """ + position: float | None = None + """ + based). Computed from the rule's index in the list. + Rule position (1-based). Computed from the rule's index in the list. + """ + protocol: str | None = None + """ + (String) IP protocol. + IP protocol. + """ + sourceAddressCidr: str | None = None + """ + (String) Source CIDR block. + Source CIDR block. + """ + sourceAddressEnd: str | None = None + """ + (String) End of source IP address range. + End of source IP address range. + """ + sourceAddressStart: str | None = None + """ + (String) Start of source IP address range. + Start of source IP address range. + """ + sourcePortEnd: float | None = None + """ + (Number) End of source port range. + End of source port range. + """ + sourcePortStart: float | None = None + """ + (Number) Start of source port range. + Start of source port range. + """ + + +class AtProvider(BaseModel): + createdAt: str | None = None + """ + (String) Creation timestamp. + Creation timestamp. + """ + defaultDnsRulesEnabled: bool | None = None + """ + (Boolean) Whether default DNS rules are enabled. + Whether default DNS rules are enabled. + """ + description: str | None = None + """ + (String) Description of the firewall ruleset. + Description of the firewall ruleset. + """ + enabled: bool | None = None + """ + (Boolean) Whether the ruleset is enabled. + Whether the ruleset is enabled. + """ + id: str | None = None + """ + (String) Firewall ruleset UUID. + """ + labels: dict[str, str] | None = None + """ + (Map of String) Ruleset labels as key/value pairs. + Ruleset labels as key/value pairs. + """ + name: str | None = None + """ + (String) Name of the firewall ruleset. + Name of the firewall ruleset. + """ + rules: list[RuleModel] | None = None + """ + based index assigned by the API and cannot be configured. (see below for nested schema) + """ + updatedAt: str | None = None + """ + (String) Last update timestamp. + Last update timestamp. + """ + version: float | None = None + """ + (Number) Ruleset version. + Ruleset version. + """ + + +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 FirewallRuleset(BaseModel): + apiVersion: Literal['network.upcloud.com/v1alpha1'] | None = ( + 'network.upcloud.com/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['FirewallRuleset'] | None = 'FirewallRuleset' + """ + 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 + """ + FirewallRulesetSpec defines the desired state of FirewallRuleset + """ + status: Status | None = None + """ + FirewallRulesetStatus defines the observed state of FirewallRuleset. + """ + + +class FirewallRulesetList(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[FirewallRuleset] + """ + List of firewallrulesets. 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/com/upcloud/network/floatingipaddress/__init__.py b/schemas/python/models/com/upcloud/network/floatingipaddress/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/network/floatingipaddress/v1alpha1.py b/schemas/python/models/com/upcloud/network/floatingipaddress/v1alpha1.py new file mode 100644 index 000000000..e5d3774ea --- /dev/null +++ b/schemas/python/models/com/upcloud/network/floatingipaddress/v1alpha1.py @@ -0,0 +1,340 @@ +# generated by datamodel-codegen: +# filename: workdir/network_upcloud_com_v1alpha1_floatingipaddress.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 MacAddressRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class MacAddressSelector(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): + access: str | None = None + """ + (String) Network access for the floating IP address. Supported value: public. + Network access for the floating IP address. Supported value: `public`. + """ + family: str | None = None + """ + (String) The address family of the floating IP address. + The address family of the floating IP address. + """ + macAddress: str | None = None + """ + (String) MAC address of a server interface to assign address to. + MAC address of a server interface to assign address to. + """ + macAddressRef: MacAddressRef | None = None + """ + Reference to a Server in server to populate macAddress. + """ + macAddressSelector: MacAddressSelector | None = None + """ + Selector for a Server in server to populate macAddress. + """ + releasePolicy: str | None = None + """ + (String) The release policy of the floating IP address. + The release policy of the floating IP address. + """ + zone: str | None = None + """ + fra1. Required when assigning a detached floating IP address. You can list available zones with upctl zone list. + Zone of the address, e.g. `de-fra1`. Required when assigning a detached floating IP address. You can list available zones with `upctl zone list`. + """ + + +class InitProvider(BaseModel): + access: str | None = None + """ + (String) Network access for the floating IP address. Supported value: public. + Network access for the floating IP address. Supported value: `public`. + """ + family: str | None = None + """ + (String) The address family of the floating IP address. + The address family of the floating IP address. + """ + macAddress: str | None = None + """ + (String) MAC address of a server interface to assign address to. + MAC address of a server interface to assign address to. + """ + macAddressRef: MacAddressRef | None = None + """ + Reference to a Server in server to populate macAddress. + """ + macAddressSelector: MacAddressSelector | None = None + """ + Selector for a Server in server to populate macAddress. + """ + releasePolicy: str | None = None + """ + (String) The release policy of the floating IP address. + The release policy of the floating IP address. + """ + zone: str | None = None + """ + fra1. Required when assigning a detached floating IP address. You can list available zones with upctl zone list. + Zone of the address, e.g. `de-fra1`. Required when assigning a detached floating IP address. You can list available zones with `upctl zone list`. + """ + + +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): + access: str | None = None + """ + (String) Network access for the floating IP address. Supported value: public. + Network access for the floating IP address. Supported value: `public`. + """ + family: str | None = None + """ + (String) The address family of the floating IP address. + The address family of the floating IP address. + """ + id: str | None = None + """ + (String) Identifier of the floating IP address. Contains the same value as ip_address. + """ + ipAddress: str | None = None + """ + (String) An UpCloud assigned IP Address. + An UpCloud assigned IP Address. + """ + macAddress: str | None = None + """ + (String) MAC address of a server interface to assign address to. + MAC address of a server interface to assign address to. + """ + releasePolicy: str | None = None + """ + (String) The release policy of the floating IP address. + The release policy of the floating IP address. + """ + zone: str | None = None + """ + fra1. Required when assigning a detached floating IP address. You can list available zones with upctl zone list. + Zone of the address, e.g. `de-fra1`. Required when assigning a detached floating IP address. You can list available zones with `upctl zone list`. + """ + + +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 FloatingIPAddress(BaseModel): + apiVersion: Literal['network.upcloud.com/v1alpha1'] | None = ( + 'network.upcloud.com/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['FloatingIPAddress'] | None = 'FloatingIPAddress' + """ + 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 + """ + FloatingIPAddressSpec defines the desired state of FloatingIPAddress + """ + status: Status | None = None + """ + FloatingIPAddressStatus defines the observed state of FloatingIPAddress. + """ + + +class FloatingIPAddressList(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[FloatingIPAddress] + """ + List of floatingipaddresses. 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/com/upcloud/network/gateway/__init__.py b/schemas/python/models/com/upcloud/network/gateway/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/network/gateway/v1alpha1.py b/schemas/python/models/com/upcloud/network/gateway/v1alpha1.py new file mode 100644 index 000000000..2f34a1817 --- /dev/null +++ b/schemas/python/models/com/upcloud/network/gateway/v1alpha1.py @@ -0,0 +1,436 @@ +# generated by datamodel-codegen: +# filename: workdir/network_upcloud_com_v1alpha1_gateway.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.k8s.apimachinery.pkg.apis.meta import v1 + + +class Address(BaseModel): + name: str | None = None + """ + (String) Gateway name. Needs to be unique within the account. + Name of the IP address. + """ + + +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 IdRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class IdSelector(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 Router(BaseModel): + id: str | None = None + """ + (String) Gateway UUID. + ID of the router attached to the gateway. + """ + idRef: IdRef | None = None + """ + Reference to a Router in network to populate id. + """ + idSelector: IdSelector | None = None + """ + Selector for a Router in network to populate id. + """ + + +class ForProvider(BaseModel): + address: Address | None = None + """ + (Block Set) IP addresses assigned to the gateway. (see below for nested schema) + IP addresses assigned to the gateway. + """ + configuredStatus: str | None = None + """ + (String) The service configured status indicates the service's current intended status. Managed by the customer. + The service configured status indicates the service's current intended status. Managed by the customer. + """ + features: list[str] | None = None + """ + (Set of String) Features enabled for the gateway. Valid item values are nat and vpn. For more details, see documentation on NAT and VPN gateways. + Features enabled for the gateway. Valid item values are `nat` and `vpn`. For more details, see documentation on [NAT](https://upcloud.com/docs/products/nat-gateway/) and [VPN](https://upcloud.com/docs/products/vpn-gateway/) gateways. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the gateway. + User defined key-value pairs to classify the gateway. + """ + name: str | None = None + """ + (String) Gateway name. Needs to be unique within the account. + Gateway name. Needs to be unique within the account. + """ + plan: str | None = None + """ + (String) Gateway pricing plan, defaults to development. You can list available plans with upctl gateway plans. + Gateway pricing plan, defaults to `development`. You can list available plans with `upctl gateway plans`. + """ + router: Router | None = None + """ + (Block List) Attached Router from where traffic is routed towards the network gateway service. (see below for nested schema) + Attached Router from where traffic is routed towards the network gateway service. + """ + zone: str | None = None + """ + fra1. + Zone in which the gateway will be hosted, e.g. `de-fra1`. + """ + + +class InitProvider(BaseModel): + address: Address | None = None + """ + (Block Set) IP addresses assigned to the gateway. (see below for nested schema) + IP addresses assigned to the gateway. + """ + configuredStatus: str | None = None + """ + (String) The service configured status indicates the service's current intended status. Managed by the customer. + The service configured status indicates the service's current intended status. Managed by the customer. + """ + features: list[str] | None = None + """ + (Set of String) Features enabled for the gateway. Valid item values are nat and vpn. For more details, see documentation on NAT and VPN gateways. + Features enabled for the gateway. Valid item values are `nat` and `vpn`. For more details, see documentation on [NAT](https://upcloud.com/docs/products/nat-gateway/) and [VPN](https://upcloud.com/docs/products/vpn-gateway/) gateways. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the gateway. + User defined key-value pairs to classify the gateway. + """ + name: str | None = None + """ + (String) Gateway name. Needs to be unique within the account. + Gateway name. Needs to be unique within the account. + """ + plan: str | None = None + """ + (String) Gateway pricing plan, defaults to development. You can list available plans with upctl gateway plans. + Gateway pricing plan, defaults to `development`. You can list available plans with `upctl gateway plans`. + """ + router: Router | None = None + """ + (Block List) Attached Router from where traffic is routed towards the network gateway service. (see below for nested schema) + Attached Router from where traffic is routed towards the network gateway service. + """ + zone: str | None = None + """ + fra1. + Zone in which the gateway will be hosted, e.g. `de-fra1`. + """ + + +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 AddressModel(BaseModel): + address: str | None = None + """ + (Block Set) IP addresses assigned to the gateway. (see below for nested schema) + IP address. + """ + name: str | None = None + """ + (String) Gateway name. Needs to be unique within the account. + Name of the IP address. + """ + + +class AddressModel1(BaseModel): + address: str | None = None + """ + (Block Set) IP addresses assigned to the gateway. (see below for nested schema) + IP address. + """ + name: str | None = None + """ + (String) Gateway name. Needs to be unique within the account. + Name of the address. + """ + + +class RouterModel(BaseModel): + id: str | None = None + """ + (String) Gateway UUID. + ID of the router attached to the gateway. + """ + + +class AtProvider(BaseModel): + address: AddressModel | None = None + """ + (Block Set) IP addresses assigned to the gateway. (see below for nested schema) + IP addresses assigned to the gateway. + """ + addresses: list[AddressModel1] | None = None + """ + (Attributes Set) Use 'address' attribute instead. This attribute will be removed in the next major version of the provider. (see below for nested schema) + """ + configuredStatus: str | None = None + """ + (String) The service configured status indicates the service's current intended status. Managed by the customer. + The service configured status indicates the service's current intended status. Managed by the customer. + """ + connections: list[str] | None = None + """ + (List of String) Names of connections attached to the gateway. Note that this field can have outdated information as connections are created by a separate resource. + Names of connections attached to the gateway. Note that this field can have outdated information as connections are created by a separate resource. + """ + features: list[str] | None = None + """ + (Set of String) Features enabled for the gateway. Valid item values are nat and vpn. For more details, see documentation on NAT and VPN gateways. + Features enabled for the gateway. Valid item values are `nat` and `vpn`. For more details, see documentation on [NAT](https://upcloud.com/docs/products/nat-gateway/) and [VPN](https://upcloud.com/docs/products/vpn-gateway/) gateways. + """ + id: str | None = None + """ + (String) Gateway UUID. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the gateway. + User defined key-value pairs to classify the gateway. + """ + name: str | None = None + """ + (String) Gateway name. Needs to be unique within the account. + Gateway name. Needs to be unique within the account. + """ + operationalState: str | None = None + """ + (String) The service operational state indicates the service's current operational, effective state. Managed by the system. + The service operational state indicates the service's current operational, effective state. Managed by the system. + """ + plan: str | None = None + """ + (String) Gateway pricing plan, defaults to development. You can list available plans with upctl gateway plans. + Gateway pricing plan, defaults to `development`. You can list available plans with `upctl gateway plans`. + """ + router: RouterModel | None = None + """ + (Block List) Attached Router from where traffic is routed towards the network gateway service. (see below for nested schema) + Attached Router from where traffic is routed towards the network gateway service. + """ + zone: str | None = None + """ + fra1. + Zone in which the gateway will be hosted, e.g. `de-fra1`. + """ + + +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 Gateway(BaseModel): + apiVersion: Literal['network.upcloud.com/v1alpha1'] | None = ( + 'network.upcloud.com/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['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/com/upcloud/network/gatewayconnection/__init__.py b/schemas/python/models/com/upcloud/network/gatewayconnection/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/network/gatewayconnection/v1alpha1.py b/schemas/python/models/com/upcloud/network/gatewayconnection/v1alpha1.py new file mode 100644 index 000000000..efecabcf5 --- /dev/null +++ b/schemas/python/models/com/upcloud/network/gatewayconnection/v1alpha1.py @@ -0,0 +1,381 @@ +# generated by datamodel-codegen: +# filename: workdir/network_upcloud_com_v1alpha1_gatewayconnection.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 GatewayRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class GatewaySelector(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 LocalRouteItem(BaseModel): + name: str | None = None + """ + (String) The name of the connection, should be unique within the gateway. + Name of the route + """ + staticNetwork: str | None = None + """ + (String) Destination prefix of the route; needs to be a valid IPv4 prefix + Destination prefix of the route; needs to be a valid IPv4 prefix + """ + type: str | None = None + """ + (String) The type of the connection; currently the only supported type is 'ipsec'. + Type of route; currently the only supported type is 'static' + """ + + +class RemoteRouteItem(BaseModel): + name: str | None = None + """ + (String) The name of the connection, should be unique within the gateway. + Name of the route + """ + staticNetwork: str | None = None + """ + (String) Destination prefix of the route; needs to be a valid IPv4 prefix + Destination prefix of the route; needs to be a valid IPv4 prefix + """ + type: str | None = None + """ + (String) The type of the connection; currently the only supported type is 'ipsec'. + Type of route; currently the only supported type is 'static' + """ + + +class ForProvider(BaseModel): + gateway: str | None = None + """ + (String) The ID of the upcloud_gateway resource to which the connection belongs. + The ID of the upcloud_gateway resource to which the connection belongs. + """ + gatewayRef: GatewayRef | None = None + """ + Reference to a Gateway in network to populate gateway. + """ + gatewaySelector: GatewaySelector | None = None + """ + Selector for a Gateway in network to populate gateway. + """ + localRoute: list[LocalRouteItem] | None = None + """ + (Block Set) Route for the UpCloud side of the network. (see below for nested schema) + Route for the UpCloud side of the network. + """ + name: str | None = None + """ + (String) The name of the connection, should be unique within the gateway. + The name of the connection, should be unique within the gateway. + """ + remoteRoute: list[RemoteRouteItem] | None = None + """ + (Block Set) Route for the remote side of the network. (see below for nested schema) + Route for the remote side of the network. + """ + type: str | None = None + """ + (String) The type of the connection; currently the only supported type is 'ipsec'. + The type of the connection; currently the only supported type is 'ipsec'. + """ + + +class InitProvider(BaseModel): + gateway: str | None = None + """ + (String) The ID of the upcloud_gateway resource to which the connection belongs. + The ID of the upcloud_gateway resource to which the connection belongs. + """ + gatewayRef: GatewayRef | None = None + """ + Reference to a Gateway in network to populate gateway. + """ + gatewaySelector: GatewaySelector | None = None + """ + Selector for a Gateway in network to populate gateway. + """ + localRoute: list[LocalRouteItem] | None = None + """ + (Block Set) Route for the UpCloud side of the network. (see below for nested schema) + Route for the UpCloud side of the network. + """ + name: str | None = None + """ + (String) The name of the connection, should be unique within the gateway. + The name of the connection, should be unique within the gateway. + """ + remoteRoute: list[RemoteRouteItem] | None = None + """ + (Block Set) Route for the remote side of the network. (see below for nested schema) + Route for the remote side of the network. + """ + type: str | None = None + """ + (String) The type of the connection; currently the only supported type is 'ipsec'. + The type of the connection; currently the only supported type is 'ipsec'. + """ + + +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): + gateway: str | None = None + """ + (String) The ID of the upcloud_gateway resource to which the connection belongs. + The ID of the upcloud_gateway resource to which the connection belongs. + """ + id: str | None = None + """ + (String) The ID of this resource. + """ + localRoute: list[LocalRouteItem] | None = None + """ + (Block Set) Route for the UpCloud side of the network. (see below for nested schema) + Route for the UpCloud side of the network. + """ + name: str | None = None + """ + (String) The name of the connection, should be unique within the gateway. + The name of the connection, should be unique within the gateway. + """ + remoteRoute: list[RemoteRouteItem] | None = None + """ + (Block Set) Route for the remote side of the network. (see below for nested schema) + Route for the remote side of the network. + """ + tunnels: list[str] | None = None + """ + (List of String) List of connection's tunnels names. Note that this field can have outdated information as connections are created by a separate resource. To make sure that you have the most recent data run 'terrafrom refresh'. + List of connection's tunnels names. Note that this field can have outdated information as connections are created by a separate resource. To make sure that you have the most recent data run 'terrafrom refresh'. + """ + type: str | None = None + """ + (String) The type of the connection; currently the only supported type is 'ipsec'. + The type of the connection; currently the only supported type is 'ipsec'. + """ + uuid: str | None = None + """ + (String) The UUID of the connection + The UUID of the connection + """ + + +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 GatewayConnection(BaseModel): + apiVersion: Literal['network.upcloud.com/v1alpha1'] | None = ( + 'network.upcloud.com/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['GatewayConnection'] | None = 'GatewayConnection' + """ + 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 + """ + GatewayConnectionSpec defines the desired state of GatewayConnection + """ + status: Status | None = None + """ + GatewayConnectionStatus defines the observed state of GatewayConnection. + """ + + +class GatewayConnectionList(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[GatewayConnection] + """ + List of gatewayconnections. 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/com/upcloud/network/gatewayconnectiontunnel/__init__.py b/schemas/python/models/com/upcloud/network/gatewayconnectiontunnel/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/network/gatewayconnectiontunnel/v1alpha1.py b/schemas/python/models/com/upcloud/network/gatewayconnectiontunnel/v1alpha1.py new file mode 100644 index 000000000..8fd37d8fa --- /dev/null +++ b/schemas/python/models/com/upcloud/network/gatewayconnectiontunnel/v1alpha1.py @@ -0,0 +1,457 @@ +# generated by datamodel-codegen: +# filename: workdir/network_upcloud_com_v1alpha1_gatewayconnectiontunnel.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 ConnectionIdRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class ConnectionIdSelector(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 PskSecretRef(BaseModel): + key: str + """ + The key to select. + """ + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class IpsecAuthPsk(BaseModel): + pskSecretRef: PskSecretRef | None = None + """ + shared key. This value is only used during resource creation and is not returned in the state. It is not possible to update this value. If you need to update it, delete the connection and create a new one. + The pre-shared key. This value is only used during resource creation and is not returned in the state. It is not possible to update this value. If you need to update it, delete the connection and create a new one. + """ + + +class IpsecProperties(BaseModel): + childRekeyTime: int | None = None + """ + (Number) IKE child SA rekey time in seconds. + IKE child SA rekey time in seconds. + """ + dpdDelay: int | None = None + """ + (Number) Delay before sending Dead Peer Detection packets if no traffic is detected, in seconds. + Delay before sending Dead Peer Detection packets if no traffic is detected, in seconds. + """ + dpdTimeout: int | None = None + """ + (Number) Timeout period for DPD reply before considering the peer to be dead, in seconds. + Timeout period for DPD reply before considering the peer to be dead, in seconds. + """ + ikeLifetime: int | None = None + """ + (Number) Maximum IKE SA lifetime in seconds. + Maximum IKE SA lifetime in seconds. + """ + phase1Algorithms: list[str] | None = None + """ + (Set of String) List of Phase 1: Proposal algorithms. + List of Phase 1: Proposal algorithms. + """ + phase1DhGroupNumbers: list[int] | None = None + """ + Hellman group numbers. + List of Phase 1 Diffie-Hellman group numbers. + """ + phase1IntegrityAlgorithms: list[str] | None = None + """ + (Set of String) List of Phase 1 integrity algorithms. + List of Phase 1 integrity algorithms. + """ + phase2Algorithms: list[str] | None = None + """ + (Set of String) List of Phase 2: Security Association algorithms. + List of Phase 2: Security Association algorithms. + """ + phase2DhGroupNumbers: list[int] | None = None + """ + Hellman group numbers. + List of Phase 2 Diffie-Hellman group numbers. + """ + phase2IntegrityAlgorithms: list[str] | None = None + """ + (Set of String) List of Phase 2 integrity algorithms. + List of Phase 2 integrity algorithms. + """ + rekeyTime: int | None = None + """ + (Number) IKE SA rekey time in seconds. + IKE SA rekey time in seconds. + """ + + +class ForProvider(BaseModel): + connectionId: str | None = None + """ + (String) ID of the upcloud_gateway_connection resource to which the tunnel belongs + ID of the upcloud_gateway_connection resource to which the tunnel belongs + """ + connectionIdRef: ConnectionIdRef | None = None + """ + Reference to a GatewayConnection in network to populate connectionId. + """ + connectionIdSelector: ConnectionIdSelector | None = None + """ + Selector for a GatewayConnection in network to populate connectionId. + """ + ipsecAuthPsk: IpsecAuthPsk | None = None + """ + shared key (see below for nested schema) + Configuration for authenticating with pre-shared key + """ + ipsecProperties: IpsecProperties | None = None + """ + (Block List, Max: 1) IPsec configuration for the tunnel (see below for nested schema) + IPsec configuration for the tunnel + """ + localAddressName: str | None = None + """ + (String) Public (UpCloud) endpoint address of this tunnel + Public (UpCloud) endpoint address of this tunnel + """ + name: str | None = None + """ + (String) The name of the tunnel, should be unique within the connection + The name of the tunnel, should be unique within the connection + """ + remoteAddress: str | None = None + """ + (String) Remote public IP address of the tunnel + Remote public IP address of the tunnel + """ + + +class IpsecAuthPskModel(BaseModel): + pskSecretRef: PskSecretRef + """ + shared key. This value is only used during resource creation and is not returned in the state. It is not possible to update this value. If you need to update it, delete the connection and create a new one. + The pre-shared key. This value is only used during resource creation and is not returned in the state. It is not possible to update this value. If you need to update it, delete the connection and create a new one. + """ + + +class InitProvider(BaseModel): + connectionId: str | None = None + """ + (String) ID of the upcloud_gateway_connection resource to which the tunnel belongs + ID of the upcloud_gateway_connection resource to which the tunnel belongs + """ + connectionIdRef: ConnectionIdRef | None = None + """ + Reference to a GatewayConnection in network to populate connectionId. + """ + connectionIdSelector: ConnectionIdSelector | None = None + """ + Selector for a GatewayConnection in network to populate connectionId. + """ + ipsecAuthPsk: IpsecAuthPskModel | None = None + """ + shared key (see below for nested schema) + Configuration for authenticating with pre-shared key + """ + ipsecProperties: IpsecProperties | None = None + """ + (Block List, Max: 1) IPsec configuration for the tunnel (see below for nested schema) + IPsec configuration for the tunnel + """ + localAddressName: str | None = None + """ + (String) Public (UpCloud) endpoint address of this tunnel + Public (UpCloud) endpoint address of this tunnel + """ + name: str | None = None + """ + (String) The name of the tunnel, should be unique within the connection + The name of the tunnel, should be unique within the connection + """ + remoteAddress: str | None = None + """ + (String) Remote public IP address of the tunnel + Remote public IP address of the tunnel + """ + + +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 IpsecAuthPskModel1(BaseModel): + pskSecretRef: PskSecretRef | None = None + """ + shared key. This value is only used during resource creation and is not returned in the state. It is not possible to update this value. If you need to update it, delete the connection and create a new one. + The pre-shared key. This value is only used during resource creation and is not returned in the state. It is not possible to update this value. If you need to update it, delete the connection and create a new one. + """ + + +class AtProvider(BaseModel): + connectionId: str | None = None + """ + (String) ID of the upcloud_gateway_connection resource to which the tunnel belongs + ID of the upcloud_gateway_connection resource to which the tunnel belongs + """ + id: str | None = None + """ + (String) The ID of this resource. + """ + ipsecAuthPsk: IpsecAuthPskModel1 | None = None + """ + shared key (see below for nested schema) + Configuration for authenticating with pre-shared key + """ + ipsecProperties: IpsecProperties | None = None + """ + (Block List, Max: 1) IPsec configuration for the tunnel (see below for nested schema) + IPsec configuration for the tunnel + """ + localAddressName: str | None = None + """ + (String) Public (UpCloud) endpoint address of this tunnel + Public (UpCloud) endpoint address of this tunnel + """ + name: str | None = None + """ + (String) The name of the tunnel, should be unique within the connection + The name of the tunnel, should be unique within the connection + """ + operationalState: str | None = None + """ + (String) Tunnel's current operational, effective state + Tunnel's current operational, effective state + """ + remoteAddress: str | None = None + """ + (String) Remote public IP address of the tunnel + Remote public IP address of the tunnel + """ + uuid: str | None = None + """ + (String) The UUID of the tunnel + The UUID of the tunnel + """ + + +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 GatewayConnectionTunnel(BaseModel): + apiVersion: Literal['network.upcloud.com/v1alpha1'] | None = ( + 'network.upcloud.com/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['GatewayConnectionTunnel'] | None = 'GatewayConnectionTunnel' + """ + 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 + """ + GatewayConnectionTunnelSpec defines the desired state of GatewayConnectionTunnel + """ + status: Status | None = None + """ + GatewayConnectionTunnelStatus defines the observed state of GatewayConnectionTunnel. + """ + + +class GatewayConnectionTunnelList(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[GatewayConnectionTunnel] + """ + List of gatewayconnectiontunnels. 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/com/upcloud/network/loadbalancer/__init__.py b/schemas/python/models/com/upcloud/network/loadbalancer/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/network/loadbalancer/v1alpha1.py b/schemas/python/models/com/upcloud/network/loadbalancer/v1alpha1.py new file mode 100644 index 000000000..69d6eccc2 --- /dev/null +++ b/schemas/python/models/com/upcloud/network/loadbalancer/v1alpha1.py @@ -0,0 +1,555 @@ +# generated by datamodel-codegen: +# filename: workdir/network_upcloud_com_v1alpha1_loadbalancer.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.k8s.apimachinery.pkg.apis.meta import v1 + + +class IpAddress(BaseModel): + address: str | None = None + """ + (String) Floating IP address to attach to the load balancer. + Floating IP address to attach to the load balancer. + """ + networkName: str | None = None + """ + (String) Name of the network where to attach the IP address. + Name of the network where to attach the IP address. + """ + + +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 NetworkRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class NetworkSelector(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 Network(BaseModel): + family: str | None = None + """ + (String) Network family. Currently only IPv4 is supported. + Network family. Currently only `IPv4` is supported. + """ + name: str | None = None + """ + (String) The name of the service. Must be unique within customer account. + The name of the network. Must be unique within the service. + """ + network: str | None = None + """ + (String, Deprecated) Private network UUID where traffic will be routed. Must reside in load balancer zone. + Private network UUID. Required for private networks and must reside in loadbalancer zone. For public network the field should be omitted. + """ + networkRef: NetworkRef | None = None + """ + Reference to a Network in network to populate network. + """ + networkSelector: NetworkSelector | None = None + """ + Selector for a Network in network to populate network. + """ + type: str | None = None + """ + (String) The type of the network. Only one public network can be attached and at least one private network must be attached. + The type of the network. Only one public network can be attached and at least one private network must be attached. + """ + + +class ForProvider(BaseModel): + configuredStatus: str | None = None + """ + (String) The service configured status indicates the service's current intended status. Managed by the customer. + The service configured status indicates the service's current intended status. Managed by the customer. + """ + ipAddresses: list[IpAddress] | None = None + """ + (Attributes Set) Floating IP addresses connected to the load balancer. (see below for nested schema) + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the load balancer. + User defined key-value pairs to classify the load balancer. + """ + maintenanceDow: str | None = None + """ + (String) The day of the week on which maintenance will be performed. If not provided, we will randomly select a weekend day. Valid values monday|tuesday|wednesday|thursday|friday|saturday|sunday. + The day of the week on which maintenance will be performed. If not provided, we will randomly select a weekend day. Valid values `monday|tuesday|wednesday|thursday|friday|saturday|sunday`. + """ + maintenanceTime: str | None = None + """ + hour timeframe has been allocated for maintenance. During this period, the multi-node production plans will not experience any downtime, while the one-node plans will have a downtime of 1-2 minutes. If not provided, we will randomly select an off-peak time. Needs to be a valid time format in UTC HH:MM:SSZ, for example 20:01:01Z. + The time at which the maintenance will begin in UTC. A 2-hour timeframe has been allocated for maintenance. During this period, the multi-node production plans will not experience any downtime, while the one-node plans will have a downtime of 1-2 minutes. If not provided, we will randomly select an off-peak time. Needs to be a valid time format in UTC HH:MM:SSZ, for example `20:01:01Z`. + """ + name: str | None = None + """ + (String) The name of the service. Must be unique within customer account. + The name of the service. Must be unique within customer account. + """ + network: str | None = None + """ + (String, Deprecated) Private network UUID where traffic will be routed. Must reside in load balancer zone. + Private network UUID where traffic will be routed. Must reside in load balancer zone. + """ + networkRef: NetworkRef | None = None + """ + Reference to a Network in network to populate network. + """ + networkSelector: NetworkSelector | None = None + """ + Selector for a Network in network to populate network. + """ + networks: list[Network] | None = None + """ + (Block List) Attached Networks from where traffic consumed and routed. Private networks must reside in loadbalancer zone. (see below for nested schema) + Attached Networks from where traffic consumed and routed. Private networks must reside in loadbalancer zone. + """ + plan: str | None = None + """ + (String) Plan which the service will have. You can list available load balancer plans with upctl loadbalancer plans + Plan which the service will have. You can list available load balancer plans with `upctl loadbalancer plans` + """ + zone: str | None = None + """ + hel1. You can list available zones with upctl zone list. + Zone in which the service will be hosted, e.g. `fi-hel1`. You can list available zones with `upctl zone list`. + """ + + +class InitProvider(BaseModel): + configuredStatus: str | None = None + """ + (String) The service configured status indicates the service's current intended status. Managed by the customer. + The service configured status indicates the service's current intended status. Managed by the customer. + """ + ipAddresses: list[IpAddress] | None = None + """ + (Attributes Set) Floating IP addresses connected to the load balancer. (see below for nested schema) + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the load balancer. + User defined key-value pairs to classify the load balancer. + """ + maintenanceDow: str | None = None + """ + (String) The day of the week on which maintenance will be performed. If not provided, we will randomly select a weekend day. Valid values monday|tuesday|wednesday|thursday|friday|saturday|sunday. + The day of the week on which maintenance will be performed. If not provided, we will randomly select a weekend day. Valid values `monday|tuesday|wednesday|thursday|friday|saturday|sunday`. + """ + maintenanceTime: str | None = None + """ + hour timeframe has been allocated for maintenance. During this period, the multi-node production plans will not experience any downtime, while the one-node plans will have a downtime of 1-2 minutes. If not provided, we will randomly select an off-peak time. Needs to be a valid time format in UTC HH:MM:SSZ, for example 20:01:01Z. + The time at which the maintenance will begin in UTC. A 2-hour timeframe has been allocated for maintenance. During this period, the multi-node production plans will not experience any downtime, while the one-node plans will have a downtime of 1-2 minutes. If not provided, we will randomly select an off-peak time. Needs to be a valid time format in UTC HH:MM:SSZ, for example `20:01:01Z`. + """ + name: str | None = None + """ + (String) The name of the service. Must be unique within customer account. + The name of the service. Must be unique within customer account. + """ + network: str | None = None + """ + (String, Deprecated) Private network UUID where traffic will be routed. Must reside in load balancer zone. + Private network UUID where traffic will be routed. Must reside in load balancer zone. + """ + networkRef: NetworkRef | None = None + """ + Reference to a Network in network to populate network. + """ + networkSelector: NetworkSelector | None = None + """ + Selector for a Network in network to populate network. + """ + networks: list[Network] | None = None + """ + (Block List) Attached Networks from where traffic consumed and routed. Private networks must reside in loadbalancer zone. (see below for nested schema) + Attached Networks from where traffic consumed and routed. Private networks must reside in loadbalancer zone. + """ + plan: str | None = None + """ + (String) Plan which the service will have. You can list available load balancer plans with upctl loadbalancer plans + Plan which the service will have. You can list available load balancer plans with `upctl loadbalancer plans` + """ + zone: str | None = None + """ + hel1. You can list available zones with upctl zone list. + Zone in which the service will be hosted, e.g. `fi-hel1`. You can list available zones with `upctl zone list`. + """ + + +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 NetworkModel(BaseModel): + dnsName: str | None = None + """ + (String, Deprecated) DNS name of the load balancer + DNS name of the load balancer network + """ + family: str | None = None + """ + (String) Network family. Currently only IPv4 is supported. + Network family. Currently only `IPv4` is supported. + """ + id: str | None = None + """ + (String) The unique identifier of the load balancer. + The unique identifier of the network. + """ + name: str | None = None + """ + (String) The name of the service. Must be unique within customer account. + The name of the network. Must be unique within the service. + """ + network: str | None = None + """ + (String, Deprecated) Private network UUID where traffic will be routed. Must reside in load balancer zone. + Private network UUID. Required for private networks and must reside in loadbalancer zone. For public network the field should be omitted. + """ + type: str | None = None + """ + (String) The type of the network. Only one public network can be attached and at least one private network must be attached. + The type of the network. Only one public network can be attached and at least one private network must be attached. + """ + + +class IpAddressModel(BaseModel): + address: str | None = None + """ + (String) Floating IP address to attach to the load balancer. + Node's IP address + """ + listen: bool | None = None + """ + (Boolean) Whether the node listens to the traffic + Whether the node listens to the traffic + """ + + +class NetworkModel1(BaseModel): + ipAddresses: list[IpAddressModel] | None = None + """ + (Attributes Set) Floating IP addresses connected to the load balancer. (see below for nested schema) + """ + name: str | None = None + """ + (String) The name of the service. Must be unique within customer account. + The name of the network + """ + type: str | None = None + """ + (String) The type of the network. Only one public network can be attached and at least one private network must be attached. + The type of the network + """ + + +class Node(BaseModel): + networks: list[NetworkModel1] | None = None + """ + (Block List) Attached Networks from where traffic consumed and routed. Private networks must reside in loadbalancer zone. (see below for nested schema) + """ + operationalState: str | None = None + """ + (String) The service operational state indicates the service's current operational, effective state. Managed by the system. + Node's operational state. Managed by the system. + """ + + +class AtProvider(BaseModel): + backends: list[str] | None = None + """ + (List of String) Backends are groups of customer servers whose traffic should be balanced. + Backends are groups of customer servers whose traffic should be balanced. + """ + configuredStatus: str | None = None + """ + (String) The service configured status indicates the service's current intended status. Managed by the customer. + The service configured status indicates the service's current intended status. Managed by the customer. + """ + dnsName: str | None = None + """ + (String, Deprecated) DNS name of the load balancer + DNS name of the load balancer + """ + frontends: list[str] | None = None + """ + (List of String) Frontends receive the traffic before dispatching it to the backends. + Frontends receive the traffic before dispatching it to the backends. + """ + id: str | None = None + """ + (String) The unique identifier of the load balancer. + """ + ipAddresses: list[IpAddress] | None = None + """ + (Attributes Set) Floating IP addresses connected to the load balancer. (see below for nested schema) + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the load balancer. + User defined key-value pairs to classify the load balancer. + """ + maintenanceDow: str | None = None + """ + (String) The day of the week on which maintenance will be performed. If not provided, we will randomly select a weekend day. Valid values monday|tuesday|wednesday|thursday|friday|saturday|sunday. + The day of the week on which maintenance will be performed. If not provided, we will randomly select a weekend day. Valid values `monday|tuesday|wednesday|thursday|friday|saturday|sunday`. + """ + maintenanceTime: str | None = None + """ + hour timeframe has been allocated for maintenance. During this period, the multi-node production plans will not experience any downtime, while the one-node plans will have a downtime of 1-2 minutes. If not provided, we will randomly select an off-peak time. Needs to be a valid time format in UTC HH:MM:SSZ, for example 20:01:01Z. + The time at which the maintenance will begin in UTC. A 2-hour timeframe has been allocated for maintenance. During this period, the multi-node production plans will not experience any downtime, while the one-node plans will have a downtime of 1-2 minutes. If not provided, we will randomly select an off-peak time. Needs to be a valid time format in UTC HH:MM:SSZ, for example `20:01:01Z`. + """ + name: str | None = None + """ + (String) The name of the service. Must be unique within customer account. + The name of the service. Must be unique within customer account. + """ + network: str | None = None + """ + (String, Deprecated) Private network UUID where traffic will be routed. Must reside in load balancer zone. + Private network UUID where traffic will be routed. Must reside in load balancer zone. + """ + networks: list[NetworkModel] | None = None + """ + (Block List) Attached Networks from where traffic consumed and routed. Private networks must reside in loadbalancer zone. (see below for nested schema) + Attached Networks from where traffic consumed and routed. Private networks must reside in loadbalancer zone. + """ + nodes: list[Node] | None = None + """ + (Attributes List) Nodes are instances running load balancer service (see below for nested schema) + """ + operationalState: str | None = None + """ + (String) The service operational state indicates the service's current operational, effective state. Managed by the system. + The service operational state indicates the service's current operational, effective state. Managed by the system. + """ + plan: str | None = None + """ + (String) Plan which the service will have. You can list available load balancer plans with upctl loadbalancer plans + Plan which the service will have. You can list available load balancer plans with `upctl loadbalancer plans` + """ + resolvers: list[str] | None = None + """ + (List of String) Domain Name Resolvers. + Domain Name Resolvers. + """ + zone: str | None = None + """ + hel1. You can list available zones with upctl zone list. + Zone in which the service will be hosted, e.g. `fi-hel1`. You can list available zones with `upctl zone list`. + """ + + +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 LoadBalancer(BaseModel): + apiVersion: Literal['network.upcloud.com/v1alpha1'] | None = ( + 'network.upcloud.com/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['LoadBalancer'] | None = 'LoadBalancer' + """ + 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 + """ + LoadBalancerSpec defines the desired state of LoadBalancer + """ + status: Status | None = None + """ + LoadBalancerStatus defines the observed state of LoadBalancer. + """ + + +class LoadBalancerList(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[LoadBalancer] + """ + List of loadbalancers. 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/com/upcloud/network/loadbalancerbackend/__init__.py b/schemas/python/models/com/upcloud/network/loadbalancerbackend/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/network/loadbalancerbackend/v1alpha1.py b/schemas/python/models/com/upcloud/network/loadbalancerbackend/v1alpha1.py new file mode 100644 index 000000000..e5cf2c0ac --- /dev/null +++ b/schemas/python/models/com/upcloud/network/loadbalancerbackend/v1alpha1.py @@ -0,0 +1,423 @@ +# generated by datamodel-codegen: +# filename: workdir/network_upcloud_com_v1alpha1_loadbalancerbackend.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 LoadbalancerRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class LoadbalancerSelector(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 Properties(BaseModel): + healthCheckExpectedStatus: float | None = None + """ + (Number) Expected HTTP status code returned by the customer application to mark server as healthy. Ignored for tcp health_check_type. + Expected HTTP status code returned by the customer application to mark server as healthy. Ignored for `tcp` `health_check_type`. + """ + healthCheckFall: float | None = None + """ + (Number) Sets how many failed health checks are allowed until the backend member is taken off from the rotation. + Sets how many failed health checks are allowed until the backend member is taken off from the rotation. + """ + healthCheckInterval: float | None = None + """ + (Number) Interval between health checks in seconds. + Interval between health checks in seconds. + """ + healthCheckRise: float | None = None + """ + (Number) Sets how many successful health checks are required to put the backend member back into rotation. + Sets how many successful health checks are required to put the backend member back into rotation. + """ + healthCheckTlsVerify: bool | None = None + """ + (Boolean) Enables certificate verification with the system CA certificate bundle. Works with https scheme in health_check_url, otherwise ignored. + Enables certificate verification with the system CA certificate bundle. Works with https scheme in health_check_url, otherwise ignored. + """ + healthCheckType: str | None = None + """ + (String) Health check type. + Health check type. + """ + healthCheckUrl: str | None = None + """ + (String) Target path for health check HTTP GET requests. Ignored for tcp health_check_type. + Target path for health check HTTP GET requests. Ignored for `tcp` `health_check_type`. + """ + http2Enabled: bool | None = None + """ + (Boolean) Allow HTTP/2 connections to backend members by utilizing ALPN extension of TLS protocol, therefore it can only be enabled when tls_enabled is set to true. Note: members should support HTTP/2 for this setting to work. + Allow HTTP/2 connections to backend members by utilizing ALPN extension of TLS protocol, therefore it can only be enabled when tls_enabled is set to true. Note: members should support HTTP/2 for this setting to work. + """ + outboundProxyProtocol: str | None = None + """ + (String) Enable outbound proxy protocol by setting the desired version. Defaults to empty string. Empty string disables proxy protocol. + Enable outbound proxy protocol by setting the desired version. Defaults to empty string. Empty string disables proxy protocol. + """ + stickySessionCookieName: str | None = None + """ + (String) Sets sticky session cookie name. Empty string disables sticky session. + Sets sticky session cookie name. Empty string disables sticky session. + """ + timeoutServer: float | None = None + """ + (Number) Backend server timeout in seconds. + Backend server timeout in seconds. + """ + timeoutTunnel: float | None = None + """ + (Number) Maximum inactivity time on the client and server side for tunnels in seconds. + Maximum inactivity time on the client and server side for tunnels in seconds. + """ + tlsEnabled: bool | None = None + """ + (Boolean) Enables TLS connection from the load balancer to backend servers. + Enables TLS connection from the load balancer to backend servers. + """ + tlsUseSystemCa: bool | None = None + """ + (Boolean) If enabled, then the system CA certificate bundle will be used for the certificate verification. + If enabled, then the system CA certificate bundle will be used for the certificate verification. + """ + tlsVerify: bool | None = None + """ + (Boolean) Enables backend servers certificate verification. Please make sure that TLS config with the certificate bundle of type authority attached to the backend or tls_use_system_ca enabled. Note: tls_verify has preference over health_check_tls_verify when tls_enabled in true. + Enables backend servers certificate verification. Please make sure that TLS config with the certificate bundle of type authority attached to the backend or `tls_use_system_ca` enabled. Note: `tls_verify` has preference over `health_check_tls_verify` when `tls_enabled` in true. + """ + + +class ResolverNameRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class ResolverNameSelector(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): + loadbalancer: str | None = None + """ + (String) UUID of the load balancer to which the backend is connected. + UUID of the load balancer to which the backend is connected. + """ + loadbalancerRef: LoadbalancerRef | None = None + """ + Reference to a LoadBalancer in network to populate loadbalancer. + """ + loadbalancerSelector: LoadbalancerSelector | None = None + """ + Selector for a LoadBalancer in network to populate loadbalancer. + """ + properties: Properties | None = None + """ + empty block is also required. (see below for nested schema) + Backend properties. Properties can be set back to defaults by defining an empty `properties {}` block. + """ + resolverName: str | None = None + """ + (String) Domain name resolver used with dynamic type members. + Domain name resolver used with dynamic type members. + """ + resolverNameRef: ResolverNameRef | None = None + """ + Reference to a LoadBalancerResolver in network to populate resolverName. + """ + resolverNameSelector: ResolverNameSelector | None = None + """ + Selector for a LoadBalancerResolver in network to populate resolverName. + """ + + +class InitProvider(BaseModel): + properties: Properties | None = None + """ + empty block is also required. (see below for nested schema) + Backend properties. Properties can be set back to defaults by defining an empty `properties {}` block. + """ + resolverName: str | None = None + """ + (String) Domain name resolver used with dynamic type members. + Domain name resolver used with dynamic type members. + """ + resolverNameRef: ResolverNameRef | None = None + """ + Reference to a LoadBalancerResolver in network to populate resolverName. + """ + resolverNameSelector: ResolverNameSelector | None = None + """ + Selector for a LoadBalancerResolver in network to populate resolverName. + """ + + +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 + """ + (String) ID of the backend. ID is in {load balancer UUID}/{backend name} format. + """ + loadbalancer: str | None = None + """ + (String) UUID of the load balancer to which the backend is connected. + UUID of the load balancer to which the backend is connected. + """ + members: list[str] | None = None + """ + (List of String) Backend member server UUIDs. Members receive traffic dispatched from the frontends. + Backend member server UUIDs. Members receive traffic dispatched from the frontends. + """ + properties: Properties | None = None + """ + empty block is also required. (see below for nested schema) + Backend properties. Properties can be set back to defaults by defining an empty `properties {}` block. + """ + resolverName: str | None = None + """ + (String) Domain name resolver used with dynamic type members. + Domain name resolver used with dynamic type members. + """ + tlsConfigs: list[str] | None = None + """ + (List of String) Set of TLS config names. + Set of TLS config names. + """ + + +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 LoadBalancerBackend(BaseModel): + apiVersion: Literal['network.upcloud.com/v1alpha1'] | None = ( + 'network.upcloud.com/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['LoadBalancerBackend'] | None = 'LoadBalancerBackend' + """ + 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 + """ + LoadBalancerBackendSpec defines the desired state of LoadBalancerBackend + """ + status: Status | None = None + """ + LoadBalancerBackendStatus defines the observed state of LoadBalancerBackend. + """ + + +class LoadBalancerBackendList(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[LoadBalancerBackend] + """ + List of loadbalancerbackends. 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/com/upcloud/network/loadbalancerbackendtlsconfig/__init__.py b/schemas/python/models/com/upcloud/network/loadbalancerbackendtlsconfig/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/network/loadbalancerbackendtlsconfig/v1alpha1.py b/schemas/python/models/com/upcloud/network/loadbalancerbackendtlsconfig/v1alpha1.py new file mode 100644 index 000000000..fa8afc029 --- /dev/null +++ b/schemas/python/models/com/upcloud/network/loadbalancerbackendtlsconfig/v1alpha1.py @@ -0,0 +1,314 @@ +# generated by datamodel-codegen: +# filename: workdir/network_upcloud_com_v1alpha1_loadbalancerbackendtlsconfig.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 BackendRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class BackendSelector(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 CertificateBundleRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class CertificateBundleSelector(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): + backend: str | None = None + """ + ID of the load balancer backend to which the TLS config is connected. + """ + backendRef: BackendRef | None = None + """ + Reference to a LoadBalancerBackend in network to populate backend. + """ + backendSelector: BackendSelector | None = None + """ + Selector for a LoadBalancerBackend in network to populate backend. + """ + certificateBundle: str | None = None + """ + Reference to certificate bundle ID. + """ + certificateBundleRef: CertificateBundleRef | None = None + """ + Reference to a LoadBalancerManualCertificateBundle in network to populate certificateBundle. + """ + certificateBundleSelector: CertificateBundleSelector | None = None + """ + Selector for a LoadBalancerManualCertificateBundle in network to populate certificateBundle. + """ + + +class InitProvider(BaseModel): + certificateBundle: str | None = None + """ + Reference to certificate bundle ID. + """ + certificateBundleRef: CertificateBundleRef | None = None + """ + Reference to a LoadBalancerManualCertificateBundle in network to populate certificateBundle. + """ + certificateBundleSelector: CertificateBundleSelector | None = None + """ + Selector for a LoadBalancerManualCertificateBundle in network to populate certificateBundle. + """ + + +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): + backend: str | None = None + """ + ID of the load balancer backend to which the TLS config is connected. + """ + certificateBundle: str | None = None + """ + Reference to certificate bundle ID. + """ + 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 LoadBalancerBackendTLSConfig(BaseModel): + apiVersion: Literal['network.upcloud.com/v1alpha1'] | None = ( + 'network.upcloud.com/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['LoadBalancerBackendTLSConfig'] | None = ( + 'LoadBalancerBackendTLSConfig' + ) + """ + 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 + """ + LoadBalancerBackendTLSConfigSpec defines the desired state of LoadBalancerBackendTLSConfig + """ + status: Status | None = None + """ + LoadBalancerBackendTLSConfigStatus defines the observed state of LoadBalancerBackendTLSConfig. + """ + + +class LoadBalancerBackendTLSConfigList(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[LoadBalancerBackendTLSConfig] + """ + List of loadbalancerbackendtlsconfigs. 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/com/upcloud/network/loadbalancerdynamicbackendmember/__init__.py b/schemas/python/models/com/upcloud/network/loadbalancerdynamicbackendmember/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/network/loadbalancerdynamicbackendmember/v1alpha1.py b/schemas/python/models/com/upcloud/network/loadbalancerdynamicbackendmember/v1alpha1.py new file mode 100644 index 000000000..b2faa530c --- /dev/null +++ b/schemas/python/models/com/upcloud/network/loadbalancerdynamicbackendmember/v1alpha1.py @@ -0,0 +1,339 @@ +# generated by datamodel-codegen: +# filename: workdir/network_upcloud_com_v1alpha1_loadbalancerdynamicbackendmember.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 BackendRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class BackendSelector(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): + backend: str | None = None + """ + (String) ID of the load balancer backend to which the member is connected. + ID of the load balancer backend to which the member is connected. + """ + backendRef: BackendRef | None = None + """ + Reference to a LoadBalancerBackend in network to populate backend. + """ + backendSelector: BackendSelector | None = None + """ + Selector for a LoadBalancerBackend in network to populate backend. + """ + enabled: bool | None = None + """ + (Boolean) Indicates if the member is enabled. Disabled members are excluded from load balancing. + Indicates if the member is enabled. Disabled members are excluded from load balancing. + """ + ip: str | None = None + """ + (String) Optional fallback IP address in case of failure on DNS resolving. + Optional fallback IP address in case of failure on DNS resolving. + """ + maxSessions: float | None = None + """ + (Number) Maximum number of sessions before queueing. + Maximum number of sessions before queueing. + """ + port: float | None = None + """ + (Number) Server port. Port is optional and can be specified in DNS SRV record. + Server port. Port is optional and can be specified in DNS SRV record. + """ + weight: float | None = None + """ + (Number) Weight of the member. The higher the weight, the more traffic the member receives. + Weight of the member. The higher the weight, the more traffic the member receives. + """ + + +class InitProvider(BaseModel): + enabled: bool | None = None + """ + (Boolean) Indicates if the member is enabled. Disabled members are excluded from load balancing. + Indicates if the member is enabled. Disabled members are excluded from load balancing. + """ + ip: str | None = None + """ + (String) Optional fallback IP address in case of failure on DNS resolving. + Optional fallback IP address in case of failure on DNS resolving. + """ + maxSessions: float | None = None + """ + (Number) Maximum number of sessions before queueing. + Maximum number of sessions before queueing. + """ + port: float | None = None + """ + (Number) Server port. Port is optional and can be specified in DNS SRV record. + Server port. Port is optional and can be specified in DNS SRV record. + """ + weight: float | None = None + """ + (Number) Weight of the member. The higher the weight, the more traffic the member receives. + Weight of the member. The higher the weight, the more traffic the member receives. + """ + + +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): + backend: str | None = None + """ + (String) ID of the load balancer backend to which the member is connected. + ID of the load balancer backend to which the member is connected. + """ + enabled: bool | None = None + """ + (Boolean) Indicates if the member is enabled. Disabled members are excluded from load balancing. + Indicates if the member is enabled. Disabled members are excluded from load balancing. + """ + id: str | None = None + """ + (String) ID of the backend member. ID is in {load balancer UUID}/{backend name}/{member name} format. + """ + ip: str | None = None + """ + (String) Optional fallback IP address in case of failure on DNS resolving. + Optional fallback IP address in case of failure on DNS resolving. + """ + maxSessions: float | None = None + """ + (Number) Maximum number of sessions before queueing. + Maximum number of sessions before queueing. + """ + port: float | None = None + """ + (Number) Server port. Port is optional and can be specified in DNS SRV record. + Server port. Port is optional and can be specified in DNS SRV record. + """ + weight: float | None = None + """ + (Number) Weight of the member. The higher the weight, the more traffic the member receives. + Weight of the member. The higher the weight, the more traffic the member receives. + """ + + +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 LoadBalancerDynamicBackendMember(BaseModel): + apiVersion: Literal['network.upcloud.com/v1alpha1'] | None = ( + 'network.upcloud.com/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['LoadBalancerDynamicBackendMember'] | None = ( + 'LoadBalancerDynamicBackendMember' + ) + """ + 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 + """ + LoadBalancerDynamicBackendMemberSpec defines the desired state of LoadBalancerDynamicBackendMember + """ + status: Status | None = None + """ + LoadBalancerDynamicBackendMemberStatus defines the observed state of LoadBalancerDynamicBackendMember. + """ + + +class LoadBalancerDynamicBackendMemberList(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[LoadBalancerDynamicBackendMember] + """ + List of loadbalancerdynamicbackendmembers. 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/com/upcloud/network/loadbalancerdynamiccertificatebundle/__init__.py b/schemas/python/models/com/upcloud/network/loadbalancerdynamiccertificatebundle/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/network/loadbalancerdynamiccertificatebundle/v1alpha1.py b/schemas/python/models/com/upcloud/network/loadbalancerdynamiccertificatebundle/v1alpha1.py new file mode 100644 index 000000000..aa84da07e --- /dev/null +++ b/schemas/python/models/com/upcloud/network/loadbalancerdynamiccertificatebundle/v1alpha1.py @@ -0,0 +1,294 @@ +# generated by datamodel-codegen: +# filename: workdir/network_upcloud_com_v1alpha1_loadbalancerdynamiccertificatebundle.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.k8s.apimachinery.pkg.apis.meta import v1 + + +class ForProvider(BaseModel): + hostnames: list[str] | None = None + """ + (List of String) Certificate hostnames. + Certificate hostnames. + """ + keyType: str | None = None + """ + (String) Private key type (rsa / ecdsa). + Private key type (`rsa` / `ecdsa`). + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the dynamic certificate bundle. + User defined key-value pairs to classify the dynamic certificate bundle. + """ + name: str | None = None + """ + (String) The name of the certificate bundle. Must be unique within customer account. + The name of the certificate bundle. Must be unique within customer account. + """ + + +class InitProvider(BaseModel): + hostnames: list[str] | None = None + """ + (List of String) Certificate hostnames. + Certificate hostnames. + """ + keyType: str | None = None + """ + (String) Private key type (rsa / ecdsa). + Private key type (`rsa` / `ecdsa`). + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the dynamic certificate bundle. + User defined key-value pairs to classify the dynamic certificate bundle. + """ + name: str | None = None + """ + (String) The name of the certificate bundle. Must be unique within customer account. + The name of the certificate bundle. Must be unique within customer account. + """ + + +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): + hostnames: list[str] | None = None + """ + (List of String) Certificate hostnames. + Certificate hostnames. + """ + id: str | None = None + """ + (String) The UUID of the certificate bundle. + """ + keyType: str | None = None + """ + (String) Private key type (rsa / ecdsa). + Private key type (`rsa` / `ecdsa`). + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the dynamic certificate bundle. + User defined key-value pairs to classify the dynamic certificate bundle. + """ + name: str | None = None + """ + (String) The name of the certificate bundle. Must be unique within customer account. + The name of the certificate bundle. Must be unique within customer account. + """ + notAfter: str | None = None + """ + (String) The time after which a certificate is no longer valid. + The time after which a certificate is no longer valid. + """ + notBefore: str | None = None + """ + (String) The time on which a certificate becomes valid. + The time on which a certificate becomes valid. + """ + operationalState: str | None = None + """ + (String) The service operational state indicates the service's current operational, effective state. Managed by the system. + The service operational state indicates the service's current operational, effective state. Managed by the system. + """ + + +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 LoadBalancerDynamicCertificateBundle(BaseModel): + apiVersion: Literal['network.upcloud.com/v1alpha1'] | None = ( + 'network.upcloud.com/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['LoadBalancerDynamicCertificateBundle'] | None = ( + 'LoadBalancerDynamicCertificateBundle' + ) + """ + 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 + """ + LoadBalancerDynamicCertificateBundleSpec defines the desired state of LoadBalancerDynamicCertificateBundle + """ + status: Status | None = None + """ + LoadBalancerDynamicCertificateBundleStatus defines the observed state of LoadBalancerDynamicCertificateBundle. + """ + + +class LoadBalancerDynamicCertificateBundleList(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[LoadBalancerDynamicCertificateBundle] + """ + List of loadbalancerdynamiccertificatebundles. 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/com/upcloud/network/loadbalancerfrontend/__init__.py b/schemas/python/models/com/upcloud/network/loadbalancerfrontend/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/network/loadbalancerfrontend/v1alpha1.py b/schemas/python/models/com/upcloud/network/loadbalancerfrontend/v1alpha1.py new file mode 100644 index 000000000..e88005a83 --- /dev/null +++ b/schemas/python/models/com/upcloud/network/loadbalancerfrontend/v1alpha1.py @@ -0,0 +1,422 @@ +# generated by datamodel-codegen: +# filename: workdir/network_upcloud_com_v1alpha1_loadbalancerfrontend.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 DefaultBackendNameRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class DefaultBackendNameSelector(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 LoadbalancerRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class LoadbalancerSelector(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 Network(BaseModel): + name: str | None = None + """ + field of a backend resource as the value for this field (like in the example above) or the depends_on meta argument to ensure the resources are created and destroyed in the correct order. + Name of the load balancer network. + """ + + +class Properties(BaseModel): + http2Enabled: bool | None = None + """ + (Boolean) Enable or disable HTTP/2 support. + Enable or disable HTTP/2 support. + """ + inboundProxyProtocol: bool | None = None + """ + (Boolean) Enable or disable inbound proxy protocol support. + Enable or disable inbound proxy protocol support. + """ + timeoutClient: float | None = None + """ + (Number) Client request timeout in seconds. + Client request timeout in seconds. + """ + + +class ForProvider(BaseModel): + defaultBackendName: str | None = None + """ + (String) The name of the backend where traffic will be routed by default. The default backend can be overridden in frontend rules. + The name of the backend where traffic will be routed by default. The default backend can be overridden in frontend rules. + + Note that the frontend resource depends on the default backend resource. Use the `name` field of a backend resource as the value for this field (like in the example above) or the `depends_on` meta argument to ensure the resources are created and destroyed in the correct order. + """ + defaultBackendNameRef: DefaultBackendNameRef | None = None + """ + Reference to a LoadBalancerBackend in network to populate defaultBackendName. + """ + defaultBackendNameSelector: DefaultBackendNameSelector | None = None + """ + Selector for a LoadBalancerBackend in network to populate defaultBackendName. + """ + loadbalancer: str | None = None + """ + (String) UUID of the load balancer to which the frontend is connected. + UUID of the load balancer to which the frontend is connected. + """ + loadbalancerRef: LoadbalancerRef | None = None + """ + Reference to a LoadBalancer in network to populate loadbalancer. + """ + loadbalancerSelector: LoadbalancerSelector | None = None + """ + Selector for a LoadBalancer in network to populate loadbalancer. + """ + mode: str | None = None + """ + (String) When load balancer operating in tcp mode it acts as a layer 4 proxy. In http mode it acts as a layer 7 proxy. + When load balancer operating in `tcp` mode it acts as a layer 4 proxy. In `http` mode it acts as a layer 7 proxy. + """ + networks: list[Network] | None = None + """ + (Block Set) Networks that frontend will be listening. Networks are required if load balancer has networks defined. This field will be required when deprecated field network is removed from load balancer resource. (see below for nested schema) + Networks that frontend will be listening. Networks are required if load balancer has `networks` defined. This field will be required when deprecated field `network` is removed from load balancer resource. + """ + port: float | None = None + """ + (Number) Port to listen for incoming requests. + Port to listen for incoming requests. + """ + properties: Properties | None = None + """ + empty block is also required. (see below for nested schema) + Frontend properties. Properties can be set back to defaults by defining an empty `properties {}` block. + """ + + +class InitProvider(BaseModel): + defaultBackendName: str | None = None + """ + (String) The name of the backend where traffic will be routed by default. The default backend can be overridden in frontend rules. + The name of the backend where traffic will be routed by default. The default backend can be overridden in frontend rules. + + Note that the frontend resource depends on the default backend resource. Use the `name` field of a backend resource as the value for this field (like in the example above) or the `depends_on` meta argument to ensure the resources are created and destroyed in the correct order. + """ + defaultBackendNameRef: DefaultBackendNameRef | None = None + """ + Reference to a LoadBalancerBackend in network to populate defaultBackendName. + """ + defaultBackendNameSelector: DefaultBackendNameSelector | None = None + """ + Selector for a LoadBalancerBackend in network to populate defaultBackendName. + """ + mode: str | None = None + """ + (String) When load balancer operating in tcp mode it acts as a layer 4 proxy. In http mode it acts as a layer 7 proxy. + When load balancer operating in `tcp` mode it acts as a layer 4 proxy. In `http` mode it acts as a layer 7 proxy. + """ + networks: list[Network] | None = None + """ + (Block Set) Networks that frontend will be listening. Networks are required if load balancer has networks defined. This field will be required when deprecated field network is removed from load balancer resource. (see below for nested schema) + Networks that frontend will be listening. Networks are required if load balancer has `networks` defined. This field will be required when deprecated field `network` is removed from load balancer resource. + """ + port: float | None = None + """ + (Number) Port to listen for incoming requests. + Port to listen for incoming requests. + """ + properties: Properties | None = None + """ + empty block is also required. (see below for nested schema) + Frontend properties. Properties can be set back to defaults by defining an empty `properties {}` block. + """ + + +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): + defaultBackendName: str | None = None + """ + (String) The name of the backend where traffic will be routed by default. The default backend can be overridden in frontend rules. + The name of the backend where traffic will be routed by default. The default backend can be overridden in frontend rules. + + Note that the frontend resource depends on the default backend resource. Use the `name` field of a backend resource as the value for this field (like in the example above) or the `depends_on` meta argument to ensure the resources are created and destroyed in the correct order. + """ + id: str | None = None + """ + (String) ID of the frontend. ID is in {load balancer UUID}/{frontend name} format. + """ + loadbalancer: str | None = None + """ + (String) UUID of the load balancer to which the frontend is connected. + UUID of the load balancer to which the frontend is connected. + """ + mode: str | None = None + """ + (String) When load balancer operating in tcp mode it acts as a layer 4 proxy. In http mode it acts as a layer 7 proxy. + When load balancer operating in `tcp` mode it acts as a layer 4 proxy. In `http` mode it acts as a layer 7 proxy. + """ + networks: list[Network] | None = None + """ + (Block Set) Networks that frontend will be listening. Networks are required if load balancer has networks defined. This field will be required when deprecated field network is removed from load balancer resource. (see below for nested schema) + Networks that frontend will be listening. Networks are required if load balancer has `networks` defined. This field will be required when deprecated field `network` is removed from load balancer resource. + """ + port: float | None = None + """ + (Number) Port to listen for incoming requests. + Port to listen for incoming requests. + """ + properties: Properties | None = None + """ + empty block is also required. (see below for nested schema) + Frontend properties. Properties can be set back to defaults by defining an empty `properties {}` block. + """ + rules: list[str] | None = None + """ + (List of String) Set of frontend rule names. + Set of frontend rule names. + """ + tlsConfigs: list[str] | None = None + """ + (List of String) Set of TLS config names. + Set of TLS config names. + """ + + +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 LoadBalancerFrontend(BaseModel): + apiVersion: Literal['network.upcloud.com/v1alpha1'] | None = ( + 'network.upcloud.com/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['LoadBalancerFrontend'] | None = 'LoadBalancerFrontend' + """ + 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 + """ + LoadBalancerFrontendSpec defines the desired state of LoadBalancerFrontend + """ + status: Status | None = None + """ + LoadBalancerFrontendStatus defines the observed state of LoadBalancerFrontend. + """ + + +class LoadBalancerFrontendList(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[LoadBalancerFrontend] + """ + List of loadbalancerfrontends. 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/com/upcloud/network/loadbalancerfrontendrule/__init__.py b/schemas/python/models/com/upcloud/network/loadbalancerfrontendrule/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/network/loadbalancerfrontendrule/v1alpha1.py b/schemas/python/models/com/upcloud/network/loadbalancerfrontendrule/v1alpha1.py new file mode 100644 index 000000000..0c2e65bc4 --- /dev/null +++ b/schemas/python/models/com/upcloud/network/loadbalancerfrontendrule/v1alpha1.py @@ -0,0 +1,996 @@ +# generated by datamodel-codegen: +# filename: workdir/network_upcloud_com_v1alpha1_loadbalancerfrontendrule.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.k8s.apimachinery.pkg.apis.meta import v1 + + +class HttpRedirectItem(BaseModel): + location: str | None = None + """ + (String) Target location. + Target location. + """ + scheme: str | None = None + """ + (String) Target scheme. + Target scheme. + """ + status: float | None = None + """ + (Number) HTTP status code. + HTTP status code. + """ + + +class HttpReturnItem(BaseModel): + contentType: str | None = None + """ + (String) Content type. + Content type. + """ + payload: str | None = None + """ + (String) The payload. + The payload. + """ + status: float | None = None + """ + (Number) HTTP status code. + HTTP status code. + """ + + +class HttpRewritePathItem(BaseModel): + matchPattern: str | None = None + """ + (String) Regex pattern to match against the request path. + Regex pattern to match against the request path. + """ + rewriteTo: str | None = None + """ + (String) Replacement pattern. + Replacement pattern. + """ + + +class HttpRewriteUriItem(BaseModel): + matchPattern: str | None = None + """ + (String) Regex pattern to match against the request path. + Regex pattern to match against the request URI. + """ + rewriteTo: str | None = None + """ + (String) Replacement pattern. + Replacement pattern. + """ + + +class SetForwardedHeader(BaseModel): + active: bool | None = None + """ + (Boolean) + """ + + +class SetRequestHeaderItem(BaseModel): + header: str | None = None + """ + (String) Header name. + Header name. + """ + value: str | None = None + """ + (String) Header value. + Header value. + """ + + +class SetResponseHeaderItem(BaseModel): + header: str | None = None + """ + (String) Header name. + Header name. + """ + value: str | None = None + """ + (String) Header value. + Header value. + """ + + +class TcpRejectItem(BaseModel): + active: bool | None = None + """ + (Boolean) + Indicates if the rule is active. + """ + + +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 BackendNameRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class BackendNameSelector(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 UseBackendItem(BaseModel): + backendName: str | None = None + """ + (String) The name of the backend where traffic will be routed. + The name of the backend where traffic will be routed. + """ + backendNameRef: BackendNameRef | None = None + """ + Reference to a LoadBalancerBackend in network to populate backendName. + """ + backendNameSelector: BackendNameSelector | None = None + """ + Selector for a LoadBalancerBackend in network to populate backendName. + """ + + +class Actions(BaseModel): + httpRedirect: list[HttpRedirectItem] | None = None + """ + (Block List) Redirects HTTP requests to specified location or URL scheme. Only either location or scheme can be defined at a time. (see below for nested schema) + Redirects HTTP requests to specified location or URL scheme. Only either location or scheme can be defined at a time. + """ + httpReturn: list[HttpReturnItem] | None = None + """ + (Block List) Returns HTTP response with specified HTTP status. (see below for nested schema) + Returns HTTP response with specified HTTP status. + """ + httpRewritePath: list[HttpRewritePathItem] | None = None + """ + (Block List) Rewrites the HTTP request path using regex pattern matching. (see below for nested schema) + Rewrites the HTTP request path using regex pattern matching. + """ + httpRewriteUri: list[HttpRewriteUriItem] | None = None + """ + (Block List) Rewrites the entire HTTP request URI using regex pattern matching. (see below for nested schema) + Rewrites the entire HTTP request URI using regex pattern matching. + """ + setForwardedHeaders: list[SetForwardedHeader] | None = None + """ + Forwarded-For / -Proto / -Port' headers in your forwarded requests (see below for nested schema) + Adds 'X-Forwarded-For / -Proto / -Port' headers in your forwarded requests + """ + setRequestHeader: list[SetRequestHeaderItem] | None = None + """ + (Block List) Set request header (see below for nested schema) + Set request header + """ + setResponseHeader: list[SetResponseHeaderItem] | None = None + """ + (Block List) Set response header (see below for nested schema) + Set response header + """ + tcpReject: list[TcpRejectItem] | None = None + """ + (Block List) Terminates a connection. (see below for nested schema) + Terminates a connection. + """ + useBackend: list[UseBackendItem] | None = None + """ + (Block List) Routes traffic to specified backend. (see below for nested schema) + Routes traffic to specified `backend`. + """ + + +class FrontendRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class FrontendSelector(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 BodySizeItem(BaseModel): + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`equal`, `greater`, `greater_or_equal`, `less`, `less_or_equal`). + """ + value: float | None = None + """ + (String) Header value. + Integer value. + """ + + +class BodySizeRangeItem(BaseModel): + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + rangeEnd: float | None = None + """ + (Number) Integer value. + Integer value. + """ + rangeStart: float | None = None + """ + (Number) Integer value. + Integer value. + """ + + +class CookieItem(BaseModel): + ignoreCase: bool | None = None + """ + (Boolean) Defines if case should be ignored. Defaults to false. + Defines if case should be ignored. Defaults to `false`. + """ + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`exact`, `substring`, `regexp`, `starts`, `ends`, `domain`, `ip`, `exists`). Matcher with `exists` and `ip` methods must be used without `value` and `ignore_case` fields. + """ + name: str | None = None + """ + (String) The name of the frontend rule. Must be unique within the frontend. + Name of the argument. + """ + value: str | None = None + """ + (String) Header value. + String value. + """ + + +class HeaderItem(BaseModel): + ignoreCase: bool | None = None + """ + (Boolean) Defines if case should be ignored. Defaults to false. + Defines if case should be ignored. Defaults to `false`. + """ + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`exact`, `substring`, `regexp`, `starts`, `ends`, `domain`, `ip`, `exists`). Matcher with `exists` and `ip` methods must be used without `value` and `ignore_case` fields. + """ + name: str | None = None + """ + (String) The name of the frontend rule. Must be unique within the frontend. + Name of the argument. + """ + value: str | None = None + """ + (String) Header value. + String value. + """ + + +class HostItem(BaseModel): + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + value: str | None = None + """ + (String) Header value. + String value. + """ + + +class HttpMethodItem(BaseModel): + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + value: str | None = None + """ + (String) Header value. + String value (`GET`, `HEAD`, `POST`, `PUT`, `PATCH`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`). + """ + + +class HttpStatu(BaseModel): + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`equal`, `greater`, `greater_or_equal`, `less`, `less_or_equal`). + """ + value: float | None = None + """ + (String) Header value. + Integer value. + """ + + +class HttpStatusRangeItem(BaseModel): + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + rangeEnd: float | None = None + """ + (Number) Integer value. + Integer value. + """ + rangeStart: float | None = None + """ + (Number) Integer value. + Integer value. + """ + + +class NumMembersUpItem(BaseModel): + backendName: str | None = None + """ + (String) The name of the backend where traffic will be routed. + The name of the `backend`. + """ + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`equal`, `greater`, `greater_or_equal`, `less`, `less_or_equal`). + """ + value: float | None = None + """ + (String) Header value. + Integer value. + """ + + +class PathItem(BaseModel): + ignoreCase: bool | None = None + """ + (Boolean) Defines if case should be ignored. Defaults to false. + Defines if case should be ignored. Defaults to `false`. + """ + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`exact`, `substring`, `regexp`, `starts`, `ends`, `domain`, `ip`, `exists`). Matcher with `exists` and `ip` methods must be used without `value` and `ignore_case` fields. + """ + value: str | None = None + """ + (String) Header value. + String value. + """ + + +class RequestHeaderItem(BaseModel): + ignoreCase: bool | None = None + """ + (Boolean) Defines if case should be ignored. Defaults to false. + Defines if case should be ignored. Defaults to `false`. + """ + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`exact`, `substring`, `regexp`, `starts`, `ends`, `domain`, `ip`, `exists`). Matcher with `exists` and `ip` methods must be used without `value` and `ignore_case` fields. + """ + name: str | None = None + """ + (String) The name of the frontend rule. Must be unique within the frontend. + Name of the argument. + """ + value: str | None = None + """ + (String) Header value. + String value. + """ + + +class ResponseHeaderItem(BaseModel): + ignoreCase: bool | None = None + """ + (Boolean) Defines if case should be ignored. Defaults to false. + Defines if case should be ignored. Defaults to `false`. + """ + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`exact`, `substring`, `regexp`, `starts`, `ends`, `domain`, `ip`, `exists`). Matcher with `exists` and `ip` methods must be used without `value` and `ignore_case` fields. + """ + name: str | None = None + """ + (String) The name of the frontend rule. Must be unique within the frontend. + Name of the argument. + """ + value: str | None = None + """ + (String) Header value. + String value. + """ + + +class SrcIpItem(BaseModel): + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + value: str | None = None + """ + (String) Header value. + IP address. CIDR masks are supported, e.g. `192.168.0.0/24`. + """ + + +class SrcPortItem(BaseModel): + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`equal`, `greater`, `greater_or_equal`, `less`, `less_or_equal`). + """ + value: float | None = None + """ + (String) Header value. + Integer value. + """ + + +class SrcPortRangeItem(BaseModel): + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + rangeEnd: float | None = None + """ + (Number) Integer value. + Integer value. + """ + rangeStart: float | None = None + """ + (Number) Integer value. + Integer value. + """ + + +class UrlItem(BaseModel): + ignoreCase: bool | None = None + """ + (Boolean) Defines if case should be ignored. Defaults to false. + Defines if case should be ignored. Defaults to `false`. + """ + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`exact`, `substring`, `regexp`, `starts`, `ends`, `domain`, `ip`, `exists`). Matcher with `exists` and `ip` methods must be used without `value` and `ignore_case` fields. + """ + value: str | None = None + """ + (String) Header value. + String value. + """ + + +class UrlParamItem(BaseModel): + ignoreCase: bool | None = None + """ + (Boolean) Defines if case should be ignored. Defaults to false. + Defines if case should be ignored. Defaults to `false`. + """ + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`exact`, `substring`, `regexp`, `starts`, `ends`, `domain`, `ip`, `exists`). Matcher with `exists` and `ip` methods must be used without `value` and `ignore_case` fields. + """ + name: str | None = None + """ + (String) The name of the frontend rule. Must be unique within the frontend. + Name of the argument. + """ + value: str | None = None + """ + (String) Header value. + String value. + """ + + +class UrlQueryItem(BaseModel): + ignoreCase: bool | None = None + """ + (Boolean) Defines if case should be ignored. Defaults to false. + Defines if case should be ignored. Defaults to `false`. + """ + inverse: bool | None = None + """ + (Boolean) Defines if the condition should be inverted. Works similarly to logical NOT operator. + Defines if the condition should be inverted. Works similarly to logical NOT operator. + """ + method: str | None = None + """ + (String) Match method (equal, greater, greater_or_equal, less, less_or_equal). + Match method (`exact`, `substring`, `regexp`, `starts`, `ends`, `domain`, `ip`, `exists`). Matcher with `exists` and `ip` methods must be used without `value` and `ignore_case` fields. + """ + value: str | None = None + """ + (String) Header value. + String value. + """ + + +class Matchers(BaseModel): + bodySize: list[BodySizeItem] | None = None + """ + (Block List) Matches by HTTP request body size. (see below for nested schema) + Matches by HTTP request body size. + """ + bodySizeRange: list[BodySizeRangeItem] | None = None + """ + (Block List) Matches by range of HTTP request body sizes. (see below for nested schema) + Matches by range of HTTP request body sizes. + """ + cookie: list[CookieItem] | None = None + """ + (Block List) Matches by HTTP cookie value. Cookie name must be provided. (see below for nested schema) + Matches by HTTP cookie value. Cookie name must be provided. + """ + header: list[HeaderItem] | None = None + """ + (String) Header name. + Matches by HTTP header value. Header name must be provided. + """ + host: list[HostItem] | None = None + """ + (Block List) Matches by hostname. Header extracted from HTTP Headers or from TLS certificate in case of secured connection. (see below for nested schema) + Matches by hostname. Header extracted from HTTP Headers or from TLS certificate in case of secured connection. + """ + httpMethod: list[HttpMethodItem] | None = None + """ + (Block List) Matches by HTTP method. (see below for nested schema) + Matches by HTTP method. + """ + httpStatus: list[HttpStatu] | None = None + """ + (Block List) Matches by HTTP status. (see below for nested schema) + Matches by HTTP status. + """ + httpStatusRange: list[HttpStatusRangeItem] | None = None + """ + (Block List) Matches by range of HTTP statuses. (see below for nested schema) + Matches by range of HTTP statuses. + """ + numMembersUp: list[NumMembersUpItem] | None = None + """ + (Block List) Matches by number of healthy backend members. (see below for nested schema) + Matches by number of healthy backend members. + """ + path: list[PathItem] | None = None + """ + (Block List) Matches by URL path. (see below for nested schema) + Matches by URL path. + """ + requestHeader: list[RequestHeaderItem] | None = None + """ + (Block List) Matches by HTTP request header value. Header name must be provided. (see below for nested schema) + Matches by HTTP request header value. Header name must be provided. + """ + responseHeader: list[ResponseHeaderItem] | None = None + """ + (Block List) Matches by HTTP response header value. Header name must be provided. (see below for nested schema) + Matches by HTTP response header value. Header name must be provided. + """ + srcIp: list[SrcIpItem] | None = None + """ + (Block List) Matches by source IP address. (see below for nested schema) + Matches by source IP address. + """ + srcPort: list[SrcPortItem] | None = None + """ + (Block List) Matches by source port number. (see below for nested schema) + Matches by source port number. + """ + srcPortRange: list[SrcPortRangeItem] | None = None + """ + (Block List) Matches by range of source port numbers. (see below for nested schema) + Matches by range of source port numbers. + """ + url: list[UrlItem] | None = None + """ + (Block List) Matches by URL without schema, e.g. example.com/dashboard. (see below for nested schema) + Matches by URL without schema, e.g. `example.com/dashboard`. + """ + urlParam: list[UrlParamItem] | None = None + """ + (Block List) Matches by URL query parameter value. Query parameter name must be provided (see below for nested schema) + Matches by URL query parameter value. Query parameter name must be provided + """ + urlQuery: list[UrlQueryItem] | None = None + """ + (Block List) Matches by URL query string. (see below for nested schema) + Matches by URL query string. + """ + + +class ForProvider(BaseModel): + actions: Actions | None = None + """ + (Block List) Rule actions. (see below for nested schema) + Rule actions. + """ + frontend: str | None = None + """ + (String) ID of the load balancer frontend to which the frontend rule is connected. + ID of the load balancer frontend to which the frontend rule is connected. + """ + frontendRef: FrontendRef | None = None + """ + Reference to a LoadBalancerFrontend in network to populate frontend. + """ + frontendSelector: FrontendSelector | None = None + """ + Selector for a LoadBalancerFrontend in network to populate frontend. + """ + matchers: Matchers | None = None + """ + (Block List) Set of rule matchers. If rule doesn't have matchers, then action applies to all incoming requests. (see below for nested schema) + Set of rule matchers. If rule doesn't have matchers, then action applies to all incoming requests. + """ + matchingCondition: str | None = None + """ + (String) Defines boolean operator used to combine multiple matchers. Defaults to and. + Defines boolean operator used to combine multiple matchers. Defaults to `and`. + """ + priority: float | None = None + """ + (Number) Rule with the higher priority goes first. Rules with the same priority processed in alphabetical order. + Rule with the higher priority goes first. Rules with the same priority processed in alphabetical order. + """ + + +class InitProvider(BaseModel): + actions: Actions | None = None + """ + (Block List) Rule actions. (see below for nested schema) + Rule actions. + """ + matchers: Matchers | None = None + """ + (Block List) Set of rule matchers. If rule doesn't have matchers, then action applies to all incoming requests. (see below for nested schema) + Set of rule matchers. If rule doesn't have matchers, then action applies to all incoming requests. + """ + matchingCondition: str | None = None + """ + (String) Defines boolean operator used to combine multiple matchers. Defaults to and. + Defines boolean operator used to combine multiple matchers. Defaults to `and`. + """ + priority: float | None = None + """ + (Number) Rule with the higher priority goes first. Rules with the same priority processed in alphabetical order. + Rule with the higher priority goes first. Rules with the same priority processed in alphabetical order. + """ + + +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 UseBackendItemModel(BaseModel): + backendName: str | None = None + """ + (String) The name of the backend where traffic will be routed. + The name of the backend where traffic will be routed. + """ + + +class AtProvider(BaseModel): + actions: Actions | None = None + """ + (Block List) Rule actions. (see below for nested schema) + Rule actions. + """ + frontend: str | None = None + """ + (String) ID of the load balancer frontend to which the frontend rule is connected. + ID of the load balancer frontend to which the frontend rule is connected. + """ + id: str | None = None + """ + (String) ID of the frontend rule. ID is in {load balancer UUID}/{frontend name}/{frontend rule name} format. + """ + matchers: Matchers | None = None + """ + (Block List) Set of rule matchers. If rule doesn't have matchers, then action applies to all incoming requests. (see below for nested schema) + Set of rule matchers. If rule doesn't have matchers, then action applies to all incoming requests. + """ + matchingCondition: str | None = None + """ + (String) Defines boolean operator used to combine multiple matchers. Defaults to and. + Defines boolean operator used to combine multiple matchers. Defaults to `and`. + """ + priority: float | None = None + """ + (Number) Rule with the higher priority goes first. Rules with the same priority processed in alphabetical order. + Rule with the higher priority goes first. Rules with the same priority processed in alphabetical order. + """ + + +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 LoadBalancerFrontendRule(BaseModel): + apiVersion: Literal['network.upcloud.com/v1alpha1'] | None = ( + 'network.upcloud.com/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['LoadBalancerFrontendRule'] | None = 'LoadBalancerFrontendRule' + """ + 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 + """ + LoadBalancerFrontendRuleSpec defines the desired state of LoadBalancerFrontendRule + """ + status: Status | None = None + """ + LoadBalancerFrontendRuleStatus defines the observed state of LoadBalancerFrontendRule. + """ + + +class LoadBalancerFrontendRuleList(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[LoadBalancerFrontendRule] + """ + List of loadbalancerfrontendrules. 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/com/upcloud/network/loadbalancerfrontendtlsconfig/__init__.py b/schemas/python/models/com/upcloud/network/loadbalancerfrontendtlsconfig/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/network/loadbalancerfrontendtlsconfig/v1alpha1.py b/schemas/python/models/com/upcloud/network/loadbalancerfrontendtlsconfig/v1alpha1.py new file mode 100644 index 000000000..1fcc040ed --- /dev/null +++ b/schemas/python/models/com/upcloud/network/loadbalancerfrontendtlsconfig/v1alpha1.py @@ -0,0 +1,322 @@ +# generated by datamodel-codegen: +# filename: workdir/network_upcloud_com_v1alpha1_loadbalancerfrontendtlsconfig.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 CertificateBundleRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class CertificateBundleSelector(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 FrontendRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class FrontendSelector(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): + certificateBundle: str | None = None + """ + (String) Reference to certificate bundle ID. + Reference to certificate bundle ID. + """ + certificateBundleRef: CertificateBundleRef | None = None + """ + Reference to a LoadBalancerManualCertificateBundle in network to populate certificateBundle. + """ + certificateBundleSelector: CertificateBundleSelector | None = None + """ + Selector for a LoadBalancerManualCertificateBundle in network to populate certificateBundle. + """ + frontend: str | None = None + """ + (String) ID of the load balancer frontend to which the TLS config is connected. + ID of the load balancer frontend to which the TLS config is connected. + """ + frontendRef: FrontendRef | None = None + """ + Reference to a LoadBalancerFrontend in network to populate frontend. + """ + frontendSelector: FrontendSelector | None = None + """ + Selector for a LoadBalancerFrontend in network to populate frontend. + """ + + +class InitProvider(BaseModel): + certificateBundle: str | None = None + """ + (String) Reference to certificate bundle ID. + Reference to certificate bundle ID. + """ + certificateBundleRef: CertificateBundleRef | None = None + """ + Reference to a LoadBalancerManualCertificateBundle in network to populate certificateBundle. + """ + certificateBundleSelector: CertificateBundleSelector | None = None + """ + Selector for a LoadBalancerManualCertificateBundle in network to populate certificateBundle. + """ + + +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): + certificateBundle: str | None = None + """ + (String) Reference to certificate bundle ID. + Reference to certificate bundle ID. + """ + frontend: str | None = None + """ + (String) ID of the load balancer frontend to which the TLS config is connected. + ID of the load balancer frontend to which the TLS config is connected. + """ + id: str | None = None + """ + (String) ID of the TLS config. ID is in {load balancer UUID}/{frontend name}/{TLS config name} 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 LoadBalancerFrontendTLSConfig(BaseModel): + apiVersion: Literal['network.upcloud.com/v1alpha1'] | None = ( + 'network.upcloud.com/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['LoadBalancerFrontendTLSConfig'] | None = ( + 'LoadBalancerFrontendTLSConfig' + ) + """ + 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 + """ + LoadBalancerFrontendTLSConfigSpec defines the desired state of LoadBalancerFrontendTLSConfig + """ + status: Status | None = None + """ + LoadBalancerFrontendTLSConfigStatus defines the observed state of LoadBalancerFrontendTLSConfig. + """ + + +class LoadBalancerFrontendTLSConfigList(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[LoadBalancerFrontendTLSConfig] + """ + List of loadbalancerfrontendtlsconfigs. 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/com/upcloud/network/loadbalancermanualcertificatebundle/__init__.py b/schemas/python/models/com/upcloud/network/loadbalancermanualcertificatebundle/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/network/loadbalancermanualcertificatebundle/v1alpha1.py b/schemas/python/models/com/upcloud/network/loadbalancermanualcertificatebundle/v1alpha1.py new file mode 100644 index 000000000..eb50c1bdc --- /dev/null +++ b/schemas/python/models/com/upcloud/network/loadbalancermanualcertificatebundle/v1alpha1.py @@ -0,0 +1,319 @@ +# generated by datamodel-codegen: +# filename: workdir/network_upcloud_com_v1alpha1_loadbalancermanualcertificatebundle.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.k8s.apimachinery.pkg.apis.meta import v1 + + +class PrivateKeySecretRef(BaseModel): + key: str + """ + The key to select. + """ + name: str + """ + Name of the secret. + """ + namespace: str + """ + Namespace of the secret. + """ + + +class ForProvider(BaseModel): + certificate: str | None = None + """ + (String) Certificate as base64 encoded string. Must be in PEM format. + Certificate as base64 encoded string. Must be in PEM format. + """ + intermediates: str | None = None + """ + (String) Intermediate certificates as base64 encoded string. Must be in PEM format. + Intermediate certificates as base64 encoded string. Must be in PEM format. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the manual certificate bundle. + User defined key-value pairs to classify the manual certificate bundle. + """ + name: str | None = None + """ + (String) The name of the certificate bundle. Must be unique within customer account. + The name of the certificate bundle. Must be unique within customer account. + """ + privateKeySecretRef: PrivateKeySecretRef | None = None + """ + (String, Sensitive) Private key as base64 encoded string. Must be in PEM format. + Private key as base64 encoded string. Must be in PEM format. + """ + + +class InitProvider(BaseModel): + certificate: str | None = None + """ + (String) Certificate as base64 encoded string. Must be in PEM format. + Certificate as base64 encoded string. Must be in PEM format. + """ + intermediates: str | None = None + """ + (String) Intermediate certificates as base64 encoded string. Must be in PEM format. + Intermediate certificates as base64 encoded string. Must be in PEM format. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the manual certificate bundle. + User defined key-value pairs to classify the manual certificate bundle. + """ + name: str | None = None + """ + (String) The name of the certificate bundle. Must be unique within customer account. + The name of the certificate bundle. Must be unique within customer account. + """ + privateKeySecretRef: PrivateKeySecretRef + """ + (String, Sensitive) Private key as base64 encoded string. Must be in PEM format. + Private key as base64 encoded string. Must be in PEM format. + """ + + +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): + certificate: str | None = None + """ + (String) Certificate as base64 encoded string. Must be in PEM format. + Certificate as base64 encoded string. Must be in PEM format. + """ + id: str | None = None + """ + (String) The UUID of the certificate bundle. + """ + intermediates: str | None = None + """ + (String) Intermediate certificates as base64 encoded string. Must be in PEM format. + Intermediate certificates as base64 encoded string. Must be in PEM format. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the manual certificate bundle. + User defined key-value pairs to classify the manual certificate bundle. + """ + name: str | None = None + """ + (String) The name of the certificate bundle. Must be unique within customer account. + The name of the certificate bundle. Must be unique within customer account. + """ + notAfter: str | None = None + """ + (String) The time after which a certificate is no longer valid. + The time after which a certificate is no longer valid. + """ + notBefore: str | None = None + """ + (String) The time on which a certificate becomes valid. + The time on which a certificate becomes valid. + """ + operationalState: str | None = None + """ + (String) The service operational state indicates the service's current operational, effective state. Managed by the system. + The service operational state indicates the service's current operational, effective state. Managed by the system. + """ + + +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 LoadBalancerManualCertificateBundle(BaseModel): + apiVersion: Literal['network.upcloud.com/v1alpha1'] | None = ( + 'network.upcloud.com/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['LoadBalancerManualCertificateBundle'] | None = ( + 'LoadBalancerManualCertificateBundle' + ) + """ + 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 + """ + LoadBalancerManualCertificateBundleSpec defines the desired state of LoadBalancerManualCertificateBundle + """ + status: Status | None = None + """ + LoadBalancerManualCertificateBundleStatus defines the observed state of LoadBalancerManualCertificateBundle. + """ + + +class LoadBalancerManualCertificateBundleList(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[LoadBalancerManualCertificateBundle] + """ + List of loadbalancermanualcertificatebundles. 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/com/upcloud/network/loadbalancerresolver/__init__.py b/schemas/python/models/com/upcloud/network/loadbalancerresolver/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/network/loadbalancerresolver/v1alpha1.py b/schemas/python/models/com/upcloud/network/loadbalancerresolver/v1alpha1.py new file mode 100644 index 000000000..895591c1c --- /dev/null +++ b/schemas/python/models/com/upcloud/network/loadbalancerresolver/v1alpha1.py @@ -0,0 +1,352 @@ +# generated by datamodel-codegen: +# filename: workdir/network_upcloud_com_v1alpha1_loadbalancerresolver.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 LoadbalancerRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class LoadbalancerSelector(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): + cacheInvalid: float | None = None + """ + (Number) Time in seconds to cache invalid results. + Time in seconds to cache invalid results. + """ + cacheValid: float | None = None + """ + (Number) Time in seconds to cache valid results. + Time in seconds to cache valid results. + """ + loadbalancer: str | None = None + """ + (String) ID of the load balancer to which the resolver is connected. + ID of the load balancer to which the resolver is connected. + """ + loadbalancerRef: LoadbalancerRef | None = None + """ + Reference to a LoadBalancer in network to populate loadbalancer. + """ + loadbalancerSelector: LoadbalancerSelector | None = None + """ + Selector for a LoadBalancer in network to populate loadbalancer. + """ + nameservers: list[str] | None = None + """ + (List of String) List of nameserver IP addresses. Nameserver can reside in public internet or in customer private network. Port is optional, if missing then default 53 will be used. + List of nameserver IP addresses. Nameserver can reside in public internet or in customer private network. Port is optional, if missing then default 53 will be used. + """ + retries: float | None = None + """ + (Number) Number of retries on failure. + Number of retries on failure. + """ + timeout: float | None = None + """ + (Number) Timeout for the query in seconds. + Timeout for the query in seconds. + """ + timeoutRetry: float | None = None + """ + (Number) Timeout for the query retries in seconds. + Timeout for the query retries in seconds. + """ + + +class InitProvider(BaseModel): + cacheInvalid: float | None = None + """ + (Number) Time in seconds to cache invalid results. + Time in seconds to cache invalid results. + """ + cacheValid: float | None = None + """ + (Number) Time in seconds to cache valid results. + Time in seconds to cache valid results. + """ + nameservers: list[str] | None = None + """ + (List of String) List of nameserver IP addresses. Nameserver can reside in public internet or in customer private network. Port is optional, if missing then default 53 will be used. + List of nameserver IP addresses. Nameserver can reside in public internet or in customer private network. Port is optional, if missing then default 53 will be used. + """ + retries: float | None = None + """ + (Number) Number of retries on failure. + Number of retries on failure. + """ + timeout: float | None = None + """ + (Number) Timeout for the query in seconds. + Timeout for the query in seconds. + """ + timeoutRetry: float | None = None + """ + (Number) Timeout for the query retries in seconds. + Timeout for the query retries in seconds. + """ + + +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): + cacheInvalid: float | None = None + """ + (Number) Time in seconds to cache invalid results. + Time in seconds to cache invalid results. + """ + cacheValid: float | None = None + """ + (Number) Time in seconds to cache valid results. + Time in seconds to cache valid results. + """ + id: str | None = None + """ + (String) ID of the resolver. ID is in {load balancer UUID}/{resolver name} format. + """ + loadbalancer: str | None = None + """ + (String) ID of the load balancer to which the resolver is connected. + ID of the load balancer to which the resolver is connected. + """ + nameservers: list[str] | None = None + """ + (List of String) List of nameserver IP addresses. Nameserver can reside in public internet or in customer private network. Port is optional, if missing then default 53 will be used. + List of nameserver IP addresses. Nameserver can reside in public internet or in customer private network. Port is optional, if missing then default 53 will be used. + """ + retries: float | None = None + """ + (Number) Number of retries on failure. + Number of retries on failure. + """ + timeout: float | None = None + """ + (Number) Timeout for the query in seconds. + Timeout for the query in seconds. + """ + timeoutRetry: float | None = None + """ + (Number) Timeout for the query retries in seconds. + Timeout for the query retries in seconds. + """ + + +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 LoadBalancerResolver(BaseModel): + apiVersion: Literal['network.upcloud.com/v1alpha1'] | None = ( + 'network.upcloud.com/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['LoadBalancerResolver'] | None = 'LoadBalancerResolver' + """ + 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 + """ + LoadBalancerResolverSpec defines the desired state of LoadBalancerResolver + """ + status: Status | None = None + """ + LoadBalancerResolverStatus defines the observed state of LoadBalancerResolver. + """ + + +class LoadBalancerResolverList(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[LoadBalancerResolver] + """ + List of loadbalancerresolvers. 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/com/upcloud/network/loadbalancerstaticbackendmember/__init__.py b/schemas/python/models/com/upcloud/network/loadbalancerstaticbackendmember/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/network/loadbalancerstaticbackendmember/v1alpha1.py b/schemas/python/models/com/upcloud/network/loadbalancerstaticbackendmember/v1alpha1.py new file mode 100644 index 000000000..0d5901cfe --- /dev/null +++ b/schemas/python/models/com/upcloud/network/loadbalancerstaticbackendmember/v1alpha1.py @@ -0,0 +1,339 @@ +# generated by datamodel-codegen: +# filename: workdir/network_upcloud_com_v1alpha1_loadbalancerstaticbackendmember.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 BackendRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class BackendSelector(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): + backend: str | None = None + """ + (String) ID of the load balancer backend to which the member is connected. + ID of the load balancer backend to which the member is connected. + """ + backendRef: BackendRef | None = None + """ + Reference to a LoadBalancerBackend in network to populate backend. + """ + backendSelector: BackendSelector | None = None + """ + Selector for a LoadBalancerBackend in network to populate backend. + """ + enabled: bool | None = None + """ + (Boolean) Indicates if the member is enabled. Disabled members are excluded from load balancing. + Indicates if the member is enabled. Disabled members are excluded from load balancing. + """ + ip: str | None = None + """ + (String) Optional fallback IP address in case of failure on DNS resolving. + Optional fallback IP address in case of failure on DNS resolving. + """ + maxSessions: float | None = None + """ + (Number) Maximum number of sessions before queueing. + Maximum number of sessions before queueing. + """ + port: float | None = None + """ + (Number) Server port. Port is optional and can be specified in DNS SRV record. + Server port. Port is optional and can be specified in DNS SRV record. + """ + weight: float | None = None + """ + (Number) Weight of the member. The higher the weight, the more traffic the member receives. + Weight of the member. The higher the weight, the more traffic the member receives. + """ + + +class InitProvider(BaseModel): + enabled: bool | None = None + """ + (Boolean) Indicates if the member is enabled. Disabled members are excluded from load balancing. + Indicates if the member is enabled. Disabled members are excluded from load balancing. + """ + ip: str | None = None + """ + (String) Optional fallback IP address in case of failure on DNS resolving. + Optional fallback IP address in case of failure on DNS resolving. + """ + maxSessions: float | None = None + """ + (Number) Maximum number of sessions before queueing. + Maximum number of sessions before queueing. + """ + port: float | None = None + """ + (Number) Server port. Port is optional and can be specified in DNS SRV record. + Server port. Port is optional and can be specified in DNS SRV record. + """ + weight: float | None = None + """ + (Number) Weight of the member. The higher the weight, the more traffic the member receives. + Weight of the member. The higher the weight, the more traffic the member receives. + """ + + +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): + backend: str | None = None + """ + (String) ID of the load balancer backend to which the member is connected. + ID of the load balancer backend to which the member is connected. + """ + enabled: bool | None = None + """ + (Boolean) Indicates if the member is enabled. Disabled members are excluded from load balancing. + Indicates if the member is enabled. Disabled members are excluded from load balancing. + """ + id: str | None = None + """ + (String) ID of the backend member. ID is in {load balancer UUID}/{backend name}/{member name} format. + """ + ip: str | None = None + """ + (String) Optional fallback IP address in case of failure on DNS resolving. + Optional fallback IP address in case of failure on DNS resolving. + """ + maxSessions: float | None = None + """ + (Number) Maximum number of sessions before queueing. + Maximum number of sessions before queueing. + """ + port: float | None = None + """ + (Number) Server port. Port is optional and can be specified in DNS SRV record. + Server port. Port is optional and can be specified in DNS SRV record. + """ + weight: float | None = None + """ + (Number) Weight of the member. The higher the weight, the more traffic the member receives. + Weight of the member. The higher the weight, the more traffic the member receives. + """ + + +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 LoadBalancerStaticBackendMember(BaseModel): + apiVersion: Literal['network.upcloud.com/v1alpha1'] | None = ( + 'network.upcloud.com/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['LoadBalancerStaticBackendMember'] | None = ( + 'LoadBalancerStaticBackendMember' + ) + """ + 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 + """ + LoadBalancerStaticBackendMemberSpec defines the desired state of LoadBalancerStaticBackendMember + """ + status: Status | None = None + """ + LoadBalancerStaticBackendMemberStatus defines the observed state of LoadBalancerStaticBackendMember. + """ + + +class LoadBalancerStaticBackendMemberList(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[LoadBalancerStaticBackendMember] + """ + List of loadbalancerstaticbackendmembers. 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/com/upcloud/network/networkpeering/__init__.py b/schemas/python/models/com/upcloud/network/networkpeering/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/network/networkpeering/v1alpha1.py b/schemas/python/models/com/upcloud/network/networkpeering/v1alpha1.py new file mode 100644 index 000000000..9bebae79d --- /dev/null +++ b/schemas/python/models/com/upcloud/network/networkpeering/v1alpha1.py @@ -0,0 +1,367 @@ +# generated by datamodel-codegen: +# filename: workdir/network_upcloud_com_v1alpha1_networkpeering.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 UuidRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class UuidSelector(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 NetworkItem(BaseModel): + uuid: str | None = None + """ + (String) The UUID of the network. + The UUID of the network. + """ + uuidRef: UuidRef | None = None + """ + Reference to a Network in network to populate uuid. + """ + uuidSelector: UuidSelector | None = None + """ + Selector for a Network in network to populate uuid. + """ + + +class PeerNetworkItem(BaseModel): + uuid: str | None = None + """ + (String) The UUID of the network. + The UUID of the network. + """ + uuidRef: UuidRef | None = None + """ + Reference to a Network in network to populate uuid. + """ + uuidSelector: UuidSelector | None = None + """ + Selector for a Network in network to populate uuid. + """ + + +class ForProvider(BaseModel): + configuredStatus: str | None = None + """ + (String) Configured status of the network peering. + Configured status of the network peering. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the network peering. + User defined key-value pairs to classify the network peering. + """ + name: str | None = None + """ + (String) Name of the network peering. + Name of the network peering. + """ + network: list[NetworkItem] | None = None + """ + (Block List) Local network of the network peering. (see below for nested schema) + Local network of the network peering. + """ + peerNetwork: list[PeerNetworkItem] | None = None + """ + (Block List) Peer network of the network peering. (see below for nested schema) + Peer network of the network peering. + """ + + +class InitProvider(BaseModel): + configuredStatus: str | None = None + """ + (String) Configured status of the network peering. + Configured status of the network peering. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the network peering. + User defined key-value pairs to classify the network peering. + """ + name: str | None = None + """ + (String) Name of the network peering. + Name of the network peering. + """ + network: list[NetworkItem] | None = None + """ + (Block List) Local network of the network peering. (see below for nested schema) + Local network of the network peering. + """ + peerNetwork: list[PeerNetworkItem] | None = None + """ + (Block List) Peer network of the network peering. (see below for nested schema) + Peer network of the network peering. + """ + + +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 NetworkItemModel(BaseModel): + uuid: str | None = None + """ + (String) The UUID of the network. + The UUID of the network. + """ + + +class PeerNetworkItemModel(BaseModel): + uuid: str | None = None + """ + (String) The UUID of the network. + The UUID of the network. + """ + + +class AtProvider(BaseModel): + configuredStatus: str | None = None + """ + (String) Configured status of the network peering. + Configured status of the network peering. + """ + id: str | None = None + """ + (String) UUID of the network peering. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the network peering. + User defined key-value pairs to classify the network peering. + """ + name: str | None = None + """ + (String) Name of the network peering. + Name of the network peering. + """ + network: list[NetworkItemModel] | None = None + """ + (Block List) Local network of the network peering. (see below for nested schema) + Local network of the network peering. + """ + peerNetwork: list[PeerNetworkItemModel] | None = None + """ + (Block List) Peer network of the network peering. (see below for nested schema) + Peer network of the network peering. + """ + + +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 NetworkPeering(BaseModel): + apiVersion: Literal['network.upcloud.com/v1alpha1'] | None = ( + 'network.upcloud.com/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['NetworkPeering'] | None = 'NetworkPeering' + """ + 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 + """ + NetworkPeeringSpec defines the desired state of NetworkPeering + """ + status: Status | None = None + """ + NetworkPeeringStatus defines the observed state of NetworkPeering. + """ + + +class NetworkPeeringList(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[NetworkPeering] + """ + List of networkpeerings. 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/com/upcloud/network/router/__init__.py b/schemas/python/models/com/upcloud/network/router/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/network/router/v1alpha1.py b/schemas/python/models/com/upcloud/network/router/v1alpha1.py new file mode 100644 index 000000000..4779ef952 --- /dev/null +++ b/schemas/python/models/com/upcloud/network/router/v1alpha1.py @@ -0,0 +1,337 @@ +# generated by datamodel-codegen: +# filename: workdir/network_upcloud_com_v1alpha1_router.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.k8s.apimachinery.pkg.apis.meta import v1 + + +class StaticRouteItem(BaseModel): + name: str | None = None + """ + (String) Name of the router. + Name or description of the route. + """ + nexthop: str | None = None + """ + (String) Next hop address. NOTE: For static route to be active the next hop has to be an address of a reachable running Cloud Server in one of the Private Networks attached to the router. + Next hop address. NOTE: For static route to be active the next hop has to be an address of a reachable running Cloud Server in one of the Private Networks attached to the router. + """ + route: str | None = None + """ + (String) Destination prefix of the route. + Destination prefix of the route. + """ + + +class ForProvider(BaseModel): + labels: dict[str, str] | None = None + """ + value pairs to classify the router. + User defined key-value pairs to classify the router. + """ + name: str | None = None + """ + (String) Name of the router. + Name of the router. + """ + staticRoute: list[StaticRouteItem] | None = None + """ + (Block Set) A collection of user managed static routes for this router. (see below for nested schema) + A collection of user managed static routes for this router. + """ + + +class InitProvider(BaseModel): + labels: dict[str, str] | None = None + """ + value pairs to classify the router. + User defined key-value pairs to classify the router. + """ + name: str | None = None + """ + (String) Name of the router. + Name of the router. + """ + staticRoute: list[StaticRouteItem] | None = None + """ + (Block Set) A collection of user managed static routes for this router. (see below for nested schema) + A collection of user managed static routes for this router. + """ + + +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 StaticRouteItemModel(BaseModel): + name: str | None = None + """ + (String) Name of the router. + Name or description of the route. + """ + nexthop: str | None = None + """ + (String) Next hop address. NOTE: For static route to be active the next hop has to be an address of a reachable running Cloud Server in one of the Private Networks attached to the router. + Next hop address. NOTE: For static route to be active the next hop has to be an address of a reachable running Cloud Server in one of the Private Networks attached to the router. + """ + route: str | None = None + """ + (String) Destination prefix of the route. + Destination prefix of the route. + """ + type: str | None = None + """ + (String) Type of the router + Type of the route. + """ + + +class StaticRoute(BaseModel): + name: str | None = None + """ + (String) Name of the router. + """ + nexthop: str | None = None + """ + (String) Next hop address. NOTE: For static route to be active the next hop has to be an address of a reachable running Cloud Server in one of the Private Networks attached to the router. + """ + route: str | None = None + """ + (String) Destination prefix of the route. + """ + type: str | None = None + """ + (String) Type of the router + """ + + +class AtProvider(BaseModel): + attachedNetworks: list[str] | None = None + """ + (List of String) List of UUIDs representing networks attached to this router. + List of UUIDs representing networks attached to this router. + """ + id: str | None = None + """ + (String) UUID of the router. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the router. + User defined key-value pairs to classify the router. + """ + name: str | None = None + """ + (String) Name of the router. + Name of the router. + """ + staticRoute: list[StaticRouteItemModel] | None = None + """ + (Block Set) A collection of user managed static routes for this router. (see below for nested schema) + A collection of user managed static routes for this router. + """ + staticRoutes: list[StaticRoute] | None = None + """ + (Set of Object) A collection of static routes for this router. This set includes both user and service defined static routes. The objects in this set use the same schema as static_route blocks. (see below for nested schema) + A collection of static routes for this router. This set includes both user and service defined static routes. The objects in this set use the same schema as `static_route` blocks. + """ + type: str | None = None + """ + (String) Type of the router + Type of the router + """ + + +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 Router(BaseModel): + apiVersion: Literal['network.upcloud.com/v1alpha1'] | None = ( + 'network.upcloud.com/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['Router'] | None = 'Router' + """ + 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 + """ + RouterSpec defines the desired state of Router + """ + status: Status | None = None + """ + RouterStatus defines the observed state of Router. + """ + + +class RouterList(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[Router] + """ + List of routers. 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/com/upcloud/network/v1alpha1.py b/schemas/python/models/com/upcloud/network/v1alpha1.py new file mode 100644 index 000000000..5aea3df84 --- /dev/null +++ b/schemas/python/models/com/upcloud/network/v1alpha1.py @@ -0,0 +1,508 @@ +# generated by datamodel-codegen: +# filename: workdir/network_upcloud_com_v1alpha1_network.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ....io.k8s.apimachinery.pkg.apis.meta import v1 + + +class EffectiveRoutesAutoPopulation(BaseModel): + enabled: bool | None = None + """ + population. + Enable or disable route auto-population. + """ + excludeBySource: list[str] | None = None + """ + connected-networks, static-route). + Exclude routes coming from specific sources (router-connected-networks, static-route). + """ + filterByDestination: list[str] | None = None + """ + populating routes. + CIDR destinations to include when auto-populating routes. + """ + filterByRouteType: list[str] | None = None + """ + (Set of String) Include only routes of given types (service, user). + Include only routes of given types (service, user). + """ + + +class DhcpRoutesConfiguration(BaseModel): + effectiveRoutesAutoPopulation: EffectiveRoutesAutoPopulation | None = None + """ + (Attributes) Automatically populate effective routes. (see below for nested schema) + """ + + +class IpNetwork(BaseModel): + address: str | None = None + """ + (String) The CIDR range of the subnet + The CIDR range of the subnet + """ + dhcp: bool | None = None + """ + (Boolean) Is DHCP enabled? + Is DHCP enabled? + """ + dhcpDefaultRoute: bool | None = None + """ + (Boolean) Is the gateway the DHCP default route? + Is the gateway the DHCP default route? + """ + dhcpDns: list[str] | None = None + """ + (Set of String) The DNS servers given by DHCP + The DNS servers given by DHCP + """ + dhcpRoutes: list[str] | None = None + """ + (Set of String) The additional DHCP classless static routes given by DHCP + The additional DHCP classless static routes given by DHCP + """ + dhcpRoutesConfiguration: DhcpRoutesConfiguration | None = None + """ + population configuration. (see below for nested schema) + """ + family: str | None = None + """ + (String) IP address family + IP address family + """ + gateway: str | None = None + """ + (String) Gateway address given by DHCP + Gateway address given by DHCP + """ + + +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 RouterRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class RouterSelector(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): + ipNetwork: IpNetwork | None = None + """ + (Block List) IP subnet within the network. Network must have exactly one IP subnet. (see below for nested schema) + IP subnet within the network. Network must have exactly one IP subnet. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the network. + User defined key-value pairs to classify the network. + """ + name: str | None = None + """ + (String) Name of the network. + Name of the network. + """ + router: str | None = None + """ + (String) UUID of a router to attach to this network. + UUID of a router to attach to this network. + """ + routerRef: RouterRef | None = None + """ + Reference to a Router in network to populate router. + """ + routerSelector: RouterSelector | None = None + """ + Selector for a Router in network to populate router. + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + The zone the network is in, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +class InitProvider(BaseModel): + ipNetwork: IpNetwork | None = None + """ + (Block List) IP subnet within the network. Network must have exactly one IP subnet. (see below for nested schema) + IP subnet within the network. Network must have exactly one IP subnet. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the network. + User defined key-value pairs to classify the network. + """ + name: str | None = None + """ + (String) Name of the network. + Name of the network. + """ + router: str | None = None + """ + (String) UUID of a router to attach to this network. + UUID of a router to attach to this network. + """ + routerRef: RouterRef | None = None + """ + Reference to a Router in network to populate router. + """ + routerSelector: RouterSelector | None = None + """ + Selector for a Router in network to populate router. + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + The zone the network is in, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 EffectiveRoute(BaseModel): + nexthop: str | None = None + """ + (String) Next hop address for this DHCP route. + Next hop address for this route. + """ + route: str | None = None + """ + (String) Destination prefix (CIDR) of the DHCP route. + Destination CIDR of the route. + """ + source: str | None = None + """ + route, router-connected-networks). + Origin of the route (e.g., static-route, router-connected-networks). + """ + sourceResourceId: str | None = None + """ + (String) UUID of the source resource that provided this route, if applicable. + UUID of the source resource that provided this route, if applicable. + """ + type: str | None = None + """ + (String) The network type + Route type (service or user). + """ + + +class DhcpEffectiveRoute(BaseModel): + autoPopulated: bool | None = None + """ + populated by DHCP. + Whether the route was auto-populated by DHCP. + """ + nexthop: str | None = None + """ + (String) Next hop address for this DHCP route. + Next hop address for this DHCP route. + """ + route: str | None = None + """ + (String) Destination prefix (CIDR) of the DHCP route. + Destination prefix (CIDR) of the DHCP route. + """ + + +class IpNetworkModel(BaseModel): + address: str | None = None + """ + (String) The CIDR range of the subnet + The CIDR range of the subnet + """ + dhcp: bool | None = None + """ + (Boolean) Is DHCP enabled? + Is DHCP enabled? + """ + dhcpDefaultRoute: bool | None = None + """ + (Boolean) Is the gateway the DHCP default route? + Is the gateway the DHCP default route? + """ + dhcpDns: list[str] | None = None + """ + (Set of String) The DNS servers given by DHCP + The DNS servers given by DHCP + """ + dhcpEffectiveRoutes: list[DhcpEffectiveRoute] | None = None + """ + only). (see below for nested schema) + """ + dhcpRoutes: list[str] | None = None + """ + (Set of String) The additional DHCP classless static routes given by DHCP + The additional DHCP classless static routes given by DHCP + """ + dhcpRoutesConfiguration: DhcpRoutesConfiguration | None = None + """ + population configuration. (see below for nested schema) + """ + family: str | None = None + """ + (String) IP address family + IP address family + """ + gateway: str | None = None + """ + (String) Gateway address given by DHCP + Gateway address given by DHCP + """ + + +class AtProvider(BaseModel): + effectiveRoutes: list[EffectiveRoute] | None = None + """ + only). (see below for nested schema) + """ + id: str | None = None + """ + (String) UUID of the network. + """ + ipNetwork: IpNetworkModel | None = None + """ + (Block List) IP subnet within the network. Network must have exactly one IP subnet. (see below for nested schema) + IP subnet within the network. Network must have exactly one IP subnet. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the network. + User defined key-value pairs to classify the network. + """ + name: str | None = None + """ + (String) Name of the network. + Name of the network. + """ + router: str | None = None + """ + (String) UUID of a router to attach to this network. + UUID of a router to attach to this network. + """ + type: str | None = None + """ + (String) The network type + The network type + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + The zone the network is in, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 Network(BaseModel): + apiVersion: Literal['network.upcloud.com/v1alpha1'] | None = ( + 'network.upcloud.com/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['Network'] | None = 'Network' + """ + 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 + """ + NetworkSpec defines the desired state of Network + """ + status: Status | None = None + """ + NetworkStatus defines the observed state of Network. + """ + + +class NetworkList(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[Network] + """ + List of networks. 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/com/upcloud/objectstorage/__init__.py b/schemas/python/models/com/upcloud/objectstorage/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/objectstorage/managedobjectstorage/__init__.py b/schemas/python/models/com/upcloud/objectstorage/managedobjectstorage/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/objectstorage/managedobjectstorage/v1alpha1.py b/schemas/python/models/com/upcloud/objectstorage/managedobjectstorage/v1alpha1.py new file mode 100644 index 000000000..b63f6829f --- /dev/null +++ b/schemas/python/models/com/upcloud/objectstorage/managedobjectstorage/v1alpha1.py @@ -0,0 +1,357 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_upcloud_com_v1alpha1_managedobjectstorage.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.k8s.apimachinery.pkg.apis.meta import v1 + + +class NetworkItem(BaseModel): + family: str | None = None + """ + (String) Network family. Currently only IPv4 is supported. + Network family. Currently only `IPv4` is supported. + """ + name: str | None = None + """ + (String) Name of the Managed Object Storage service. Must be unique within account. + Network name. Must be unique within the service. + """ + type: str | None = None + """ + (String) Network type (private or public). + Network type (`private` or `public`). + """ + uuid: str | None = None + """ + (String) Private network uuid. For public networks the field should be omitted. + Private network uuid. For public networks the field should be omitted. + """ + + +class ForProvider(BaseModel): + configuredStatus: str | None = None + """ + (String) Service status managed by the end user. + Service status managed by the end user. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the managed object storage. + User defined key-value pairs to classify the managed object storage. + """ + name: str | None = None + """ + (String) Name of the Managed Object Storage service. Must be unique within account. + Name of the Managed Object Storage service. Must be unique within account. + """ + network: list[NetworkItem] | None = None + """ + (Block Set) Attached networks from where object storage can be used. Private networks must reside in object storage region. To gain access from multiple private networks that might reside in different zones, create the networks and a corresponding router for each network. (see below for nested schema) + Attached networks from where object storage can be used. Private networks must reside in object storage region. To gain access from multiple private networks that might reside in different zones, create the networks and a corresponding router for each network. + """ + region: str | None = None + """ + storage regions to list available regions. + Region in which the service will be hosted, see `upcloud_managed_object_storage_regions` data source or use `upctl object-storage regions` to list available regions. + """ + + +class InitProvider(BaseModel): + configuredStatus: str | None = None + """ + (String) Service status managed by the end user. + Service status managed by the end user. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the managed object storage. + User defined key-value pairs to classify the managed object storage. + """ + name: str | None = None + """ + (String) Name of the Managed Object Storage service. Must be unique within account. + Name of the Managed Object Storage service. Must be unique within account. + """ + network: list[NetworkItem] | None = None + """ + (Block Set) Attached networks from where object storage can be used. Private networks must reside in object storage region. To gain access from multiple private networks that might reside in different zones, create the networks and a corresponding router for each network. (see below for nested schema) + Attached networks from where object storage can be used. Private networks must reside in object storage region. To gain access from multiple private networks that might reside in different zones, create the networks and a corresponding router for each network. + """ + region: str | None = None + """ + storage regions to list available regions. + Region in which the service will be hosted, see `upcloud_managed_object_storage_regions` data source or use `upctl object-storage regions` to list available regions. + """ + + +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 EndpointItem(BaseModel): + domainName: str | None = None + """ + (String) Domain name of the endpoint. + Domain name of the endpoint. + """ + iamUrl: str | None = None + """ + (String) URL for IAM. + URL for IAM. + """ + stsUrl: str | None = None + """ + (String) URL for STS. + URL for STS. + """ + type: str | None = None + """ + (String) Network type (private or public). + Type of the endpoint (`private` / `public`). + """ + + +class AtProvider(BaseModel): + configuredStatus: str | None = None + """ + (String) Service status managed by the end user. + Service status managed by the end user. + """ + createdAt: str | None = None + """ + (String) Creation time. + Creation time. + """ + endpoint: list[EndpointItem] | None = None + """ + (Attributes Set) Endpoints for accessing the Managed Object Storage service. (see below for nested schema) + """ + id: str | None = None + """ + (String) The UUID of the managed object storage instance. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the managed object storage. + User defined key-value pairs to classify the managed object storage. + """ + name: str | None = None + """ + (String) Name of the Managed Object Storage service. Must be unique within account. + Name of the Managed Object Storage service. Must be unique within account. + """ + network: list[NetworkItem] | None = None + """ + (Block Set) Attached networks from where object storage can be used. Private networks must reside in object storage region. To gain access from multiple private networks that might reside in different zones, create the networks and a corresponding router for each network. (see below for nested schema) + Attached networks from where object storage can be used. Private networks must reside in object storage region. To gain access from multiple private networks that might reside in different zones, create the networks and a corresponding router for each network. + """ + operationalState: str | None = None + """ + (String) Operational state of the Managed Object Storage service. + Operational state of the Managed Object Storage service. + """ + region: str | None = None + """ + storage regions to list available regions. + Region in which the service will be hosted, see `upcloud_managed_object_storage_regions` data source or use `upctl object-storage regions` to list available regions. + """ + updatedAt: str | None = None + """ + (String) Update time. + Update time. + """ + + +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 ManagedObjectStorage(BaseModel): + apiVersion: Literal['objectstorage.upcloud.com/v1alpha1'] | None = ( + 'objectstorage.upcloud.com/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['ManagedObjectStorage'] | None = 'ManagedObjectStorage' + """ + 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 + """ + ManagedObjectStorageSpec defines the desired state of ManagedObjectStorage + """ + status: Status | None = None + """ + ManagedObjectStorageStatus defines the observed state of ManagedObjectStorage. + """ + + +class ManagedObjectStorageList(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[ManagedObjectStorage] + """ + List of managedobjectstorages. 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/com/upcloud/objectstorage/managedobjectstoragebucket/__init__.py b/schemas/python/models/com/upcloud/objectstorage/managedobjectstoragebucket/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/objectstorage/managedobjectstoragebucket/v1alpha1.py b/schemas/python/models/com/upcloud/objectstorage/managedobjectstoragebucket/v1alpha1.py new file mode 100644 index 000000000..57d4899d0 --- /dev/null +++ b/schemas/python/models/com/upcloud/objectstorage/managedobjectstoragebucket/v1alpha1.py @@ -0,0 +1,269 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_upcloud_com_v1alpha1_managedobjectstoragebucket.yaml + +from __future__ import annotations + +from typing import Any, Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 ServiceUuidRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class ServiceUuidSelector(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): + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + serviceUuidRef: ServiceUuidRef | None = None + """ + Reference to a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + serviceUuidSelector: ServiceUuidSelector | None = None + """ + Selector for a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + + +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: dict[str, Any] | 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 + """ + (String) ID of the bucket. ID is in {object storage UUID}/{bucket name} format. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + totalObjects: float | None = None + """ + (Number) Number of objects stored in the bucket. + Number of objects stored in the bucket. + """ + totalSizeBytes: float | None = None + """ + (Number) Total size of objects stored in the bucket. + Total size of objects stored in the bucket. + """ + + +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 ManagedObjectStorageBucket(BaseModel): + apiVersion: Literal['objectstorage.upcloud.com/v1alpha1'] | None = ( + 'objectstorage.upcloud.com/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['ManagedObjectStorageBucket'] | None = 'ManagedObjectStorageBucket' + """ + 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 + """ + ManagedObjectStorageBucketSpec defines the desired state of ManagedObjectStorageBucket + """ + status: Status | None = None + """ + ManagedObjectStorageBucketStatus defines the observed state of ManagedObjectStorageBucket. + """ + + +class ManagedObjectStorageBucketList(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[ManagedObjectStorageBucket] + """ + List of managedobjectstoragebuckets. 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/com/upcloud/objectstorage/managedobjectstoragecustomdomain/__init__.py b/schemas/python/models/com/upcloud/objectstorage/managedobjectstoragecustomdomain/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/objectstorage/managedobjectstoragecustomdomain/v1alpha1.py b/schemas/python/models/com/upcloud/objectstorage/managedobjectstoragecustomdomain/v1alpha1.py new file mode 100644 index 000000000..4101a8d0f --- /dev/null +++ b/schemas/python/models/com/upcloud/objectstorage/managedobjectstoragecustomdomain/v1alpha1.py @@ -0,0 +1,294 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_upcloud_com_v1alpha1_managedobjectstoragecustomdomain.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 ServiceUuidRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class ServiceUuidSelector(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): + mode: str | None = None + """ + (String) Routing mode for the domain. Defaults to api. + Routing mode for the domain. Defaults to `api`. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + serviceUuidRef: ServiceUuidRef | None = None + """ + Reference to a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + serviceUuidSelector: ServiceUuidSelector | None = None + """ + Selector for a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + type: str | None = None + """ + (String) At the moment only public is accepted. + At the moment only `public` is accepted. + """ + + +class InitProvider(BaseModel): + mode: str | None = None + """ + (String) Routing mode for the domain. Defaults to api. + Routing mode for the domain. Defaults to `api`. + """ + type: str | None = None + """ + (String) At the moment only public is accepted. + At the moment only `public` is accepted. + """ + + +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 + """ + (String) ID of the custom domain. ID is in {object storage UUID}/{domain name} format. + """ + mode: str | None = None + """ + (String) Routing mode for the domain. Defaults to api. + Routing mode for the domain. Defaults to `api`. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + type: str | None = None + """ + (String) At the moment only public is accepted. + At the moment only `public` is accepted. + """ + + +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 ManagedObjectStorageCustomDomain(BaseModel): + apiVersion: Literal['objectstorage.upcloud.com/v1alpha1'] | None = ( + 'objectstorage.upcloud.com/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['ManagedObjectStorageCustomDomain'] | None = ( + 'ManagedObjectStorageCustomDomain' + ) + """ + 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 + """ + ManagedObjectStorageCustomDomainSpec defines the desired state of ManagedObjectStorageCustomDomain + """ + status: Status | None = None + """ + ManagedObjectStorageCustomDomainStatus defines the observed state of ManagedObjectStorageCustomDomain. + """ + + +class ManagedObjectStorageCustomDomainList(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[ManagedObjectStorageCustomDomain] + """ + List of managedobjectstoragecustomdomains. 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/com/upcloud/objectstorage/managedobjectstoragepolicy/__init__.py b/schemas/python/models/com/upcloud/objectstorage/managedobjectstoragepolicy/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/objectstorage/managedobjectstoragepolicy/v1alpha1.py b/schemas/python/models/com/upcloud/objectstorage/managedobjectstoragepolicy/v1alpha1.py new file mode 100644 index 000000000..4cea52cf2 --- /dev/null +++ b/schemas/python/models/com/upcloud/objectstorage/managedobjectstoragepolicy/v1alpha1.py @@ -0,0 +1,322 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_upcloud_com_v1alpha1_managedobjectstoragepolicy.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 ServiceUuidRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class ServiceUuidSelector(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): + description: str | None = None + """ + (String) Description of the policy. This property is immutable after creation. + Description of the policy. This property is immutable after creation. + """ + document: str | None = None + """ + encoded compliant with RFC 3986. Extra whitespace and escapes are ignored when determining if the document has changed. + Policy document, URL-encoded compliant with RFC 3986. Extra whitespace and escapes are ignored when determining if the document has changed. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + serviceUuidRef: ServiceUuidRef | None = None + """ + Reference to a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + serviceUuidSelector: ServiceUuidSelector | None = None + """ + Selector for a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + + +class InitProvider(BaseModel): + description: str | None = None + """ + (String) Description of the policy. This property is immutable after creation. + Description of the policy. This property is immutable after creation. + """ + document: str | None = None + """ + encoded compliant with RFC 3986. Extra whitespace and escapes are ignored when determining if the document has changed. + Policy document, URL-encoded compliant with RFC 3986. Extra whitespace and escapes are ignored when determining if the document has changed. + """ + + +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): + arn: str | None = None + """ + (String) Policy ARN. + Policy ARN. + """ + attachmentCount: float | None = None + """ + (Number) Attachment count. + Attachment count. + """ + createdAt: str | None = None + """ + (String) Creation time. + Creation time. + """ + defaultVersionId: str | None = None + """ + (String) Default version id. + Default version id. + """ + description: str | None = None + """ + (String) Description of the policy. This property is immutable after creation. + Description of the policy. This property is immutable after creation. + """ + document: str | None = None + """ + encoded compliant with RFC 3986. Extra whitespace and escapes are ignored when determining if the document has changed. + Policy document, URL-encoded compliant with RFC 3986. Extra whitespace and escapes are ignored when determining if the document has changed. + """ + id: str | None = None + """ + (String) ID of the policy. ID is in {object storage UUID}/{policy name} format. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + system: bool | None = None + """ + (Boolean) Defines whether the policy was set up by the system. + Defines whether the policy was set up by the system. + """ + updatedAt: str | None = None + """ + (String) Update time. + Update time. + """ + + +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 ManagedObjectStoragePolicy(BaseModel): + apiVersion: Literal['objectstorage.upcloud.com/v1alpha1'] | None = ( + 'objectstorage.upcloud.com/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['ManagedObjectStoragePolicy'] | None = 'ManagedObjectStoragePolicy' + """ + 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 + """ + ManagedObjectStoragePolicySpec defines the desired state of ManagedObjectStoragePolicy + """ + status: Status | None = None + """ + ManagedObjectStoragePolicyStatus defines the observed state of ManagedObjectStoragePolicy. + """ + + +class ManagedObjectStoragePolicyList(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[ManagedObjectStoragePolicy] + """ + List of managedobjectstoragepolicies. 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/com/upcloud/objectstorage/managedobjectstoragestaticsite/__init__.py b/schemas/python/models/com/upcloud/objectstorage/managedobjectstoragestaticsite/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/objectstorage/managedobjectstoragestaticsite/v1alpha1.py b/schemas/python/models/com/upcloud/objectstorage/managedobjectstoragestaticsite/v1alpha1.py new file mode 100644 index 000000000..28ed0264c --- /dev/null +++ b/schemas/python/models/com/upcloud/objectstorage/managedobjectstoragestaticsite/v1alpha1.py @@ -0,0 +1,445 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_upcloud_com_v1alpha1_managedobjectstoragestaticsite.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 BucketNameRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class BucketNameSelector(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 ErrorPage(BaseModel): + errorDocument: str | None = None + """ + (String) Path to the error page document within the bucket. + Path to the error page document within the bucket. + """ + statusCode: float | None = None + """ + (Number) Exact HTTP status code to match. Mutually exclusive with status range. + Exact HTTP status code to match. Mutually exclusive with status range. + """ + statusRangeEnd: float | None = None + """ + (Number) End of the status code range (inclusive). Must be greater than start. + End of the status code range (inclusive). Must be greater than start. + """ + statusRangeStart: float | None = None + """ + (Number) Start of the status code range (inclusive). + Start of the status code range (inclusive). + """ + + +class ServiceUuidRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class ServiceUuidSelector(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): + bucketName: str | None = None + """ + (String) S3 bucket from which static content is served. Must have a public read policy. + S3 bucket from which static content is served. Must have a public read policy. + """ + bucketNameRef: BucketNameRef | None = None + """ + Reference to a ManagedObjectStorageBucket in objectstorage to populate bucketName. + """ + bucketNameSelector: BucketNameSelector | None = None + """ + Selector for a ManagedObjectStorageBucket in objectstorage to populate bucketName. + """ + bucketPrefix: str | None = None + """ + (String) Path prefix within the bucket. For example, dist/ serves content from the dist/ folder. Defaults to empty string (bucket root). + Path prefix within the bucket. For example, `dist/` serves content from the `dist/` folder. Defaults to empty string (bucket root). + """ + domainName: str | None = None + """ + website mode attached to the service. + A custom domain in `static-website` mode attached to the service. + """ + enabled: bool | None = None + """ + (Boolean) Enable or disable serving content on this domain. Defaults to true. + Enable or disable serving content on this domain. Defaults to true. + """ + errorPages: list[ErrorPage] | None = None + """ + (Attributes List) Custom error pages served when the storage backend returns an error status. (see below for nested schema) + """ + indexDocument: str | None = None + """ + (String) Name of the index document. Defaults to index.html. + Name of the index document. Defaults to `index.html`. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + serviceUuidRef: ServiceUuidRef | None = None + """ + Reference to a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + serviceUuidSelector: ServiceUuidSelector | None = None + """ + Selector for a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + spaMode: bool | None = None + """ + page application mode. In SPA mode, the index document is served for all paths, which is useful for client-side routing. + Whether to enable single-page application mode. In SPA mode, the index document is served for all paths, which is useful for client-side routing. + """ + + +class InitProvider(BaseModel): + bucketName: str | None = None + """ + (String) S3 bucket from which static content is served. Must have a public read policy. + S3 bucket from which static content is served. Must have a public read policy. + """ + bucketNameRef: BucketNameRef | None = None + """ + Reference to a ManagedObjectStorageBucket in objectstorage to populate bucketName. + """ + bucketNameSelector: BucketNameSelector | None = None + """ + Selector for a ManagedObjectStorageBucket in objectstorage to populate bucketName. + """ + bucketPrefix: str | None = None + """ + (String) Path prefix within the bucket. For example, dist/ serves content from the dist/ folder. Defaults to empty string (bucket root). + Path prefix within the bucket. For example, `dist/` serves content from the `dist/` folder. Defaults to empty string (bucket root). + """ + domainName: str | None = None + """ + website mode attached to the service. + A custom domain in `static-website` mode attached to the service. + """ + enabled: bool | None = None + """ + (Boolean) Enable or disable serving content on this domain. Defaults to true. + Enable or disable serving content on this domain. Defaults to true. + """ + errorPages: list[ErrorPage] | None = None + """ + (Attributes List) Custom error pages served when the storage backend returns an error status. (see below for nested schema) + """ + indexDocument: str | None = None + """ + (String) Name of the index document. Defaults to index.html. + Name of the index document. Defaults to `index.html`. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + serviceUuidRef: ServiceUuidRef | None = None + """ + Reference to a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + serviceUuidSelector: ServiceUuidSelector | None = None + """ + Selector for a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + spaMode: bool | None = None + """ + page application mode. In SPA mode, the index document is served for all paths, which is useful for client-side routing. + Whether to enable single-page application mode. In SPA mode, the index document is served for all paths, which is useful for client-side routing. + """ + + +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): + bucketName: str | None = None + """ + (String) S3 bucket from which static content is served. Must have a public read policy. + S3 bucket from which static content is served. Must have a public read policy. + """ + bucketPrefix: str | None = None + """ + (String) Path prefix within the bucket. For example, dist/ serves content from the dist/ folder. Defaults to empty string (bucket root). + Path prefix within the bucket. For example, `dist/` serves content from the `dist/` folder. Defaults to empty string (bucket root). + """ + domainName: str | None = None + """ + website mode attached to the service. + A custom domain in `static-website` mode attached to the service. + """ + enabled: bool | None = None + """ + (Boolean) Enable or disable serving content on this domain. Defaults to true. + Enable or disable serving content on this domain. Defaults to true. + """ + errorPages: list[ErrorPage] | None = None + """ + (Attributes List) Custom error pages served when the storage backend returns an error status. (see below for nested schema) + """ + id: str | None = None + """ + (String) ID of the static site. ID is in {object storage UUID}/{domain name} format. + """ + indexDocument: str | None = None + """ + (String) Name of the index document. Defaults to index.html. + Name of the index document. Defaults to `index.html`. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + spaMode: bool | None = None + """ + page application mode. In SPA mode, the index document is served for all paths, which is useful for client-side routing. + Whether to enable single-page application mode. In SPA mode, the index document is served for all paths, which is useful for client-side routing. + """ + + +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 ManagedObjectStorageStaticSite(BaseModel): + apiVersion: Literal['objectstorage.upcloud.com/v1alpha1'] | None = ( + 'objectstorage.upcloud.com/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['ManagedObjectStorageStaticSite'] | None = ( + 'ManagedObjectStorageStaticSite' + ) + """ + 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 + """ + ManagedObjectStorageStaticSiteSpec defines the desired state of ManagedObjectStorageStaticSite + """ + status: Status | None = None + """ + ManagedObjectStorageStaticSiteStatus defines the observed state of ManagedObjectStorageStaticSite. + """ + + +class ManagedObjectStorageStaticSiteList(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[ManagedObjectStorageStaticSite] + """ + List of managedobjectstoragestaticsites. 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/com/upcloud/objectstorage/managedobjectstorageuser/__init__.py b/schemas/python/models/com/upcloud/objectstorage/managedobjectstorageuser/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/objectstorage/managedobjectstorageuser/v1alpha1.py b/schemas/python/models/com/upcloud/objectstorage/managedobjectstorageuser/v1alpha1.py new file mode 100644 index 000000000..2ccc62019 --- /dev/null +++ b/schemas/python/models/com/upcloud/objectstorage/managedobjectstorageuser/v1alpha1.py @@ -0,0 +1,269 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_upcloud_com_v1alpha1_managedobjectstorageuser.yaml + +from __future__ import annotations + +from typing import Any, Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 ServiceUuidRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class ServiceUuidSelector(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): + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + serviceUuidRef: ServiceUuidRef | None = None + """ + Reference to a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + serviceUuidSelector: ServiceUuidSelector | None = None + """ + Selector for a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + + +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: dict[str, Any] | 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): + arn: str | None = None + """ + (String) User ARN. + User ARN. + """ + createdAt: str | None = None + """ + (String) Creation time. + Creation time. + """ + id: str | None = None + """ + (String) ID of the user. ID is in {object storage UUID}/{username} format. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + + +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 ManagedObjectStorageUser(BaseModel): + apiVersion: Literal['objectstorage.upcloud.com/v1alpha1'] | None = ( + 'objectstorage.upcloud.com/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['ManagedObjectStorageUser'] | None = 'ManagedObjectStorageUser' + """ + 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 + """ + ManagedObjectStorageUserSpec defines the desired state of ManagedObjectStorageUser + """ + status: Status | None = None + """ + ManagedObjectStorageUserStatus defines the observed state of ManagedObjectStorageUser. + """ + + +class ManagedObjectStorageUserList(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[ManagedObjectStorageUser] + """ + List of managedobjectstorageusers. 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/com/upcloud/objectstorage/managedobjectstorageuseraccesskey/__init__.py b/schemas/python/models/com/upcloud/objectstorage/managedobjectstorageuseraccesskey/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/objectstorage/managedobjectstorageuseraccesskey/v1alpha1.py b/schemas/python/models/com/upcloud/objectstorage/managedobjectstorageuseraccesskey/v1alpha1.py new file mode 100644 index 000000000..e7472d1f9 --- /dev/null +++ b/schemas/python/models/com/upcloud/objectstorage/managedobjectstorageuseraccesskey/v1alpha1.py @@ -0,0 +1,339 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_upcloud_com_v1alpha1_managedobjectstorageuseraccesskey.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 ServiceUuidRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class ServiceUuidSelector(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 UsernameRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class UsernameSelector(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): + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + serviceUuidRef: ServiceUuidRef | None = None + """ + Reference to a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + serviceUuidSelector: ServiceUuidSelector | None = None + """ + Selector for a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + status: str | None = None + """ + (String) Status of the key. Valid values: Active|Inactive + Status of the key. Valid values: `Active`|`Inactive` + """ + username: str | None = None + """ + (String) Username. + Username. + """ + usernameRef: UsernameRef | None = None + """ + Reference to a ManagedObjectStorageUser in objectstorage to populate username. + """ + usernameSelector: UsernameSelector | None = None + """ + Selector for a ManagedObjectStorageUser in objectstorage to populate username. + """ + + +class InitProvider(BaseModel): + status: str | None = None + """ + (String) Status of the key. Valid values: Active|Inactive + Status of the key. Valid values: `Active`|`Inactive` + """ + + +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): + accessKeyId: str | None = None + """ + (String) Access key ID. + Access key ID. + """ + createdAt: str | None = None + """ + (String) Creation time. + Creation time. + """ + id: str | None = None + """ + (String) ID of the user. ID is in {object storage UUID}/{username}/{access key id} format. + """ + lastUsedAt: str | None = None + """ + (String) Last used. + Last used. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + status: str | None = None + """ + (String) Status of the key. Valid values: Active|Inactive + Status of the key. Valid values: `Active`|`Inactive` + """ + username: str | None = None + """ + (String) Username. + Username. + """ + + +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 ManagedObjectStorageUserAccessKey(BaseModel): + apiVersion: Literal['objectstorage.upcloud.com/v1alpha1'] | None = ( + 'objectstorage.upcloud.com/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['ManagedObjectStorageUserAccessKey'] | None = ( + 'ManagedObjectStorageUserAccessKey' + ) + """ + 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 + """ + ManagedObjectStorageUserAccessKeySpec defines the desired state of ManagedObjectStorageUserAccessKey + """ + status: Status | None = None + """ + ManagedObjectStorageUserAccessKeyStatus defines the observed state of ManagedObjectStorageUserAccessKey. + """ + + +class ManagedObjectStorageUserAccessKeyList(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[ManagedObjectStorageUserAccessKey] + """ + List of managedobjectstorageuseraccesskeys. 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/com/upcloud/objectstorage/managedobjectstorageuserpolicy/__init__.py b/schemas/python/models/com/upcloud/objectstorage/managedobjectstorageuserpolicy/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/objectstorage/managedobjectstorageuserpolicy/v1alpha1.py b/schemas/python/models/com/upcloud/objectstorage/managedobjectstorageuserpolicy/v1alpha1.py new file mode 100644 index 000000000..b1b3ff91b --- /dev/null +++ b/schemas/python/models/com/upcloud/objectstorage/managedobjectstorageuserpolicy/v1alpha1.py @@ -0,0 +1,393 @@ +# generated by datamodel-codegen: +# filename: workdir/objectstorage_upcloud_com_v1alpha1_managedobjectstorageuserpolicy.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 NameRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class NameSelector(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 ServiceUuidRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class ServiceUuidSelector(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 UsernameRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class UsernameSelector(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): + name: str | None = None + """ + (String) Policy name. + Policy name. + """ + nameRef: NameRef | None = None + """ + Reference to a ManagedObjectStoragePolicy in objectstorage to populate name. + """ + nameSelector: NameSelector | None = None + """ + Selector for a ManagedObjectStoragePolicy in objectstorage to populate name. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + serviceUuidRef: ServiceUuidRef | None = None + """ + Reference to a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + serviceUuidSelector: ServiceUuidSelector | None = None + """ + Selector for a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + username: str | None = None + """ + (String) Username. + Username. + """ + usernameRef: UsernameRef | None = None + """ + Reference to a ManagedObjectStorageUser in objectstorage to populate username. + """ + usernameSelector: UsernameSelector | None = None + """ + Selector for a ManagedObjectStorageUser in objectstorage to populate username. + """ + + +class InitProvider(BaseModel): + name: str | None = None + """ + (String) Policy name. + Policy name. + """ + nameRef: NameRef | None = None + """ + Reference to a ManagedObjectStoragePolicy in objectstorage to populate name. + """ + nameSelector: NameSelector | None = None + """ + Selector for a ManagedObjectStoragePolicy in objectstorage to populate name. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + serviceUuidRef: ServiceUuidRef | None = None + """ + Reference to a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + serviceUuidSelector: ServiceUuidSelector | None = None + """ + Selector for a ManagedObjectStorage in objectstorage to populate serviceUuid. + """ + username: str | None = None + """ + (String) Username. + Username. + """ + usernameRef: UsernameRef | None = None + """ + Reference to a ManagedObjectStorageUser in objectstorage to populate username. + """ + usernameSelector: UsernameSelector | None = None + """ + Selector for a ManagedObjectStorageUser in objectstorage to populate username. + """ + + +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 + """ + (String) ID of the user. ID is in {object storage UUID}/{username}/{policy name} format. + """ + name: str | None = None + """ + (String) Policy name. + Policy name. + """ + serviceUuid: str | None = None + """ + (String) Managed Object Storage service UUID. + Managed Object Storage service UUID. + """ + username: str | None = None + """ + (String) Username. + Username. + """ + + +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 ManagedObjectStorageUserPolicy(BaseModel): + apiVersion: Literal['objectstorage.upcloud.com/v1alpha1'] | None = ( + 'objectstorage.upcloud.com/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['ManagedObjectStorageUserPolicy'] | None = ( + 'ManagedObjectStorageUserPolicy' + ) + """ + 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 + """ + ManagedObjectStorageUserPolicySpec defines the desired state of ManagedObjectStorageUserPolicy + """ + status: Status | None = None + """ + ManagedObjectStorageUserPolicyStatus defines the observed state of ManagedObjectStorageUserPolicy. + """ + + +class ManagedObjectStorageUserPolicyList(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[ManagedObjectStorageUserPolicy] + """ + List of managedobjectstorageuserpolicies. 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/com/upcloud/provider/__init__.py b/schemas/python/models/com/upcloud/provider/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/provider/providerconfig/__init__.py b/schemas/python/models/com/upcloud/provider/providerconfig/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/provider/providerconfig/v1beta1.py b/schemas/python/models/com/upcloud/provider/providerconfig/v1beta1.py new file mode 100644 index 000000000..1e302c0c6 --- /dev/null +++ b/schemas/python/models/com/upcloud/provider/providerconfig/v1beta1.py @@ -0,0 +1,201 @@ +# generated by datamodel-codegen: +# filename: workdir/provider_upcloud_com_v1beta1_providerconfig.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, conint + +from .....io.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. + """ + 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. + """ + requestTimeoutSec: conint(ge=0) | None = None + """ + RequestTimeoutSec is the duration, in seconds, the provider waits for + an HTTP request to the UpCloud API to complete. Defaults to 120. + """ + retryMax: conint(ge=0) | None = None + """ + RetryMax is the maximum number of retries of a failed UpCloud API + request. Defaults to 4. + """ + retryWaitMaxSec: conint(ge=0) | None = None + """ + RetryWaitMaxSec is the maximum time, in seconds, to wait between + retries. Defaults to 30. + """ + retryWaitMinSec: conint(ge=0) | None = None + """ + RetryWaitMinSec is the minimum time, in seconds, to wait between + retries. Defaults to 1. + """ + + +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['provider.upcloud.com/v1beta1'] | None = ( + 'provider.upcloud.com/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/com/upcloud/provider/providerconfigusage/__init__.py b/schemas/python/models/com/upcloud/provider/providerconfigusage/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/provider/providerconfigusage/v1beta1.py b/schemas/python/models/com/upcloud/provider/providerconfigusage/v1beta1.py new file mode 100644 index 000000000..daff71224 --- /dev/null +++ b/schemas/python/models/com/upcloud/provider/providerconfigusage/v1beta1.py @@ -0,0 +1,101 @@ +# generated by datamodel-codegen: +# filename: workdir/provider_upcloud_com_v1beta1_providerconfigusage.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import BaseModel + +from .....io.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['provider.upcloud.com/v1beta1'] | None = ( + 'provider.upcloud.com/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/com/upcloud/server/__init__.py b/schemas/python/models/com/upcloud/server/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/server/firewallrules/__init__.py b/schemas/python/models/com/upcloud/server/firewallrules/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/server/firewallrules/v1alpha1.py b/schemas/python/models/com/upcloud/server/firewallrules/v1alpha1.py new file mode 100644 index 000000000..eb4e683c7 --- /dev/null +++ b/schemas/python/models/com/upcloud/server/firewallrules/v1alpha1.py @@ -0,0 +1,387 @@ +# generated by datamodel-codegen: +# filename: workdir/server_upcloud_com_v1alpha1_firewallrules.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.k8s.apimachinery.pkg.apis.meta import v1 + + +class FirewallRuleItem(BaseModel): + action: str | None = None + """ + address/port range. + Action to take if the rule conditions are met. Valid values `accept | drop`. + """ + comment: str | None = None + """ + (String) A comment for the rule. + A comment for the rule. + """ + destinationAddressEnd: str | None = None + """ + (String) The destination address range ends from this address + The destination address range ends from this address + """ + destinationAddressStart: str | None = None + """ + (String) The destination address range starts from this address + The destination address range starts from this address + """ + destinationPortEnd: str | None = None + """ + (String) The destination port range ends from this port number + The destination port range ends from this port number + """ + destinationPortStart: str | None = None + """ + (String) The destination port range starts from this port number + The destination port range starts from this port number + """ + direction: str | None = None + """ + (String) The direction of network traffic this rule will be applied to. Valid values are in and out. + The direction of network traffic this rule will be applied to. Valid values are `in` and `out`. + """ + family: str | None = None + """ + (String) The address family of new firewall rule + The address family of new firewall rule + """ + icmpType: str | None = None + """ + (String) The ICMP type of the rule. Only valid if protocol is ICMP. + The ICMP type of the rule. Only valid if protocol is ICMP. + """ + protocol: str | None = None + """ + (String) The protocol of the rule. Possible values are `` (empty), tcp, udp, icmp. + The protocol of the rule. Possible values are `` (empty), `tcp`, `udp`, `icmp`. + """ + sourceAddressEnd: str | None = None + """ + (String) The source address range ends from this address + The source address range ends from this address + """ + sourceAddressStart: str | None = None + """ + (String) The source address range starts from this address + The source address range starts from this address + """ + sourcePortEnd: str | None = None + """ + (String) The source port range ends from this port number + The source port range ends from this port number + """ + sourcePortStart: str | None = None + """ + (String) The source port range starts from this port number + The source port range starts from this port number + """ + + +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 ServerIdRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class ServerIdSelector(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): + firewallRule: list[FirewallRuleItem] | None = None + """ + (Block List) A single firewall rule. The rules are evaluated in order. The maximum number of firewall rules per server is 1000. + A single firewall rule. The rules are evaluated in order. The maximum number of firewall rules per server is 1000. + + Typical firewall rule should have `action`, `direction`, `protocol`, `family` and at least one destination/source-address/port range. + + A default rule can be created by providing only `action` and `direction` attributes. Default rule should be defined last. + + If used, IP address and port ranges must have both start and end values specified. These can be the same value if only one IP address or port number is specified. + Source and destination port numbers can only be set if the protocol is TCP or UDP. + The ICMP type may only be set if the protocol is ICMP. + """ + serverId: str | None = None + """ + (String) The UUID of the server to be protected with the firewall rules. + The UUID of the server to be protected with the firewall rules. + """ + serverIdRef: ServerIdRef | None = None + """ + Reference to a Server in server to populate serverId. + """ + serverIdSelector: ServerIdSelector | None = None + """ + Selector for a Server in server to populate serverId. + """ + + +class InitProvider(BaseModel): + firewallRule: list[FirewallRuleItem] | None = None + """ + (Block List) A single firewall rule. The rules are evaluated in order. The maximum number of firewall rules per server is 1000. + A single firewall rule. The rules are evaluated in order. The maximum number of firewall rules per server is 1000. + + Typical firewall rule should have `action`, `direction`, `protocol`, `family` and at least one destination/source-address/port range. + + A default rule can be created by providing only `action` and `direction` attributes. Default rule should be defined last. + + If used, IP address and port ranges must have both start and end values specified. These can be the same value if only one IP address or port number is specified. + Source and destination port numbers can only be set if the protocol is TCP or UDP. + The ICMP type may only be set if the protocol is ICMP. + """ + serverId: str | None = None + """ + (String) The UUID of the server to be protected with the firewall rules. + The UUID of the server to be protected with the firewall rules. + """ + serverIdRef: ServerIdRef | None = None + """ + Reference to a Server in server to populate serverId. + """ + serverIdSelector: ServerIdSelector | None = None + """ + Selector for a Server in server to populate serverId. + """ + + +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): + firewallRule: list[FirewallRuleItem] | None = None + """ + (Block List) A single firewall rule. The rules are evaluated in order. The maximum number of firewall rules per server is 1000. + A single firewall rule. The rules are evaluated in order. The maximum number of firewall rules per server is 1000. + + Typical firewall rule should have `action`, `direction`, `protocol`, `family` and at least one destination/source-address/port range. + + A default rule can be created by providing only `action` and `direction` attributes. Default rule should be defined last. + + If used, IP address and port ranges must have both start and end values specified. These can be the same value if only one IP address or port number is specified. + Source and destination port numbers can only be set if the protocol is TCP or UDP. + The ICMP type may only be set if the protocol is ICMP. + """ + id: str | None = None + """ + (String) The ID of this resource. + """ + serverId: str | None = None + """ + (String) The UUID of the server to be protected with the firewall rules. + The UUID of the server to be protected with the firewall rules. + """ + + +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 FirewallRules(BaseModel): + apiVersion: Literal['server.upcloud.com/v1alpha1'] | None = ( + 'server.upcloud.com/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['FirewallRules'] | None = 'FirewallRules' + """ + 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 + """ + FirewallRulesSpec defines the desired state of FirewallRules + """ + status: Status | None = None + """ + FirewallRulesStatus defines the observed state of FirewallRules. + """ + + +class FirewallRulesList(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[FirewallRules] + """ + List of firewallrules. 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/com/upcloud/server/servergroup/__init__.py b/schemas/python/models/com/upcloud/server/servergroup/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/server/servergroup/v1alpha1.py b/schemas/python/models/com/upcloud/server/servergroup/v1alpha1.py new file mode 100644 index 000000000..8c0a8189f --- /dev/null +++ b/schemas/python/models/com/upcloud/server/servergroup/v1alpha1.py @@ -0,0 +1,374 @@ +# generated by datamodel-codegen: +# filename: workdir/server_upcloud_com_v1alpha1_servergroup.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 MembersRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class MembersSelector(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): + antiAffinityPolicy: str | None = None + """ + affinity group. Setting this to strict or yes will + result in all servers in the group being placed on separate compute hosts. The value can be strict, yes, or no. + Defines if a server group is an anti-affinity group. Setting this to `strict` or `yes` will + result in all servers in the group being placed on separate compute hosts. The value can be `strict`, `yes`, or `no`. + + * `strict` policy doesn't allow servers in the same server group to be on the same host + * `yes` refers to best-effort policy and tries to put servers on different hosts, but this is not guaranteed + * `no` refers to having no policy and thus no effect on server host affinity + + To verify if the anti-affinity policies are met by requesting a server group details from API. For more information + please see UpCloud API documentation on server groups. + + Plese also note that anti-affinity policies are only applied on server start. This means that if anti-affinity + policies in server group are not met, you need to manually restart the servers in said group, + for example via API, UpCloud Control Panel or upctl (UpCloud CLI) + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the server group. + User defined key-value pairs to classify the server group. + """ + members: list[str] | None = None + """ + (Set of String) UUIDs of the servers that are members of this group. Servers can also be attached to the server group via server_group property of upcloud_server. See also track_members property. + UUIDs of the servers that are members of this group. Servers can also be attached to the server group via `server_group` property of `upcloud_server`. See also `track_members` property. + """ + membersRefs: list[MembersRef] | None = None + """ + References to Server in server to populate members. + """ + membersSelector: MembersSelector | None = None + """ + Selector for a list of Server in server to populate members. + """ + title: str | None = None + """ + (String) Title of your server group + Title of your server group + """ + trackMembers: bool | None = None + """ + (Boolean) Controls if members of the server group are being tracked in this resource. Set to false when using server_group property of upcloud_server to attach servers to the server group to avoid delayed state updates. + Controls if members of the server group are being tracked in this resource. Set to `false` when using `server_group` property of `upcloud_server` to attach servers to the server group to avoid delayed state updates. + """ + + +class InitProvider(BaseModel): + antiAffinityPolicy: str | None = None + """ + affinity group. Setting this to strict or yes will + result in all servers in the group being placed on separate compute hosts. The value can be strict, yes, or no. + Defines if a server group is an anti-affinity group. Setting this to `strict` or `yes` will + result in all servers in the group being placed on separate compute hosts. The value can be `strict`, `yes`, or `no`. + + * `strict` policy doesn't allow servers in the same server group to be on the same host + * `yes` refers to best-effort policy and tries to put servers on different hosts, but this is not guaranteed + * `no` refers to having no policy and thus no effect on server host affinity + + To verify if the anti-affinity policies are met by requesting a server group details from API. For more information + please see UpCloud API documentation on server groups. + + Plese also note that anti-affinity policies are only applied on server start. This means that if anti-affinity + policies in server group are not met, you need to manually restart the servers in said group, + for example via API, UpCloud Control Panel or upctl (UpCloud CLI) + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the server group. + User defined key-value pairs to classify the server group. + """ + members: list[str] | None = None + """ + (Set of String) UUIDs of the servers that are members of this group. Servers can also be attached to the server group via server_group property of upcloud_server. See also track_members property. + UUIDs of the servers that are members of this group. Servers can also be attached to the server group via `server_group` property of `upcloud_server`. See also `track_members` property. + """ + membersRefs: list[MembersRef] | None = None + """ + References to Server in server to populate members. + """ + membersSelector: MembersSelector | None = None + """ + Selector for a list of Server in server to populate members. + """ + title: str | None = None + """ + (String) Title of your server group + Title of your server group + """ + trackMembers: bool | None = None + """ + (Boolean) Controls if members of the server group are being tracked in this resource. Set to false when using server_group property of upcloud_server to attach servers to the server group to avoid delayed state updates. + Controls if members of the server group are being tracked in this resource. Set to `false` when using `server_group` property of `upcloud_server` to attach servers to the server group to avoid delayed state updates. + """ + + +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): + antiAffinityPolicy: str | None = None + """ + affinity group. Setting this to strict or yes will + result in all servers in the group being placed on separate compute hosts. The value can be strict, yes, or no. + Defines if a server group is an anti-affinity group. Setting this to `strict` or `yes` will + result in all servers in the group being placed on separate compute hosts. The value can be `strict`, `yes`, or `no`. + + * `strict` policy doesn't allow servers in the same server group to be on the same host + * `yes` refers to best-effort policy and tries to put servers on different hosts, but this is not guaranteed + * `no` refers to having no policy and thus no effect on server host affinity + + To verify if the anti-affinity policies are met by requesting a server group details from API. For more information + please see UpCloud API documentation on server groups. + + Plese also note that anti-affinity policies are only applied on server start. This means that if anti-affinity + policies in server group are not met, you need to manually restart the servers in said group, + for example via API, UpCloud Control Panel or upctl (UpCloud CLI) + """ + id: str | None = None + """ + (String) UUID of the server group. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the server group. + User defined key-value pairs to classify the server group. + """ + members: list[str] | None = None + """ + (Set of String) UUIDs of the servers that are members of this group. Servers can also be attached to the server group via server_group property of upcloud_server. See also track_members property. + UUIDs of the servers that are members of this group. Servers can also be attached to the server group via `server_group` property of `upcloud_server`. See also `track_members` property. + """ + title: str | None = None + """ + (String) Title of your server group + Title of your server group + """ + trackMembers: bool | None = None + """ + (Boolean) Controls if members of the server group are being tracked in this resource. Set to false when using server_group property of upcloud_server to attach servers to the server group to avoid delayed state updates. + Controls if members of the server group are being tracked in this resource. Set to `false` when using `server_group` property of `upcloud_server` to attach servers to the server group to avoid delayed state updates. + """ + + +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 ServerGroup(BaseModel): + apiVersion: Literal['server.upcloud.com/v1alpha1'] | None = ( + 'server.upcloud.com/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['ServerGroup'] | None = 'ServerGroup' + """ + 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 + """ + ServerGroupSpec defines the desired state of ServerGroup + """ + status: Status | None = None + """ + ServerGroupStatus defines the observed state of ServerGroup. + """ + + +class ServerGroupList(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[ServerGroup] + """ + List of servergroups. 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/com/upcloud/server/serverprivatefirewallruleset/__init__.py b/schemas/python/models/com/upcloud/server/serverprivatefirewallruleset/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/server/serverprivatefirewallruleset/v1alpha1.py b/schemas/python/models/com/upcloud/server/serverprivatefirewallruleset/v1alpha1.py new file mode 100644 index 000000000..778f0c056 --- /dev/null +++ b/schemas/python/models/com/upcloud/server/serverprivatefirewallruleset/v1alpha1.py @@ -0,0 +1,335 @@ +# generated by datamodel-codegen: +# filename: workdir/server_upcloud_com_v1alpha1_serverprivatefirewallruleset.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 RulesetIdRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class RulesetIdSelector(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 ServerIdRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class ServerIdSelector(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): + rulesetId: str | None = None + """ + (String) The UUID of the firewall ruleset to attach. + The UUID of the firewall ruleset to attach. + """ + rulesetIdRef: RulesetIdRef | None = None + """ + Reference to a FirewallRuleset in network to populate rulesetId. + """ + rulesetIdSelector: RulesetIdSelector | None = None + """ + Selector for a FirewallRuleset in network to populate rulesetId. + """ + serverId: str | None = None + """ + (String) The UUID of the server to attach the firewall ruleset to. + The UUID of the server to attach the firewall ruleset to. + """ + serverIdRef: ServerIdRef | None = None + """ + Reference to a Server in server to populate serverId. + """ + serverIdSelector: ServerIdSelector | None = None + """ + Selector for a Server in server to populate serverId. + """ + + +class InitProvider(BaseModel): + rulesetId: str | None = None + """ + (String) The UUID of the firewall ruleset to attach. + The UUID of the firewall ruleset to attach. + """ + rulesetIdRef: RulesetIdRef | None = None + """ + Reference to a FirewallRuleset in network to populate rulesetId. + """ + rulesetIdSelector: RulesetIdSelector | None = None + """ + Selector for a FirewallRuleset in network to populate rulesetId. + """ + serverId: str | None = None + """ + (String) The UUID of the server to attach the firewall ruleset to. + The UUID of the server to attach the firewall ruleset to. + """ + serverIdRef: ServerIdRef | None = None + """ + Reference to a Server in server to populate serverId. + """ + serverIdSelector: ServerIdSelector | None = None + """ + Selector for a Server in server to populate serverId. + """ + + +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 + """ + (String) Composite identifier in format {server_id}/{ruleset_id}. + """ + rulesetId: str | None = None + """ + (String) The UUID of the firewall ruleset to attach. + The UUID of the firewall ruleset to attach. + """ + serverId: str | None = None + """ + (String) The UUID of the server to attach the firewall ruleset to. + The UUID of the server to attach the firewall ruleset to. + """ + + +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 ServerPrivateFirewallRuleset(BaseModel): + apiVersion: Literal['server.upcloud.com/v1alpha1'] | None = ( + 'server.upcloud.com/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['ServerPrivateFirewallRuleset'] | None = ( + 'ServerPrivateFirewallRuleset' + ) + """ + 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 + """ + ServerPrivateFirewallRulesetSpec defines the desired state of ServerPrivateFirewallRuleset + """ + status: Status | None = None + """ + ServerPrivateFirewallRulesetStatus defines the observed state of ServerPrivateFirewallRuleset. + """ + + +class ServerPrivateFirewallRulesetList(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[ServerPrivateFirewallRuleset] + """ + List of serverprivatefirewallrulesets. 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/com/upcloud/server/tag/__init__.py b/schemas/python/models/com/upcloud/server/tag/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/server/tag/v1alpha1.py b/schemas/python/models/com/upcloud/server/tag/v1alpha1.py new file mode 100644 index 000000000..44d3d9030 --- /dev/null +++ b/schemas/python/models/com/upcloud/server/tag/v1alpha1.py @@ -0,0 +1,281 @@ +# generated by datamodel-codegen: +# filename: workdir/server_upcloud_com_v1alpha1_tag.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 ServersRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class ServersSelector(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): + description: str | None = None + """ + Free form text representing the meaning of the tag. + """ + servers: list[str] | None = None + """ + A collection of servers that have been assigned the tag. + """ + serversRefs: list[ServersRef] | None = None + """ + References to Server in server to populate servers. + """ + serversSelector: ServersSelector | None = None + """ + Selector for a list of Server in server to populate servers. + """ + + +class InitProvider(BaseModel): + description: str | None = None + """ + Free form text representing the meaning of the tag. + """ + servers: list[str] | None = None + """ + A collection of servers that have been assigned the tag. + """ + serversRefs: list[ServersRef] | None = None + """ + References to Server in server to populate servers. + """ + serversSelector: ServersSelector | None = None + """ + Selector for a list of Server in server to populate servers. + """ + + +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): + description: str | None = None + """ + Free form text representing the meaning of the tag. + """ + id: str | None = None + servers: list[str] | None = None + """ + A collection of servers that have been assigned the tag. + """ + + +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 Tag(BaseModel): + apiVersion: Literal['server.upcloud.com/v1alpha1'] | None = ( + 'server.upcloud.com/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['Tag'] | None = 'Tag' + """ + 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 + """ + TagSpec defines the desired state of Tag + """ + status: Status | None = None + """ + TagStatus defines the observed state of Tag. + """ + + +class TagList(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[Tag] + """ + List of tags. 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/com/upcloud/server/v1alpha1.py b/schemas/python/models/com/upcloud/server/v1alpha1.py new file mode 100644 index 000000000..15485279f --- /dev/null +++ b/schemas/python/models/com/upcloud/server/v1alpha1.py @@ -0,0 +1,1004 @@ +# generated by datamodel-codegen: +# filename: workdir/server_upcloud_com_v1alpha1_server.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ....io.k8s.apimachinery.pkg.apis.meta import v1 + + +class Login(BaseModel): + createPassword: bool | None = None + """ + (Boolean) Indicates a password should be create to allow access + Indicates a password should be create to allow access + """ + keys: list[str] | None = None + """ + (List of String) A list of ssh keys to access the server + A list of ssh keys to access the server + """ + passwordDelivery: str | None = None + """ + (String) The delivery method for the server's root password (one of none, email or sms) + The delivery method for the server's root password (one of `none`, `email` or `sms`) + """ + user: str | None = None + """ + (String) Username to be create to access the server + Username to be create to access the server + """ + + +class AdditionalIpAddres(BaseModel): + ipAddress: str | None = None + """ + (String) The primary IP address of this interface. + An additional IP address for this interface. + """ + ipAddressFamily: str | None = None + """ + (String) The type of the primary IP address of this interface (one of IPv4 or IPv6). + The type of the additional IP address of this interface (one of `IPv4` or `IPv6`). + """ + + +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 NetworkRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class NetworkSelector(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 NetworkInterfaceItem(BaseModel): + additionalIpAddress: list[AdditionalIpAddres] | None = None + """ + 31 blocks of additional IP addresses to assign to this interface. Allowed only with network interfaces of type private (see below for nested schema) + 0-31 blocks of additional IP addresses to assign to this interface. Allowed only with network interfaces of type `private` + """ + bootable: bool | None = None + """ + (Boolean) true if this interface should be used for network booting. + `true` if this interface should be used for network booting. + """ + index: float | None = None + """ + assigned when the server is updated. This might result to inaccurate diffs in the plan, when interfaces are re-ordered or when interface is removed from the middle of the list. + The interface index. + """ + ipAddress: str | None = None + """ + (String) The primary IP address of this interface. + The primary IP address of this interface. + """ + ipAddressFamily: str | None = None + """ + (String) The type of the primary IP address of this interface (one of IPv4 or IPv6). + The type of the primary IP address of this interface (one of `IPv4` or `IPv6`). + """ + network: str | None = None + """ + (String) The UUID of the network to attach this interface to. Required for private network interfaces. + The UUID of the network to attach this interface to. Required for private network interfaces. + """ + networkRef: NetworkRef | None = None + """ + Reference to a Network in network to populate network. + """ + networkSelector: NetworkSelector | None = None + """ + Selector for a Network in network to populate network. + """ + sourceIpFiltering: bool | None = None + """ + (Boolean) true if source IP should be filtered. + `true` if source IP should be filtered. + """ + type: str | None = None + """ + (String) Network interface type. For private network interfaces, a network must be specified with an existing network id. + Network interface type. For private network interfaces, a network must be specified with an existing network id. + """ + + +class SimpleBackup(BaseModel): + plan: str | None = None + """ + (String) The pricing plan used for the server. You can list available server plans with upctl server plans + Simple backup plan. Accepted values: daily, dailies, weeklies, monthlies. + """ + time: str | None = None + """ + (String) Time of the day at which backup will be taken. Should be provided in a hhmm format (e.g. 2230). + Time of the day at which backup will be taken. Should be provided in a hhmm format (e.g. 2230). + """ + + +class StorageRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class StorageSelector(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 StorageDevice(BaseModel): + address: str | None = None + """ + select next available address from that bus. + The device address the storage will be attached to (`scsi`|`virtio`|`ide`). Leave `address_position` field empty to auto-select next available address from that bus. + """ + addressPosition: str | None = None + """ + 15 (0, for example). Valid values for scsi or ide are 0-1:0-1 (0:0, for example). Leave empty to auto-select next available address in the given bus. + The device position in the given bus (defined via field `address`). Valid values for address `virtio` are `0-15` (`0`, for example). Valid values for `scsi` or `ide` are `0-1:0-1` (`0:0`, for example). Leave empty to auto-select next available address in the given bus. + """ + storage: str | None = None + """ + (String) The UUID of the storage to attach to the server. + The UUID of the storage to attach to the server. + """ + storageRef: StorageRef | None = None + """ + Reference to a Storage in storage to populate storage. + """ + storageSelector: StorageSelector | None = None + """ + Selector for a Storage in storage to populate storage. + """ + type: str | None = None + """ + (String) Network interface type. For private network interfaces, a network must be specified with an existing network id. + The device type the storage will be attached as + """ + + +class BackupRuleItem(BaseModel): + interval: str | None = None + """ + (String) The weekday when the backup is created + The weekday when the backup is created + """ + retention: float | None = None + """ + (Number) The number of days before a backup is automatically deleted + The number of days before a backup is automatically deleted + """ + time: str | None = None + """ + (String) Time of the day at which backup will be taken. Should be provided in a hhmm format (e.g. 2230). + The time of day (UTC) when the backup is created + """ + + +class Template(BaseModel): + address: str | None = None + """ + select next available address from that bus. + The device address the storage will be attached to (`scsi`|`virtio`|`ide`). Leave `address_position` field empty to auto-select next available address from that bus. + """ + addressPosition: str | None = None + """ + 15 (0, for example). Valid values for scsi or ide are 0-1:0-1 (0:0, for example). Leave empty to auto-select next available address in the given bus. + The device position in the given bus (defined via field `address`). For example `0:0`, or `0`. Leave empty to auto-select next available address in the given bus. + """ + backupRule: list[BackupRuleItem] | None = None + """ + (Block List) The criteria to backup the storage. + The criteria to backup the storage. + + Please keep in mind that it's not possible to have a storage with `backup_rule` attached to a server with `simple_backup` specified. Such configurations will throw errors during execution. + """ + deleteAutoresizeBackup: bool | None = None + """ + (Boolean) If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after success. + If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after success. + """ + encrypt: bool | None = None + """ + (Boolean) Sets if the storage is encrypted at rest + Sets if the storage is encrypted at rest + """ + filesystemAutoresize: bool | None = None + """ + (Boolean) If set to true, provider will attempt to resize partition and filesystem when the size of template storage changes. + Please note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the backup will be used + to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless delete_autoresize_backup option is set to true). + Taking and keeping backups incure costs. + If set to true, provider will attempt to resize partition and filesystem when the size of template storage changes. + Please note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the backup will be used + to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless delete_autoresize_backup option is set to true). + Taking and keeping backups incure costs. + """ + size: float | None = None + """ + (Number) The size of the storage in gigabytes + The size of the storage in gigabytes + """ + storage: str | None = None + """ + (String) The UUID of the storage to attach to the server. + A valid storage UUID or template name. You can list available public templates with `upctl storage list --public --template` and available private templates with `upctl storage list --template`. + """ + tier: str | None = None + """ + (String) The storage tier to use. + The storage tier to use. + """ + title: str | None = None + """ + (String) A short, informational description of the server. + A short, informative description + """ + + +class ForProvider(BaseModel): + bootOrder: str | None = None + """ + (String) The boot device order, cdrom|disk|network or comma separated combination of those values. Defaults to disk + The boot device order, `cdrom`|`disk`|`network` or comma separated combination of those values. Defaults to `disk` + """ + cpu: float | None = None + """ + (Number) The number of CPU cores for the server + The number of CPU cores for the server + """ + firewall: bool | None = None + """ + (Boolean) Are firewall rules active for the server + Are firewall rules active for the server + """ + host: float | None = None + """ + attribute. Only available for private cloud hosts + Use this to start the VM on a specific host. Refers to value from host -attribute. Only available for private cloud hosts + """ + hostname: str | None = None + """ + (String) The hostname of the server. + The hostname of the server. + """ + hotResize: bool | None = None + """ + (Boolean) If set to true, allows changing the server plan without requiring a reboot. This enables hot resizing of the server. If hot resizing fails, the apply operation will fail. + If set to true, allows changing the server plan without requiring a reboot. This enables hot resizing of the server. If hot resizing fails, the apply operation will fail. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the server. + User defined key-value pairs to classify the server. + """ + login: Login | None = None + """ + (Block List) Configure access credentials to the server (see below for nested schema) + Configure access credentials to the server + """ + mem: float | None = None + """ + (Number) The amount of memory for the server (in megabytes) + The amount of memory for the server (in megabytes) + """ + metadata: bool | None = None + """ + init based templates. + Is metadata service active for the server. The metadata service must be enabled when using recent cloud-init based templates. + """ + networkInterface: list[NetworkInterfaceItem] | None = None + """ + (Block List) One or more blocks describing the network interfaces of the server. + One or more blocks describing the network interfaces of the server. + + In addition to list order, the configured network interfaces are matched to the server's actual network interfaces by `index` and `ip_address` fields. This is to avoid public and utility network interfaces being re-assigned when the server is updated. This might result to inaccurate diffs in the plan, when interfaces are re-ordered or when interface is removed from the middle of the list. + + We recommend explicitly setting the value for `index` in configuration, when re-ordering interfaces or when removing interface from middle of the list. + """ + nicModel: str | None = None + """ + (String) The model of the server's network interfaces + The model of the server's network interfaces + """ + plan: str | None = None + """ + (String) The pricing plan used for the server. You can list available server plans with upctl server plans + The pricing plan used for the server. You can list available server plans with `upctl server plans` + """ + serverGroup: str | None = None + """ + zero value. + The UUID of a server group to attach this server to. Note that the server can also be attached to a server group via the `members` property of `upcloud_server_group`. Only one of the these should be defined at a time. This value is only updated if it has been set to non-zero value. + """ + simpleBackup: SimpleBackup | None = None + """ + (Block Set) Simple backup schedule configuration + Simple backup schedule configuration + + The simple backups provide a simplified way to back up *all* of the storages attached to a given server. This means you cannot have simple backup set for a server, and individual `backup_rules` on the storages attached to the server. Such configuration will throw an error during execution. This also applies to `backup_rules` defined for server templates. + """ + storageDevices: list[StorageDevice] | None = None + """ + (Block Set) A set of storage devices associated with the server (see below for nested schema) + A set of storage devices associated with the server + """ + tags: list[str] | None = None + """ + (Set of String) Tags to attach to the server. Note that tags are an access control feature and only available for a limited set of resources. Use labels to describe and filter your resources. + Tags to attach to the server. Note that tags are an access control feature and only available for a limited set of resources. Use labels to describe and filter your resources. + """ + template: Template | None = None + """ + (Block List) Block describing the preconfigured operating system (see below for nested schema) + Block describing the preconfigured operating system + """ + timezone: str | None = None + """ + (String) The timezone of the server. The timezone must be a valid timezone string, e.g. Europe/Helsinki. + The timezone of the server. The timezone must be a valid timezone string, e.g. `Europe/Helsinki`. + """ + title: str | None = None + """ + (String) A short, informational description of the server. + A short, informational description of the server. + """ + userData: str | None = None + """ + (String) Defines URL for a server setup script, or the script body itself + Defines URL for a server setup script, or the script body itself + """ + videoModel: str | None = None + """ + (String) The model of the server's video interface + The model of the server's video interface + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + The zone in which the server will be hosted, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +class InitProvider(BaseModel): + bootOrder: str | None = None + """ + (String) The boot device order, cdrom|disk|network or comma separated combination of those values. Defaults to disk + The boot device order, `cdrom`|`disk`|`network` or comma separated combination of those values. Defaults to `disk` + """ + cpu: float | None = None + """ + (Number) The number of CPU cores for the server + The number of CPU cores for the server + """ + firewall: bool | None = None + """ + (Boolean) Are firewall rules active for the server + Are firewall rules active for the server + """ + host: float | None = None + """ + attribute. Only available for private cloud hosts + Use this to start the VM on a specific host. Refers to value from host -attribute. Only available for private cloud hosts + """ + hostname: str | None = None + """ + (String) The hostname of the server. + The hostname of the server. + """ + hotResize: bool | None = None + """ + (Boolean) If set to true, allows changing the server plan without requiring a reboot. This enables hot resizing of the server. If hot resizing fails, the apply operation will fail. + If set to true, allows changing the server plan without requiring a reboot. This enables hot resizing of the server. If hot resizing fails, the apply operation will fail. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the server. + User defined key-value pairs to classify the server. + """ + login: Login | None = None + """ + (Block List) Configure access credentials to the server (see below for nested schema) + Configure access credentials to the server + """ + mem: float | None = None + """ + (Number) The amount of memory for the server (in megabytes) + The amount of memory for the server (in megabytes) + """ + metadata: bool | None = None + """ + init based templates. + Is metadata service active for the server. The metadata service must be enabled when using recent cloud-init based templates. + """ + networkInterface: list[NetworkInterfaceItem] | None = None + """ + (Block List) One or more blocks describing the network interfaces of the server. + One or more blocks describing the network interfaces of the server. + + In addition to list order, the configured network interfaces are matched to the server's actual network interfaces by `index` and `ip_address` fields. This is to avoid public and utility network interfaces being re-assigned when the server is updated. This might result to inaccurate diffs in the plan, when interfaces are re-ordered or when interface is removed from the middle of the list. + + We recommend explicitly setting the value for `index` in configuration, when re-ordering interfaces or when removing interface from middle of the list. + """ + nicModel: str | None = None + """ + (String) The model of the server's network interfaces + The model of the server's network interfaces + """ + plan: str | None = None + """ + (String) The pricing plan used for the server. You can list available server plans with upctl server plans + The pricing plan used for the server. You can list available server plans with `upctl server plans` + """ + serverGroup: str | None = None + """ + zero value. + The UUID of a server group to attach this server to. Note that the server can also be attached to a server group via the `members` property of `upcloud_server_group`. Only one of the these should be defined at a time. This value is only updated if it has been set to non-zero value. + """ + simpleBackup: SimpleBackup | None = None + """ + (Block Set) Simple backup schedule configuration + Simple backup schedule configuration + + The simple backups provide a simplified way to back up *all* of the storages attached to a given server. This means you cannot have simple backup set for a server, and individual `backup_rules` on the storages attached to the server. Such configuration will throw an error during execution. This also applies to `backup_rules` defined for server templates. + """ + storageDevices: list[StorageDevice] | None = None + """ + (Block Set) A set of storage devices associated with the server (see below for nested schema) + A set of storage devices associated with the server + """ + tags: list[str] | None = None + """ + (Set of String) Tags to attach to the server. Note that tags are an access control feature and only available for a limited set of resources. Use labels to describe and filter your resources. + Tags to attach to the server. Note that tags are an access control feature and only available for a limited set of resources. Use labels to describe and filter your resources. + """ + template: Template | None = None + """ + (Block List) Block describing the preconfigured operating system (see below for nested schema) + Block describing the preconfigured operating system + """ + timezone: str | None = None + """ + (String) The timezone of the server. The timezone must be a valid timezone string, e.g. Europe/Helsinki. + The timezone of the server. The timezone must be a valid timezone string, e.g. `Europe/Helsinki`. + """ + title: str | None = None + """ + (String) A short, informational description of the server. + A short, informational description of the server. + """ + userData: str | None = None + """ + (String) Defines URL for a server setup script, or the script body itself + Defines URL for a server setup script, or the script body itself + """ + videoModel: str | None = None + """ + (String) The model of the server's video interface + The model of the server's video interface + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + The zone in which the server will be hosted, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 AdditionalIpAddresModel(BaseModel): + ipAddress: str | None = None + """ + (String) The primary IP address of this interface. + An additional IP address for this interface. + """ + ipAddressFamily: str | None = None + """ + (String) The type of the primary IP address of this interface (one of IPv4 or IPv6). + The type of the additional IP address of this interface (one of `IPv4` or `IPv6`). + """ + ipAddressFloating: bool | None = None + """ + (Boolean) true indicates that the primary IP address is a floating IP address. + `true` indicates that the additional IP address is a floating IP address. + """ + + +class NetworkInterfaceItemModel(BaseModel): + additionalIpAddress: list[AdditionalIpAddresModel] | None = None + """ + 31 blocks of additional IP addresses to assign to this interface. Allowed only with network interfaces of type private (see below for nested schema) + 0-31 blocks of additional IP addresses to assign to this interface. Allowed only with network interfaces of type `private` + """ + bootable: bool | None = None + """ + (Boolean) true if this interface should be used for network booting. + `true` if this interface should be used for network booting. + """ + index: float | None = None + """ + assigned when the server is updated. This might result to inaccurate diffs in the plan, when interfaces are re-ordered or when interface is removed from the middle of the list. + The interface index. + """ + ipAddress: str | None = None + """ + (String) The primary IP address of this interface. + The primary IP address of this interface. + """ + ipAddressFamily: str | None = None + """ + (String) The type of the primary IP address of this interface (one of IPv4 or IPv6). + The type of the primary IP address of this interface (one of `IPv4` or `IPv6`). + """ + ipAddressFloating: bool | None = None + """ + (Boolean) true indicates that the primary IP address is a floating IP address. + `true` indicates that the primary IP address is a floating IP address. + """ + macAddress: str | None = None + """ + (String) The MAC address of the interface. + The MAC address of the interface. + """ + network: str | None = None + """ + (String) The UUID of the network to attach this interface to. Required for private network interfaces. + The UUID of the network to attach this interface to. Required for private network interfaces. + """ + sourceIpFiltering: bool | None = None + """ + (Boolean) true if source IP should be filtered. + `true` if source IP should be filtered. + """ + type: str | None = None + """ + (String) Network interface type. For private network interfaces, a network must be specified with an existing network id. + Network interface type. For private network interfaces, a network must be specified with an existing network id. + """ + + +class StorageDeviceModel(BaseModel): + address: str | None = None + """ + select next available address from that bus. + The device address the storage will be attached to (`scsi`|`virtio`|`ide`). Leave `address_position` field empty to auto-select next available address from that bus. + """ + addressPosition: str | None = None + """ + 15 (0, for example). Valid values for scsi or ide are 0-1:0-1 (0:0, for example). Leave empty to auto-select next available address in the given bus. + The device position in the given bus (defined via field `address`). Valid values for address `virtio` are `0-15` (`0`, for example). Valid values for `scsi` or `ide` are `0-1:0-1` (`0:0`, for example). Leave empty to auto-select next available address in the given bus. + """ + storage: str | None = None + """ + (String) The UUID of the storage to attach to the server. + The UUID of the storage to attach to the server. + """ + type: str | None = None + """ + (String) Network interface type. For private network interfaces, a network must be specified with an existing network id. + The device type the storage will be attached as + """ + + +class TemplateModel(BaseModel): + address: str | None = None + """ + select next available address from that bus. + The device address the storage will be attached to (`scsi`|`virtio`|`ide`). Leave `address_position` field empty to auto-select next available address from that bus. + """ + addressPosition: str | None = None + """ + 15 (0, for example). Valid values for scsi or ide are 0-1:0-1 (0:0, for example). Leave empty to auto-select next available address in the given bus. + The device position in the given bus (defined via field `address`). For example `0:0`, or `0`. Leave empty to auto-select next available address in the given bus. + """ + backupRule: list[BackupRuleItem] | None = None + """ + (Block List) The criteria to backup the storage. + The criteria to backup the storage. + + Please keep in mind that it's not possible to have a storage with `backup_rule` attached to a server with `simple_backup` specified. Such configurations will throw errors during execution. + """ + deleteAutoresizeBackup: bool | None = None + """ + (Boolean) If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after success. + If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after success. + """ + encrypt: bool | None = None + """ + (Boolean) Sets if the storage is encrypted at rest + Sets if the storage is encrypted at rest + """ + filesystemAutoresize: bool | None = None + """ + (Boolean) If set to true, provider will attempt to resize partition and filesystem when the size of template storage changes. + Please note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the backup will be used + to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless delete_autoresize_backup option is set to true). + Taking and keeping backups incure costs. + If set to true, provider will attempt to resize partition and filesystem when the size of template storage changes. + Please note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the backup will be used + to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless delete_autoresize_backup option is set to true). + Taking and keeping backups incure costs. + """ + id: str | None = None + """ + (String) UUID of the server. + The unique identifier for the storage + """ + size: float | None = None + """ + (Number) The size of the storage in gigabytes + The size of the storage in gigabytes + """ + storage: str | None = None + """ + (String) The UUID of the storage to attach to the server. + A valid storage UUID or template name. You can list available public templates with `upctl storage list --public --template` and available private templates with `upctl storage list --template`. + """ + tier: str | None = None + """ + (String) The storage tier to use. + The storage tier to use. + """ + title: str | None = None + """ + (String) A short, informational description of the server. + A short, informative description + """ + + +class AtProvider(BaseModel): + bootOrder: str | None = None + """ + (String) The boot device order, cdrom|disk|network or comma separated combination of those values. Defaults to disk + The boot device order, `cdrom`|`disk`|`network` or comma separated combination of those values. Defaults to `disk` + """ + cpu: float | None = None + """ + (Number) The number of CPU cores for the server + The number of CPU cores for the server + """ + firewall: bool | None = None + """ + (Boolean) Are firewall rules active for the server + Are firewall rules active for the server + """ + host: float | None = None + """ + attribute. Only available for private cloud hosts + Use this to start the VM on a specific host. Refers to value from host -attribute. Only available for private cloud hosts + """ + hostname: str | None = None + """ + (String) The hostname of the server. + The hostname of the server. + """ + hotResize: bool | None = None + """ + (Boolean) If set to true, allows changing the server plan without requiring a reboot. This enables hot resizing of the server. If hot resizing fails, the apply operation will fail. + If set to true, allows changing the server plan without requiring a reboot. This enables hot resizing of the server. If hot resizing fails, the apply operation will fail. + """ + id: str | None = None + """ + (String) UUID of the server. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the server. + User defined key-value pairs to classify the server. + """ + login: Login | None = None + """ + (Block List) Configure access credentials to the server (see below for nested schema) + Configure access credentials to the server + """ + mem: float | None = None + """ + (Number) The amount of memory for the server (in megabytes) + The amount of memory for the server (in megabytes) + """ + metadata: bool | None = None + """ + init based templates. + Is metadata service active for the server. The metadata service must be enabled when using recent cloud-init based templates. + """ + networkInterface: list[NetworkInterfaceItemModel] | None = None + """ + (Block List) One or more blocks describing the network interfaces of the server. + One or more blocks describing the network interfaces of the server. + + In addition to list order, the configured network interfaces are matched to the server's actual network interfaces by `index` and `ip_address` fields. This is to avoid public and utility network interfaces being re-assigned when the server is updated. This might result to inaccurate diffs in the plan, when interfaces are re-ordered or when interface is removed from the middle of the list. + + We recommend explicitly setting the value for `index` in configuration, when re-ordering interfaces or when removing interface from middle of the list. + """ + nicModel: str | None = None + """ + (String) The model of the server's network interfaces + The model of the server's network interfaces + """ + plan: str | None = None + """ + (String) The pricing plan used for the server. You can list available server plans with upctl server plans + The pricing plan used for the server. You can list available server plans with `upctl server plans` + """ + serverGroup: str | None = None + """ + zero value. + The UUID of a server group to attach this server to. Note that the server can also be attached to a server group via the `members` property of `upcloud_server_group`. Only one of the these should be defined at a time. This value is only updated if it has been set to non-zero value. + """ + simpleBackup: SimpleBackup | None = None + """ + (Block Set) Simple backup schedule configuration + Simple backup schedule configuration + + The simple backups provide a simplified way to back up *all* of the storages attached to a given server. This means you cannot have simple backup set for a server, and individual `backup_rules` on the storages attached to the server. Such configuration will throw an error during execution. This also applies to `backup_rules` defined for server templates. + """ + storageDevices: list[StorageDeviceModel] | None = None + """ + (Block Set) A set of storage devices associated with the server (see below for nested schema) + A set of storage devices associated with the server + """ + tags: list[str] | None = None + """ + (Set of String) Tags to attach to the server. Note that tags are an access control feature and only available for a limited set of resources. Use labels to describe and filter your resources. + Tags to attach to the server. Note that tags are an access control feature and only available for a limited set of resources. Use labels to describe and filter your resources. + """ + template: TemplateModel | None = None + """ + (Block List) Block describing the preconfigured operating system (see below for nested schema) + Block describing the preconfigured operating system + """ + timezone: str | None = None + """ + (String) The timezone of the server. The timezone must be a valid timezone string, e.g. Europe/Helsinki. + The timezone of the server. The timezone must be a valid timezone string, e.g. `Europe/Helsinki`. + """ + title: str | None = None + """ + (String) A short, informational description of the server. + A short, informational description of the server. + """ + userData: str | None = None + """ + (String) Defines URL for a server setup script, or the script body itself + Defines URL for a server setup script, or the script body itself + """ + videoModel: str | None = None + """ + (String) The model of the server's video interface + The model of the server's video interface + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + The zone in which the server will be hosted, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 Server(BaseModel): + apiVersion: Literal['server.upcloud.com/v1alpha1'] | None = ( + 'server.upcloud.com/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['Server'] | None = 'Server' + """ + 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 + """ + ServerSpec defines the desired state of Server + """ + status: Status | None = None + """ + ServerStatus defines the observed state of Server. + """ + + +class ServerList(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[Server] + """ + List of servers. 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/com/upcloud/storage/__init__.py b/schemas/python/models/com/upcloud/storage/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/storage/filestorage/__init__.py b/schemas/python/models/com/upcloud/storage/filestorage/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/storage/filestorage/v1alpha1.py b/schemas/python/models/com/upcloud/storage/filestorage/v1alpha1.py new file mode 100644 index 000000000..9ea39333c --- /dev/null +++ b/schemas/python/models/com/upcloud/storage/filestorage/v1alpha1.py @@ -0,0 +1,403 @@ +# generated by datamodel-codegen: +# filename: workdir/storage_upcloud_com_v1alpha1_filestorage.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 UuidRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class UuidSelector(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 Network(BaseModel): + family: str | None = None + """ + (String) IP family, e.g. IPv4. + IP family, e.g. IPv4. + """ + ipAddress: str | None = None + """ + assign otherwise). + IP address to assign (optional, auto-assign otherwise). + """ + name: str | None = None + """ + (String) Name of the file storage service. + Attachment name (unique per this service). + """ + uuid: str | None = None + """ + (String) UUID of an existing private network to attach. + UUID of an existing private network to attach. + """ + uuidRef: UuidRef | None = None + """ + Reference to a Network in network to populate uuid. + """ + uuidSelector: UuidSelector | None = None + """ + Selector for a Network in network to populate uuid. + """ + + +class ForProvider(BaseModel): + configuredStatus: str | None = None + """ + (String) The service configured status indicates the service's current intended status. Managed by the customer. + The service configured status indicates the service's current intended status. Managed by the customer. + """ + encrypt: bool | None = None + """ + (Boolean) Sets if the file storage is encrypted at rest. Encryption can only be enabled at creation time and cannot be changed later. Defaults to false. + Sets if the file storage is encrypted at rest. Encryption can only be enabled at creation time and cannot be changed later. Defaults to `false`. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the file storage. + User defined key-value pairs to classify the file storage. + """ + name: str | None = None + """ + (String) Name of the file storage service. + Name of the file storage service. + """ + network: Network | None = None + """ + (Block Set) Network attached to this file storage (currently supports at most one of these blocks). (see below for nested schema) + Network attached to this file storage (currently supports at most one of these blocks). + """ + size: float | None = None + """ + (Number) Size of the file storage in GB. + Size of the file storage in GB. + """ + zone: str | None = None + """ + hel1. You can list available zones with upctl zone list. + Zone in which the service will be hosted, e.g. `fi-hel1`. You can list available zones with `upctl zone list`. + """ + + +class InitProvider(BaseModel): + configuredStatus: str | None = None + """ + (String) The service configured status indicates the service's current intended status. Managed by the customer. + The service configured status indicates the service's current intended status. Managed by the customer. + """ + encrypt: bool | None = None + """ + (Boolean) Sets if the file storage is encrypted at rest. Encryption can only be enabled at creation time and cannot be changed later. Defaults to false. + Sets if the file storage is encrypted at rest. Encryption can only be enabled at creation time and cannot be changed later. Defaults to `false`. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the file storage. + User defined key-value pairs to classify the file storage. + """ + name: str | None = None + """ + (String) Name of the file storage service. + Name of the file storage service. + """ + network: Network | None = None + """ + (Block Set) Network attached to this file storage (currently supports at most one of these blocks). (see below for nested schema) + Network attached to this file storage (currently supports at most one of these blocks). + """ + size: float | None = None + """ + (Number) Size of the file storage in GB. + Size of the file storage in GB. + """ + zone: str | None = None + """ + hel1. You can list available zones with upctl zone list. + Zone in which the service will be hosted, e.g. `fi-hel1`. You can list available zones with `upctl zone list`. + """ + + +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 NetworkModel(BaseModel): + family: str | None = None + """ + (String) IP family, e.g. IPv4. + IP family, e.g. IPv4. + """ + ipAddress: str | None = None + """ + assign otherwise). + IP address to assign (optional, auto-assign otherwise). + """ + name: str | None = None + """ + (String) Name of the file storage service. + Attachment name (unique per this service). + """ + uuid: str | None = None + """ + (String) UUID of an existing private network to attach. + UUID of an existing private network to attach. + """ + + +class AtProvider(BaseModel): + configuredStatus: str | None = None + """ + (String) The service configured status indicates the service's current intended status. Managed by the customer. + The service configured status indicates the service's current intended status. Managed by the customer. + """ + encrypt: bool | None = None + """ + (Boolean) Sets if the file storage is encrypted at rest. Encryption can only be enabled at creation time and cannot be changed later. Defaults to false. + Sets if the file storage is encrypted at rest. Encryption can only be enabled at creation time and cannot be changed later. Defaults to `false`. + """ + id: str | None = None + """ + (String) UUID of the file storage. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the file storage. + User defined key-value pairs to classify the file storage. + """ + name: str | None = None + """ + (String) Name of the file storage service. + Name of the file storage service. + """ + network: NetworkModel | None = None + """ + (Block Set) Network attached to this file storage (currently supports at most one of these blocks). (see below for nested schema) + Network attached to this file storage (currently supports at most one of these blocks). + """ + size: float | None = None + """ + (Number) Size of the file storage in GB. + Size of the file storage in GB. + """ + zone: str | None = None + """ + hel1. You can list available zones with upctl zone list. + Zone in which the service will be hosted, e.g. `fi-hel1`. You can list available zones with `upctl zone list`. + """ + + +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 FileStorage(BaseModel): + apiVersion: Literal['storage.upcloud.com/v1alpha1'] | None = ( + 'storage.upcloud.com/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['FileStorage'] | None = 'FileStorage' + """ + 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 + """ + FileStorageSpec defines the desired state of FileStorage + """ + status: Status | None = None + """ + FileStorageStatus defines the observed state of FileStorage. + """ + + +class FileStorageList(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[FileStorage] + """ + List of filestorages. 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/com/upcloud/storage/filestorageshare/__init__.py b/schemas/python/models/com/upcloud/storage/filestorageshare/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/storage/filestorageshare/v1alpha1.py b/schemas/python/models/com/upcloud/storage/filestorageshare/v1alpha1.py new file mode 100644 index 000000000..2dfb19969 --- /dev/null +++ b/schemas/python/models/com/upcloud/storage/filestorageshare/v1alpha1.py @@ -0,0 +1,269 @@ +# generated by datamodel-codegen: +# filename: workdir/storage_upcloud_com_v1alpha1_filestorageshare.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 FileStorageRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class FileStorageSelector(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): + fileStorage: str | None = None + """ + UUID of the file storage service. + """ + fileStorageRef: FileStorageRef | None = None + """ + Reference to a FileStorage in storage to populate fileStorage. + """ + fileStorageSelector: FileStorageSelector | None = None + """ + Selector for a FileStorage in storage to populate fileStorage. + """ + path: str | None = None + """ + Absolute path exported by the share (e.g. `/public`). + """ + + +class InitProvider(BaseModel): + path: str | None = None + """ + Absolute path exported by the share (e.g. `/public`). + """ + + +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): + fileStorage: str | None = None + """ + UUID of the file storage service. + """ + id: str | None = None + path: str | None = None + """ + Absolute path exported by the share (e.g. `/public`). + """ + + +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 FileStorageShare(BaseModel): + apiVersion: Literal['storage.upcloud.com/v1alpha1'] | None = ( + 'storage.upcloud.com/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['FileStorageShare'] | None = 'FileStorageShare' + """ + 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 + """ + FileStorageShareSpec defines the desired state of FileStorageShare + """ + status: Status | None = None + """ + FileStorageShareStatus defines the observed state of FileStorageShare. + """ + + +class FileStorageShareList(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[FileStorageShare] + """ + List of filestorageshares. 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/com/upcloud/storage/filestorageshareacl/__init__.py b/schemas/python/models/com/upcloud/storage/filestorageshareacl/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/storage/filestorageshareacl/v1alpha1.py b/schemas/python/models/com/upcloud/storage/filestorageshareacl/v1alpha1.py new file mode 100644 index 000000000..6373a117d --- /dev/null +++ b/schemas/python/models/com/upcloud/storage/filestorageshareacl/v1alpha1.py @@ -0,0 +1,324 @@ +# generated by datamodel-codegen: +# filename: workdir/storage_upcloud_com_v1alpha1_filestorageshareacl.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 FileStorageRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class FileStorageSelector(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 ShareNameRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class ShareNameSelector(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): + fileStorage: str | None = None + """ + UUID of the file storage service. + """ + fileStorageRef: FileStorageRef | None = None + """ + Reference to a FileStorage in storage to populate fileStorage. + """ + fileStorageSelector: FileStorageSelector | None = None + """ + Selector for a FileStorage in storage to populate fileStorage. + """ + permission: str | None = None + """ + Access level: 'ro' or 'rw'. + """ + shareName: str | None = None + """ + Name of the share. + """ + shareNameRef: ShareNameRef | None = None + """ + Reference to a FileStorageShare in storage to populate shareName. + """ + shareNameSelector: ShareNameSelector | None = None + """ + Selector for a FileStorageShare in storage to populate shareName. + """ + target: str | None = None + """ + Target IP/CIDR or '*'. + """ + + +class InitProvider(BaseModel): + permission: str | None = None + """ + Access level: 'ro' or 'rw'. + """ + target: str | None = None + """ + Target IP/CIDR or '*'. + """ + + +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): + fileStorage: str | None = None + """ + UUID of the file storage service. + """ + id: str | None = None + permission: str | None = None + """ + Access level: 'ro' or 'rw'. + """ + shareName: str | None = None + """ + Name of the share. + """ + target: str | None = None + """ + Target IP/CIDR or '*'. + """ + + +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 FileStorageShareACL(BaseModel): + apiVersion: Literal['storage.upcloud.com/v1alpha1'] | None = ( + 'storage.upcloud.com/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['FileStorageShareACL'] | None = 'FileStorageShareACL' + """ + 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 + """ + FileStorageShareACLSpec defines the desired state of FileStorageShareACL + """ + status: Status | None = None + """ + FileStorageShareACLStatus defines the observed state of FileStorageShareACL. + """ + + +class FileStorageShareACLList(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[FileStorageShareACL] + """ + List of filestorageshareacls. 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/com/upcloud/storage/storagebackup/__init__.py b/schemas/python/models/com/upcloud/storage/storagebackup/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/storage/storagebackup/v1alpha1.py b/schemas/python/models/com/upcloud/storage/storagebackup/v1alpha1.py new file mode 100644 index 000000000..b7ca1b156 --- /dev/null +++ b/schemas/python/models/com/upcloud/storage/storagebackup/v1alpha1.py @@ -0,0 +1,340 @@ +# generated by datamodel-codegen: +# filename: workdir/storage_upcloud_com_v1alpha1_storagebackup.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 SourceStorageRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class SourceStorageSelector(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): + labels: dict[str, str] | None = None + """ + value pairs to classify the storage. + User defined key-value pairs to classify the storage. + """ + sourceStorage: str | None = None + """ + (String) The UUID of the storage to back up. + The UUID of the storage to back up. + """ + sourceStorageRef: SourceStorageRef | None = None + """ + Reference to a Storage in storage to populate sourceStorage. + """ + sourceStorageSelector: SourceStorageSelector | None = None + """ + Selector for a Storage in storage to populate sourceStorage. + """ + title: str | None = None + """ + (String) Title of the backup. + Title of the backup. + """ + + +class InitProvider(BaseModel): + labels: dict[str, str] | None = None + """ + value pairs to classify the storage. + User defined key-value pairs to classify the storage. + """ + sourceStorage: str | None = None + """ + (String) The UUID of the storage to back up. + The UUID of the storage to back up. + """ + sourceStorageRef: SourceStorageRef | None = None + """ + Reference to a Storage in storage to populate sourceStorage. + """ + sourceStorageSelector: SourceStorageSelector | None = None + """ + Selector for a Storage in storage to populate sourceStorage. + """ + title: str | None = None + """ + (String) Title of the backup. + Title of the backup. + """ + + +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): + createdAt: str | None = None + """ + (String) Timestamp of the backup creation. + Timestamp of the backup creation. + """ + encrypt: bool | None = None + """ + (Boolean) Sets if the storage is encrypted at rest. + Sets if the storage is encrypted at rest. + """ + id: str | None = None + """ + (String) ID of the created backup. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the storage. + User defined key-value pairs to classify the storage. + """ + size: float | None = None + """ + (Number) The size of the storage in gigabytes. + The size of the storage in gigabytes. + """ + sourceStorage: str | None = None + """ + (String) The UUID of the storage to back up. + The UUID of the storage to back up. + """ + systemLabels: dict[str, str] | None = None + """ + value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user. + System defined key-value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user. + """ + tier: str | None = None + """ + (String) The tier of the storage. + The tier of the storage. + """ + title: str | None = None + """ + (String) Title of the backup. + Title of the backup. + """ + type: str | None = None + """ + (String) The type of the storage. + The type of the storage. + """ + zone: str | None = None + """ + fra1. + The zone the storage is in, e.g. `de-fra1`. + """ + + +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 StorageBackup(BaseModel): + apiVersion: Literal['storage.upcloud.com/v1alpha1'] | None = ( + 'storage.upcloud.com/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['StorageBackup'] | None = 'StorageBackup' + """ + 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 + """ + StorageBackupSpec defines the desired state of StorageBackup + """ + status: Status | None = None + """ + StorageBackupStatus defines the observed state of StorageBackup. + """ + + +class StorageBackupList(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[StorageBackup] + """ + List of storagebackups. 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/com/upcloud/storage/storagetemplate/__init__.py b/schemas/python/models/com/upcloud/storage/storagetemplate/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/storage/storagetemplate/v1alpha1.py b/schemas/python/models/com/upcloud/storage/storagetemplate/v1alpha1.py new file mode 100644 index 000000000..fd6d03eb7 --- /dev/null +++ b/schemas/python/models/com/upcloud/storage/storagetemplate/v1alpha1.py @@ -0,0 +1,335 @@ +# generated by datamodel-codegen: +# filename: workdir/storage_upcloud_com_v1alpha1_storagetemplate.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 SourceStorageRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class SourceStorageSelector(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): + labels: dict[str, str] | None = None + """ + value pairs to classify the storage. + User defined key-value pairs to classify the storage. + """ + sourceStorage: str | None = None + """ + (String) The source storage that is used as a base for this storage template. + The source storage that is used as a base for this storage template. + """ + sourceStorageRef: SourceStorageRef | None = None + """ + Reference to a Storage in storage to populate sourceStorage. + """ + sourceStorageSelector: SourceStorageSelector | None = None + """ + Selector for a Storage in storage to populate sourceStorage. + """ + title: str | None = None + """ + (String) The title of the storage. + The title of the storage. + """ + + +class InitProvider(BaseModel): + labels: dict[str, str] | None = None + """ + value pairs to classify the storage. + User defined key-value pairs to classify the storage. + """ + sourceStorage: str | None = None + """ + (String) The source storage that is used as a base for this storage template. + The source storage that is used as a base for this storage template. + """ + sourceStorageRef: SourceStorageRef | None = None + """ + Reference to a Storage in storage to populate sourceStorage. + """ + sourceStorageSelector: SourceStorageSelector | None = None + """ + Selector for a Storage in storage to populate sourceStorage. + """ + title: str | None = None + """ + (String) The title of the storage. + The title of the storage. + """ + + +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): + encrypt: bool | None = None + """ + (Boolean) Sets if the storage is encrypted at rest. + Sets if the storage is encrypted at rest. + """ + id: str | None = None + """ + (String) UUID of the storage. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the storage. + User defined key-value pairs to classify the storage. + """ + size: float | None = None + """ + (Number) The size of the storage in gigabytes. + The size of the storage in gigabytes. + """ + sourceStorage: str | None = None + """ + (String) The source storage that is used as a base for this storage template. + The source storage that is used as a base for this storage template. + """ + systemLabels: dict[str, str] | None = None + """ + value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user. + System defined key-value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user. + """ + tier: str | None = None + """ + (String) The tier of the storage. + The tier of the storage. + """ + title: str | None = None + """ + (String) The title of the storage. + The title of the storage. + """ + type: str | None = None + """ + (String) The type of the storage. + The type of the storage. + """ + zone: str | None = None + """ + fra1. + The zone the storage is in, e.g. `de-fra1`. + """ + + +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 StorageTemplate(BaseModel): + apiVersion: Literal['storage.upcloud.com/v1alpha1'] | None = ( + 'storage.upcloud.com/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['StorageTemplate'] | None = 'StorageTemplate' + """ + 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 + """ + StorageTemplateSpec defines the desired state of StorageTemplate + """ + status: Status | None = None + """ + StorageTemplateStatus defines the observed state of StorageTemplate. + """ + + +class StorageTemplateList(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[StorageTemplate] + """ + List of storagetemplates. 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/com/upcloud/storage/v1alpha1.py b/schemas/python/models/com/upcloud/storage/v1alpha1.py new file mode 100644 index 000000000..1fc7822c3 --- /dev/null +++ b/schemas/python/models/com/upcloud/storage/v1alpha1.py @@ -0,0 +1,476 @@ +# generated by datamodel-codegen: +# filename: workdir/storage_upcloud_com_v1alpha1_storage.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from ....io.k8s.apimachinery.pkg.apis.meta import v1 + + +class BackupRuleItem(BaseModel): + interval: str | None = None + """ + (String) The weekday when the backup is created + The weekday when the backup is created + """ + retention: float | None = None + """ + (Number) The number of days before a backup is automatically deleted + The number of days before a backup is automatically deleted + """ + time: str | None = None + """ + (String) The time of day (UTC) when the backup is created + The time of day (UTC) when the backup is created + """ + + +class Clone(BaseModel): + id: str | None = None + """ + (String) UUID of the storage. + The unique identifier of the storage/template to clone. + """ + + +class Import(BaseModel): + source: str | None = None + """ + (String) The mode of the import task. One of http_import or direct_upload. + The mode of the import task. One of `http_import` or `direct_upload`. + """ + sourceHash: str | None = None + """ + (String) SHA256 hash of the source content. This hash is used to verify the integrity of the imported data by comparing it to sha256sum after the import has completed. Possible filename is automatically removed from the hash before comparison. + SHA256 hash of the source content. This hash is used to verify the integrity of the imported data by comparing it to `sha256sum` after the import has completed. Possible filename is automatically removed from the hash before comparison. + """ + sourceLocation: str | None = None + """ + Type header of the PUT request is set automatically based on the file extension (.gz or .xz, case-insensitive). + The location of the file to import. For `http_import` an accessible URL. For `direct_upload` a local file. When direct uploading a compressed image, `Content-Type` header of the PUT request is set automatically based on the file extension (`.gz` or `.xz`, case-insensitive). + """ + + +class ForProvider(BaseModel): + backupRule: list[BackupRuleItem] | None = None + """ + (Block List) The criteria to backup the storage. + The criteria to backup the storage. + + Please keep in mind that it's not possible to have a storage with `backup_rule` attached to a server with `simple_backup` specified. Such configurations will throw errors during execution. + """ + clone: Clone | None = None + """ + (Block Set) Block defining another storage/template to clone to storage. (see below for nested schema) + Block defining another storage/template to clone to storage. + """ + deleteAutoresizeBackup: bool | None = None + """ + (Boolean) If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after success. + If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after success. + """ + encrypt: bool | None = None + """ + (Boolean) Sets if the storage is encrypted at rest. + Sets if the storage is encrypted at rest. + """ + filesystemAutoresize: bool | None = None + """ + (Boolean) If set to true, provider will attempt to resize partition and filesystem when the size of the storage changes. Please note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the backup will be used to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless delete_autoresize_backup option is set to true). + Taking and keeping backups incure costs. + If set to true, provider will attempt to resize partition and filesystem when the size of the storage changes. Please note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the backup will be used to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless `delete_autoresize_backup` option is set to true). + Taking and keeping backups incure costs. + """ + import_: Import | None = Field(None, alias='import') + """ + (Block Set) Block defining external data to import to storage (see below for nested schema) + Block defining external data to import to storage + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the storage. + User defined key-value pairs to classify the storage. + """ + size: float | None = None + """ + (Number) The size of the storage in gigabytes. + The size of the storage in gigabytes. + """ + tier: str | None = None + """ + (String) The tier of the storage. + The tier of the storage. + """ + title: str | None = None + """ + (String) The title of the storage. + The title of the storage. + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + The zone the storage is in, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +class InitProvider(BaseModel): + backupRule: list[BackupRuleItem] | None = None + """ + (Block List) The criteria to backup the storage. + The criteria to backup the storage. + + Please keep in mind that it's not possible to have a storage with `backup_rule` attached to a server with `simple_backup` specified. Such configurations will throw errors during execution. + """ + clone: Clone | None = None + """ + (Block Set) Block defining another storage/template to clone to storage. (see below for nested schema) + Block defining another storage/template to clone to storage. + """ + deleteAutoresizeBackup: bool | None = None + """ + (Boolean) If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after success. + If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after success. + """ + encrypt: bool | None = None + """ + (Boolean) Sets if the storage is encrypted at rest. + Sets if the storage is encrypted at rest. + """ + filesystemAutoresize: bool | None = None + """ + (Boolean) If set to true, provider will attempt to resize partition and filesystem when the size of the storage changes. Please note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the backup will be used to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless delete_autoresize_backup option is set to true). + Taking and keeping backups incure costs. + If set to true, provider will attempt to resize partition and filesystem when the size of the storage changes. Please note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the backup will be used to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless `delete_autoresize_backup` option is set to true). + Taking and keeping backups incure costs. + """ + import_: Import | None = Field(None, alias='import') + """ + (Block Set) Block defining external data to import to storage (see below for nested schema) + Block defining external data to import to storage + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the storage. + User defined key-value pairs to classify the storage. + """ + size: float | None = None + """ + (Number) The size of the storage in gigabytes. + The size of the storage in gigabytes. + """ + tier: str | None = None + """ + (String) The tier of the storage. + The tier of the storage. + """ + title: str | None = None + """ + (String) The title of the storage. + The title of the storage. + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + The zone the storage is in, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 ImportModel(BaseModel): + sha256sum: str | None = None + """ + (String) sha256 sum of the imported data + sha256 sum of the imported data + """ + source: str | None = None + """ + (String) The mode of the import task. One of http_import or direct_upload. + The mode of the import task. One of `http_import` or `direct_upload`. + """ + sourceHash: str | None = None + """ + (String) SHA256 hash of the source content. This hash is used to verify the integrity of the imported data by comparing it to sha256sum after the import has completed. Possible filename is automatically removed from the hash before comparison. + SHA256 hash of the source content. This hash is used to verify the integrity of the imported data by comparing it to `sha256sum` after the import has completed. Possible filename is automatically removed from the hash before comparison. + """ + sourceLocation: str | None = None + """ + Type header of the PUT request is set automatically based on the file extension (.gz or .xz, case-insensitive). + The location of the file to import. For `http_import` an accessible URL. For `direct_upload` a local file. When direct uploading a compressed image, `Content-Type` header of the PUT request is set automatically based on the file extension (`.gz` or `.xz`, case-insensitive). + """ + writtenBytes: float | None = None + """ + (Number) Number of bytes imported + Number of bytes imported + """ + + +class AtProvider(BaseModel): + backupRule: list[BackupRuleItem] | None = None + """ + (Block List) The criteria to backup the storage. + The criteria to backup the storage. + + Please keep in mind that it's not possible to have a storage with `backup_rule` attached to a server with `simple_backup` specified. Such configurations will throw errors during execution. + """ + clone: Clone | None = None + """ + (Block Set) Block defining another storage/template to clone to storage. (see below for nested schema) + Block defining another storage/template to clone to storage. + """ + deleteAutoresizeBackup: bool | None = None + """ + (Boolean) If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after success. + If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after success. + """ + encrypt: bool | None = None + """ + (Boolean) Sets if the storage is encrypted at rest. + Sets if the storage is encrypted at rest. + """ + filesystemAutoresize: bool | None = None + """ + (Boolean) If set to true, provider will attempt to resize partition and filesystem when the size of the storage changes. Please note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the backup will be used to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless delete_autoresize_backup option is set to true). + Taking and keeping backups incure costs. + If set to true, provider will attempt to resize partition and filesystem when the size of the storage changes. Please note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the backup will be used to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless `delete_autoresize_backup` option is set to true). + Taking and keeping backups incure costs. + """ + id: str | None = None + """ + (String) UUID of the storage. + """ + import_: ImportModel | None = Field(None, alias='import') + """ + (Block Set) Block defining external data to import to storage (see below for nested schema) + Block defining external data to import to storage + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the storage. + User defined key-value pairs to classify the storage. + """ + size: float | None = None + """ + (Number) The size of the storage in gigabytes. + The size of the storage in gigabytes. + """ + systemLabels: dict[str, str] | None = None + """ + value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user. + System defined key-value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user. + """ + tier: str | None = None + """ + (String) The tier of the storage. + The tier of the storage. + """ + title: str | None = None + """ + (String) The title of the storage. + The title of the storage. + """ + type: str | None = None + """ + (String) The type of the storage. + The type of the storage. + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + The zone the storage is in, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 Storage(BaseModel): + apiVersion: Literal['storage.upcloud.com/v1alpha1'] | None = ( + 'storage.upcloud.com/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['Storage'] | None = 'Storage' + """ + 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 + """ + StorageSpec defines the desired state of Storage + """ + status: Status | None = None + """ + StorageStatus defines the observed state of Storage. + """ + + +class StorageList(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[Storage] + """ + List of storages. 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/com/upcloud/uks/__init__.py b/schemas/python/models/com/upcloud/uks/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/uks/kubernetescluster/__init__.py b/schemas/python/models/com/upcloud/uks/kubernetescluster/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/uks/kubernetescluster/v1alpha1.py b/schemas/python/models/com/upcloud/uks/kubernetescluster/v1alpha1.py new file mode 100644 index 000000000..97d1d5b6f --- /dev/null +++ b/schemas/python/models/com/upcloud/uks/kubernetescluster/v1alpha1.py @@ -0,0 +1,466 @@ +# generated by datamodel-codegen: +# filename: workdir/uks_upcloud_com_v1alpha1_kubernetescluster.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.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 NetworkRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class NetworkSelector(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): + controlPlaneIpFilter: list[str] | None = None + """ + (Set of String) IP addresses or IP ranges in CIDR format which are allowed to access the cluster control plane. To allow access from any source, use ["0.0.0.0/0"]. To deny access from all sources, use []. Values set here do not restrict access to node groups or exposed Kubernetes services. + IP addresses or IP ranges in CIDR format which are allowed to access the cluster control plane. To allow access from any source, use `["0.0.0.0/0"]`. To deny access from all sources, use `[]`. Values set here do not restrict access to node groups or exposed Kubernetes services. + """ + fetchKubeconfig: bool | None = None + """ + (Boolean) Fetch the cluster kubeconfig and connection details into the kubeconfig attribute. Consider using the upcloud_kubernetes_cluster ephemeral resource instead to keep the credentials out of the state. Defaults to false. + Fetch the cluster kubeconfig and connection details into the `kubeconfig` attribute. Consider using the `upcloud_kubernetes_cluster` ephemeral resource instead to keep the credentials out of the state. Defaults to `false`. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the cluster. + User defined key-value pairs to classify the cluster. + """ + name: str | None = None + """ + (String) Cluster name. Needs to be unique within the account. + Cluster name. Needs to be unique within the account. + """ + network: str | None = None + """ + (String) Network ID for the cluster to run in. + Network ID for the cluster to run in. + """ + networkRef: NetworkRef | None = None + """ + Reference to a Network in network to populate network. + """ + networkSelector: NetworkSelector | None = None + """ + Selector for a Network in network to populate network. + """ + plan: str | None = None + """ + (String) The pricing plan used for the cluster. You can list available plans with upctl kubernetes plans. + The pricing plan used for the cluster. You can list available plans with `upctl kubernetes plans`. + """ + privateNodeGroups: bool | None = None + """ + (Boolean) Enable private node groups. Private node groups requires a network that is routed through NAT gateway. + Enable private node groups. Private node groups requires a network that is routed through NAT gateway. + """ + storageEncryption: str | None = None + """ + at-rest and none. + Set default storage encryption strategy for all nodes in the cluster. Valid values are `data-at-rest` and `none`. + """ + upgradeStrategyType: str | None = None + """ + groups to update them. + The upgrade strategy to use when changing the cluster `version`. If not set, `manual` strategy will be used by default. When using `manual` strategy, you must replace the existing node-groups to update them. + """ + version: str | None = None + """ + (String) Kubernetes version ID, e.g. 1.31. You can list available version IDs with upctl kubernetes versions. + Kubernetes version ID, e.g. `1.31`. You can list available version IDs with `upctl kubernetes versions`. + + Note that when changing the cluster version, `upgrade_strategy` will be taken into account. + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone in which the Kubernetes cluster will be hosted, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +class InitProvider(BaseModel): + controlPlaneIpFilter: list[str] | None = None + """ + (Set of String) IP addresses or IP ranges in CIDR format which are allowed to access the cluster control plane. To allow access from any source, use ["0.0.0.0/0"]. To deny access from all sources, use []. Values set here do not restrict access to node groups or exposed Kubernetes services. + IP addresses or IP ranges in CIDR format which are allowed to access the cluster control plane. To allow access from any source, use `["0.0.0.0/0"]`. To deny access from all sources, use `[]`. Values set here do not restrict access to node groups or exposed Kubernetes services. + """ + fetchKubeconfig: bool | None = None + """ + (Boolean) Fetch the cluster kubeconfig and connection details into the kubeconfig attribute. Consider using the upcloud_kubernetes_cluster ephemeral resource instead to keep the credentials out of the state. Defaults to false. + Fetch the cluster kubeconfig and connection details into the `kubeconfig` attribute. Consider using the `upcloud_kubernetes_cluster` ephemeral resource instead to keep the credentials out of the state. Defaults to `false`. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the cluster. + User defined key-value pairs to classify the cluster. + """ + name: str | None = None + """ + (String) Cluster name. Needs to be unique within the account. + Cluster name. Needs to be unique within the account. + """ + network: str | None = None + """ + (String) Network ID for the cluster to run in. + Network ID for the cluster to run in. + """ + networkRef: NetworkRef | None = None + """ + Reference to a Network in network to populate network. + """ + networkSelector: NetworkSelector | None = None + """ + Selector for a Network in network to populate network. + """ + plan: str | None = None + """ + (String) The pricing plan used for the cluster. You can list available plans with upctl kubernetes plans. + The pricing plan used for the cluster. You can list available plans with `upctl kubernetes plans`. + """ + privateNodeGroups: bool | None = None + """ + (Boolean) Enable private node groups. Private node groups requires a network that is routed through NAT gateway. + Enable private node groups. Private node groups requires a network that is routed through NAT gateway. + """ + storageEncryption: str | None = None + """ + at-rest and none. + Set default storage encryption strategy for all nodes in the cluster. Valid values are `data-at-rest` and `none`. + """ + upgradeStrategyType: str | None = None + """ + groups to update them. + The upgrade strategy to use when changing the cluster `version`. If not set, `manual` strategy will be used by default. When using `manual` strategy, you must replace the existing node-groups to update them. + """ + version: str | None = None + """ + (String) Kubernetes version ID, e.g. 1.31. You can list available version IDs with upctl kubernetes versions. + Kubernetes version ID, e.g. `1.31`. You can list available version IDs with `upctl kubernetes versions`. + + Note that when changing the cluster version, `upgrade_strategy` will be taken into account. + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone in which the Kubernetes cluster will be hosted, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 Kubeconfig(BaseModel): + clientCertificate: str | None = None + """ + (String) TLS authentication client certificate, encoded (PEM). + TLS authentication client certificate, encoded (PEM). + """ + clusterCaCertificate: str | None = None + """ + (String) TLS authentication root certificate bundle, encoded (PEM). + TLS authentication root certificate bundle, encoded (PEM). + """ + host: str | None = None + """ + (String) Hostname of the cluster API. Defined as URI. + Hostname of the cluster API. Defined as URI. + """ + + +class AtProvider(BaseModel): + controlPlaneIpFilter: list[str] | None = None + """ + (Set of String) IP addresses or IP ranges in CIDR format which are allowed to access the cluster control plane. To allow access from any source, use ["0.0.0.0/0"]. To deny access from all sources, use []. Values set here do not restrict access to node groups or exposed Kubernetes services. + IP addresses or IP ranges in CIDR format which are allowed to access the cluster control plane. To allow access from any source, use `["0.0.0.0/0"]`. To deny access from all sources, use `[]`. Values set here do not restrict access to node groups or exposed Kubernetes services. + """ + fetchKubeconfig: bool | None = None + """ + (Boolean) Fetch the cluster kubeconfig and connection details into the kubeconfig attribute. Consider using the upcloud_kubernetes_cluster ephemeral resource instead to keep the credentials out of the state. Defaults to false. + Fetch the cluster kubeconfig and connection details into the `kubeconfig` attribute. Consider using the `upcloud_kubernetes_cluster` ephemeral resource instead to keep the credentials out of the state. Defaults to `false`. + """ + id: str | None = None + """ + (String) UUID of the cluster. + """ + kubeconfig: Kubeconfig | None = None + """ + (Attributes) Cluster kubeconfig and connection details. Set only when fetch_kubeconfig is true. (see below for nested schema) + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the cluster. + User defined key-value pairs to classify the cluster. + """ + name: str | None = None + """ + (String) Cluster name. Needs to be unique within the account. + Cluster name. Needs to be unique within the account. + """ + network: str | None = None + """ + (String) Network ID for the cluster to run in. + Network ID for the cluster to run in. + """ + networkCidr: str | None = None + """ + (String) Network CIDR for the given network. Computed automatically. + Network CIDR for the given network. Computed automatically. + """ + nodeGroups: list[str] | None = None + """ + (List of String) Names of the node groups configured to cluster + Names of the node groups configured to cluster + """ + plan: str | None = None + """ + (String) The pricing plan used for the cluster. You can list available plans with upctl kubernetes plans. + The pricing plan used for the cluster. You can list available plans with `upctl kubernetes plans`. + """ + privateNodeGroups: bool | None = None + """ + (Boolean) Enable private node groups. Private node groups requires a network that is routed through NAT gateway. + Enable private node groups. Private node groups requires a network that is routed through NAT gateway. + """ + state: str | None = None + """ + (String) Operational state of the cluster. + Operational state of the cluster. + """ + storageEncryption: str | None = None + """ + at-rest and none. + Set default storage encryption strategy for all nodes in the cluster. Valid values are `data-at-rest` and `none`. + """ + upgradeStrategyType: str | None = None + """ + groups to update them. + The upgrade strategy to use when changing the cluster `version`. If not set, `manual` strategy will be used by default. When using `manual` strategy, you must replace the existing node-groups to update them. + """ + version: str | None = None + """ + (String) Kubernetes version ID, e.g. 1.31. You can list available version IDs with upctl kubernetes versions. + Kubernetes version ID, e.g. `1.31`. You can list available version IDs with `upctl kubernetes versions`. + + Note that when changing the cluster version, `upgrade_strategy` will be taken into account. + """ + zone: str | None = None + """ + fra1. You can list available zones with upctl zone list. + Zone in which the Kubernetes cluster will be hosted, e.g. `de-fra1`. You can list available zones with `upctl zone list`. + """ + + +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 KubernetesCluster(BaseModel): + apiVersion: Literal['uks.upcloud.com/v1alpha1'] | None = 'uks.upcloud.com/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['KubernetesCluster'] | None = 'KubernetesCluster' + """ + 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 + """ + KubernetesClusterSpec defines the desired state of KubernetesCluster + """ + status: Status | None = None + """ + KubernetesClusterStatus defines the observed state of KubernetesCluster. + """ + + +class KubernetesClusterList(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[KubernetesCluster] + """ + List of kubernetesclusters. 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/com/upcloud/uks/kubernetesnodegroup/__init__.py b/schemas/python/models/com/upcloud/uks/kubernetesnodegroup/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/schemas/python/models/com/upcloud/uks/kubernetesnodegroup/v1alpha1.py b/schemas/python/models/com/upcloud/uks/kubernetesnodegroup/v1alpha1.py new file mode 100644 index 000000000..6fbb70c3b --- /dev/null +++ b/schemas/python/models/com/upcloud/uks/kubernetesnodegroup/v1alpha1.py @@ -0,0 +1,526 @@ +# generated by datamodel-codegen: +# filename: workdir/uks_upcloud_com_v1alpha1_kubernetesnodegroup.yaml + +from __future__ import annotations + +from typing import Literal + +from pydantic import AwareDatetime, BaseModel, Field + +from .....io.k8s.apimachinery.pkg.apis.meta import v1 + + +class CloudNativePlan(BaseModel): + storageSize: float | None = None + """ + (Number) The size of the storage device in gigabytes. + The size of the storage device in gigabytes. + """ + storageTier: str | None = None + """ + (String) The storage tier to use. + The storage tier to use. + """ + + +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 ClusterRef(BaseModel): + name: str + """ + Name of the referenced object. + """ + policy: Policy | None = None + """ + Policies for referencing. + """ + + +class ClusterSelector(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 CustomPlan(BaseModel): + cores: float | None = None + """ + (Number) The number of CPU cores dedicated to individual node group nodes. + The number of CPU cores dedicated to individual node group nodes. + """ + memory: float | None = None + """ + (Number) The amount of memory in megabytes to assign to individual node group node. Value needs to be divisible by 1024. + The amount of memory in megabytes to assign to individual node group node. Value needs to be divisible by 1024. + """ + storageSize: float | None = None + """ + (Number) The size of the storage device in gigabytes. + The size of the storage device in gigabytes. + """ + storageTier: str | None = None + """ + (String) The storage tier to use. + The storage tier to use. + """ + + +class GpuPlan(BaseModel): + storageSize: float | None = None + """ + (Number) The size of the storage device in gigabytes. + The size of the storage device in gigabytes. + """ + storageTier: str | None = None + """ + (String) The storage tier to use. + The storage tier to use. + """ + + +class KubeletArg(BaseModel): + key: str | None = None + """ + (String) Kubelet argument key. + Kubelet argument key. + """ + value: str | None = None + """ + (String) Kubelet argument value. + Kubelet argument value. + """ + + +class TaintItem(BaseModel): + effect: str | None = None + """ + (String) Taint effect. + Taint effect. + """ + key: str | None = None + """ + (String) Kubelet argument key. + Taint key. + """ + value: str | None = None + """ + (String) Kubelet argument value. + Taint value. + """ + + +class ForProvider(BaseModel): + antiAffinity: bool | None = None + """ + affinity policy is considered 'best effort' and enabling it does not fully guarantee that the nodes will end up on different hardware. + If set to true, nodes in this group will be placed on separate compute hosts. Please note that anti-affinity policy is considered 'best effort' and enabling it does not fully guarantee that the nodes will end up on different hardware. + """ + cloudNativePlan: CloudNativePlan | None = None + """ + (Block List) Resource properties for Cloud Native plan storage configuration. This block is optional for Cloud Native plans. (see below for nested schema) + Resource properties for Cloud Native plan storage configuration. This block is optional for Cloud Native plans. + """ + cluster: str | None = None + """ + (String) UUID of the cluster. + UUID of the cluster. + """ + clusterRef: ClusterRef | None = None + """ + Reference to a KubernetesCluster in uks to populate cluster. + """ + clusterSelector: ClusterSelector | None = None + """ + Selector for a KubernetesCluster in uks to populate cluster. + """ + customPlan: CustomPlan | None = None + """ + (Block List) Resource properties for custom plan. This block is required for custom plans only. (see below for nested schema) + Resource properties for custom plan. This block is required for `custom` plans only. + """ + gpuPlan: GpuPlan | None = None + """ + (Block List) Resource properties for GPU plan storage configuration. This block is optional for GPU plans. (see below for nested schema) + Resource properties for GPU plan storage configuration. This block is optional for GPU plans. + """ + kubeletArgs: list[KubeletArg] | None = None + """ + -. The API will prefix the arguments with -- when preparing kubelet call. + Additional arguments for kubelet for the nodes in this group. Configure the arguments without leading `--`. The API will prefix the arguments with `--` when preparing kubelet call. + + Note that these arguments will be passed directly to kubelet CLI on each worker node without any validation. Passing invalid arguments can break your whole cluster. Be extra careful when adding kubelet args. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the node_group. + User defined key-value pairs to classify the node_group. + """ + nodeCount: float | None = None + """ + (Number) Amount of nodes to provision in the node group. + Amount of nodes to provision in the node group. + """ + plan: str | None = None + """ + (String) The server plan used for the node group. You can list available plans with upctl server plans + The server plan used for the node group. You can list available plans with `upctl server plans` + """ + sshKeys: list[str] | None = None + """ + (Set of String) You can optionally select SSH keys to be added as authorized keys to the nodes in this node group. This allows you to connect to the nodes via SSH once they are running. + You can optionally select SSH keys to be added as authorized keys to the nodes in this node group. This allows you to connect to the nodes via SSH once they are running. + """ + storageEncryption: str | None = None + """ + at-rest and none. + The storage encryption strategy to use for the nodes in this group. If not set, the cluster's storage encryption strategy will be used, if applicable. Valid values are `data-at-rest` and `none`. + """ + taint: list[TaintItem] | None = None + """ + (Block Set) Taints for the nodes in this group. (see below for nested schema) + Taints for the nodes in this group. + """ + utilityNetworkAccess: bool | None = None + """ + (Boolean) If set to false, nodes in this group will not have access to utility network. + If set to false, nodes in this group will not have access to utility network. + """ + + +class InitProvider(BaseModel): + antiAffinity: bool | None = None + """ + affinity policy is considered 'best effort' and enabling it does not fully guarantee that the nodes will end up on different hardware. + If set to true, nodes in this group will be placed on separate compute hosts. Please note that anti-affinity policy is considered 'best effort' and enabling it does not fully guarantee that the nodes will end up on different hardware. + """ + cloudNativePlan: CloudNativePlan | None = None + """ + (Block List) Resource properties for Cloud Native plan storage configuration. This block is optional for Cloud Native plans. (see below for nested schema) + Resource properties for Cloud Native plan storage configuration. This block is optional for Cloud Native plans. + """ + customPlan: CustomPlan | None = None + """ + (Block List) Resource properties for custom plan. This block is required for custom plans only. (see below for nested schema) + Resource properties for custom plan. This block is required for `custom` plans only. + """ + gpuPlan: GpuPlan | None = None + """ + (Block List) Resource properties for GPU plan storage configuration. This block is optional for GPU plans. (see below for nested schema) + Resource properties for GPU plan storage configuration. This block is optional for GPU plans. + """ + kubeletArgs: list[KubeletArg] | None = None + """ + -. The API will prefix the arguments with -- when preparing kubelet call. + Additional arguments for kubelet for the nodes in this group. Configure the arguments without leading `--`. The API will prefix the arguments with `--` when preparing kubelet call. + + Note that these arguments will be passed directly to kubelet CLI on each worker node without any validation. Passing invalid arguments can break your whole cluster. Be extra careful when adding kubelet args. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the node_group. + User defined key-value pairs to classify the node_group. + """ + nodeCount: float | None = None + """ + (Number) Amount of nodes to provision in the node group. + Amount of nodes to provision in the node group. + """ + plan: str | None = None + """ + (String) The server plan used for the node group. You can list available plans with upctl server plans + The server plan used for the node group. You can list available plans with `upctl server plans` + """ + sshKeys: list[str] | None = None + """ + (Set of String) You can optionally select SSH keys to be added as authorized keys to the nodes in this node group. This allows you to connect to the nodes via SSH once they are running. + You can optionally select SSH keys to be added as authorized keys to the nodes in this node group. This allows you to connect to the nodes via SSH once they are running. + """ + storageEncryption: str | None = None + """ + at-rest and none. + The storage encryption strategy to use for the nodes in this group. If not set, the cluster's storage encryption strategy will be used, if applicable. Valid values are `data-at-rest` and `none`. + """ + taint: list[TaintItem] | None = None + """ + (Block Set) Taints for the nodes in this group. (see below for nested schema) + Taints for the nodes in this group. + """ + utilityNetworkAccess: bool | None = None + """ + (Boolean) If set to false, nodes in this group will not have access to utility network. + If set to false, nodes in this group will not have access to utility network. + """ + + +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): + antiAffinity: bool | None = None + """ + affinity policy is considered 'best effort' and enabling it does not fully guarantee that the nodes will end up on different hardware. + If set to true, nodes in this group will be placed on separate compute hosts. Please note that anti-affinity policy is considered 'best effort' and enabling it does not fully guarantee that the nodes will end up on different hardware. + """ + cloudNativePlan: CloudNativePlan | None = None + """ + (Block List) Resource properties for Cloud Native plan storage configuration. This block is optional for Cloud Native plans. (see below for nested schema) + Resource properties for Cloud Native plan storage configuration. This block is optional for Cloud Native plans. + """ + cluster: str | None = None + """ + (String) UUID of the cluster. + UUID of the cluster. + """ + customPlan: CustomPlan | None = None + """ + (Block List) Resource properties for custom plan. This block is required for custom plans only. (see below for nested schema) + Resource properties for custom plan. This block is required for `custom` plans only. + """ + gpuPlan: GpuPlan | None = None + """ + (Block List) Resource properties for GPU plan storage configuration. This block is optional for GPU plans. (see below for nested schema) + Resource properties for GPU plan storage configuration. This block is optional for GPU plans. + """ + id: str | None = None + """ + (String) Computed ID of the node group. This is a combination of the cluster UUID and the node group name, separated with a /. + """ + kubeletArgs: list[KubeletArg] | None = None + """ + -. The API will prefix the arguments with -- when preparing kubelet call. + Additional arguments for kubelet for the nodes in this group. Configure the arguments without leading `--`. The API will prefix the arguments with `--` when preparing kubelet call. + + Note that these arguments will be passed directly to kubelet CLI on each worker node without any validation. Passing invalid arguments can break your whole cluster. Be extra careful when adding kubelet args. + """ + labels: dict[str, str] | None = None + """ + value pairs to classify the node_group. + User defined key-value pairs to classify the node_group. + """ + nodeCount: float | None = None + """ + (Number) Amount of nodes to provision in the node group. + Amount of nodes to provision in the node group. + """ + plan: str | None = None + """ + (String) The server plan used for the node group. You can list available plans with upctl server plans + The server plan used for the node group. You can list available plans with `upctl server plans` + """ + sshKeys: list[str] | None = None + """ + (Set of String) You can optionally select SSH keys to be added as authorized keys to the nodes in this node group. This allows you to connect to the nodes via SSH once they are running. + You can optionally select SSH keys to be added as authorized keys to the nodes in this node group. This allows you to connect to the nodes via SSH once they are running. + """ + storageEncryption: str | None = None + """ + at-rest and none. + The storage encryption strategy to use for the nodes in this group. If not set, the cluster's storage encryption strategy will be used, if applicable. Valid values are `data-at-rest` and `none`. + """ + taint: list[TaintItem] | None = None + """ + (Block Set) Taints for the nodes in this group. (see below for nested schema) + Taints for the nodes in this group. + """ + utilityNetworkAccess: bool | None = None + """ + (Boolean) If set to false, nodes in this group will not have access to utility network. + If set to false, nodes in this group will not have access to utility network. + """ + + +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 KubernetesNodeGroup(BaseModel): + apiVersion: Literal['uks.upcloud.com/v1alpha1'] | None = 'uks.upcloud.com/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['KubernetesNodeGroup'] | None = 'KubernetesNodeGroup' + """ + 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 + """ + KubernetesNodeGroupSpec defines the desired state of KubernetesNodeGroup + """ + status: Status | None = None + """ + KubernetesNodeGroupStatus defines the observed state of KubernetesNodeGroup. + """ + + +class KubernetesNodeGroupList(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[KubernetesNodeGroup] + """ + List of kubernetesnodegroups. 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 ca57061c9..b985470ec 100644 --- a/uv.lock +++ b/uv.lock @@ -25,6 +25,7 @@ members = [ "compose-nebius-cluster", "compose-serving-stack", "compose-telemetry-destination", + "compose-upcloud-cluster", "compose-usages", "compose-vultr-cluster", "crossplane-models", @@ -600,6 +601,25 @@ requires-dist = [ { name = "grpcio", specifier = ">=1.73.1" }, ] +[[package]] +name = "compose-upcloud-cluster" +version = "0.0.0" +source = { editable = "functions/compose-upcloud-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-usages" version = "0.0.0"