Commit Graph
3379 Commits
Author SHA1 Message Date
Blaine Gardner 6a4c87dc92 Merge pull request #14616 from BlaineEXE/rgw-allow-extra-volumes
rgw: allow users to add custom volume mounts
2024-08-28 16:47:23 -06:00
Blaine Gardner eea43b7b79 rgw: allow users to add custom volume mounts
Allow RGW users to mount arbitrary volumes to RGW pods. This follows the
pattern that was established for NFS to support SSSD and LDAP, and
reuses much of the same code.

This opens the door wider for advanced users to take advantage of some
Ceph RGW features that Rook doesn't have first class support for.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-08-27 16:16:53 -06:00
Travis Nielsen 5218e1d70e Merge pull request #14630 from chanyoung/fix_osx_make_test
tests: fix unit test failure on macOS due to temp directory path
2024-08-23 07:15:49 -06:00
Benoît Knecht 1c45677f5e core: fix Ceph monitor deployment in separate zones
Previously, Rook would fail to create monitors for a `CephCluster` spec that
required them to be located in distinct failure domains:

```yaml
spec:
  mon:
    count: 3
    failureDomainLabel: topology.kubernetes.io/zone
    zones:
    - eu-central-1a
    - eu-central-1b
    - eu-central-1c
```

This was due to the fact that Rook was mistakenly getting the
`failureDomainLabel` from `spec.mon.stretchCluster.failureDomainLabel`.

This commit ensures `spec.mon.failureDomainLabel` is being used instead, which
fixes the cluster deployment for the spec above.

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
2024-08-23 09:06:55 +02:00
chanyoung d77f6e5e3d tests: fix unit test failure on macOS due to temp directory path
Use os.TempDir() instead of '/tmp'. This is for the peermap tests.

Signed-off-by: chanyoung <park910113@gmail.com>
2024-08-23 09:38:32 +09:00
Blaine Gardner afdfffac67 Merge pull request #14435 from parth-gr/osd-resize
osd: reweight osd while resizing
2024-08-20 12:14:22 -06:00
Justin Cichra 74a79b24b3 core: add configuration option for metrics bindAddress
Alerting on controller-runtime's workqueue_depth can be useful for
debugging controllers. Also having a prometheus target for a pod gives
another data point that the system is working as expected. It is useful
for uptime alerts.

Make the bind address configurable via the configmap while still retaining the default
behavior that it is disabled.

Resolves: #14538

Signed-off-by: Justin Cichra <jcichra@cloudflare.com>
2024-08-20 13:38:38 -04:00
Travis Nielsen 128dcddfcf Merge pull request #14599 from subhamkrai/update-csi-operator-version
csi: update csi-operator to use latest tag v0.1
2024-08-20 11:26:44 -06:00
parth-gr 17cfda5bd6 osd: reweight osd while resizing
osd got resized by cryptsetup bluestore cmd
but it should also be reweight to balance the pgs properly

closes: https://github.com/rook/rook/issues/14430

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-08-20 22:52:33 +05:30
Praveen M a1ddf4535d csi: update csi sidecars' image version
Below csi sidecars are updated with latest available versions

csi-resizer: v1.11.1
csi-provisioner: v5.0.1
csi-attacher: v4.6.1
csi-snapshotter: v8.0.1
csi-node-driver-registrar: v2.11.1

Signed-off-by: Praveen M <m.praveen@ibm.com>
2024-08-20 22:08:19 +05:30
subhamkrai 2556e14780 build: changes forced by latest controller-runtime
this commit contains changes that are forced by latest
controller-runtime version v0.19.0.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-08-20 21:21:42 +05:30
subhamkrai 89e9077e72 csi: update csi-operator to use latest tag v0.1
updating csi-operator version in go.mod and csi-operator.yaml
to use latest release v0.1. And also fixing one small bug
where csi-driver log level was set in csi-operator log level.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-08-20 11:23:07 +05:30
ShravaniVangur 9656d1963a csi: storageclass update to gp2-csi
Updating storageClassName for cluster-on-pvc.yaml file from gp2 to gp2-csi.

