Commit Graph
12 Commits
Author SHA1 Message Date
Joshua Hoblitt 197b6ef843 Merge pull request #17857 from jhoblitt/convert-smoke-object-to-sharedstore
test: build the smoke object store with the shared store fixture
2026-07-13 13:09:31 -07:00
Joshua Hoblitt 3c0be0d67a test: build the smoke object store with the shared store fixture
Generalize the object suite's sharedstore.Create to accept the target
namespace, store name, and RGW instance count instead of the hardcoded
object-ns / sharedstore / single instance, then use it to stand up the
SmokeSuite object store.

TestObjectStorage_SmokeTest previously created its store with
runObjectE2ETestLite, which applies a CephObjectStore manifest and polls
for health on fixed intervals. It now builds the store through the
typed-client, watch-based sharedstore fixture and tears it down with
Destroy. lite-store is the only object store in the smoke namespace, so
the fixture safely owns the cluster-global .rgw.root realm pool that
Destroy deletes.

The object suite's own call is updated to pass its namespace,
"sharedstore", and one instance, preserving its existing behavior.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-07-10 14:39:29 -07:00
Joshua Hoblitt 8dfc5d408d test: add an OBC update helper to util/obc
Add obc.Update, a get/mutate/update helper for live ObjectBucketClaims,
generalized from the notification suite's label updater, which becomes a
thin wrapper over it. The bucket quota conversion needs the same shape for
additionalConfig updates.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-07-06 10:35:37 -07:00
Joshua Hoblitt 2f82880de7 test: consolidate the OBC test helpers into util/obc
Introduce util/obc as the home for ObjectBucketClaim test helpers: the
provisioner StorageClass constructor (moved out of util/fixture, where it
was a misplaced pure constructor), the create/bound and delete/absent
lifecycle waiters, and a per-OBC S3 client. The lifecycle waiters and S3
client are promoted from the notification suite, which built them inline as
their only consumer.

Retarget the StorageClass callers (topic/kafka, bucket/owner) and rework
the notification suite onto the shared helpers.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-07-01 16:26:46 -07:00
Joshua Hoblitt b7725553d0 test: add a generic S3 agent builder to the object test client
Add client.NewS3Agent, which builds an rgw S3 agent for an object store
from a set of credentials and the store's endpoint. The object tests build
S3 clients from several credential sources (the store's dashboard admin
user, an OBC's provisioned secret); this factors out the endpoint and agent
construction they share.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-07-01 14:42:39 -07:00
Joshua Hoblitt eb404e6677 test: rework the shared-store user/bucket/topic suites
The object store user (caps/keys/opmask), bucket-owner, and bucket topic
tests already shared a CephObjectStore but polled with count-based
utils.Retry behind a wide entry signature. Move them onto the wait4 toolkit
and a slim (t, k8sh, store) signature: each is an ordered t.Run script using
typed clients and watch-based waits, with per-package check helpers for
repeated verification. Extend the shared store fixture to provision the
realm/zonegroup/zone pools and serve TLS, build its rgw admin and SNS clients
through the consolidated util/client package (replacing the separate
admin/sns/s3 packages), and run every package in both the TLS and non-TLS
passes (now separate parallel jobs).

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-06-29 11:10:52 -07:00
Joshua Hoblitt b59101d8e8 test: add the object suite test util toolkit
Add the shared helpers the object test packages build on:
- wait4: watch-based Assert/Require waiters (Create/Delete/Condition/Absent)
  that block on Kubernetes watch events rather than fixed-interval polling,
  plus Eventually for non-k8s state (rgw admin/S3/SNS), a pod-log waiter, and
  the readiness predicates used with them.
- secrets: verification of the Secret references CRDs publish in status.
- fixture: create-with-t.Cleanup helpers for pure-cleanup resources, and
  constructors for ObjectBucketClaim test resources.
- client: rgw admin and SNS client builders, S3 credentials/endpoint, and the
  store's TLS cert plus a verification-skipping HTTP client.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-06-29 11:10:52 -07:00
Joshua Hoblitt 0139637e34 test: add integration tests for CephObjectStoreUser capabilities
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-04-02 09:44:28 -07:00
Joshua Hoblitt 92f6d3fb67 test: factor out shared object store creation from ns'd object suite tests
This factors out the creation of a single CephObjectStore instance to be
shared between the individually namespaced object suite packages.

This reduces the object suite runtime by the cost of starting up and
tearing down an object store three times.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-03-27 14:42:51 -07:00
Joshua Hoblitt 36f1a3308f test: factor out util/admin package for setup of ceph admin client
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2025-08-01 14:44:58 -07:00
Carlos Barria c044ca9e77 core: fix golangci-lint check ST1008
Signed-off-by: Carlos Barria <cbarria@yahoo.com>
2025-05-22 15:39:30 -04:00
Joshua Hoblitt 7887f03c5c object: add CephBucketTopic .spec.endpoint.kafka.{user,password}SecretRef
userSecretRef and passwordSecretRef fields are added to allow the Kafka
endpoint username and password to be supplied from a Kubernetes Secret,
rather than exposed as plaintext as part of the endpoint URI. If the
endpoint URI has HTTP basic auth user-id and user-pass components, they
are overridden by userSecretRef and passwordSecretRef.

Squid added bucket topic attributes for configuring the user-name and
password for pushing notifications to Kafka as an alternative to
encoding credentials into the URI. However, these attributes are not
supported under Reef. Thus, this initial implementation relies on URI
mangling for compatible with both Reef and Squid. Future work could
using Ceph version detection and switch to the new attributes to be used
with Squid and/or the implementation could be converted exclusively to
use the new attributes once Rook has dropped support for Reef.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2025-04-16 10:53:11 -07:00