Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 16 additions & 20 deletions .github/workflows/helm-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ on:
version:
description: "Release version to publish, e.g. 1.0.0 or v1.0.0"
required: true
default: "0.0.4"
type: string

permissions:
Expand All @@ -45,21 +44,15 @@ jobs:
chart_version: ${{ steps.version.outputs.chart_version }}

steps:
- name: Checkout helm chart repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Normalize release version
id: version
env:
RELEASE_TAG: ${{ inputs.version || github.event.workflow_run.head_branch }}
run: |
set -euo pipefail

if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
RAW="${{ github.event.inputs.version }}"
else
RAW="${{ github.event.workflow_run.head_branch }}"
fi

RAW_TAG="${RAW#refs/tags/}"
RAW_TAG="${RELEASE_TAG#refs/tags/}"
git check-ref-format "refs/tags/$RAW_TAG"
CHART_VERSION="${RAW_TAG#v}"

if [ -z "$CHART_VERSION" ]; then
Expand All @@ -71,25 +64,26 @@ jobs:
echo "chart_version=$CHART_VERSION"
} >> "$GITHUB_OUTPUT"


- name: Replace chart version and app version
run: |
set -eux
sed -i -E 's/^version:.*/version: "${{ steps.version.outputs.chart_version }}"/' deploy/rustfs-operator/Chart.yaml
- name: Check out the release source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
ref: ${{ github.event.workflow_run.head_sha || format('refs/tags/{0}', steps.version.outputs.raw_tag) }}

- name: Set up Helm
uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1

- name: Package Helm Chart
env:
CHART_VERSION: ${{ steps.version.outputs.chart_version }}
run: |
set -eux
helm package ./deploy/rustfs-operator \
--destination helm-packages/ \
--version "${{ steps.version.outputs.chart_version }}" \
--app-version "${{ steps.version.outputs.chart_version }}"
--version "$CHART_VERSION" \
--app-version "$CHART_VERSION"
helm package ./deploy/rustfs-tenant \
--destination helm-packages/ \
--version "${{ steps.version.outputs.chart_version }}"
--version "$CHART_VERSION"

- name: Upload helm package as artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
Expand Down Expand Up @@ -123,10 +117,12 @@ jobs:
run: helm repo index . --url https://operator.rustfs.com

- name: Push helm package and index file
env:
CHART_VERSION: ${{ needs.build-helm-package.outputs.chart_version }}
run: |
set -eux
git config --global user.name "${{ secrets.USERNAME }}"
git config --global user.email "${{ secrets.EMAIL_ADDRESS }}"
git add .
git commit -m "Update rustfs operator helm package with ${{ needs.build-helm-package.outputs.chart_version }}." || echo "No changes to commit"
git commit -m "Update rustfs operator helm package with $CHART_VERSION." || echo "No changes to commit"
git push origin main
71 changes: 35 additions & 36 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,39 @@ All notable changes to RustFS Operator are documented in this file. The format i

## [Unreleased]

## [0.0.9]

### Added

