Commit Graph
483 Commits
Author SHA1 Message Date
Oded Viner 2cb714dabd object: migrate s3agent object methods to aws sdk v2
migrate PutObjectInBucket, GetObjectInBucket, and
DeleteObjectInBucket to use aws sdk v2 client.
replace v1 awserr error handling in DeleteObjectInBucket
with v2 typed errors (errors.As).
remove unused v1 awserr import.

Signed-off-by: Oded Viner <oviner@redhat.com>
2026-04-23 17:40:15 +03: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
Artem Torubarov 91086e5803 rgw: fix integration test to detect new zone pools
Signed-off-by: Artem Torubarov <artem.torubarov@sap.com>
2026-03-11 16:39:53 +01:00
Artem Torubarov 3c0bfd8572 rgw: integration test to check new pools in zone.json
Signed-off-by: Artem Torubarov <artem.torubarov@sap.com>
2026-03-09 15:11:28 +01:00
Joshua Hoblitt 3ef0c90ef8 object: add ObjectStoreUserSpec.OpMask field
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-02-10 15:10:28 -07:00
subhamkrai 20f350a71a csi: remove automated node fencing code
since node fencing is disabled in rook for sometime
and this feature is implemented in csi. So, this
commits remove obsolete code related to node loss

Signed-off-by: subhamkrai <srai@redhat.com>
2026-01-22 15:19:12 +05:30
Travis Nielsen 94e9e2ba91 ci: test rook upgrade from 1.18
The upgrade test is expected to check from the previous minor
release to the current master or latest release. With the
release of 1.19 coming soon, the upgrade test will now
check from v1.18.x.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-12-15 11:44:38 -07:00
subhamkrai 304cdc8c83 core: remove support for reef v18 in Rook v1.19
For Rook v1.19,removing support for Ceph Reef. It is at end of life.
Users on Reef can continue to use Rook v1.18.x or older.
The latest two Ceph versions Squid and Tentacle are supported.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-12-04 13:11:35 +05:30
Travis Nielsen 83047a17d1 operator: fix concurrency issues in the cluster controller
Use a sync map for the clusterMap in the cluster controller
and fix other issues to allow for concurrent cluster
reconcile.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-11-17 11:46:33 -07:00
Joshua Hoblitt 61cbe4fc23 object: fix user quotas being overwritten when obc bucketOwner is set
Resolves https://github.com/rook/rook/issues/16417

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2025-11-06 16:31:12 -07:00
subhamkrai 11fac627b0 core: add support for ceph tentacle
we are now adding tentacle to the supported versions and add the
upgrade test from squid to tentacle. Also, clean some unused code.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-09-19 12:03:45 +05:30
subhamkraiandTravis Nielsen c57a47f774 ci: run csi-operator only in canary and upgrade suite
this commit add check to only run the csi-operator in
all the canary tests and upgrade suite only, other suite
like smoke and object will still test csi-driver.

Also, adding changes to make CI happy.

Signed-off-by: subhamkrai <srai@redhat.com>
Co-Authored-by: Travis Nielsen <tnielsen@redhat.com>
Signed-off-by: subhamkrai <srai@redhat.com>
2025-08-19 11:23:14 +05:30
Travis Nielsen 86d30082ab tests: upgrade from 1.17 to master
For the integration tests, now we start upgrading from v1.17.x
to the master branch, to test that the upgrades are stable
to what will become the 1.18 release.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-08-06 15:02:50 -06:00
Travis Nielsen dc09e78ece Merge pull request #16224 from jhoblitt/maint/integration-ceph-admin-client
test: factor out util/admin package for setup of ceph admin client
2025-08-06 10:51:34 -06: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
Joshua Hoblitt 1163133aec object: simplify CephObjectStoreUser deletion logic
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2025-08-01 12:41:10 -07:00
Travis Nielsen db2e547779 tests: skip bucket lifecycle policy removal test
In ceph v19.2.3 bucket lifecycle policy removal appears to
be broken, so skip this test for now.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-07-29 12:40:48 -06:00
Michael AdamandTravis Nielsen fc10f61444 ci: stop using helm.sh up
use setup-helm instead.

Signed-off-by: Michael Adam <obnox@samba.org>
Co-authored-by: Travis Nielsen <tnielsen@redhat.com>
2025-06-12 19:47:24 +02:00
Artem Torubarov df3ce489d6 tests: change project name in keystone e2e test
Signed-off-by: Artem Torubarov <artem.torubarov@sap.com>
2025-06-03 10:30:04 +02:00
Carlos Barria c63ebbe0e3 core: fix golangci-lint check ST1019
This change cleans up and standardizes import statements across the Ceph operator code. It removes redundant or duplicate imports and reorganizes alias names for improved clarity and consistency. Additionally, the ST1019 exception was removed from .golangci.yaml now that the code complies with the rule.

