Skip to content

test(e2e): replace MinIO with RustFS in the object storage test harness - #10865

Merged
mnencia merged 12 commits into
mainfrom
dev/remove-minio
Jun 17, 2026
Merged

mnencia merged 12 commits into
mainfrom
dev/remove-minio

Conversation

@armru

@armru armru commented Jun 10, 2026 •

Copy link
Copy Markdown
Member

The MinIO and mc images used by the e2e suite are pinned to the last Apache-2.0 releases and no longer receive updates. This PR replaces the whole stack: the in-cluster object storage server becomes RustFS, and the client pod used to inspect the store becomes the AWS CLI.

The server keeps the existing TLS setup, with the certificates generated by the test suite projected under the names RustFS expects. Since the RustFS image runs as a non-root user, the pod sets an fsGroup so the data volume and the certificates stay accessible. The query helpers keep their signatures: listing and counting enumerate every bucket through the S3 API and filter the results with a regular expression derived from the previous glob semantics, tags are read with get-object-tagging, and the forged-WAL helper uses a server-side copy. A failure enumerating the buckets aborts the listing, so an unreachable endpoint surfaces as an error instead of an empty result, and the per-bucket listings run in parallel so the cost of a poll does not grow linearly with the number of buckets accumulated during a run. Checksum calculation is pinned to when_required because the CRC-based defaults introduced in AWS CLI 2.23 are not supported by every S3-compatible object store.

With MinIO gone, the harness is also renamed to provider-neutral terms: the minio Go packages become objectstore, the in-cluster resources move to the object-store namespace and service with matching secret names, the fixtures and their file names are renamed accordingly, the timeout keys become walsInObjectStore and objectStoreInstallation, and the spec texts stop mentioning MinIO. Note that the spec renames are a one-time discontinuity for anything tracking test names across runs, and any out-of-tree TEST_TIMEOUTS override needs the new keys. The user-facing documentation, where MinIO is presented as one of the supported object stores, is intentionally unchanged.

Verified on kind by running the backup and restore, backup tags, and parallel WAL restore specs against the new harness: barman-cloud bucket auto-creation, TLS, object tagging, and server-side copy all work against RustFS with both the old and the new client.

Closes #6572
Closes #8967

@armru armru added the no-issue label Jun 10, 2026
@armru
armru requested a review from a team June 10, 2026 17:10
@armru

armru commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

/test

@cnpg-bot cnpg-bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.25 release-1.28 labels Jun 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

@github-actions

Copy link
Copy Markdown
Contributor

@armru armru added do not backport This PR must not be backported - it will be in the next minor release and removed backport-requested ◀️ This pull request should be backported to all supported releases release-1.25 release-1.28 labels Jun 10, 2026
@cnpg-bot cnpg-bot added the ok to merge 👌 This PR can be merged label Jun 10, 2026
@armru armru removed the no-issue label Jun 11, 2026
@gbartolini gbartolini modified the milestone: 1.30.0 Jun 15, 2026
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jun 15, 2026
@NiccoloFei

Copy link
Copy Markdown
Collaborator

/test ft=backup-restore,upgrade,postgres-major-upgrade,replication

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

armru and others added 12 commits June 17, 2026 18:23
The MinIO image used by the e2e object storage harness is pinned to
the last Apache-2.0 release and no longer receives updates. Replace
the server with RustFS, keeping the historical `minio` namespace,
service name, credentials, and CA/TLS secrets so that fixtures and
test code are unaffected. The `mc` client pod is retained, since it
speaks plain S3 against any backend.

RustFS runs as the non-root `rustfs` user (uid 10001), so the pod
sets an fsGroup to keep the data volume and the projected TLS
certificates accessible. TLS is enabled by projecting the existing
server secret as `rustfs_cert.pem`/`rustfs_key.pem` into the
directory referenced by RUSTFS_TLS_PATH.

The renovate configuration tracks the new image with a dedicated
custom manager, and the kind/k3d helper scripts now preload the
RustFS image instead of the MinIO one.

Signed-off-by: Armando Ruocco <[email protected]>
The mc image is pinned to the last Apache-2.0 release and no longer
receives updates. Query the object store through an aws-cli pod
instead: listing and counting now enumerate every bucket through the
S3 API and filter the `bucket/key` paths with a regular expression
derived from the previous glob, tags are read with
`get-object-tagging`, and cleanup uses `aws s3 rm --recursive`.

Helper signatures are unchanged. Since there is no mc alias anymore,
the paths passed to CleanFiles and ForgeArchiveWalOnMinio drop the
leading `minio/` segment, and listings are returned without it.

