Commit Graph
702 Commits
Author SHA1 Message Date
Lucas Henry c948183c0e operator: fix formatting of some logger methods
Some logging instructions use formatting syntax `%q`, but the logging method is
`Info` or `Debug` instead of `Debugf` and `Infof`. As a result, the arguments of
the method were concatenated instead of formatted properly.

Signed-off-by: Lucas Henry <polyedre@disroot.org>
2023-08-04 15:45:54 +02:00
Blaine Gardner 5979b38162 Merge pull request #12560 from polyedre/do-not-add-objectstore-endpoint-to-zone-when-sync-is-disabled
object: do not add objectstore endpoint to zone when sync is disabled
2023-07-25 15:31:42 -06:00
Jiffin Tony Thottan 1bf33f125e object: update ceph cosi driver image to v0.1.1
Update the ceph cosi driver image to v0.1.1, so that it can
work on both amd and arm platforms.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2023-07-20 14:19:15 +05:30
Lucas Henry 564afef4c7 object: do not add objectstore endpoint to zone when sync is disabled
Gateways that do not run the sync threads should not be accessible from one of
the Zone endpoint. If this is the case, the synchronization might stop working.

When the CephObjectStore has the option
`spec.gateway.disableMultisiteSyncTraffic` set to `true`, we must ensure that
the objectstore endpoint is not present in the Zone endpoint.

Signed-off-by: Lucas Henry <polyedre@disroot.org>
2023-07-20 08:34:41 +02:00
travisn 4c98669148 cosi: handle deletion of the cosi driver
The controller was attempting to delete the cosi driver
again and again, always failing the reconcile when the
driver did not exist. Since the desired state is for the
driver not to exist when disabled, return a successful
reconcile.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-07-18 14:53:22 -06:00
travisn 990cb40043 cosi: change the default deployment strategy to never
While experimental, the cosi driver should not be enabled by
default.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-07-18 14:35:54 -06:00
Travis Nielsen 2e7f9045ab Merge pull request #12460 from pgoron/admin-caps-spelling
object: align spelling of user admin capabilities with ceph
2023-07-18 13:23:15 -06:00
Travis Nielsen 91fea5395e Merge pull request #12415 from thotz/ceph-cosi-driver
object: adding ceph cosi driver
2023-07-18 12:12:12 -06:00
Jiffin Tony Thottan b48dc8a335 object: intial cosi driver controller design
Adding CephCOSIDriver CRD and controller. The controller will bring up
the ceph cosi driver when first object store is created in the rook
operator namespace. Then admin can defined COSI CRDs like BucketClass
and BucketAccessClass for different object stores deployed via Rook.
Using the BucketClass and BucketAccessClass, user can define
BucketAccess for backend bucket in the RGW. The CephCOSIDriver CRD
defines configuration options for ceph cosi driver. In the first version
its usability is minimal. Even if it is not defined Rook will bring up
the ceph cosi driver with default values.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2023-07-18 22:49:41 +05:30
Lucas Henry 393d09347e rgw: add option to disable synchronization traffic
Some users want to deploy two CephObjectStores for a single Zone. The first
configures RGWs to process the synchronization of the data, while the second
CephObjectStore configures the client RGWs.

Currently, this can be implemented by setting the RGW option
'rgw_run_sync_thread' in the 'rook-config-override' ConfigMap, though it is not
really user friendly.

Ref: https://docs.ceph.com/en/latest/radosgw/config-ref/#confval-rgw_run_sync_thread

This commit adds a new option in the CephObjectStore CRD as defined in issue
https://github.com/rook/rook/issues/12272. The new option
'disableMultisiteSyncTraffic' determine whether the operator should disable the
multisite sync threads for the RGWs.

If the option is set to 'false', or if the option is not specified, the operator
does nothing. This ensures that the multisite sync threads will not be enabled
for users that disabled explicitely the multisite sync threads either manually
or with the 'rook-config-override' ConfigMap.

This commit also recommends to use two objectstore when scaling Ceph Objectstore
Multisite replication, with one objectstore configured with disabled replication
traffic.