Signed-off-by: ShravaniVangur <shravanivangur@gmail.com>
2024-08-20 00:08:50 +05:30
Blaine Gardner 679ccc762d Merge pull request #14576 from travisn/version-detect-annotation
core: Add annotations and labels to detect version jobs
2024-08-16 10:03:41 -06:00
Madhu Rajanna 7c7e8a2b32 csi: update cephcsi to 3.12.0
updating cephcsi image to 3.12.0
release.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-08-16 10:47:44 +02:00
Madhu Rajanna 123025f22c csi: update csi-addons to v0.9.0
As we have new csi-addons v0.9.0
updating the same here as well.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-08-16 07:57:16 +02:00
Travis Nielsen 5014d5bcf2 core: add annotations and labels to detect version jobs
The jobs to detect the ceph and csi versions now can have
custom annotationso and labels added to them. They are
very short-lived jobs, but they may need custom annotations
in some environments to run.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-08-15 16:48:28 -06:00
Blaine Gardner 5f98d2ea3e Merge pull request #13807 from jklippel/feature/swift-and-keystone
rgw: implement support for authentication using keystone for s3 and swift
2024-08-08 09:55:34 -06: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
subhamkrai f40cb392c9 csi: add unit test for csi-op resources
adding unit test for csi-op resources and also
fixing small pointer issue with this commit.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-08-08 15:43:16 +05:30
subhamkrai 64cce51f03 csi: add annotation to existing CSI driver
adding annotation to existing CSI driver resource so that
csi-operator can take ownership of existing CSI driver resources.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-08-08 15:43:16 +05:30
subhamkrai 1ad20d07e7 csi: add csi-operator operator config cr
Signed-off-by: subhamkrai <srai@redhat.com>
2024-08-08 11:21:49 +05:30
subhamkrai 667e044013 csi: add new CSI-operator config CR
adding changes to create CSI-operator config CR based on
every radosnamesapce and subvolumegroup.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-08-08 11:21:49 +05:30
subhamkrai 4b0b3a55d9 csi: add code for new CSI operator CR cephcluster
adding code changes,rbac changes required for create the new
Ceph-CSI operator CR named cephCluster in api group 'csi.ceph.io'.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-08-08 11:21:45 +05:30
Blaine Gardner b4a2285aa6 object: use advertise endpoint for admin ops
RGW can only serve a single certificate. This limitation means that the
prior behavior of using the default service for admin ops when TLS is
enabled may mean it requires additional complex certificate management
to make sure the object store uses a certificate valid for Rook internal
admin ops and user connections.

This is needlessly complex for users. Instead, change Rook's behavior
and documentation to clarify that it will use the same endpoint intended
for S3 client applications. This means that users have a more
straightforward path to enabling both Rook and consuming applications.

More info: https://github.com/rook/rook/issues/14530

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-08-05 14:32:59 -06:00
Travis Nielsen 9c98467f3c Merge pull request #14517 from iPraveenParihar/csi/explicitly-set-topology-flag
csi: explicitly set Topology feature-gate
2024-08-01 10:45:16 -06:00
Blaine Gardner b76631ace9 Merge pull request #14467 from BlaineEXE/object-advertise-endpoint
object: add hosting.advertiseEndpoint config
2024-07-31 16:17:24 -06:00
Praveen M e30e5e881f csi: explicitly set Topology feature-gate
issue:
external-provisioner (v5) enabled topology feature-gate by default
and the current implementation in Rook uses a conditional block to
enable the topology feature gate. This approach now does not directly
reflect the state of the `CSI_ENABLE_TOPOLOGY`.

fix:
replacing the conditional block with a direct use of the
`CSI_ENABLE_TOPOLOGY` for flag value.

Signed-off-by: Praveen M <m.praveen@ibm.com>
2024-07-31 20:37:20 +05:30
Travis Nielsen 2fb1e7af2c Merge pull request #14491 from travisn/ceph-18.2.4
manifest: Update the ceph recommended version to v18.2.4
2024-07-24 13:31:17 -06:00
Travis Nielsen 6ce616bf96 mgr: properly detect if dashboard cert already exists
If the dashboard cert already exists when ssl is enabled,
we need to not restart the dashboard module. The module
should only be restarted when there is a change to the
dashboard configuration. When ssl is enabled, the dashboard
is essentially being restarted every time there is a reconcile
which is causing issues with the mgr getting blocklisted
unnecessarily by ceph during failover.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-07-24 12:22:38 -06:00
Travis Nielsen e26920a483 manifest: update the ceph recommended version to v18.2.4
Since Reef v18.2.4 is released, set it to the default
ceph version that is deployed with Rook.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-07-24 11:06:09 -06:00
Artem Torubarov 3f2d0eb1f8 mgr: lookup cluster crd on active mgr watch
Signed-off-by: Artem Torubarov <artem.torubarov@clyso.com>
2024-07-24 12:09:19 +02:00
Blaine Gardner a2b0b6449c object: add hosting.advertiseEndpoint config
Add CephObjectStore spec.hosting.advertiseEndpoint configuration. This
provides a clear documented default for which endpoint Rook "advertises"
to dependent resources like CephObjectStores, OBCs, and COSI
Buckets/Accesses and allows users to override the default behavior if
desired.