- Tenant `spec.tiers` registers S3, RustFS, and MinIO remote tiers and rotates credentials when their Secret changes. Bucket lifecycle rules can move current and noncurrent object versions to a tier once it is ready.
- Buckets support declarative default encryption for new objects with SSE-S3 or SSE-KMS. The Operator validates the key configuration and reports conflicts when an externally modified setting would be overwritten.
- Tenant `spec.tls.caTrust.clientCaSecretRef` enables mutual TLS for client and peer connections with cert-manager. Operator admin and STS requests use a client certificate.
- Tenant `spec.readinessProbe` configures the initial delay, timeout, period, and success and failure thresholds for each Pool.
- The Operator manages a PodDisruptionBudget for each eligible Pool, using drive placement and online drive counts to preserve the write quorum for the `STANDARD` storage class during node drains.
- The [Helm installation guide](deploy/rustfs-operator/README.md#installing-the-chart) includes versioned installation commands and an Argo CD Application for the public chart repository.

### Fixed

- Tenant provisioning checks existing buckets with `HeadBucket` before attempting creation. Busy buckets can reach `Ready` even when repeated creation requests would time out. COSI retains its ownership check for same-name buckets.
- The PodDisruptionBudget calculation treats path-only drive endpoints on a single-node deployment as belonging to one server.
- Helm defaults to `docker.io/rustfs/operator` for the Operator, Console, and COSI driver. CI checks source and packaged image versions against the release tag. Both Helm charts are packaged from the Docker release commit, or from the requested tag for manual publication.

### Upgrading from 0.0.8

1. Apply the CRDs from the 0.0.9 Operator chart before upgrading the controller. Helm leaves installed CRDs in place. See the [upgrade commands](deploy/rustfs-operator/README.md#upgrading).
2. If you manage PodDisruptionBudgets yourself, set `spec.disablePodDisruptionBudget: true` on those Tenants before the new Operator starts. If the Operator will manage the budgets, remove existing budgets that select the same Pool Pods. Kubernetes rejects evictions when two budgets select one Pod.
3. Plan for a StatefulSet rollout. The default readiness timeout increases from one to five seconds. Tenants using the default ServiceAccount roll eligible Pods with `RollingUpdate` and partition zero. A custom ServiceAccount preserves the existing strategy and partition. Set `spec.readinessProbe.timeoutSeconds: 1` to retain the previous timeout.

## [0.0.8] - 2026-10-03

### Changed

- Docker builds in CI and image publication use the smaller `dind-sm-standard-2` runners.

## [0.0.7] - 2026-09-09

### Added

- Tenant `spec.readinessProbe` with optional initial delay, timeout, period, failure
threshold, and success threshold settings, preserved during reconciliation.
- Full mutual TLS (client-to-Pod and Pod-to-Pod) support when `caTrust.clientCaSecretRef` is
configured with cert-manager, including client certificate/key volume projections, automatic
`client auth` usage on managed default certificates, mTLS-aware container probes, and operator
admin/STS client certificate authentication.
- Optional `rustfs-tenant` Helm chart for a Tenant and separate API/Console Ingress
or HTTPRoute resources, with backend TLS policies, native YAML/Kustomize examples,
and networking lifecycle documentation. Existing CRDs and controller behavior are unchanged.
Expand All @@ -43,41 +68,14 @@ All notable changes to RustFS Operator are documented in this file. The format i
- Tenant `spec.hostUsers` and OpenShift `hostUsers: false` defaults for `restricted-v3`.
- Tenant bucket canned anonymous access and ConfigMap-sourced bucket policies.
- Declarative Tenant bucket lifecycle rules with drift-aware ownership and explicit removal.
- Bucket lifecycle `transition` and `noncurrentVersionTransition` actions that move objects to a
remote tier registered in RustFS.
- Tenant `spec.tiers` for declarative S3, RustFS, and MinIO remote tiers with Secret-sourced
credentials, rotation on Secret updates, and conflict reporting for immutable tier settings.
- Declarative Tenant bucket versioning and Object Lock default retention with drift-aware ownership.
- Declarative default bucket encryption (`SSE-S3` or `SSE-KMS`) with drift-aware ownership,
explicit removal, and validation of the Tenant SSE-S3 master key or KMS default key.
- Helm chart `cosiDriver.enabled` to deploy the RustFS COSI (`rustfs.objectstorage.k8s.io`)
driver alongside the upstream provisioner sidecar, with dedicated ServiceAccount/RBAC.
- Seven built-in RustFS Grafana dashboards, published by default as sidecar-discoverable
ConfigMaps with configurable labels and namespace.
- Per-pool PodDisruptionBudgets with `minAvailable` derived from the erasure layout RustFS
reports, so node drains keep `STANDARD` write quorum, including while drives are offline;
opt out with `spec.disablePodDisruptionBudget`. Enabled by default: before upgrading, set the
opt-out on Tenants whose budgets you manage yourself, or remove your own budgets that select
pool Pods, because Kubernetes rejects evictions of Pods selected by more than one budget.

### Changed

- The default Tenant readiness probe timeout is five seconds, increased from the
previous effective one-second default. Upgrades update existing StatefulSet Pod
templates. Tenants without `spec.serviceAccountName` use enforced `RollingUpdate`
with partition zero for default ServiceAccount token protection; Tenants with
a custom ServiceAccount retain their existing update strategy and partition.
Apply the updated Tenant CRD explicitly before upgrading the Operator or
configuring readiness fields; Helm does not upgrade installed CRDs.

### Fixed

- Check an existing Tenant bucket with HeadBucket before CreateBucket, so a bucket under
continuous writes no longer stays Pending on RustFS lock-timeout 503 responses.
- Update source release metadata to `0.0.8` so source Helm installs select the
`0.0.8` Operator and Console images, and verify release tags and chart images in CI.
- Use `docker.io/rustfs/operator` as the default Helm image repository for the Operator,
Console, and COSI driver, while preserving repository overrides through Helm values.
- Reject multi-pool Tenants containing a single-node single-disk pool before applying pool workloads, matching RustFS startup constraints.
- Reject additional volume mounts that overlap operator-managed data, logging, TLS, or OIDC paths.

Expand All @@ -88,8 +86,6 @@ All notable changes to RustFS Operator are documented in this file. The format i

### Changed

- Documented the public Operator Helm repository, versioned installation, and an
Argo CD Application using the published chart.
- Updated the default RustFS server image from `rustfs/rustfs:1.0.0-beta.10` to
`rustfs/rustfs:1.0.0`.
- Documented that distinct-physical-disk erasure failures and a separate data-plane operator are
Expand Down Expand Up @@ -191,5 +187,8 @@ is unaffected.
- Pin Operator and RustFS images independently, then verify Tenant readiness and S3 read/write data
before and after any rollback.

[Unreleased]: https://github.com/rustfs/operator/compare/0.0.6...HEAD
[Unreleased]: https://github.com/rustfs/operator/compare/0.0.9...HEAD
[0.0.9]: https://github.com/rustfs/operator/compare/0.0.8...0.0.9
[0.0.8]: https://github.com/rustfs/operator/compare/0.0.7...0.0.8
[0.0.7]: https://github.com/rustfs/operator/compare/0.0.6...0.0.7
[0.0.6]: https://github.com/rustfs/operator/compare/0.0.5...0.0.6
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "operator"
version = "0.0.8"
version = "0.0.9"
edition = "2024"
repository = "https://github.com/rustfs/operator"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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 ServiceAccounts, Services, and StatefulSets so RustFS runs inside your cluster, from single-node single-disk development tenants to erasure-coded distributed clusters.

**Status:** v0.0.8 — under active development.
**Status:** v0.0.9 — under active development.

## Features

Expand Down
4 changes: 2 additions & 2 deletions deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ helm repo add rustfs-operator https://operator.rustfs.com
helm repo update
helm search repo rustfs-operator/rustfs-operator --versions
helm install rustfs-operator rustfs-operator/rustfs-operator \
--version 0.0.8 \
--version 0.0.9 \
--namespace rustfs-system \
--create-namespace
```

The example selects published chart version `0.0.8`. Select another available
The example pins chart version `0.0.9`. Select another available
version with `--version`. For GitOps deployments, see the
[Argo CD Application example](rustfs-operator/README.md#argo-cd).

Expand Down
4 changes: 2 additions & 2 deletions deploy/rustfs-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: rustfs-operator
description: Kubernetes operator for managing RustFS storage clusters
type: application
version: 0.0.8
appVersion: "0.0.8"
version: 0.0.9
appVersion: "0.0.9"
home: https://rustfs.com
sources:
- https://github.com/rustfs/operator
Expand Down
29 changes: 20 additions & 9 deletions deploy/rustfs-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ Install the published chart with an explicit version:

```bash
helm install rustfs-operator rustfs-operator/rustfs-operator \
--version 0.0.8 \
--version 0.0.9 \
--namespace rustfs-system \
--create-namespace
```

The examples use published chart version `0.0.8`. Select another version from
The examples pin chart version `0.0.9`. Select another version from
`helm search repo --versions` when installing or upgrading. Inspect that version's
configuration with `helm show values rustfs-operator/rustfs-operator --version 0.0.8`.
configuration with `helm show values rustfs-operator/rustfs-operator --version 0.0.9`.

The chart publishes the seven bundled RustFS Grafana dashboards as ConfigMaps by
default. It does not install Grafana or Prometheus. A Grafana dashboard sidecar
Expand All @@ -58,7 +58,7 @@ spec:
source:
repoURL: https://operator.rustfs.com
chart: rustfs-operator
targetRevision: "0.0.8"
targetRevision: "0.0.9"
destination:
server: https://kubernetes.default.svc
namespace: rustfs-system
Expand Down Expand Up @@ -571,7 +571,9 @@ kubectl apply -f examples/simple-tenant.yaml

## Upgrading

To upgrade the operator:
From a checkout of the target release, apply the CRDs before upgrading the Operator.
Helm leaves installed CRDs in place. The dedicated field manager takes ownership
of the chart-managed CRD fields, including CRDs originally created by Helm.

```bash
kubectl apply --server-side --force-conflicts \
Expand All @@ -580,14 +582,23 @@ kubectl apply --server-side --force-conflicts \
kubectl apply --server-side --force-conflicts \
--field-manager=rustfs-operator-crd-upgrade \
-f deploy/rustfs-operator/crds/policybinding-crd.yaml
```

When upgrading from 0.0.8, set `spec.disablePodDisruptionBudget: true` on any
Tenant whose Pool budgets you manage yourself. If the Operator will manage
the budgets, remove any existing budgets that select the same Pool Pods.
Complete this step before starting the new Operator.

Then upgrade the chart using your installation's values:

```bash
helm upgrade rustfs-operator deploy/rustfs-operator/ \
--namespace rustfs-system
```

Helm does not upgrade existing CRDs from a chart's `crds/` directory. Apply the
cluster-scoped CRDs first so the API server accepts fields introduced by the
new Operator version. The dedicated field manager deliberately takes ownership
of the chart-managed CRD fields, including CRDs originally created by Helm.
The default readiness timeout increases from one to five seconds in 0.0.9.
See the [release notes](../../CHANGELOG.md#upgrading-from-008) for StatefulSet
rollout behavior.

When adopting OpenShift mode on an existing installation, apply the CRDs first,
then upgrade the chart with `openshift.enabled=true`, and wait for the Operator
Expand Down
2 changes: 1 addition & 1 deletion deploy/rustfs-tenant/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ apiVersion: v2
name: rustfs-tenant
description: A RustFS Tenant with optional S3 and Console ingress resources
type: application
version: 0.0.8
version: 0.0.9
home: https://rustfs.com
sources:
- https://github.com/rustfs/operator
Expand Down
6 changes: 3 additions & 3 deletions docs/operator-user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -848,9 +848,9 @@ The Operator only changes and deletes budgets that the Tenant owns. If a PodDisr

Upgrading an Operator release without PodDisruptionBudget support:

1. Upgrade the chart, so the CRD gains `disablePodDisruptionBudget` and the ClusterRole gains `policy/poddisruptionbudgets` permissions.
2. To keep managing budgets yourself, set `spec.disablePodDisruptionBudget: true` on those Tenants before the new Operator image starts.
3. Otherwise remove your own PodDisruptionBudgets that select pool Pods. Kubernetes rejects the eviction of a Pod that more than one budget selects, so a drain cannot evict any Pod of the pool while both exist.
1. Apply the [CRDs from the target release](../deploy/rustfs-operator/README.md#upgrading) so the API server accepts `spec.disablePodDisruptionBudget`.
2. To keep managing budgets yourself, set `spec.disablePodDisruptionBudget: true` on those Tenants. To use Operator-managed budgets, remove your own PodDisruptionBudgets that select the same pool Pods. Kubernetes rejects evictions when more than one budget selects a Pod.
3. Upgrade the chart to grant the ClusterRole its `policy/poddisruptionbudgets` permissions and start the new Operator.

### 7.5 TLS

Expand Down
2 changes: 1 addition & 1 deletion e2e/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions scripts/check-release-metadata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,10 @@ grep -Fq '.Values.console.image.tag | default .Values.operator.image.tag | defau
echo "release metadata check failed: Console image does not default to Chart.appVersion" >&2
exit 1
}
grep -Fq -- '--app-version "${{ steps.version.outputs.chart_version }}"' .github/workflows/helm-package.yml || {
if ! grep -Fq 'CHART_VERSION: ${{ steps.version.outputs.chart_version }}' .github/workflows/helm-package.yml ||
! grep -Fq -- '--app-version "$CHART_VERSION"' .github/workflows/helm-package.yml; then
echo "release metadata check failed: Helm packaging does not set appVersion from the release tag" >&2
exit 1
}
fi

echo "release metadata is consistent: operator=$cargo_version rust=$toolchain_version"
10 changes: 3 additions & 7 deletions src/reconcile/pool_lifecycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -695,15 +695,11 @@ fn should_start_decommission(
));
}

if matches!(existing_state, Some(PoolLifecycleState::Decommissioning))
let same_request = matches!(existing_state, Some(PoolLifecycleState::Decommissioning))
&& existing
.and_then(|status| status.request_id.as_deref())
.is_some_and(|request_id| request_id == request.request_id)
{
return Ok(false);
}

Ok(true)
.is_some_and(|request_id| request_id == request.request_id);
Ok(!same_request)
}

fn decommission_started_after_request(
Expand Down