Signed-off-by: Lucas Henry <polyedre@disroot.org>
2023-07-17 09:27:20 +02:00
Peter Goron 40eed236cf object: align spelling of user admin capabilities with ceph
users & buckets admin capabilities aren't spelled the same
way between rook crd (singular) and ceph (plural). It's a bit
misleading when comparing ceph admin cap and rook users.

Signed-off-by: Peter Goron <peter.goron@gmail.com>
2023-07-01 19:05:26 +02:00
travisn 4ff18dadf4 object: remove obsolete bucket health checker removal
The bucket health checker was removed in 1.10. Now in 1.12
we no longer need this removal of the bucket health
checker since it will no longer exist to remove.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-06-28 16:07:51 -06:00
travisn 557a3e06cc core: api updates for controller runtime v0.15
For the controller runtime v0.15 there are some breaking
changes to the api that need to be updated.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-06-22 10:33:28 -06:00
Travis Nielsen d7dcf58f7c Merge pull request #12406 from polyedre/confusing-message
Fix confusing successful message when reconciling CephObjectStoreUser
2023-06-20 13:12:55 -06:00
Lucas Henry 87bc3dfcdc operator: remove confusing successful message when reconciling CephObjectStoreUser
When creating a CephObjectStoreUser with a value spec.store that refers to an
unexisting CephObjectStore, after the reconciliation loop the
CephObjectStoreUser is in the ReconcileFailed state. However, a
ReconcileSucceeded event is created with this message:

"successfully configured CephObjectStoreUser"

The success message results of the return value for the error which is currently
`nil`. Let's replace it with the error message.

Signed-off-by: Lucas Henry <polyedre@disroot.org>
2023-06-20 11:02:04 +02:00
Jiffin Tony Thottan 6ea24cb11b object: add ssl ref in cephobjectstore user secret
There is no reference for ssl in cephobjectstore Secret, so users won't
have much idea why tls secret need to used. Hence give reference
object stores tls secret ref in the Secret.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2023-06-09 12:42:35 +05:30
Travis Nielsen 6417ed4047 Merge pull request #12256 from thotz/add-missing-caps-object-user
object: add missing caps for object store user
2023-05-30 16:37:18 -06:00
Jiffin Tony Thottan 1f45cfa581 object: use networkspec from clusterinfo spec while running radosgw-admin
The radosgw-admin command uses the network spec from ceph cluster spec
in object context but it is not filled properly in the object package.
But with PR 10898, network spec is available in clusterinfo which can
be used directly. Also removed cluserspec from object context.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2023-05-30 11:06:03 +05:30
Jiffin Tony Thottan ad0c000e6a object: add missing caps for object store user
Lot of new caps added to rgw users, reflecting same changes on the
object store user CRD.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2023-05-26 17:36:00 +05:30
sp98 e87338fbc4 core: skip OBC and Notification controllers
Skip running Object Bucket and Object bucket notification
controllers based on env variable.

Signed-off-by: sp98 <sapillai@redhat.com>
2023-04-24 19:16:06 +05:30
travisn 609ac91cb1 core: update default image to ceph v17.2.6
With the release of ceph v17.2.6, the examples and the base
image for the operator are updated to pick up the latest
and greatest.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-04-11 14:07:11 -06:00
Jiffin Tony Thottan 01a3dd0baf object: check obc provisioner for bucket notification
obc-label-controller needs to check only obc provisioned by Rook operator.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2023-03-31 14:56:18 +05:30
Travis Nielsen e3fa098c1d Merge pull request #11908 from thenamehasbeentake/enableRGWDashboard_by_custom
rgw: enableRGWDashboard can be configured by custom
2023-03-17 08:18:52 -06:00
parth-gr 8e317ee074 ci: update golangci-lint version as it fails for some k8s version in 1.10
Closes: https://github.com/rook/rook/issues/11896

Signed-off-by: parth-gr <paarora@redhat.com>
2023-03-16 20:59:22 +05:30
root 253d4123f6 rgw: allow the rgw dashboard to be disabled
The rgw dashboard can be disabled by the setting in the
CephObjectStore `gateway.dashboardEnabled` if set to false.

Signed-off-by: xiaobaowen <xiaobaowen@deeproute.ai>
2023-03-16 22:58:32 +08:00
Blaine Gardner 29ad3282a0 Merge pull request #11665 from BlaineEXE/object-make-obc-gen-user-name-work-for-multisite
object: make OBC genUserID unique across clusters
2023-03-01 15:29:09 -07:00
parth-gr 96ea7817f8 external: add realm support for external cluster
if a cluster won't use the deafult realm and try to
execute the python script it will fail to vaildate rgw
as the rgw-admin-user would be created on default realm
So creating user in specific realm if the realm name is passed

Signed-off-by: parth-gr <paarora@redhat.com>
2023-03-01 20:55:48 +05:30
parth-grandBlaine Gardner 69ae9569cd build: update k8s version to 1.26.1
Update the Kubernetes API version used to 1.26.1, and start testing
against Kubernetes version 1.26.1 in CI.

Co-authored-by: parth-gr <paarora@redhat.com>
Co-authored-by: Blaine Gardner <blaine.gardner@redhat.com>

Signed-off-by: parth-gr <paarora@redhat.com>
Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2023-02-23 20:18:47 -07:00
Liang Zheng c81aa7f856 object: update os user caps
Removing user caps will be skipped as the UserCaps is empty, which will cause updating user caps to not take effect.

Signed-off-by: Liang Zheng <zhengliang0901@gmail.com>
2023-02-21 17:06:41 +08:00
parth-gr a84daf9bf0 core: change io/ioutil package to use io and os package
few functions got change as they were deprecated
for ex: ioutil.Readfile change to os.Readfile
ioutil.TempFile change to os.CreateTemp
And fixed golang-ci-lint-issues

Signed-off-by: parth-gr <paarora@redhat.com>
2023-02-17 20:38:29 +05:30
Travis Nielsen ace2e152e8 Merge pull request #11673 from travisn/rgw-pool-pgs
object: RGW metadata pg count reduction on 16.2.11
2023-02-15 12:20:23 -07:00
Travis Nielsen 3dabc6dcb6 Merge pull request #11317 from avanthakkar/introduce-ceph-exporter
core: introduce ceph-exporter
2023-02-15 11:59:05 -07:00
Blaine Gardner 2733375ca4 object: make OBC genUserID unique across clusters
Rook's implementation of OBC's GenerateUserID could generate colliding
user IDs for multisite clusters where each site is configured with the
same namespace/name of CephObjectStore. Add the Ceph cluster FSID to the
generated name to ensure the names won't conflict for multiple sites.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2023-02-15 09:08:52 -07:00
Avan Thakkar 460900756c core: add service monitor for ceph-exporter service
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
2023-02-15 15:44:56 +05:30
Travis Nielsen 107d947f97 object: rgw metadata pg count reduction on latest pacific
The removal of the rgw_rados_pool_pg_num_min property
was completed in v16.2.11 for Pacific. The previous
fix in PR 11024 only assumed the fix was in Quincy v17.2.2
or newer. Now we account for v16.2.11 as well.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2023-02-14 16:25:31 -07:00
Liang Zheng c0c4c30334 rgw: handle insecure flag skip for object bucket notification in the tls config
Signed-off-by: Liang Zheng <zhengliang0901@gmail.com>
2023-02-07 17:35:55 +08:00
Avan Thakkar 2f8ee60374 core: introduce ceph-exporter
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
2023-02-06 02:47:09 -05:00
Jiffin Tony Thottan c4984208e8 test: update kv version for rgw-kms tests
The test is getting time out while checking backend version for kv
engines in RGW KMS unit tests.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2023-01-16 19:14:37 +05:30
Blaine Gardner 17c5cf7384 object: update startup, liveness, readiness probes
Based on the latest info from the Ceph RGW team, update all probes. Get
rid of the liveness probe entirely. Update startup and readiness probes
to support return codes for misconfiguration (500) and for server-side
throttling (498 or 503).

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2022-12-20 15:23:22 -07:00
Jiffin Tony Thottan 5f1b443662 rgw: remove rgw_rados_pool_pg_num_min for metadata pool creation
rgw_rados_pool_pg_num_min is deprecated and no longer valid in qunicy
with https://github.com/ceph/ceph/pull/46234, remove that option from
cephobject-controller as well

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2022-12-06 15:35:24 +05:30
Blaine Gardner a777b1d7d1 object: do not create service for external object stores
External CephObjectStores already have endpoints defined by
spec.gateway.externalRgwEndpoints, and if the external store is
configured with TLS (HTTPS), the store's certificates will likely not
accept connections intended for the Service endpoint Rook creates. Some
users might not be able to easily add the service endpoint to their
certificates. Therefore, don't even bother creating a Service for
external clusters.