Signed-off-by: Carlos Barria <cbarria@yahoo.com>
2025-05-27 17:38:22 -04: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
Carlos Barria 8afc4ee548 core: fix golangci-lint check QF1004
Signed-off-by: Carlos Barria <cbarria@yahoo.com>
2025-05-22 11:21:45 -04:00
Carlos Barria 61494d1baf core: fix golangci-lint check ST1005
Signed-off-by: Carlos Barria <cbarria@yahoo.com>
2025-05-19 17:52:22 -04:00
Blaine Gardner e650d4e025 Merge pull request #15779 from rook/revert-15776-more-logging-for-obc-test
Revert "ci: increase logging and time for OBC lifecycle rm test"
2025-04-29 16:19:16 -06:00
Blaine Gardner 9c8c74e24b Revert "ci: increase logging and time for OBC lifecycle rm test"
Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2025-04-29 16:11:40 -06:00
Blaine Gardner c4363ab81a Merge pull request #15804 from BlaineEXE/ci-wait-longer-for-upgrade-image-pull
ci: extend timeout for mons in upgrade test
2025-04-29 14:18:32 -06:00
Blaine Gardner 98bd03a420 ci: extend timeout for mons in upgrade test
When upgrading from one Ceph version to another, the new image to
upgrade to can take a long time to pull in some cases before the upgrade
can even begin. For example, some ceph-ci images regularly take 6+
minutes to pull, which exceeds the timeout waiting for mons to be ready.

Extend the timeout for mons to account for these cases.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2025-04-29 13:53:43 -06:00
Blaine Gardner bd12f214b4 ci: increase logging and time for OBC lifecycle rm test
Nightly CI has been failing recently having issues with removing a
bucket's lifecycle config after initially applying it. A Ceph RGW issue
is suspected, but more information is needed. Attempt a longer timeout,
to see if it is a slow async process. Also log the returned info to see
if it is helpful.

This commit is intended to be eventually reverted, but it must be
checked into master so that nightly CI runs provide the needed info.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2025-04-24 14:06:28 -06: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
Joshua Hoblitt 6b2c357871 object: add CephObjectStoreUser.spec.keys
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2025-04-03 09:09:01 -07:00
Travis Nielsen d3cb7271a7 tests: upgrade from rook 1.16 to master
The upgrade tests in master have been upgrading from 1.15 to
master. In anticipation of the v1.17 release, we change
the upgrade tests to start from v1.16 to test if there
are any regressions in the supported upgrades.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-03-27 13:06:55 -06:00
Joshua Hoblitt 3cb343f62a core: run gofumpt on all files
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2025-03-26 10:41:48 -07:00
Travis Nielsen c7e5a4c236 tests: enable csi operator for go test suites
Create the CSI operator in the go integration test suites
to test the new CSI operator scenarios. For the upgrade
test suite, enable the CSI operator after the upgrade
to verify the working cluster after it is enabled.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-03-19 21:02:05 +05:30
subhamkrai 45e76204bf ci: wait for pod before exec into pod
keystone integration test has recentally starting to fail
as pod with lable osc-admin-admin was not in running status
and we're trying to exec into the pod.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-02-20 12:25:07 +05:30
Joshua Hoblitt 9d21fe0f5c test: add obc bucketOwner integration test
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2025-02-04 12:10:20 -07:00
Joshua Hoblitt b689038ffc test: add obc bucketLifecycle integration test
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2025-01-21 16:01:37 -07:00
df511fb58f ci: update golangci-lint to the latest version (v1.62)
The ci was using a pretty old version og golangci-lint.
This updates to the latest version.

Additionally, it  silences some
gosec integer conversion overflow false positves
and fixes some real errors of this category
 and string format errors found by golangci-lint, while at it.

Co-authored-by: Blaine Gardner <b.blaine.gardner@gmail.com>
Co-authored-by: Travis Nielsen <tnielsen@redhat.com>
Signed-off-by: Michael Adam <obnox@samba.org>
2024-12-14 14:47:30 +01:00
Joshua Hoblitt 8fd34e88bb test: add obc bucketPolicy integration test
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2024-12-12 13:36:26 -07:00
Joshua Hoblitt 57b7eeec80 object: add httpClient param to object.NewS3Agent()
To allow the caller to pass in their own transport when testing.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2024-12-12 10:20:41 -07:00
Travis Nielsen 23f3db1261 ci: suppress the error from creating the dashboard admin user
The dashboard admin rgw user has timing isssues in the CI.
For now, just suppress the CI failure and log the error
until we can spend more time to get a reliable wait for the
user creation.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-12-11 09:42:59 -07:00
Blaine Gardner e6db006501 Merge pull request #15035 from BlaineEXE/object-revert-cosi-user-autocreation
Revert "object: create cosi user for each object store"
2024-12-09 16:21:58 -07:00
Travis Nielsen 506407b5ea tests: upgrade from rook 1.15 to master
The upgrade tests in master have been upgrading from 1.14 to
master. In anticipation of the v1.16 release, we change
the upgrade tests to start from v1.15 to test if there
are any regressions in the supported upgrades.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-11-22 10:40:02 -07:00
Blaine Gardner fc08e87d44 Revert "object: create cosi user for each object store"
This reverts commit a941b3c33f.

Stop creating the 'cosi' user in the CephObjectStore reconcile. This
step often fails for some amount of time during initial object store
creation, causing frequent user concern. It has also been the source of
some reported failures that would otherwise be non-breaking for certain
users.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-11-21 16:03:32 -07:00
Travis Nielsen f60f4443df test: remove obsolete object user test flag
In Rook v1.6 some new properties were added for
ceph object store users, so the CI was skipping
validation of that setting in the upgrade test.
Now we are far past the need for that flag, and we
can assume the latest flags exist for the tests.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-10-30 15:03:24 -06:00
Joshua Hoblitt f64027bf43 test: add obc bucketMaxObjects integration test
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2024-10-23 14:39:38 -07:00
Travis Nielsen b665d7a7b7 core: remove support for ceph quincy
Given that Ceph Quincy (v17) is past end of life,
remove Quincy from the supported Ceph versions,
examples, and documentation.

Supported versions now include only Reef and Squid.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-10-03 11:12:55 -06:00
Travis Nielsen 8b60c52f31 build: generate the local build tag with docker io
The docker.io image prefix is expected to be prepended
to the image names in the test images. This was missed
in 14550 related to some CI tests, which was now causing
the CI failures in the 1.15 branch where the search and
replace was missing the new docker.io prefix.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 3045076db8)
2024-08-21 10:21:31 -06:00
Zuhair AlSader 6714b86d3b manifest: add registry name to docker images
Signed-off-by: Zuhair AlSader <zuhair@devzero.io>
2024-08-20 13:35:08 -04:00
ee8bcad49d rgw: add support for keystone auth + swift/s3
For the specification see:
<https://github.com/rook/rook/blob/master/design/ceph/object/swift-and-keystone-integration.md>

* extend the API object specs for swift and keystone integration

* adapt rgw to the new go-ceph version

  - The parameter lists of the API call have changes, as parameters
    ignored by the RGW Admin Ops API are no longer serialized, therefore
    the mock has to be adapted.

  - There is now validation for the user keys that are passed to the
    User get API, therefore things failed when we had empty keys in our
    User proxy object.

* expand the reconcile loop for the swift and keystone integration

* fix minor mistakes in design document

* add env var to pass extra args to minikube

  Minikube decides CPU cores and memory automatically based on the
  available resources on the machine which may be insufficient to
  run rook. This commit adds an environment variable to add arbitrary
  arguments to the minikube command, so both can be specified if
  desired.

* integration tests for swift and keystone

  The new integration of swift or s3 and keystone support by rook
  does not have any integration tests yet.

  This commit introduces integration tests for swift and keystone. The
  tests are done against a minimal keystone setup (keystone container
  image from Yaook-project (https://yaook.cloud), sqlite as database
  backend, cert-manager and trust-manager for test certificate setup).

  To prevent hardcoded credentials, passwords are generated
  by the tests. The integration tests use the openstack client
  (keystone- and swift-functionality) (https://docs.openstack.org/
  python-openstackclient/ latest/). This was a concious design decision
  to use client tooling as close as possible to the end user instead of
  using other go-libraries (such as gophercloud).

* add documentation on swift and keystone

  Currently there is no documentation on the use of Swift to access
  an object store as well as the use of OpenStack keystone for
  authentication.

  This commit adds documentation on the use of Swift and OpenStack
  keystone, as well as CRD-related documentation and an example setup.

* add integration tests for S3 via keystone

  This commit introduces integration tests for s3 and keystone. The
  tests are run against the same minimal keystone setup that the tests
  for swift and keystone use.

  The integration tests use the aws s3 client to use client tooling as
  close as possible to the end user instead of using other go-libraries.

Co-authored-by: Jan Klippel <jan.klippel@uhurutec.com>
Co-authored-by: Silvio Ankermann <silvio.ankermann@cloudandheat.com>
Signed-off-by: Sebastian Riese <sebastian.riese@cloudandheat.com>
Signed-off-by: Jan Klippel <jan.klippel@uhurutec.com>
Signed-off-by: Silvio Ankermann <silvio.ankermann@cloudandheat.com>
2024-08-08 14:26:21 +02:00