rustfs

by CloudPirates

Helm chartv0.12.3App 1.0.6Apache-2.0Verified publisher

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:

  1. 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.
  1. 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

ParameterDescriptionDefault
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]

Common parameters

ParameterDescriptionDefault
nameOverrideString to partially override rustfs.fullname""
fullnameOverrideString to fully override rustfs.fullname""
namespaceOverrideString to override the namespace for all resources""
commonLabelsLabels to add to all deployed objects{}
commonAnnotationsAnnotations to add to all deployed objects{}
clusterDomainKubernetes cluster domaincluster.local

RustFS image configuration

ParameterDescriptionDefault
image.registryRustFS image registrydocker.io
image.repositoryRustFS image repositoryrustfs/rustfs
image.tagRustFS image tag (immutable tags are recommended)"1.0.2"
image.imagePullPolicyRustFS image pull policyAlways

RustFS Authentication

ParameterDescriptionDefault
auth.accessKeyRustFS access key"rustfsadmin"
auth.secretKeyRustFS secret key. If not set, a random password will be generated""
auth.existingSecretName of existing secret containing RustFS credentials""
auth.existingSecretAccessKeyKeyKey in existing secret containing access key"access-key"
auth.existingSecretSecretKeyKeyKey in existing secret containing secret key"secret-key"

RustFS configuration

ParameterDescriptionDefault
config.volumesRustFS storage volumes configuration"/data/rustfs{0..3}"
config.addressRustFS server address"0.0.0.0:9000"
config.consoleAddressRustFS console address"0.0.0.0:9001"
config.consoleEnabledEnable RustFS consoletrue
config.externalAddressRustFS external address":9000"
config.corsAllowedOriginsCORS allowed origins for API"*"
config.consoleCorsAllowedOriginsCORS allowed origins for console"*"
config.logLevelRustFS log level (trace, debug, info, warn, error)"info"
config.tlsPathPath to TLS certificates. Empty disables TLS unless tlsPersistence is enabled, then its mountPath is used""
config.extraEnvVarsExtra environment variables[]

RustFS setup

ParameterDescriptionDefault
setup.imageImage configuration for rustfs/rc CLI
setup.existingSecretIf defined, uses a pre-configured SecretMap with the keys below as JSON""
setup.policiesPolicy definitions[]
setup.bucketsBucket definitions[]
setup.usersUser definitions[]
setup.resourcesResource 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

ParameterDescriptionDefault
replicaCountNumber of replicas4

Deployment type configuration

ParameterDescriptionDefault
deploymentTypeType of deployment (deployment or statefulset)"deployment"
updateStrategy.typeUpdate strategy for StatefulSetRollingUpdate
updateStrategy.rollingUpdate.partitionPartition for RollingUpdate (StatefulSet only)0
podManagementPolicyPod management policy for StatefulSet (Parallel or OrderedReady)"Parallel"

Pod annotations and labels

ParameterDescriptionDefault
podAnnotationsPod annotations{}
podLabelsPod labels{}

Security Context

ParameterDescriptionDefault
podSecurityContext.fsGroupGroup ID for the volumes of the pod1001
containerSecurityContext.allowPrivilegeEscalationEnable container privilege escalationfalse
containerSecurityContext.runAsNonRootConfigure the container to run as a non-root usertrue
containerSecurityContext.runAsUserUser ID for the RustFS container1001
containerSecurityContext.runAsGroupGroup ID for the RustFS container1001
containerSecurityContext.readOnlyRootFilesystemMount container root filesystem as read-onlyfalse
containerSecurityContext.capabilities.dropLinux capabilities to be dropped["ALL"]
priorityClassNamePriority class for the rustfs instance""

Service configuration

ParameterDescriptionDefault
service.typeRustFS service typeClusterIP
service.portRustFS API service port9000
service.annotationsService annotations{}

Console Service configuration (for StatefulSet only)

ParameterDescriptionDefault
consoleService.enabledEnable Console service that routes to the first pod onlytrue
consoleService.typeConsole service typeClusterIP
consoleService.portConsole service port9001
consoleService.sessionAffinityTimeoutSession affinity timeout in seconds10800
consoleService.annotationsConsole service annotations{}

Ingress configuration

ParameterDescriptionDefault
ingress.enabledEnable ingress record generation for RustFS APIfalse
ingress.classNameIngressClass that will be used to implement the Ingress""
ingress.annotationsAdditional annotations for the Ingress resource{}
ingress.hosts[0].hostHostname for RustFS API ingressrustfs.local
ingress.hosts[0].paths[0].pathPath for RustFS API ingress/
ingress.hosts[0].paths[0].pathTypePath type for RustFS API ingressPrefix
ingress.tlsTLS configuration for RustFS API ingress[]

Console Ingress configuration (for StatefulSet only)

ParameterDescriptionDefault
consoleIngress.enabledEnable Console ingress record generation for RustFS API (routes to first pod only)true
consoleIngress.classNameIngressClass that will be used to implement the Console Ingress""
consoleIngress.annotationsAdditional 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartrustfs is pinned at v0.12.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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