The current default is to round-robin an endpoint from
spec.hosting.dnsNames, which has proven to be troublesome for some
users' object store configurations. This change provides much-needed
disambiguation for users.

This may be a breaking change for some existing spec.hosting.dnsNames
users. This is unexpected but is documented.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-07-22 14:43:51 -06:00
yingshanghuangqiao 3d672a726a core: fix some comments
Signed-off-by: yingshanghuangqiao <yingshanghuangqiao@foxmail.com>
2024-07-22 22:09:52 +08:00
Travis Nielsen 88e952a3ac osd: update the device class if desired state changes
Normally the device class of an OSD is determined at provisioning
and is not updated thereafter. In some scenarios the admin may
want to force update the device class to a new value. The device
classes can be updated by first setting allowDeviceClassUpdate
in the storage spec of the cephcluster, then updating the
device class specified on the deviceSets or other OSDs.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-07-17 13:54:21 -06:00
Travis Nielsen 3ccdb53cb6 Merge pull request #14258 from subhamkrai/add-cephfs-fencing
mds: block of active mds ip only
2024-07-17 11:48:01 -06:00
subhamkrai 9f1b64be54 mds: block of active mds ip only
currently, it was blocking both the mds ip
instead its should block ip of of mds which is in
the same node which is down.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-07-17 13:30:35 +05:30
Madhu Rajanna cb87c3a845 csi: fix template render in logRotation
the templateParam need to be updated
with the right values before we are
rendering the template.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-07-17 08:15:30 +02:00
subhamkrai efe6ef4e45 csi: revert remove cephFs networkFence code temporarily
This reverts commit bd4250f56e.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-07-17 11:36:15 +05:30
Travis Nielsen 9967b161f9 Merge pull request #14420 from YiteGu/make-kube-api-limit-configurable
csi: make kube apiserver qps configurable
2024-07-16 07:40:56 -06:00
yite.gu 80541a23c9 csi: make kube apiserver qps configurable
This commit adds the flexibility to configure kube apiserver qps
as per the user requirement and also keeps the existing values as
the default one.

Signed-off-by: yite.gu <yitegu0@gmail.com>
2024-07-16 18:39:16 +08:00
Travis Nielsen 22d4139b74 core: add support for ceph squid
With the release of the first squid RC, we add squid
to the supported versions and add tests to run
Rook against the squid release.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-07-15 10:04:32 -06:00
Travis Nielsen 689b39de4f Merge pull request #14057 from travisn/deviceclass-log
pool: Return error if device class update fails
2024-07-12 08:50:35 -06:00
parth-gr 4ca8b12e12 csi: add log rotation for csi cephfs nfs pod containers
Use the same logrotate flow of rbd, as merged in #14305

1) Make the csi cephfs and nfs container logs persisted in a file

2) Use the cephcluster api specs to configure the log rotate

3) Add log rotation to rotate the log file and
Add a sidecar log collector container

And some fixes on the implementation:

1) Add a operator namespace in the log file path

2) Only add volume to the container if logrotate is enabled

Closes: https://github.com/rook/rook/issues/12809, https://github.com/rook/rook/issues/14429

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-07-12 12:50:35 +05:30
Travis Nielsen 0bea31ef7f pool: return error if device class update fails
Updating the device class swallowed any error if updated
for the pool. The error was not even logged, so we couldn't
troubleshoot why the new crush rule was not applied.
Log the error for troubleshooting and also fail the pool
reconcile since the desired configuration was not applied.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-07-10 12:59:43 -06:00
Travis Nielsen 28addd1301 Merge pull request #14216 from thotz/update-cosi-images
object: update cosi images
2024-07-10 12:47:07 -06:00
Travis Nielsen b8bcd71929 Merge pull request #14421 from subhamkrai/update-go-mods
build: update controller runtime to v0.18.4
2024-07-08 10:10:10 -06:00
parth-gr 2ca0d1390b csi: add securityContext to csi containers
With the recent enhancements csi containers for using
logrotate, they need to run with securityContext to privileged,
on platform like openshift.
Used the ROOK_HOSTPATH_REQUIRES_PRIVILEGED flag
wich is set with operator deployment to see
if the securityCOntext is needed or not

Closes: https://github.com/rook/rook/issues/14400

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-07-08 18:47:26 +05:30
subhamkrai d429ed8be4 build: update controller runtime to v0.18.4
this commit update cntrl runtime to v0.18.4 and other related deps/

Signed-off-by: subhamkrai <srai@redhat.com>
2024-07-05 09:05:12 +05:30
Travis Nielsen 8e25300ad5 Merge pull request #14199 from Nordix/update-cephfs-clusterroles
csi: add cephfs encryption support
2024-07-01 15:27:38 -06:00