rustfs
by CloudPirates
High-performance distributed object storage with S3-compatible API
About this chart
RustFS
A Helm chart for RustFS - High-performance distributed file system written in Rust with S3-compatible API. RustFS is a modern, efficient file system that provides S3-compatible APIs for cloud-native applications.
[!WARNING]
RustFS is currently in ALPHA stage. It is not recommended for production use by the publisher.
Prerequisites
- Kubernetes 1.24+
- Helm 3.2.0+
- PV provisioner support in the underlying infrastructure (if persistence is enabled)
Modes
RustFS can be deployed in two modes:
- Deployment Mode: In this mode, RustFS is deployed as a standard Kubernetes Deployment. This mode is suitable for high load scenarios where stateless operation is acceptable. This deployment mode requires mounting persistent volumes in read-write-many (RWX) mode to ensure data persistence across pod restarts.
- StatefulSet Mode: In this mode, RustFS is deployed as a StatefulSet. This mode is ideal for scenarios where data consistency and persistence are critical. Each pod in the StatefulSet has a unique identity and stable storage, making it suitable for stateful applications.
Installing the Chart
To install the chart with the release name my-rustfs:
helm install my-rustfs oci://registry-1.docker.io/cloudpirates/rustfs
To install with custom values:
helm install my-rustfs oci://registry-1.docker.io/cloudpirates/rustfs -f my-values.yaml
Or install directly from the local chart:
helm install my-rustfs ./charts/rustfs
The command deploys RustFS on the Kubernetes cluster in the default configuration. The Configuration section lists the parameters that can be configured during installation.
Uninstalling the Chart
To uninstall/delete the my-rustfs deployment:
helm uninstall my-rustfs
The command removes all the Kubernetes components associated with the chart and deletes the release.
Security & Signature Verification
This Helm chart is cryptographically signed with Cosign to ensure authenticity and prevent tampering.
Public Key:
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE5U+rM2d3hDjgP5T3cLShuuQIU9vR
Z4/G+Nug6q5vRa+C3qUA1wXjbaJFAfcIrv5VjmYAYOj13shnPpp3Zh4fnQ==
-----END PUBLIC KEY-----
To verify the helm chart before installation, copy the public key to the file cosign.pub and run cosign:
cosign verify --key cosign.pub registry-1.docker.io/cloudpirates/rustfs:<version>
Configuration
The following table lists the configurable parameters of the RustFS chart and their default values.
Global parameters
| Parameter | Description | Default |
|---|---|---|
global.imageRegistry | Global Docker image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
Common parameters
| Parameter | Description | Default |
|---|---|---|
nameOverride | String to partially override rustfs.fullname | "" |
fullnameOverride | String to fully override rustfs.fullname | "" |
namespaceOverride | String to override the namespace for all resources | "" |
commonLabels | Labels to add to all deployed objects | {} |
commonAnnotations | Annotations to add to all deployed objects | {} |
clusterDomain | Kubernetes cluster domain | cluster.local |
RustFS image configuration
| Parameter | Description | Default |
|---|---|---|
image.registry | RustFS image registry | docker.io |
image.repository | RustFS image repository | rustfs/rustfs |
image.tag | RustFS image tag (immutable tags are recommended) | "1.0.2" |
image.imagePullPolicy | RustFS image pull policy | Always |
RustFS Authentication
| Parameter | Description | Default |
|---|---|---|
auth.accessKey | RustFS access key | "rustfsadmin" |
auth.secretKey | RustFS secret key. If not set, a random password will be generated | "" |
auth.existingSecret | Name of existing secret containing RustFS credentials | "" |
auth.existingSecretAccessKeyKey | Key in existing secret containing access key | "access-key" |
auth.existingSecretSecretKeyKey | Key in existing secret containing secret key | "secret-key" |
RustFS configuration
| Parameter | Description | Default |
|---|---|---|
config.volumes | RustFS storage volumes configuration | "/data/rustfs{0..3}" |
config.address | RustFS server address | "0.0.0.0:9000" |
config.consoleAddress | RustFS console address | "0.0.0.0:9001" |
config.consoleEnabled | Enable RustFS console | true |
config.externalAddress | RustFS external address | ":9000" |
config.corsAllowedOrigins | CORS allowed origins for API | "*" |
config.consoleCorsAllowedOrigins | CORS allowed origins for console | "*" |
config.logLevel | RustFS log level (trace, debug, info, warn, error) | "info" |
config.tlsPath | Path to TLS certificates. Empty disables TLS unless tlsPersistence is enabled, then its mountPath is used | "" |
config.extraEnvVars | Extra environment variables | [] |
RustFS setup
| Parameter | Description | Default |
|---|---|---|
setup.image | Image configuration for rustfs/rc CLI | |
setup.existingSecret | If defined, uses a pre-configured SecretMap with the keys below as JSON | "" |
setup.policies | Policy definitions | [] |
setup.buckets | Bucket definitions | [] |
setup.users | User definitions | [] |
setup.resources | Resource requests and limits for the setup job containers | {} |
Policies
- name: my-policy
spec:
Version: 2012-10-17
Statement:
- Effect: Allow
Action: [ "*" ]
Resource: [ "arn:aws:s3:::*" ]
Buckets
- name: my-bucket
versioning: true
Users
- name: my-user
password: thisIsMySecretPassword
policies:
- readwrite
Deployment configuration
| Parameter | Description | Default |
|---|---|---|
replicaCount | Number of replicas | 4 |
Deployment type configuration
| Parameter | Description | Default |
|---|---|---|
deploymentType | Type of deployment (deployment or statefulset) | "deployment" |
updateStrategy.type | Update strategy for StatefulSet | RollingUpdate |
updateStrategy.rollingUpdate.partition | Partition for RollingUpdate (StatefulSet only) | 0 |
podManagementPolicy | Pod management policy for StatefulSet (Parallel or OrderedReady) | "Parallel" |
Pod annotations and labels
| Parameter | Description | Default |
|---|---|---|
podAnnotations | Pod annotations | {} |
podLabels | Pod labels | {} |
Security Context
| Parameter | Description | Default |
|---|---|---|
podSecurityContext.fsGroup | Group ID for the volumes of the pod | 1001 |
containerSecurityContext.allowPrivilegeEscalation | Enable container privilege escalation | false |
containerSecurityContext.runAsNonRoot | Configure the container to run as a non-root user | true |
containerSecurityContext.runAsUser | User ID for the RustFS container | 1001 |
containerSecurityContext.runAsGroup | Group ID for the RustFS container | 1001 |
containerSecurityContext.readOnlyRootFilesystem | Mount container root filesystem as read-only | false |
containerSecurityContext.capabilities.drop | Linux capabilities to be dropped | ["ALL"] |
priorityClassName | Priority class for the rustfs instance | "" |
Service configuration
| Parameter | Description | Default |
|---|---|---|
service.type | RustFS service type | ClusterIP |
service.port | RustFS API service port | 9000 |
service.annotations | Service annotations | {} |
Console Service configuration (for StatefulSet only)
| Parameter | Description | Default |
|---|---|---|
consoleService.enabled | Enable Console service that routes to the first pod only | true |
consoleService.type | Console service type | ClusterIP |
consoleService.port | Console service port | 9001 |
consoleService.sessionAffinityTimeout | Session affinity timeout in seconds | 10800 |
consoleService.annotations | Console service annotations | {} |
Ingress configuration
| Parameter | Description | Default |
|---|---|---|
ingress.enabled | Enable ingress record generation for RustFS API | false |
ingress.className | IngressClass that will be used to implement the Ingress | "" |
ingress.annotations | Additional annotations for the Ingress resource | {} |
ingress.hosts[0].host | Hostname for RustFS API ingress | rustfs.local |
ingress.hosts[0].paths[0].path | Path for RustFS API ingress | / |
ingress.hosts[0].paths[0].pathType | Path type for RustFS API ingress | Prefix |
ingress.tls | TLS configuration for RustFS API ingress | [] |
Console Ingress configuration (for StatefulSet only)
| Parameter | Description | Default |
|---|---|---|
consoleIngress.enabled | Enable Console ingress record generation for RustFS API (routes to first pod only) | true |
consoleIngress.className | IngressClass that will be used to implement the Console Ingress | "" |
consoleIngress.annotations | Additional annotations for the Console Ingress resource |
Deploy rustfs with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has rustfs on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartrustfs is pinned at v0.12.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply