From dd48ba7c4a9b7368723cbb7f5ba149e0d5c72b30 Mon Sep 17 00:00:00 2001 From: GatewayJ <18332154+GatewayJ@users.noreply.github.com> Date: Thu, 25 Jun 2026 18:13:49 +0800 Subject: [PATCH] feat: allow RustFS to validate tenant storage layouts --- README.md | 2 +- .../app/(dashboard)/tenants/new/page.tsx | 12 +- console-web/i18n/locales/en-US.json | 2 +- console-web/i18n/locales/zh-CN.json | 2 +- deploy/rustfs-operator/crds/tenant-crd.yaml | 7 - deploy/rustfs-operator/crds/tenant.yaml | 7 - docs/operator-user-guide.md | 11 +- docs/operator-user-guide.zh-CN.md | 11 +- examples/README.md | 36 +- examples/minimal-dev-tenant.yaml | 20 +- examples/simple-tenant.yaml | 10 +- examples/spot-instance-tenant.yaml | 2 +- examples/tenant-4nodes.yaml | 2 +- src/console/handlers/pools.rs | 17 +- src/types/v1alpha1.rs | 2 +- src/types/v1alpha1/persistence.rs | 2 +- src/types/v1alpha1/pool.rs | 408 +----------------- src/types/v1alpha1/tenant.rs | 8 +- src/types/v1alpha1/tenant/workloads.rs | 72 +++- 19 files changed, 147 insertions(+), 486 deletions(-) diff --git a/README.md b/README.md index 1dbab1f..f93f9e3 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # RustFS Kubernetes Operator -A Kubernetes operator for [RustFS](https://rustfs.com/) object storage, written in Rust with [kube-rs](https://github.com/kube-rs/kube). It reconciles a **`Tenant` custom resource** (`rustfs.com/v1alpha1`), validates referenced credential and KMS Secrets, and applies RBAC, Services, and StatefulSets so RustFS runs as an erasure-coded cluster inside your cluster. +A Kubernetes operator for [RustFS](https://rustfs.com/) object storage, written in Rust with [kube-rs](https://github.com/kube-rs/kube). It reconciles a **`Tenant` custom resource** (`rustfs.com/v1alpha1`), validates referenced credential and KMS Secrets, and applies RBAC, Services, and StatefulSets so RustFS runs inside your cluster, from single-node single-disk development tenants to erasure-coded distributed clusters. **Status:** v0.1.0 pre-release — under active development. diff --git a/console-web/app/(dashboard)/tenants/new/page.tsx b/console-web/app/(dashboard)/tenants/new/page.tsx index 7282d4a..927e9e8 100644 --- a/console-web/app/(dashboard)/tenants/new/page.tsx +++ b/console-web/app/(dashboard)/tenants/new/page.tsx @@ -31,8 +31,8 @@ const DEFAULT_RUSTFS_IMAGE = "rustfs/rustfs:latest" const defaultPool: CreatePoolRequest = { name: "pool-0", - servers: 2, - volumes_per_server: 2, + servers: 1, + volumes_per_server: 1, storage_size: "10Gi", storage_class: "", } @@ -48,9 +48,9 @@ spec: name: rustfs-creds pools: - name: pool-0 - servers: 2 + servers: 1 persistence: - volumesPerServer: 2 + volumesPerServer: 1 volumeClaimTemplate: accessModes: - ReadWriteOnce @@ -474,9 +474,7 @@ export default function TenantCreatePage() {
{t("Pools")} - - {t("At least one pool with 4+ volumes (e.g. 2 servers × 2 volumes).")} - + {t("RustFS validates storage layout when the tenant starts.")}