This does introduce a few issues. The Service seems to have been
initially created to allow multiple external RGW endpoints to be
addressable via a single address in Rook. For all connections to an
external CephObjectStore with multiple endpoints, simply choose an
endpoint at random. Random selection will prevent Rook from failing to
create buckets or users on an external store if one of the external
store's endpoints fails.

The latest OBC library (lib-bucket-provisioner) allows updating the
endpoints on ObjectBuckets after they are created. This allows Rook
users to change endpoints on external CephObjectStores without breaking
all existing OBCs. It requires implementation of the new GetUserID()
library call, requires updating Provision() and Grant() calls to be
idempotent, and it requires removing the Update() call.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2022-11-04 17:30:30 -06:00
Travis Nielsen 0d3d12c0fd Merge pull request #11198 from subhamkrai/latest-ceph-version
core: upgrade ceph to latest release v17.2.5
2022-10-26 09:51:47 -06:00
subhamkrai 270b565f18 core: upgrade ceph to latest release v17.2.5
Signed-off-by: subhamkrai <srai@redhat.com>
2022-10-26 19:59:53 +05:30
Blaine Gardner 0937eaee38 Merge pull request #11124 from BlaineEXE/object-revise-health-check
object: remove health checker
2022-10-24 11:31:23 -06:00
Blaine Gardner 5320830781 object: fix logic for rgw period commit detection
The `periodWillChange()` implementation to detect map keys to ignore.
Previously, we relied on the `GoString()` method to output the same
format always to determine the current path to the
map[string]interface{} node, but that may change depending on the underlying
implementation of go-cmp.

Instead, parse the go-cmp `Path` step by step and construct a JSON path
to the node in a stable format.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2022-10-19 14:56:56 -06:00
Blaine Gardner a7c0c7ee93 object: remove health checker
Remove the health checker for CephObjectStore. The liveness and
readiness probes go through the same code paths in RGW as creating
buckets without as much affect on the storage backend.

Full discussion: https://github.com/rook/rook/issues/11031

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2022-10-18 13:41:46 -06:00
Blaine Gardner 61279e9820 Merge pull request #11018 from thotz/obc-tls-insecurity-flag-skip
rgw: handle insecure flag skip for obc in the tls config
2022-09-30 10:36:42 -06:00
Travis Nielsen 0779618816 Merge pull request #10966 from avanthakkar/customizable-image-pull-policy
operator: make imagePullPolicy customizable for csi driver and ceph pods
2022-09-28 07:23:26 -06:00
Avan Thakkar 934aa91056 operator: make imagePullPolicy customizable for csi driver and ceph pods
Introduce a new env variable ROOK_CSI_IMAGE_PULL_POLICY in rook operator configmap which should be used to
customize the imagePullPolicy for the csi driver and imagePullPolicy property in cephVersionSpec for ceph pods.

Signed-off-by: Avan Thakkar <athakkar@redhat.com>
2022-09-27 11:57:43 +05:30
parth-gr 26584fc6e5 core: update loadclusterInfo with multus check
if Multus is enabled the clusterinfo should be updated with
network as multus as to run the ceph cmds in remote
executor

Signed-off-by: parth-gr <paarora@redhat.com>
2022-09-22 14:46:51 +05:30