Request and response checksum calculation is set to `when_required`
because the CRC-based defaults introduced in AWS CLI 2.23 are not
supported by every S3-compatible object store.

Signed-off-by: Armando Ruocco <[email protected]>
Propagate bucket enumeration failures instead of reporting an empty
listing when the object store is unreachable, and run the per-bucket
listings in parallel, eight at a time, so the cost of a poll no longer
grows linearly with the number of buckets in the store.

Preload the AWS CLI image alongside the other helper images, pin the
image versioning to semver in the renovate configuration, and drop the
unused AWS_PAGER variable: the CLI never pages without a TTY.

Signed-off-by: Armando Ruocco <[email protected]>
The e2e object storage harness no longer runs MinIO, so retire the
name everywhere it survived the migration. The `tests/utils/minio`
and `tests/internal/asserts/minio` packages become `objectstore`,
along with their callers, helpers, and the shared suite environment.
The in-cluster resources move to the `object-store` namespace and
service with matching CA/TLS secret names, the credentials become
exported constants, and the timeout keys turn into
`walsInObjectStore` and `objectStoreInstallation`.

Fixtures, fixture file names, and the cluster and bucket names they
define are renamed accordingly, and the spec texts stop mentioning
MinIO. The user-facing documentation, where MinIO is presented as one
of the supported object stores, is intentionally unchanged.

Signed-off-by: Armando Ruocco <[email protected]>
The defaultClient/sslClient now returns an appsv1.Deployment (with replicas=1) wrapping the same pod template, with a matching label selector (run: s3-client).
Deploy now creates the Deployment and waits via deployments.WaitForReady.
Added ClientPodRef() returning deployment/s3-client to always point to the live pod.

The s3-client used to be a bare Pod, meaning that after a Node drain it wouldn't get recreated.
This wasn't an evident issue in our E2E suite given that nothing post drain E2Es currently requires
the object store.

Signed-off-by: Niccolò Fei <[email protected]>
@mnencia
mnencia force-pushed the dev/remove-minio branch from 0f360f1 to de224ed Compare June 17, 2026 16:23
@mnencia mnencia added backport-requested ◀️ This pull request should be backported to all supported releases release-1.28 release-1.29 and removed do not backport This PR must not be backported - it will be in the next minor release labels Jun 17, 2026
@mnencia
mnencia merged commit e7419df into main Jun 17, 2026
43 of 45 checks passed
@mnencia
mnencia deleted the dev/remove-minio branch June 17, 2026 16:45
cnpg-bot pushed a commit that referenced this pull request Jun 17, 2026
…ss (#10865)

The MinIO and mc images used by the e2e suite are pinned to the last
Apache-2.0 releases and no longer receive updates. This PR replaces the
whole stack: the in-cluster object storage server becomes RustFS, and
the client pod used to inspect the store becomes the AWS CLI.

The server keeps the existing TLS setup, with the certificates generated
by the test suite projected under the names RustFS expects. Since the
RustFS image runs as a non-root user, the pod sets an fsGroup so the
data volume and the certificates stay accessible. The query helpers keep
their signatures: listing and counting enumerate every bucket through
the S3 API and filter the results with a regular expression derived from
the previous glob semantics, tags are read with get-object-tagging, and
the forged-WAL helper uses a server-side copy. A failure enumerating the
buckets aborts the listing, so an unreachable endpoint surfaces as an
error instead of an empty result, and the per-bucket listings run in
parallel so the cost of a poll does not grow linearly with the number of
buckets accumulated during a run. Checksum calculation is pinned to
when_required because the CRC-based defaults introduced in AWS CLI 2.23
are not supported by every S3-compatible object store.

With MinIO gone, the harness is also renamed to provider-neutral terms:
the minio Go packages become objectstore, the in-cluster resources move
to the object-store namespace and service with matching secret names,
the fixtures and their file names are renamed accordingly, the timeout
keys become walsInObjectStore and objectStoreInstallation, and the spec
texts stop mentioning MinIO. Note that the spec renames are a one-time
discontinuity for anything tracking test names across runs, and any
out-of-tree TEST_TIMEOUTS override needs the new keys. The user-facing
documentation, where MinIO is presented as one of the supported object
stores, is intentionally unchanged.

Verified on kind by running the backup and restore, backup tags, and
parallel WAL restore specs against the new harness: barman-cloud bucket
auto-creation, TLS, object tagging, and server-side copy all work
against RustFS with both the old and the new client.

Closes #6572
Closes #8967

Signed-off-by: Armando Ruocco <[email protected]>
Signed-off-by: Niccolò Fei <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
Co-authored-by: Niccolò Fei <[email protected]>
Co-authored-by: Marco Nenciarini <[email protected]>
(cherry picked from commit e7419df)
mnencia added a commit that referenced this pull request Jun 17, 2026
…ss (#10865)

The MinIO and mc images used by the e2e suite are pinned to the last
Apache-2.0 releases and no longer receive updates. This PR replaces the
whole stack: the in-cluster object storage server becomes RustFS, and
the client pod used to inspect the store becomes the AWS CLI.

The server keeps the existing TLS setup, with the certificates generated
by the test suite projected under the names RustFS expects. Since the
RustFS image runs as a non-root user, the pod sets an fsGroup so the
data volume and the certificates stay accessible. The query helpers keep
their signatures: listing and counting enumerate every bucket through
the S3 API and filter the results with a regular expression derived from
the previous glob semantics, tags are read with get-object-tagging, and
the forged-WAL helper uses a server-side copy. A failure enumerating the
buckets aborts the listing, so an unreachable endpoint surfaces as an
error instead of an empty result, and the per-bucket listings run in
parallel so the cost of a poll does not grow linearly with the number of
buckets accumulated during a run. Checksum calculation is pinned to
when_required because the CRC-based defaults introduced in AWS CLI 2.23
are not supported by every S3-compatible object store.

With MinIO gone, the harness is also renamed to provider-neutral terms:
the minio Go packages become objectstore, the in-cluster resources move
to the object-store namespace and service with matching secret names,
the fixtures and their file names are renamed accordingly, the timeout
keys become walsInObjectStore and objectStoreInstallation, and the spec
texts stop mentioning MinIO. Note that the spec renames are a one-time
discontinuity for anything tracking test names across runs, and any
out-of-tree TEST_TIMEOUTS override needs the new keys. The user-facing
documentation, where MinIO is presented as one of the supported object
stores, is intentionally unchanged.

Verified on kind by running the backup and restore, backup tags, and
parallel WAL restore specs against the new harness: barman-cloud bucket
auto-creation, TLS, object tagging, and server-side copy all work
against RustFS with both the old and the new client.

Closes #6572
Closes #8967

Signed-off-by: Armando Ruocco <[email protected]>
Signed-off-by: Niccolò Fei <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
Co-authored-by: Niccolò Fei <[email protected]>
Co-authored-by: Marco Nenciarini <[email protected]>
(cherry picked from commit e7419df)
armru added a commit that referenced this pull request Jun 19, 2026
…CC (#10949)

The RustFS test object store introduced in #10865 hardcoded a pod
`fsGroup` of 10001. OpenShift's restricted SCC assigns the pod an
arbitrary UID and rejects an out-of-range `fsGroup`, so no pod was ever
admitted, the e2e `SynchronizedBeforeSuite` hung waiting for the object
store to become ready, and every OpenShift job ran to the 180-minute
timeout with no specs executed. This only surfaces under a restricted
SCC, which the community kind-based CI does not exercise.

Drop the fixed `fsGroup` so the SCC can assign a compliant UID. On
OpenShift the SCC then makes the volumes group-writable through the
assigned `fsGroup`. On kind and the cloud providers, where the PVC is
root-owned and no `fsGroup` is applied, an init container creates the
working subdirectories and makes them writable, so the non-root RustFS
user can use them whatever UID it runs as. The projected TLS certificate
drops its explicit `0600` mode and uses the default `0644`, so it stays
readable when no `fsGroup` is present.

This is a test-harness change only; it does not touch the operator or
any production manifest.

Validated on a live OpenShift 4.21 cluster (the pod is rejected before,
runs 1/1 with TLS ready after), against a simulated cloud CSI volume
(`root:root 0755`, where an fsGroup-only fix CrashLoops the server with
a permission-denied on the data dir), and on a plain kind cluster.

Signed-off-by: Marco Nenciarini <[email protected]>
Signed-off-by: Armando Ruocco <[email protected]>
Co-authored-by: Armando Ruocco <[email protected]>
cnpg-bot pushed a commit that referenced this pull request Jun 19, 2026
…CC (#10949)

The RustFS test object store introduced in #10865 hardcoded a pod
`fsGroup` of 10001. OpenShift's restricted SCC assigns the pod an
arbitrary UID and rejects an out-of-range `fsGroup`, so no pod was ever
admitted, the e2e `SynchronizedBeforeSuite` hung waiting for the object
store to become ready, and every OpenShift job ran to the 180-minute
timeout with no specs executed. This only surfaces under a restricted
SCC, which the community kind-based CI does not exercise.

Drop the fixed `fsGroup` so the SCC can assign a compliant UID. On
OpenShift the SCC then makes the volumes group-writable through the
assigned `fsGroup`. On kind and the cloud providers, where the PVC is
root-owned and no `fsGroup` is applied, an init container creates the
working subdirectories and makes them writable, so the non-root RustFS
user can use them whatever UID it runs as. The projected TLS certificate
drops its explicit `0600` mode and uses the default `0644`, so it stays
readable when no `fsGroup` is present.

This is a test-harness change only; it does not touch the operator or
any production manifest.

Validated on a live OpenShift 4.21 cluster (the pod is rejected before,
runs 1/1 with TLS ready after), against a simulated cloud CSI volume
(`root:root 0755`, where an fsGroup-only fix CrashLoops the server with
a permission-denied on the data dir), and on a plain kind cluster.

Signed-off-by: Marco Nenciarini <[email protected]>
Signed-off-by: Armando Ruocco <[email protected]>
Co-authored-by: Armando Ruocco <[email protected]>
(cherry picked from commit 7c92694)
cnpg-bot pushed a commit that referenced this pull request Jun 19, 2026
…CC (#10949)

The RustFS test object store introduced in #10865 hardcoded a pod
`fsGroup` of 10001. OpenShift's restricted SCC assigns the pod an
arbitrary UID and rejects an out-of-range `fsGroup`, so no pod was ever
admitted, the e2e `SynchronizedBeforeSuite` hung waiting for the object
store to become ready, and every OpenShift job ran to the 180-minute
timeout with no specs executed. This only surfaces under a restricted
SCC, which the community kind-based CI does not exercise.

Drop the fixed `fsGroup` so the SCC can assign a compliant UID. On
OpenShift the SCC then makes the volumes group-writable through the
assigned `fsGroup`. On kind and the cloud providers, where the PVC is
root-owned and no `fsGroup` is applied, an init container creates the
working subdirectories and makes them writable, so the non-root RustFS
user can use them whatever UID it runs as. The projected TLS certificate
drops its explicit `0600` mode and uses the default `0644`, so it stays
readable when no `fsGroup` is present.

This is a test-harness change only; it does not touch the operator or
any production manifest.

Validated on a live OpenShift 4.21 cluster (the pod is rejected before,
runs 1/1 with TLS ready after), against a simulated cloud CSI volume
(`root:root 0755`, where an fsGroup-only fix CrashLoops the server with
a permission-denied on the data dir), and on a plain kind cluster.

Signed-off-by: Marco Nenciarini <[email protected]>
Signed-off-by: Armando Ruocco <[email protected]>
Co-authored-by: Armando Ruocco <[email protected]>
(cherry picked from commit 7c92694)
mnencia added a commit to cloudnative-pg/plugin-barman-cloud that referenced this pull request Sep 24, 2026
)

The MinIO images are no longer maintained. Replace them with RustFS in
the e2e harness, in hack/ and in the docs, as cloudnative-pg did in
cloudnative-pg/cloudnative-pg#10865, and name
the resources in provider-neutral terms (object-store, s3).

The e2e Deployment mirrors core: an init container makes the data and
log subdirectories writable for the non-root RustFS user, no fsGroup,
glibc image, probes on /health, containers run with dropped capabilities
and non-root where possible. RustFS requires at least 3 characters for
the access key and 8 for the secret; the e2e credentials meet that.
hack/minio becomes hack/object-store, keeping the cert-manager TLS
setup, and the mc pod becomes an AWS CLI Deployment. The docs replace
the MinIO operator section with a RustFS one; versioned docs are
untouched.

Verified with task e2e-ephemeral and task e2e-external-kind (all S3
specs green, the skipped ones are the pre-existing GCS specs), and by
applying hack/object-store with cert-manager on kind: a plugin backup
completed over TLS and the cleanup script emptied the bucket.

Closes #624

Signed-off-by: Armando Ruocco <[email protected]>
Signed-off-by: Niccolò Fei <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
Co-authored-by: Niccolò Fei <[email protected]>
Co-authored-by: Marco Nenciarini <[email protected]>
Co-authored-by: Tao Li <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-requested ◀️ This pull request should be backported to all supported releases lgtm This PR has been approved by a maintainer ok to merge 👌 This PR can be merged release-1.28 size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Migrate from deprecated MinIO Docker images for S3 archive testing [Bug]: Remove the fixed usage of MinIO in the E2E tests

6 participants